WebKit-https.git
5 years agoRemove alignment code from IPC coders
antti@apple.com [Fri, 21 Nov 2014 17:40:50 +0000 (17:40 +0000)]
Remove alignment code from IPC coders
https://bugs.webkit.org/show_bug.cgi?id=138963

Reviewed by Anders Carlsson.

Alignment code achieves nothing except making the messages somewhat bigger.

* Platform/IPC/ArgumentCoders.cpp:
(IPC::ArgumentCoder<CString>::encode):
(IPC::ArgumentCoder<CString>::decode):
(IPC::ArgumentCoder<String>::encode):
(IPC::decodeStringText):
* Platform/IPC/ArgumentCoders.h:
(IPC::SimpleArgumentCoder::encode):
(IPC::SimpleArgumentCoder::decode):
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::initialize):
(IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
(IPC::ArgumentDecoder::decodeFixedLengthData):
(IPC::ArgumentDecoder::decodeVariableLengthByteArray):
(IPC::ArgumentDecoder::decodeNumber):
(IPC::ArgumentDecoder::decode):
(IPC::roundUpToAlignment): Deleted.
(IPC::alignedBufferIsLargeEnoughToContain): Deleted.
(IPC::ArgumentDecoder::alignBufferPosition): Deleted.
(IPC::decodeValueFromBuffer): Deleted.
* Platform/IPC/ArgumentDecoder.h:
(IPC::ArgumentDecoder::isInvalid):
(IPC::ArgumentDecoder::markInvalid):
(IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::ArgumentEncoder):
(IPC::ArgumentEncoder::grow):
(IPC::ArgumentEncoder::encodeFixedLengthData):
(IPC::ArgumentEncoder::encodeVariableLengthByteArray):
(IPC::ArgumentEncoder::encode):
* Platform/IPC/ArgumentEncoder.h:
(IPC::ArgumentEncoder::buffer):
(IPC::ArgumentEncoder::mutableBuffer):
* Platform/IPC/DataReference.cpp:
(IPC::SharedBufferDataReference::encode):
* Platform/IPC/MessageEncoder.cpp:
(IPC::MessageEncoder::setIsSyncMessage):
(IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendOutgoingMessage):

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

5 years agoAttempt to fix the internal Apple Mavericks build after <https://trac.webkit.org...
dbates@webkit.org [Fri, 21 Nov 2014 17:05:19 +0000 (17:05 +0000)]
Attempt to fix the internal Apple Mavericks build after <https://trac.webkit.org/changeset/176448>
(https://bugs.webkit.org/show_bug.cgi?id=138930)

Declare NSCachedURLResponse SPI when building without the Apple Internal SDK and with the Apple
Internal SDK when building for OS X Mavericks or earlier.

* platform/spi/cf/CFNetworkSPI.h:

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

5 years agoMake memoryCache() return a reference
andersca@apple.com [Fri, 21 Nov 2014 17:04:42 +0000 (17:04 +0000)]
Make memoryCache() return a reference
https://bugs.webkit.org/show_bug.cgi?id=138939

Reviewed by Antti Koivisto.

Source/WebCore:

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResource):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::replayXHR):
(WebCore::InspectorResourceAgent::setCacheDisabled):
(WebCore::InspectorResourceAgent::mainFrameNavigated):
* loader/DocumentLoader.cpp:
(WebCore::areAllLoadersPageCacheAcceptable):
(WebCore::DocumentLoader::finishedLoading):
(WebCore::DocumentLoader::responseReceived):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
(WebCore::SubresourceLoader::didFail):
(WebCore::SubresourceLoader::willCancel):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::addIncrementalDataBuffer):
(WebCore::CachedImage::finishLoading):
* loader/cache/CachedResource.cpp:
(WebCore::deadDecodedDataDeletionIntervalForResourceType):
(WebCore::CachedResource::~CachedResource):
(WebCore::CachedResource::failBeforeStarting):
(WebCore::CachedResource::addClientToSet):
(WebCore::CachedResource::removeClient):
(WebCore::CachedResource::destroyDecodedDataIfNeeded):
(WebCore::CachedResource::setDecodedSize):
(WebCore::CachedResource::setEncodedSize):
(WebCore::CachedResource::didAccessDecodedData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
(WebCore::CachedResourceLoader::loadResource):
(WebCore::CachedResourceLoader::clearPreloads):
(WebCore::CachedResourceLoader::printPreloadStats):
* loader/cache/MemoryCache.cpp:
(WebCore::memoryCache):
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):
* page/FrameView.cpp:
(WebCore::FrameView::willPaintContents):
(WebCore::FrameView::didPaintContents):
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseCriticalMemory):
* testing/Internals.cpp:
(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache statistics]):
(+[WebCache emptyInMemoryResources]):
(+[WebCache sizeOfDeadResources:]):
(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):
(+[WebCache imageForURL:]):
(+[WebCache setDisabled:]):
(+[WebCache isDisabled]):
* WebView/WebView.mm:
(+[WebView _setCacheModel:]):

Source/WebKit/win:

* WebCache.cpp:
(WebCache::statistics):
(WebCache::empty):
(WebCache::setDisabled):
(WebCache::disabled):
* WebView.cpp:
(WebView::setCacheModel):

Source/WebKit2:

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:
(WebKit::WebResourceCacheManager::getCacheOrigins):
(WebKit::WebResourceCacheManager::clearCacheForOrigin):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::clearResourceCaches):
(WebKit::getWebCoreMemoryCacheStatistics):
(WebKit::WebProcess::setMemoryCacheDisabled):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel):

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

5 years agoRemove http lock code from webkitperl
ossy@webkit.org [Fri, 21 Nov 2014 16:44:26 +0000 (16:44 +0000)]
Remove http lock code from webkitperl
https://bugs.webkit.org/show_bug.cgi?id=138959

Reviewed by Alexey Proskuryakov.

* Scripts/webkitperl/httpd.pm:
(cleanUp):
(extractLockNumber): Deleted.
(getLockFiles): Deleted.
(getNextAvailableLockNumber): Deleted.
(getLockNumberForCurrentRunning): Deleted.
(waitForHTTPDLock): Deleted.
(scheduleHttpTesting): Deleted.
(getWaitTime): Deleted.

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

5 years ago[iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, Quart...
dbates@webkit.org [Fri, 21 Nov 2014 16:40:55 +0000 (16:40 +0000)]
[iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
https://bugs.webkit.org/show_bug.cgi?id=138930

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Rename header MPAVRoutingControllerSPI.h to MediaPlayerSPI.h.
* loader/cocoa/SubresourceLoaderCocoa.mm: Move NSCachedURLResponse forward declarations to file
CFNetworkSPI.h and include header CFNetworkSPI.h.
* loader/mac/ResourceLoaderMac.mm: Ditto.
* platform/audio/ios/MediaSessionManagerIOS.mm: Substitute MediaPlayerSPI.h for MPAVRoutingControllerSPI.h.
* platform/spi/cf/CFNetworkSPI.h: Add more SPI.
* platform/spi/cg/CoreGraphicsSPI.h: Ditto.
* platform/spi/cocoa/QuartzCoreSPI.h: Ditto.
* platform/spi/ios/MediaPlayerSPI.h: Renamed from Source/WebCore/platform/spi/ios/MPAVRoutingControllerSPI.h.

Source/WebKit2:

* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Remove forward declaration for NSCachedURLResponse
methods as this functionality was incorporated into CFNetworkSPI.h, which is included by this file.
* Platform/mac/LayerHostingContext.mm: Moved QuartzCore forward declarations from this file to file
QuartzCoreSPI.h and included header QuartzCoreSPI.h.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Include header XPCSPI.h.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Remove forward declarations of
XPC SPI since these declarations are part of XCPSPI.h, which is included by header XPCServiceEntryPoint.h.
* UIProcess/API/Cocoa/WKWebView.mm: Remove unnecessary include of header QuartzCore/CARenderServer.h
as it will be included by header QuartzCoreSPI.h.
* UIProcess/Network/NetworkProcessProxy.cpp: Include header XPCSPI.h when building for iOS with
USE(XPC_SERVICES) enabled.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Include header MediaPlayerSPI.h instead of including
MediaPlayer private headers directly. Also sort the list of #import directives.

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

5 years agoAX: MathML expressions are misread by VoiceOver
cfleizach@apple.com [Fri, 21 Nov 2014 15:55:01 +0000 (15:55 +0000)]
AX: MathML expressions are misread by VoiceOver
https://bugs.webkit.org/show_bug.cgi?id=138948

Reviewed by Mario Sanchez Prada.

Source/WebCore:

The logic for deciding what's the radicand and an index was too tied to children placement.
We should instead pull directly from the source.

Test: platform/mac/accessibility/mathml-root.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::mathRadicandObject):
(WebCore::AccessibilityRenderObject::mathRootIndexObject):
* rendering/mathml/RenderMathMLRoot.h:

LayoutTests:

* platform/mac/accessibility/mathml-root-expected.txt: Added.
* platform/mac/accessibility/mathml-root.html: Added.

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

5 years ago[JSC] Disable verifyHeap
ossy@webkit.org [Fri, 21 Nov 2014 15:26:06 +0000 (15:26 +0000)]
[JSC] Disable verifyHeap
https://bugs.webkit.org/show_bug.cgi?id=138962

Reviewed by Mark Lam.

* runtime/Options.h:

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

5 years ago[CMake] Use ld.gold if it is available to speedup builds
ossy@webkit.org [Fri, 21 Nov 2014 07:06:28 +0000 (07:06 +0000)]
[CMake] Use ld.gold if it is available to speedup builds
https://bugs.webkit.org/show_bug.cgi?id=137953

Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsCommon.cmake:

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

5 years agoBuild fix.
mitz@apple.com [Fri, 21 Nov 2014 06:59:12 +0000 (06:59 +0000)]
Build fix.

* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Cast the return value of
[getMPAudioVideoRoutingPopoverControllerClass() alloc] to resolve ambiguity about which
-initWithType: we are calling.
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Cast to resolve ambiguity.
(-[WKAirPlayRoutePicker show:fromRect:]): Cast for consistency.

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

5 years ago[EFL] The option value of fixed layout is false in MiniBrowser
commit-queue@webkit.org [Fri, 21 Nov 2014 06:26:45 +0000 (06:26 +0000)]
[EFL] The option value of fixed layout is false in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=138830

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2014-11-20
Reviewed by Gyuyoung Kim.

Changed the option value of fixed layout to EINA_TRUE in MiniBrowser.

* MiniBrowser/efl/main.c:

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

5 years agoRemove the remaining vestiges of minimal-ui
benjamin@webkit.org [Fri, 21 Nov 2014 04:49:13 +0000 (04:49 +0000)]
Remove the remaining vestiges of minimal-ui
https://bugs.webkit.org/show_bug.cgi?id=138890

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-20
Reviewed by Sam Weinig.

Source/WebCore:

In ViewportArguments' setViewportFeature(), I skip the warning for now.

* WebCore.exp.in:
* dom/ViewportArguments.cpp:
(WebCore::setViewportFeature):
* dom/ViewportArguments.h:
(WebCore::ViewportArguments::ViewportArguments):
(WebCore::ViewportArguments::operator==):
* page/ViewportConfiguration.cpp:
(WebCore::ViewportConfiguration::ViewportConfiguration):
(WebCore::ViewportConfiguration::initialScale):
(WebCore::ViewportConfiguration::minimumScale):
(WebCore::ViewportConfiguration::updateConfiguration):
(WebCore::ViewportConfiguration::viewportArgumentsLength):
(WebCore::ViewportConfiguration::layoutWidth):
(WebCore::ViewportConfiguration::layoutHeight):
(WebCore::ViewportConfigurationTextStream::operator<<):
(WebCore::ViewportConfiguration::description):
(WebCore::ViewportConfiguration::setMinimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::activeMinimumLayoutSizeInScrollViewCoordinates): Deleted.
(WebCore::ViewportConfiguration::resetMinimalUI): Deleted.
(WebCore::ViewportConfiguration::didFinishDocumentLoad): Deleted.
* page/ViewportConfiguration.h:
(WebCore::ViewportConfiguration::minimumLayoutSizeForMinimalUI): Deleted.
(WebCore::ViewportConfiguration::usesMinimalUI): Deleted.

Source/WebKit/ios:

* WebCoreSupport/WebChromeClientIOS.mm:
(dictionaryForViewportArguments):
* WebKit.iOS.exp:

Source/WebKit/mac:

* History/WebHistoryItem.mm:
* History/WebHistoryItemPrivate.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
(WebKit::WebPage::didFinishDocumentLoad): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::savePageState):
(WebKit::WebPage::restorePageState):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):

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

5 years agoWeb Inspector: do not show invalid specificity for dynamic cases of :matches()
benjamin@webkit.org [Fri, 21 Nov 2014 04:31:06 +0000 (04:31 +0000)]
Web Inspector: do not show invalid specificity for dynamic cases of :matches()
https://bugs.webkit.org/show_bug.cgi?id=138911

Reviewed by Joseph Pecoraro.

* css/CSSSelector.cpp:
(WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity):
(WebCore::functionalPseudoClassStaticSpecificity):
(WebCore::staticSpecificityInternal):
(WebCore::CSSSelector::staticSpecificity):
(WebCore::CSSSelector::specificity): Deleted.
* css/CSSSelector.h:
Add an additional computation path for the inspector.

The regular path ignores everything inside function pseudo classes.
This new path takes the static specificity of the regular path, then evaluate
recursively all the selector lists inside any level of :matches().

If two complex selector of selector list do not have the same specificity,
we bail out and refuse to compute a static specificity representing the selector.

* inspector/InspectorStyleSheet.cpp:
(WebCore::buildObjectForSelectorHelper):
(WebCore::selectorsFromSource):
(WebCore::InspectorStyleSheet::buildObjectForSelector):
Do not add the complexity to the inspector's CSSSelector structure whenever
it is dynamic.

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

5 years agoFix misc bugs and typos in app.js
rniwa@webkit.org [Fri, 21 Nov 2014 04:30:38 +0000 (04:30 +0000)]
Fix misc bugs and typos in app.js
https://bugs.webkit.org/show_bug.cgi?id=138946

Reviewed by Benjamin Poulain.

* public/v2/app.js:
(App.DashboardPaneProxyForPicker._platformOrMetricIdChanged):
(App.ChartsController.init):
(App.buildPopup): Renamed from App.BuildPopup.
(App.InteractiveChartComponent._constructGraphIfPossible): Fixed the bug that we were calling
remove() on the wrong object (an array as opposed to elements in the array).
(App.InteractiveChartComponent._highlightedItemsChanged): Check the length of _highlights as
_highlights is always an array and evalutes to true.

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

5 years agoRemove InspectorCSSAgent::buildArrayForRuleList()
benjamin@webkit.org [Fri, 21 Nov 2014 04:26:35 +0000 (04:26 +0000)]
Remove InspectorCSSAgent::buildArrayForRuleList()
https://bugs.webkit.org/show_bug.cgi?id=138907

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-20
Reviewed by Andreas Kling.

* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::buildArrayForRuleList): Deleted.
* inspector/InspectorCSSAgent.h:

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

5 years ago[iOS] Skip some tests that fail with stderr
dbates@webkit.org [Fri, 21 Nov 2014 03:47:29 +0000 (03:47 +0000)]
[iOS] Skip some tests that fail with stderr

* platform/ios-simulator/TestExpectations:

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

5 years agoREGRESSION (174986): CSS clip property is ignored when border-radius is present.
zalan@apple.com [Fri, 21 Nov 2014 03:17:44 +0000 (03:17 +0000)]
REGRESSION (174986): CSS clip property is ignored when border-radius is present.
https://bugs.webkit.org/show_bug.cgi?id=138935
rdar://problem/18965984

Reviewed by Simon Fraser.

Revert back to r163382 and fix bug 127729 properly. Save the graphics context when paint and clip rects are
the same, but the clip rect has radius.
Each iteration on ::clipRect() from r163382 onwards just introduced yet another regression.

Source/WebCore:

Test: fast/clip/css-clip-does-not-work-when-border-radius-is-present.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):

LayoutTests:

* fast/clip/css-clip-does-not-work-when-border-radius-is-present-expected.html: Added.
* fast/clip/css-clip-does-not-work-when-border-radius-is-present.html: Added.

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

5 years agoRemoved the custom allocator for PODRedBlackTree
ggaren@apple.com [Fri, 21 Nov 2014 02:27:20 +0000 (02:27 +0000)]
Removed the custom allocator for PODRedBlackTree
https://bugs.webkit.org/show_bug.cgi?id=138942

Reviewed by Sam Weinig.

bmalloc is fast enough.

* WebCore.xcodeproj/project.pbxproj:
* platform/PODArena.h: Removed.
* platform/PODFreeListArena.h: Removed. This is the point of the patch.

* platform/PODIntervalTree.h:
(WebCore::PODIntervalTree::PODIntervalTree): Deleted. As a side effect
of removing our custom allocator, we can no longer have a special
"I'm not initialized yet" state. Instead, the tree either exists or not,
like an idiomatic C++ object.

* platform/PODRedBlackTree.h:
(WebCore::PODRedBlackTree::PODRedBlackTree): Ditto.

(WebCore::PODRedBlackTree::~PODRedBlackTree): We need to clear in our
destructor because we can no longer rely on the arena destructor
implicitly freeing our tree nodes.

Side note: This change basically removes the whole reason for having
a purpose-built tree for POD data. We should probably remove this whole
data structure in a follow-up patch, and just use a standard tree.

(WebCore::PODRedBlackTree::clear):
(WebCore::PODRedBlackTree::add):
(WebCore::PODRedBlackTree::remove):
(WebCore::PODRedBlackTree::contains):
(WebCore::PODRedBlackTree::visitInorder):
(WebCore::PODRedBlackTree::size):
(WebCore::PODRedBlackTree::checkInvariants):
(WebCore::PODRedBlackTree::dump):
(WebCore::PODRedBlackTree::deleteNode):
(WebCore::PODRedBlackTree::markFree): Use normal new/delete, and mark
ourselves as fast allocated so we get the bmalloc goodness.

(WebCore::PODRedBlackTree::isInitialized): Deleted.
(WebCore::PODRedBlackTree::initIfNeeded): Deleted.

* rendering/FloatingObjects.cpp:
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
(WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
(WebCore::FloatingObjects::FloatingObjects):
(WebCore::FloatingObjects::clear):
(WebCore::FloatingObjects::addPlacedObject):
(WebCore::FloatingObjects::removePlacedObject):
(WebCore::FloatingObjects::computePlacedFloatsTree):
(WebCore::FloatingObjects::placedFloatsTree):
(WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
(WebCore::FloatingObjects::logicalLeftOffset):
(WebCore::FloatingObjects::logicalRightOffset): POD tree had a slightly
weird behavior in which it was valid to use some of its APIs without
first initializing it, but not others. It's not really possible to model
that behavior with normal C++ objects that use new/delete, so instead
I added some explicit NULL checks.

* rendering/FloatingObjects.h:
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
* rendering/RenderView.cpp:
(WebCore::RenderView::intervalArena): Deleted.
* rendering/RenderView.h: Removed custom-allocator-related cruft.

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

5 years agoPreview popover needs minimum and maximum sizes
bdakin@apple.com [Fri, 21 Nov 2014 02:10:33 +0000 (02:10 +0000)]
Preview popover needs minimum and maximum sizes
https://bugs.webkit.org/show_bug.cgi?id=138943
-and corresponding-
rdar://problem/18904651

Reviewed by Tim Horton.

Quick follow-up to get the right screen.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController largestPopoverSize]):

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

5 years agoPreview popover needs minimum and maximum sizes
bdakin@apple.com [Fri, 21 Nov 2014 01:52:41 +0000 (01:52 +0000)]
Preview popover needs minimum and maximum sizes
https://bugs.webkit.org/show_bug.cgi?id=138943
-and corresponding-
rdar://problem/18904651

Reviewed by Tim Horton.

This patch enforces minimum and maximum popover sizes. If the popover needs to be
sized up to be above the minimum, it will end up covering some of the
_hitTestResult, so we should compute a new origin rect based on the original
event location.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopover]):
(-[WKActionMenuController largestPopoverSize]):
(-[WKActionMenuController _preferredPopoverSize]):
(-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.

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

5 years agoClicks on previews can be recognized multiple times
conrad_shultz@apple.com [Fri, 21 Nov 2014 00:57:53 +0000 (00:57 +0000)]
Clicks on previews can be recognized multiple times
https://bugs.webkit.org/show_bug.cgi?id=138944

Reviewed by Tim Horton.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController _clickRecognized:]):
Only dispatch the delegate message on the appropriate gesture recognizer state transition.

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

5 years agoClients should be able to customize preview click behavior
conrad_shultz@apple.com [Fri, 21 Nov 2014 00:36:45 +0000 (00:36 +0000)]
Clients should be able to customize preview click behavior
https://bugs.webkit.org/show_bug.cgi?id=138940

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_handleClickInPreviewView:URL:.

* UIProcess/API/mac/WKView.mm:
(-[WKView _handleClickInPreviewView:URL:]):
Extracted from -[WKActionMenuController pagePreviewViewControllerWasClicked:].

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
Extract code to -[WKView _handleClickInPreviewView:URL:].

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

5 years agoAdd some comments to describe the DFG UseKind representations.
mark.lam@apple.com [Thu, 20 Nov 2014 23:39:46 +0000 (23:39 +0000)]
Add some comments to describe the DFG UseKind representations.
<https://webkit.org/b/138934>

Reviewed by Filip Pizlo.

* dfg/DFGUseKind.h:
- Also regrouped the UseKind enums by representation to be more readable.

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

5 years agoAdd Heap verification infrastructure.
mark.lam@apple.com [Thu, 20 Nov 2014 23:28:41 +0000 (23:28 +0000)]
Add Heap verification infrastructure.
<https://webkit.org/b/138851>

Reviewed by Geoffrey Garen.

The verification infrastructure code is always built in but disabled by
default.  When disabled, the cost is minimal:
1. Heap has a m_verifier field.
2. GC does a few "if (m_verifier)" checks that should fail.
3. HeapVerifier takes up code space though not used.

When enabled:
1. The HeapVerifier will keep N number of GC cycle data.
   Each GC cycle will contain a "before marking" and "after marking" live
   object list.
   The GC cycles is a circular buffer.  Only data for the last N GC cycles
   will be retained.
2. During GC, the current GC cycle's live objects lists will be populated
   before and after marking.
3. The current GC cycle's live object lists will be validated before GC,
   after marking, and after GC.

Currently, the only validation being done is to verify that object
butterflies are allocated from valid blocks in the Storage (aka Copied)
space.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::collect):
* heap/Heap.h:
* heap/HeapVerifier.cpp: Added.
(JSC::LiveObjectList::findObject):
(JSC::HeapVerifier::HeapVerifier):
(JSC::HeapVerifier::collectionTypeName):
(JSC::HeapVerifier::phaseName):
(JSC::getButterflyDetails):
(JSC::HeapVerifier::initializeGCCycle):
(JSC::GatherLiveObjFunctor::GatherLiveObjFunctor):
(JSC::GatherLiveObjFunctor::operator()):
(JSC::HeapVerifier::gatherLiveObjects):
(JSC::HeapVerifier::liveObjectListForGathering):
(JSC::trimDeadObjectsFromList):
(JSC::HeapVerifier::trimDeadObjects):
(JSC::HeapVerifier::verifyButterflyIsInStorageSpace):
(JSC::HeapVerifier::verify):
(JSC::HeapVerifier::reportObject):
(JSC::HeapVerifier::checkIfRecorded):
* heap/HeapVerifier.h: Added.
(JSC::LiveObjectData::LiveObjectData):
(JSC::LiveObjectList::LiveObjectList):
(JSC::LiveObjectList::reset):
(JSC::HeapVerifier::GCCycle::GCCycle):
(JSC::HeapVerifier::GCCycle::collectionTypeName):
(JSC::HeapVerifier::incrementCycle):
(JSC::HeapVerifier::currentCycle):
(JSC::HeapVerifier::cycleForIndex):
* runtime/Options.h:

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

5 years agoSupport unprefixed animation event types
dino@apple.com [Thu, 20 Nov 2014 23:26:29 +0000 (23:26 +0000)]
Support unprefixed animation event types
https://bugs.webkit.org/show_bug.cgi?id=138931
<rdar://problem/18943167>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: animations/unprefixed-events-mixed-with-prefixed.html
       animations/unprefixed-events.html

Support the unprefixed animation event names:
- animationstart (was webkitAnimationStart)
- animationiteration (was webkitAnimationIteration)
- animationend (was webkitAnimationEnd)

(Yes, event types are case sensitive and yes, this will
likely cause some head-scratching as people change content)

The approach here is to follow what transitions does:
- listener only for old event name -> fire old event name
- listener for both old and new event name -> fire new event name
- listener only for new event name -> fire new event name

That way pages that were trying to anticipate the new event name
won't get duplicate events.

* CMakeLists.txt: Add new AnimationEvent* stuff.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
* dom/DOMAllInOne.cpp:

* dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
(WebCore::AnimationEventInit::AnimationEventInit):
(WebCore::AnimationEvent::AnimationEvent):
(WebCore::AnimationEvent::~AnimationEvent):
(WebCore::AnimationEvent::animationName):
(WebCore::AnimationEvent::elapsedTime):
(WebCore::AnimationEvent::eventInterface):
* dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
* dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.

* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded): Handle new event types.

* dom/EventNames.h: New names.
* dom/EventNames.in:

* dom/EventTarget.cpp:
(WebCore::legacyType): Provide a mapping from the new names to the older
prefixed forms.

* html/HTMLAttributeNames.in: Support the on* attributes, even though I
hate them and wish this approach would die.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):

* page/DOMWindow.h: New names, and constructors.
* page/DOMWindow.idl:

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.

* page/animation/KeyframeAnimation.cpp: Fire the new types of events.
(WebCore::KeyframeAnimation::onAnimationStart):
(WebCore::KeyframeAnimation::onAnimationIteration):
(WebCore::KeyframeAnimation::onAnimationEnd):
(WebCore::KeyframeAnimation::sendAnimationEvent):

LayoutTests:

Add a test for unprefixed animation event names, as well
as a test that ensures we don't get multiple dispatches if
we're still listening for the old events.

And for the older tests, just add the new things from the
window namespace.

* animations/unprefixed-events-expected.txt: Added.
* animations/unprefixed-events-mixed-with-prefixed-expected.txt: Added.
* animations/unprefixed-events-mixed-with-prefixed.html: Added.
* animations/unprefixed-events.html: Added.

* fast/events/event-creation-expected.txt:
* fast/events/event-creation.html:
* js/dom/constructor-length.html:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

5 years agoNew perf dashboard should provide UI to create a new analysis task
rniwa@webkit.org [Thu, 20 Nov 2014 23:25:07 +0000 (23:25 +0000)]
New perf dashboard should provide UI to create a new analysis task
https://bugs.webkit.org/show_bug.cgi?id=138910

Reviewed by Benjamin Poulain.

This patch reverts some parts of r175006 and re-introduces bugs associated with analysis tasks.
I'll add UI to show and edit bug numbers associated with an analysis task in a follow up patch.

With this patch, we can create a new analysis task by selection a range of points and opening
"analysis pane" (renamed from "bugs pane"). Each analysis task created is represented by a yellow bar
in the chart hyperlinked to the analysis task.

* init-database.sql: Redefined the bugs to be associated with an analysis task instead of a test run.

* public/api/analysis-tasks.php: Added the support for querying analysis tasks for a specific metric
on a specific platform. Also retrieve and return all bugs associated with analysis tasks.
(main):
(fetch_and_push_bugs_to_tasks): Added. Fetches all bugs associated with an array of analysis tasks
and adds the associated bugs to each task in the array.
(format_task):

* public/api/runs.php: Reverted changes made in r175006.
(fetch_runs_for_config):
(format_run):

* public/api/test-groups.php:
(fetch_test_groups_for_task): Use the newly added Database::select_rows.

* public/include/db.php:
(Database::select_first_or_last_row):
(Database::select_rows): Extracted from select_first_or_last_row.

* public/v2/analysis.js:
(App.AnalysisTask): Added "bugs" property.
(App.Bug): Added now that bugs are regular data store objects.

* public/v2/app.js:
(App.Pane._fetch): Calls this.fetchAnalyticRanges to fetch analysis tasks as well as test runs.
(App.Pane.fetchAnalyticRanges): Added. Fetches analysis tasks for the current metric on the current
platform that are associated with a specific range of runs.
(App.PaneController.actions.toggleBugsPane): Updated per showingBugsPane to showingAnalysisPane rename.
(App.PaneController.actions.associateBug): Deleted.
(App.PaneController.actions.createAnalysisTask): Replaced the pre-condition checks with assertions as
this action should never be triggered when the pre-condition is not met. Also re-fetch analysis tasks
once we've created one.
(App.PaneController.toggleSearchPane): Updated per showingBugsPane to showingAnalysisPane rename.
(App.PaneController._detailsChanged): Ditto. Removed selectedSinglePoint since it's no longer used.
(App.PaneController._showDetails): Call _updateCanAnalyze to update the status of "Analyze" button.
(App.PaneController._updateBugs): Deleted.
(App.PaneController._updateMarkedPoints): Deleted.
(App.PaneController._updateCanAnalyze): Added. Disables the button to create an analysis task when
the name is missing or when at most one point is selected.

(App.InteractiveChartComponent._constructGraphIfPossible): Update the locations of range rects.
(App.InteractiveChartComponent._relayoutDataAndAxes): Ditto.
(App.InteractiveChartComponent._mousePointInGraph): Don't return a point unless the mouse cursor is
on our svg element to avoid locking the current item when a bar shown for an analysis task is clicked.
(App.InteractiveChartComponent._rangesChanged): Added. Creates an array of objects representing
clickable bars for analysis tasks.
(App.InteractiveChartComponent._updateRangeBarRects): Computes the inline style used by each clickable
bar for analysis tasks to place them at the right location.
(App.InteractiveChartComponent.actions.openRange): Added. Forwards the action to the parent controller.

* public/v2/chart-pane.css:
(.chart .extent): Use the same color as the vertical indicator in the highlight behind the selection.
(.chart .rangeBar): Added.

* public/v2/data.js:
(TimeSeries.prototype.nextPoint): Added. Used by _rangesChanged.

* public/v2/index.html: Renamed "bugs pane" to "analysis pane" and removed the UI to associate bugs.
This ability will be reinstated in a follow up patch. Also added a container div and spans for analysis
task bars in the interactive chart component.

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

5 years agoURTBF after r176420 to fix non Apple builds.
ossy@webkit.org [Thu, 20 Nov 2014 23:04:51 +0000 (23:04 +0000)]
URTBF after r176420 to fix non Apple builds.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):

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

5 years agoWebPlugInClient::m_webPage can never be null, use a reference
andersca@apple.com [Thu, 20 Nov 2014 22:56:22 +0000 (22:56 +0000)]
WebPlugInClient::m_webPage can never be null, use a reference
https://bugs.webkit.org/show_bug.cgi?id=138937

Reviewed by Andreas Kling.

* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::WebPlugInClient):
(WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
* WebProcess/WebProcess.h:

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

5 years ago[iOS] Update TestExpectation file for LayoutTests/canvas tests
dbates@webkit.org [Thu, 20 Nov 2014 22:33:07 +0000 (22:33 +0000)]
[iOS] Update TestExpectation file for LayoutTests/canvas tests

Also skip some LayoutTests/animation tests that are flaky or fail due to an assertion failure.

* platform/ios-simulator/TestExpectations:

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

5 years agoTextIndicator should have getters for TextIndicator::Data properties
timothy_horton@apple.com [Thu, 20 Nov 2014 22:26:10 +0000 (22:26 +0000)]
TextIndicator should have getters for TextIndicator::Data properties
https://bugs.webkit.org/show_bug.cgi?id=138920

Reviewed by Beth Dakin.

Instead of having clients reach into the data(), add getters.
Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
Remove declarations for draw/drawContentImage, which were already removed.

* Shared/TextIndicator.cpp:
(WebKit::TextIndicator::frameRect): Deleted.
* Shared/TextIndicator.h:
(WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
(WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
(WebKit::TextIndicator::contentImageScaleFactor):
(WebKit::TextIndicator::contentImageWithHighlight):
(WebKit::TextIndicator::contentImage):
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(WebKit::TextIndicatorWindow::setTextIndicator):

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

5 years agoRemove a piece of DataDetectors SPI that we aren't using anymore
timothy_horton@apple.com [Thu, 20 Nov 2014 22:23:30 +0000 (22:23 +0000)]
Remove a piece of DataDetectors SPI that we aren't using anymore
https://bugs.webkit.org/show_bug.cgi?id=138917

Reviewed by Beth Dakin.

* platform/spi/mac/DataDetectorsSPI.h:

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

5 years agoSkip flaky inspector-protocol/debugger tests.
ap@apple.com [Thu, 20 Nov 2014 22:17:22 +0000 (22:17 +0000)]
Skip flaky inspector-protocol/debugger tests.
webkit.org/b/100846, webkit.org/b/136715

* platform/mac/TestExpectations:

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

5 years agoCancel DataDetectors menu earlier if we know it can't be presented
timothy_horton@apple.com [Thu, 20 Nov 2014 22:16:55 +0000 (22:16 +0000)]
Cancel DataDetectors menu earlier if we know it can't be presented
https://bugs.webkit.org/show_bug.cgi?id=138922
<rdar://problem/18950441>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
If we end up with a menu with no items, don't change selection or anything.

(-[WKActionMenuController menuNeedsUpdate:]):
Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
and use a bigger hammer (removeAllItems).

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
and use a bigger hammer (removeAllItems).

(-[WebActionMenuController willOpenMenu:withEvent:]):
If we end up with a menu with no items, don't change selection or anything.

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

5 years agoDon't use a TextIndicator BounceAndCrossfade transition if the selection highlight...
timothy_horton@apple.com [Thu, 20 Nov 2014 22:10:58 +0000 (22:10 +0000)]
Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
https://bugs.webkit.org/show_bug.cgi?id=138919
<rdar://problem/19042207>

Reviewed by Beth Dakin.

* Shared/TextIndicator.h:
(WebKit::TextIndicator::presentationTransition):
(WebKit::TextIndicator::setPresentationTransition):
Add getter and setter pair.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
If the selection highlight will never be shown because there's only a single menu item,
use a normal bounce animation instead of bounce + crossfade.

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

5 years agohttp tests should not use shared temporary files, part 2
ap@apple.com [Thu, 20 Nov 2014 22:10:37 +0000 (22:10 +0000)]
http tests should not use shared temporary files, part 2
https://bugs.webkit.org/show_bug.cgi?id=138894

Rubber-stamped by Tim Horton.

Made more scripts that access local files use per-test files. Some tests could use
HTTP referrer, others needed explicit parameters.

* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-allow.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-block.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-empty.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-filter.html:
* http/tests/security/contentSecurityPolicy/1.1/reflected-xss-invalid.html:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt:
* http/tests/security/contentSecurityPolicy/report-uri-from-child-frame.html:
* http/tests/security/contentSecurityPolicy/resources/echo-report.php:
* http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html: Removed.
* http/tests/security/contentSecurityPolicy/resources/generate-csp-report.php: Copied from LayoutTests/http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html.
* http/tests/security/contentSecurityPolicy/resources/go-to-echo-report.php: Added.
* http/tests/security/contentSecurityPolicy/resources/reflected-xss-and-xss-protection.js:
(testMixedHeader):
* http/tests/security/contentSecurityPolicy/resources/report-file-path.php: Added.
* http/tests/security/contentSecurityPolicy/resources/save-report.php:
* http/tests/security/contentSecurityPolicy/xmlhttprequest-protected-resource-does-not-crash.html:
* http/tests/security/xssAuditor/block-does-not-leak-location-expected.txt:
* http/tests/security/xssAuditor/block-does-not-leak-location.html:
* http/tests/security/xssAuditor/block-does-not-leak-referrer.html:
* http/tests/security/xssAuditor/cookie-injection-expected.txt:
* http/tests/security/xssAuditor/cookie-injection.html:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute-2.html:
* http/tests/security/xssAuditor/embed-tag-code-attribute-expected.txt:
* http/tests/security/xssAuditor/embed-tag-code-attribute.html:
* http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-control-char.html:
* http/tests/security/xssAuditor/embed-tag-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/embed-tag-javascript-url.html:
* http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/embed-tag-null-char.html:
* http/tests/security/xssAuditor/embed-tag.html:
* http/tests/security/xssAuditor/faux-script1.html:
* http/tests/security/xssAuditor/faux-script2.html:
* http/tests/security/xssAuditor/faux-script3.html:
* http/tests/security/xssAuditor/form-action-expected.txt:
* http/tests/security/xssAuditor/form-action.html:
* http/tests/security/xssAuditor/formaction-on-button-expected.txt:
* http/tests/security/xssAuditor/formaction-on-button.html:
* http/tests/security/xssAuditor/formaction-on-input-expected.txt:
* http/tests/security/xssAuditor/formaction-on-input.html:
* http/tests/security/xssAuditor/frameset-injection-expected.txt:
* http/tests/security/xssAuditor/frameset-injection.html:
* http/tests/security/xssAuditor/full-block-get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/full-block-get-from-iframe.html:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-javascript-url.html:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit-expected.txt:
* http/tests/security/xssAuditor/full-block-iframe-no-inherit.php:
* http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
* http/tests/security/xssAuditor/full-block-link-onclick.html:
* http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-object-tag.html:
* http/tests/security/xssAuditor/full-block-post-from-iframe.html:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-cross-domain.html:
* http/tests/security/xssAuditor/full-block-script-tag-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/full-block-script-tag-with-source.html:
* http/tests/security/xssAuditor/full-block-script-tag.html:
* http/tests/security/xssAuditor/get-from-iframe-expected.txt:
* http/tests/security/xssAuditor/get-from-iframe.html:
* http/tests/security/xssAuditor/iframe-injection-allowed-2.html:
* http/tests/security/xssAuditor/iframe-injection-allowed-3.html:
* http/tests/security/xssAuditor/iframe-injection-allowed.html:
* http/tests/security/xssAuditor/iframe-injection-expected.txt:
* http/tests/security/xssAuditor/iframe-injection.html:
* http/tests/security/xssAuditor/iframe-javascript-url-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-more-encoding.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode2.html:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-twice-url-encode3.html:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded-expected.txt:
* http/tests/security/xssAuditor/iframe-javascript-url-url-encoded.html:
* http/tests/security/xssAuditor/iframe-javascript-url.html:
* http/tests/security/xssAuditor/iframe-onload-GBK-char-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-GBK-char.html:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag-expected.txt:
* http/tests/security/xssAuditor/iframe-onload-in-svg-tag.html:
* http/tests/security/xssAuditor/iframe-srcdoc-expected.txt:
* http/tests/security/xssAuditor/iframe-srcdoc.html:
* http/tests/security/xssAuditor/img-onerror-GBK-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-GBK-char.html:
* http/tests/security/xssAuditor/img-onerror-accented-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-accented-char.html:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char.html:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2-expected.txt:
* http/tests/security/xssAuditor/img-onerror-non-ASCII-char2.html:
* http/tests/security/xssAuditor/img-onerror-tricky.html:
* http/tests/security/xssAuditor/img-tag-with-comma-expected.txt:
* http/tests/security/xssAuditor/img-tag-with-comma.html:
* http/tests/security/xssAuditor/inline-event-HTML-entities-expected.txt:
* http/tests/security/xssAuditor/inline-event-HTML-entities.html:
* http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
* http/tests/security/xssAuditor/link-onclick-ampersand.html:
* http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-control-char.html:
* http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
* http/tests/security/xssAuditor/link-onclick-entities.html:
* http/tests/security/xssAuditor/link-onclick-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
* http/tests/security/xssAuditor/link-onclick-null-char.html:
* http/tests/security/xssAuditor/link-onclick.html:
* http/tests/security/xssAuditor/link-opens-new-window-expected.txt:
* http/tests/security/xssAuditor/link-opens-new-window.html:
* http/tests/security/xssAuditor/malformed-HTML-expected.txt:
* http/tests/security/xssAuditor/malformed-HTML.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-1.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-2.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-3.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-4.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-5.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-6.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-7.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-8.html:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9-expected.txt:
* http/tests/security/xssAuditor/malformed-xss-protection-header-9.html:
* http/tests/security/xssAuditor/no-protection-script-tag.html:
* http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-control-char.html:
* http/tests/security/xssAuditor/object-embed-tag-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/object-embed-tag-null-char.html:
* http/tests/security/xssAuditor/object-embed-tag.html:
* http/tests/security/xssAuditor/object-tag-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
* http/tests/security/xssAuditor/object-tag-javascript-url.html:
* http/tests/security/xssAuditor/object-tag.html:
* http/tests/security/xssAuditor/open-event-handler-iframe-expected.txt:
* http/tests/security/xssAuditor/open-event-handler-iframe.html:
* http/tests/security/xssAuditor/open-iframe-src-03-expected.txt:
* http/tests/security/xssAuditor/open-iframe-src-03.html:
* http/tests/security/xssAuditor/post-from-iframe.html:
* http/tests/security/xssAuditor/report-script-tag-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-full-block.html:
* http/tests/security/xssAuditor/report-script-tag-replace-state-expected.txt:
* http/tests/security/xssAuditor/report-script-tag-replace-state.html:
* http/tests/security/xssAuditor/report-script-tag.html:
* http/tests/security/xssAuditor/resources/echo-intertag.pl:
* http/tests/security/xssAuditor/script-tag-Big5-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char-twice-url-encode.html:
* http/tests/security/xssAuditor/script-tag-Big5-char.html:
* http/tests/security/xssAuditor/script-tag-Big5-char2-expected.txt:
* http/tests/security/xssAuditor/script-tag-Big5-char2.html:
* http/tests/security/xssAuditor/script-tag-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-control-char.html:
* http/tests/security/xssAuditor/script-tag-convoluted-expected.txt:
* http/tests/security/xssAuditor/script-tag-convoluted.html:
* http/tests/security/xssAuditor/script-tag-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-entities.html:
* http/tests/security/xssAuditor/script-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-expression-follows-expected.txt:
* http/tests/security/xssAuditor/script-tag-expression-follows.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag2.html:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3-expected.txt:
* http/tests/security/xssAuditor/script-tag-inside-svg-tag3.html:
* http/tests/security/xssAuditor/script-tag-near-start-expected.txt:
* http/tests/security/xssAuditor/script-tag-near-start.html:
* http/tests/security/xssAuditor/script-tag-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-null-char.html:
* http/tests/security/xssAuditor/script-tag-open-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-open-redirect.html:
* http/tests/security/xssAuditor/script-tag-post-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-control-char.html:
* http/tests/security/xssAuditor/script-tag-post-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-post-null-char.html:
* http/tests/security/xssAuditor/script-tag-post.html:
* http/tests/security/xssAuditor/script-tag-redirect-expected.txt:
* http/tests/security/xssAuditor/script-tag-redirect.html:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html:
* http/tests/security/xssAuditor/script-tag-with-actual-comma-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-actual-comma.html:
* http/tests/security/xssAuditor/script-tag-with-callbacks-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-callbacks.html:
* http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-01.html:
* http/tests/security/xssAuditor/script-tag-with-comma-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-comma-02.html:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-fancy-unicode.html:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-closing-tag.html:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-invalid-url-encoding.html:
* http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-control-char.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url2.html:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-data-url3.html:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-double-quote.html:
* http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-entities.html:
* http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-no-quote.html:
* http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-null-char.html:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-relative-scheme.html:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query.html:
* http/tests/security/xssAuditor/script-tag-with-source-same-host.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-01.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-02.html:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-source-unterminated-03.html:
* http/tests/security/xssAuditor/script-tag-with-source.html:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-U2028.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment2.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment3.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment4.html:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5-expected.txt:
* http/tests/security/xssAuditor/script-tag-with-trailing-comment5.html:
* http/tests/security/xssAuditor/script-tag.html:
* http/tests/security/xssAuditor/svg-animate-expected.txt:
* http/tests/security/xssAuditor/svg-animate.html:
* http/tests/security/xssAuditor/svg-script-tag-expected.txt:
* http/tests/security/xssAuditor/svg-script-tag.html:
* http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-big5.html:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
* http/tests/security/xssAuditor/xss-filter-bypass-sjis.html:
* http/tests/security/xssAuditor/xss-protection-parsing-01.html:
* http/tests/security/xssAuditor/xss-protection-parsing-02-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-02.html:
* http/tests/security/xssAuditor/xss-protection-parsing-03-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-03.html:
* http/tests/security/xssAuditor/xss-protection-parsing-04-expected.txt:
* http/tests/security/xssAuditor/xss-protection-parsing-04.html:

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

5 years agoInvalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
bdakin@apple.com [Thu, 20 Nov 2014 22:03:39 +0000 (22:03 +0000)]
Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
https://bugs.webkit.org/show_bug.cgi?id=138568
-and corresponding-
rdar://problem/18904600

Reviewed by Tim Horton.

Source/WebCore:

Add an optional parameter indicating whether or not to include images.
* WebCore.exp.in:
* editing/cocoa/HTMLConverter.h:
* editing/cocoa/HTMLConverter.mm:
(WebCore::editingAttributedStringFromRange):

Source/WebKit/mac:

Skip images for lookup.
* WebView/WebActionMenuController.mm:
(performDictionaryLookupForRange):

Source/WebKit2:

Skip images for lookup.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForRange):

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

5 years ago[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
dbates@webkit.org [Thu, 20 Nov 2014 21:50:06 +0000 (21:50 +0000)]
[iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=138928

Reviewed by Simon Fraser.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

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

5 years agoFix the !ENABLE(SVG_FONTS) build after r176276
mmaxfield@apple.com [Thu, 20 Nov 2014 21:45:54 +0000 (21:45 +0000)]
Fix the !ENABLE(SVG_FONTS) build after r176276
https://bugs.webkit.org/show_bug.cgi?id=138924

Reviewed by Csaba Osztrogon√°c.

No new tests because there is no behavior change.

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestFont):

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

5 years ago[iOS] Update expected results for LayoutTests/animations
dbates@webkit.org [Thu, 20 Nov 2014 21:43:21 +0000 (21:43 +0000)]
[iOS] Update expected results for LayoutTests/animations

* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/animations/3d/replace-filling-transform-expected.txt: Added.
* platform/ios-simulator/animations/animation-offscreen-to-onscreen-expected.txt: Added.
* platform/ios-simulator/animations/missing-values-first-keyframe-expected.txt: Added.
* platform/ios-simulator/animations/missing-values-last-keyframe-expected.txt: Added.
* platform/ios-simulator/animations/opacity-transform-animation-expected.txt: Added.
* platform/ios-simulator/animations/suspend-transform-animation-expected.txt: Added.

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

5 years agoAdd -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
andersca@apple.com [Thu, 20 Nov 2014 20:01:40 +0000 (20:01 +0000)]
Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
https://bugs.webkit.org/show_bug.cgi?id=138929
<rdar://problem/18683802>

Reviewed by Dan Bernstein.

Also, re-implement -[WKWebView loadHTMLString:baseURL:] in terms of this newly added function
and assume a UTF-8 encoding. This matches what Legacy WebKit does.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView loadData:MIMEType:textEncodingName:baseURL:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadData):
* UIProcess/WebPageProxy.h:

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

5 years agoUpdate media/track/track-in-band-cues-added-once.html to make failures easier to...
eric.carlson@apple.com [Thu, 20 Nov 2014 19:12:32 +0000 (19:12 +0000)]
Update media/track/track-in-band-cues-added-once.html to make failures easier to diagnose
https://bugs.webkit.org/show_bug.cgi?id=138908

Reviewed by Alexey Proskuryakov.

* media/track/track-in-band-cues-added-once.html: Update test to remove one potential
    source of flakeyness and to do more logging in the event of a failure to make debugging
    failures simpler.
* media/track/track-in-band-cues-added-once-expected.txt:

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

5 years ago[iOS] Temporarily skip almost all DRT tests
dbates@webkit.org [Thu, 20 Nov 2014 19:06:43 +0000 (19:06 +0000)]
[iOS] Temporarily skip almost all DRT tests

Towards updating the expected results on iOS, temporarily skip running almost
all DRT tests on iOS. We'll subsequently un-skip tests as we land updated/new
expected results for them.

* platform/ios-simulator/TestExpectations:

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

5 years agoRename String.prototype.contains to String.prototype.includes
utatane.tea@gmail.com [Thu, 20 Nov 2014 18:50:46 +0000 (18:50 +0000)]
Rename String.prototype.contains to String.prototype.includes
https://bugs.webkit.org/show_bug.cgi?id=138923

Source/JavaScriptCore:

As per the latest TC39 meeting[1, 2], String.prototype.contains is
renamed to String.prototype.includes. This is because the name
`contains` breaks the web since it conflicts with existing `contains`
implementations in major libraries.

[1]: https://github.com/mathiasbynens/String.prototype.includes
[2]: https://github.com/tc39/test262/pull/119

Reviewed by Geoffrey Garen.

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
(JSC::stringProtoFuncIncludes):
(JSC::stringProtoFuncContains): Deleted.

LayoutTests:

Reviewed by Geoffrey Garen.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/string-includes.js: Renamed from LayoutTests/js/script-tests/string-contains.js.
(stringToSearchIn.toString):
(startOffset.valueOf):
(matchString.toString):
(endOffset.valueOf):
* js/string-includes-expected.txt: Renamed from LayoutTests/js/string-contains-expected.txt.
* js/string-includes.html: Renamed from LayoutTests/js/string-contains.html.

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

5 years agoAdd a way to mute an AudioContext.
adachan@apple.com [Thu, 20 Nov 2014 18:50:12 +0000 (18:50 +0000)]
Add a way to mute an AudioContext.
https://bugs.webkit.org/show_bug.cgi?id=138104

Reviewed by Eric Carlson.

Keep a muted state in AudioDestinationNode. If m_muted is true,
zero out the audio buffers.

No new tests, since it's difficult to test whether the audio is indeed muted.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
Call pageMutedStateDidChange() so it'll initialize the destination audio node's muted state accordingly.
(WebCore::AudioContext::pageMutedStateDidChange):
Set the destination audio node's muted state to match the page's muted state.

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_muted.
(WebCore::AudioDestinationNode::render):
If m_muted is true, call AudioBus::zero() to zero out the buffers.
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::setMuted):
Set m_muted.

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

5 years agoCrash when destroying a Document that has a throttled timer still running
cdumez@apple.com [Thu, 20 Nov 2014 18:44:12 +0000 (18:44 +0000)]
Crash when destroying a Document that has a throttled timer still running
https://bugs.webkit.org/show_bug.cgi?id=138914

Reviewed by Benjamin Poulain.

Source/WebCore:

Upon destruction, a throttled DOMTimer whose interval depends on
viewport changes will try to unregister itself from the view. It gets
the view pointer from its Document. However, scriptExecutionContext()
can return null if the Document is being destroyed (i.e. ~DOMTimer()
is called from ~ScriptExecutionContext(), as the ScriptExecutionContext
owns the DOMTimer).

This patch adds a null check for scriptExecutionContext() in the
DOMTimer destructor to avoid this issue.

Test: fast/dom/throttled-timer-running-on-document-destruction.html

* page/DOMTimer.cpp:
(WebCore::DOMTimer::~DOMTimer):

(WebCore::DOMTimer::unregisterForViewportChanges):
Add assertion to make sure scriptExecutionContext() does not return
null.

(WebCore::DOMTimerFireState::setChangedStyleOfElementOutsideViewport): Deleted.
Killed this function as this was dead code.

LayoutTests:

Add a layout test to test the case where a Document gets destroyed while
throttled timer is still running.

* fast/dom/resources/frame-with-throttled-timer.html: Added.
* fast/dom/throttled-timer-running-on-document-destruction-expected.txt: Added.
* fast/dom/throttled-timer-running-on-document-destruction.html: Added.

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

5 years agoSimple line layout: Introduce text fragment continuation.
zalan@apple.com [Thu, 20 Nov 2014 18:11:07 +0000 (18:11 +0000)]
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274

Source/WebCore:

This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.

FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)

Reviewed by Antti Koivisto.

Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync rendering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

LayoutTests:

Rebaseline for simple line layout's multiple rendere support.

Reviewed by Antti Koivisto.

* fast/text/simple-lines-multiple-renderers-expected.html: Added.
* fast/text/simple-lines-multiple-renderers.html: Added.
* fast/tokenizer/script_extra_close-expected.txt: Multiple tab characters should collapse into a single whitespace. This
needs fixing in complex line layout.
* tables/mozilla/bugs/bug157890-expected.txt: no-op endofline run is added by complex inline layout
when multiple text content is injected through JS into a <pre>. This requires fixing complex line layout.

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

5 years agoRemove alignment code from cache coders
antti@apple.com [Thu, 20 Nov 2014 17:43:40 +0000 (17:43 +0000)]
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927

Failed to land this file.

* NetworkProcess/cache/NetworkCacheCoders.cpp:
(WebKit::NetworkCacheCoder<CString>::encode):
(WebKit::NetworkCacheCoder<CString>::decode):
(WebKit::NetworkCacheCoder<String>::encode):
(WebKit::decodeStringText):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::encode):
(WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::decode):
* NetworkProcess/cache/NetworkCacheCoders.h:

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

5 years agoWTFCrashWithSecurityImplication under SpeculativeJIT::compile() when loading a page...
mark.lam@apple.com [Thu, 20 Nov 2014 17:42:58 +0000 (17:42 +0000)]
WTFCrashWithSecurityImplication under SpeculativeJIT::compile() when loading a page from theblaze.com.
<https://webkit.org/b/137642>

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In the DFG, we have a ConstantFolding phase that occurs after all LocalCSE
phases have already transpired.  Hence, Identity nodes introduced in the
ConstantFolding phase will be left in the node graph.  Subsequently, the
DFG code generator asserts that CSE phases have consumed all Identity nodes.
This turns out to not be true.  Hence, the crash.  We fix this by teaching
the DFG code generator to emit code for Identity nodes.

Unlike the DFG, the FTL does not have this issue.  That is because the FTL
plan has GlobalCSE phases that come after ConstantFolding and any other
phases that can generate Identity nodes.  Hence, for the FTL, it is true that
CSE will consume all Identity nodes, and the code generator should not see any
Identity nodes.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

* js/dfg-inline-identity-expected.txt: Added.
* js/dfg-inline-identity.html: Added.
* js/script-tests/dfg-inline-identity.js: Added.
(o.toKey):
(foo):
(test):

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

5 years agoRemove alignment code from cache coders
antti@apple.com [Thu, 20 Nov 2014 17:32:04 +0000 (17:32 +0000)]
Remove alignment code from cache coders
https://bugs.webkit.org/show_bug.cgi?id=138927

Reviewed by Anders Carlsson.

Alignment code doesn't do anything useful, wastes space and produces wrong results
if the encoder and decoder buffers don't have the same 8-byte alignment.

* NetworkProcess/cache/NetworkCacheDecoder.cpp:
(WebKit::NetworkCacheDecoder::NetworkCacheDecoder):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
(WebKit::NetworkCacheDecoder::decodeFixedLengthData):
(WebKit::NetworkCacheDecoder::decodeNumber):
(WebKit::roundUpToAlignment): Deleted.
(WebKit::alignedBufferIsLargeEnoughToContain): Deleted.
(WebKit::NetworkCacheDecoder::alignBufferPosition): Deleted.
* NetworkProcess/cache/NetworkCacheDecoder.h:
(WebKit::NetworkCacheDecoder::currentOffset):
(WebKit::NetworkCacheDecoder::isInvalid):
(WebKit::NetworkCacheDecoder::markInvalid):
(WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
* NetworkProcess/cache/NetworkCacheEncoder.cpp:
(WebKit::NetworkCacheEncoder::grow):
(WebKit::NetworkCacheEncoder::encodeFixedLengthData):
(WebKit::NetworkCacheEncoder::encodeNumber):
(WebKit::roundUpToAlignment): Deleted.
* NetworkProcess/cache/NetworkCacheEncoder.h:

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

5 years agoUnreviewed, rolling out r176396.
commit-queue@webkit.org [Thu, 20 Nov 2014 16:33:41 +0000 (16:33 +0000)]
Unreviewed, rolling out r176396.
https://bugs.webkit.org/show_bug.cgi?id=138926

revealed some WebCore::BidiResolver issue. rollout this for
now. (Requested by zalan on #webkit).

Reverted changeset:

"Simple line layout: Introduce text fragment continuation."
https://bugs.webkit.org/show_bug.cgi?id=138274
http://trac.webkit.org/changeset/176396

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

5 years agoSimple line layout: Introduce text fragment continuation.
zalan@apple.com [Thu, 20 Nov 2014 15:22:02 +0000 (15:22 +0000)]
Simple line layout: Introduce text fragment continuation.
https://bugs.webkit.org/show_bug.cgi?id=138274

Source/WebCore:

This patch extends simple line layout coverage to multiple text renderers.
When a particular render flow has multiple text renderers (but not any other type)
then we use simple line layout to process and paint the content. -other, existing requirements still apply
so that for example if the content requires decoration, we bail out of simple line layout.

FlowContent now supports multiple renderes. It continuously reads content from sibling renderers
so that the simple line layout parser sees it as one monolithic block of content. Run positions
are all relative to the block and they get resolved to renderer's positions on demand.
(painting, computing bounding rects etc)

Reviewed by Antti Koivisto.

Performance test already been added for the multiple rendere use case,
correctness is covered by existing test cases.
Test: fast/text/simple-lines-mutliple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor): Check if children are all 8bit RenderTexts.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Move the endofline check right before where we might overflow using end position.
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Split runs at renderers' boundary to be in sync with inline text renderering.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::FlowContents):
(WebCore::SimpleLineLayout::FlowContents::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContents::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::textWidth): Do not measure text across renderers. It could produce different width value due to
ligature which later can produce unexpected line breaks and out sync renderering in general.
(WebCore::SimpleLineLayout::FlowContents::renderer):
(WebCore::SimpleLineLayout::FlowContents::resolveRendererPositions):
(WebCore::SimpleLineLayout::FlowContents::appendNextRendererContentIfNeeded): Read the next renderer content if needed.
(WebCore::SimpleLineLayout::FlowContents::nextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContents::runWidth):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContents::isEndOfContent):
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

LayoutTests:

Rebaseline for simple line layout's multiple rendere support.

Reviewed by Antti Koivisto.

* fast/text/simple-lines-multiple-renderers-expected.html: Added.
* fast/text/simple-lines-multiple-renderers.html: Added.
* fast/tokenizer/script_extra_close-expected.txt: Multiple tab characters should collapse into a single whitespace. This
needs fixing in complex line layout.
* tables/mozilla/bugs/bug157890-expected.txt: no-op endofline run is added by complex inline layout
when multiple text content is injected through JS into a <pre>. This requires fixing complex line layout.

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

5 years ago[WinCairo] Compile error when GStreamer is enabled.
commit-queue@webkit.org [Thu, 20 Nov 2014 15:20:37 +0000 (15:20 +0000)]
[WinCairo] Compile error when GStreamer is enabled.
https://bugs.webkit.org/show_bug.cgi?id=138925

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-20
Reviewed by Philippe Normand.

A guard is missing for an overridden method.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

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

5 years ago[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
commit-queue@webkit.org [Thu, 20 Nov 2014 12:46:15 +0000 (12:46 +0000)]
[GTK] Provide convenience API in DOM bindings to post messages to user message handlers
https://bugs.webkit.org/show_bug.cgi?id=138871

Patch by Adrian Perez de Castro <aperez@igalia.com> on 2014-11-20
Reviewed by Carlos Garcia Campos.

Source/WebCore:

Adds a convenience function in the WebKitGTK+ DOM bindings to post
messages to user message handlers in a way convenient way more
convenient than using the autogenerated bindings.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_webkit_message_handlers_post_message):
Added new convenience API function to post messages to user message
handlers.
* bindings/gobject/WebKitDOMCustom.h: Ditto.
* bindings/gobject/WebKitDOMCustom.symbols: Ditto.

Tools:

Add a test case for the convenience API for posting user messages
added to the DOM bindings.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
(testUserContentManagerMessageFromConvenienceDOMBindings):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback):

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

5 years ago[CSS Grid Layout] Replace the usage of size_t by unsigned
svillar@igalia.com [Thu, 20 Nov 2014 09:49:17 +0000 (09:49 +0000)]
[CSS Grid Layout] Replace the usage of size_t by unsigned
https://bugs.webkit.org/show_bug.cgi?id=136218

Reviewed by Benjamin Poulain.

In general, size_t should be used for sizes of objects in
memory. We're using it to represent indexes and spans in the
grid. Now that the maximum number of tracks is 1 million, it
should be safe to replace them by unsigned integers.

No new tests as there is no change in functionality.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackRepeatFunction):
* css/StyleResolver.cpp:
(WebCore::createImplicitNamedGridLinesFromGridArea):
(WebCore::createGridTrackList):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::GridIterator::GridIterator):
(WebCore::RenderGrid::GridIterator::nextGridItem):
(WebCore::RenderGrid::GridIterator::isEmptyAreaEnough):
(WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
(WebCore::RenderGrid::GridSizingData::GridSizingData):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::gridTrackSize):
(WebCore::RenderGrid::distributeSpaceToTracks):
(WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
(WebCore::RenderGrid::ensureGridSize):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::populateGridPositions):
* rendering/RenderGrid.h:
* rendering/style/GridCoordinate.h:
(WebCore::GridSpan::integerSpan):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::explicitGridColumnCount):
(WebCore::GridResolvedPosition::explicitGridRowCount):
(WebCore::explicitGridSizeForSide):
(WebCore::GridResolvedPosition::resolveNamedGridLinePositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionFromStyle):
(WebCore::GridResolvedPosition::resolveGridPositionAgainstOppositePosition):
(WebCore::firstNamedGridLineBeforePosition):
(WebCore::GridResolvedPosition::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
(WebCore::GridResolvedPosition::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
* rendering/style/GridResolvedPosition.h:
(WebCore::GridResolvedPosition::adjustGridPositionForRowEndColumnEndSide):
(WebCore::GridResolvedPosition::adjustGridPositionForSide):
(WebCore::GridResolvedPosition::GridResolvedPosition):
(WebCore::GridResolvedPosition::toInt):
* rendering/style/StyleGridData.h:

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

5 years agoRemove "document has no sibling rules" optimization.
akling@apple.com [Thu, 20 Nov 2014 08:43:25 +0000 (08:43 +0000)]
Remove "document has no sibling rules" optimization.
<https://webkit.org/b/138902>

Reviewed by Antti Koivisto.

We were keeping a document-level flag to track whether there are any
sibling rules in any active style sheets.

This information was used to do.. nothing.

* css/StyleResolver.h:
(WebCore::StyleResolver::usesSiblingRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto): Deleted.
* mathml/MathMLMathElement.h:

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

5 years agoCaret renderer is always a RenderBlock.
akling@apple.com [Thu, 20 Nov 2014 08:36:11 +0000 (08:36 +0000)]
Caret renderer is always a RenderBlock.
<https://webkit.org/b/138912>

Reviewed by Chris Dumez.

Tighten typing in the code that finds and deals with the renderer
used to paint the caret (it's always a RenderBlock.)

* editing/FrameSelection.cpp:
(WebCore::CaretBase::updateCaretRect):
(WebCore::FrameSelection::caretRendererWithoutUpdatingLayout):
(WebCore::DragCaretController::caretRenderer):
(WebCore::repaintCaretForLocalRect):
(WebCore::CaretBase::paintCaret):
* editing/FrameSelection.h:
* editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
* editing/htmlediting.cpp:
(WebCore::rendererForCaretPainting):
(WebCore::localCaretRectInRendererForCaretPainting):
(WebCore::absoluteBoundsForLocalCaretRect):
* editing/htmlediting.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintCaret):

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

5 years ago[GTK] URTBF after r176363.
ossy@webkit.org [Thu, 20 Nov 2014 08:29:51 +0000 (08:29 +0000)]
[GTK] URTBF after r176363.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setTextIndicator):
* UIProcess/API/gtk/PageClientImpl.h:

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

5 years agoREGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animat...
antti@apple.com [Thu, 20 Nov 2014 08:23:19 +0000 (08:23 +0000)]
REGRESSION (r172854): Web Viewer in FileMaker does not render a Base64 encoded animated-GIF
https://bugs.webkit.org/show_bug.cgi?id=138807
<rdar://problem/18829540>

Reviewed by Simon Fraser.

Animation gets paused because WebKit thinks the GIF is outside of the view.

* page/FrameView.cpp:
(WebCore::FrameView::windowClipRect):

We need to convert to window coordinates in paintsEntireContents mode too so these functions are consistent.
This matters with some WK1 API clients.

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

5 years agoMove 'clip' CSS property to the new StyleBuilder
cdumez@apple.com [Thu, 20 Nov 2014 07:42:19 +0000 (07:42 +0000)]
Move 'clip' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138909

Reviewed by Andreas Kling.

Move 'clip' CSS property from DeprecatedStyleBuilder to the new
StyleBuilder by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyClip::convertToLength): Deleted.
(WebCore::ApplyPropertyClip::applyInheritValue): Deleted.
(WebCore::ApplyPropertyClip::applyInitialValue): Deleted.
(WebCore::ApplyPropertyClip::applyValue): Deleted.
(WebCore::ApplyPropertyClip::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInitialClip):
(WebCore::StyleBuilderFunctions::applyInheritClip):
(WebCore::StyleBuilderFunctions::applyValueClip):

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

5 years agoDon't track sub-resources that are started after main frame progress has completed.
commit-queue@webkit.org [Thu, 20 Nov 2014 05:45:52 +0000 (05:45 +0000)]
Don't track sub-resources that are started after main frame progress has completed.
https://bugs.webkit.org/show_bug.cgi?id=138582

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2014-11-19
Reviewed by Sam Weinig.

After main frame progress has finished, starting loading a sub-resource shouldn't affect
UI process's view of page loading status (i.e., the page has already completed loading
and the progress shouldn't change). To achive that, don't track the subresources that
are started after the main frame has finished, except for those triggered by user interaction.

* WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:  Notify WebPage that the main frame progress
    has started or finished.
(WebKit::WebProgressTrackerClient::progressStarted):
(WebKit::WebProgressTrackerClient::progressFinished):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
    the main frame is loaded and it is not triggered by user interaction.
(WebKit::WebPage::removeResourceRequest):
* WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
(WebKit::WebPage::setMainFrameProgressCompleted):

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

5 years agoRemove dead code from TiledBackingStore
ryuan.choi@navercorp.com [Thu, 20 Nov 2014 05:35:49 +0000 (05:35 +0000)]
Remove dead code from TiledBackingStore
https://bugs.webkit.org/show_bug.cgi?id=138864

Reviewed by Andreas Kling.

Since r168151, paint() method, m_commitTileUpdatesOnIdleEventLoop and related code are not used.

No new tests, no behavior change.

* platform/graphics/TiledBackingStore.cpp:
(WebCore::TiledBackingStore::TiledBackingStore):
(WebCore::TiledBackingStore::setTileSize):
(WebCore::TiledBackingStore::invalidate):
(WebCore::TiledBackingStore::createTiles):
(WebCore::TiledBackingStore::paint): Deleted.
(WebCore::TiledBackingStore::startTileBufferUpdateTimer): Deleted.
(WebCore::TiledBackingStore::tileBufferUpdateTimerFired): Deleted.
(WebCore::TiledBackingStore::startBackingStoreUpdateTimer): Deleted.
(WebCore::TiledBackingStore::backingStoreUpdateTimerFired): Deleted.
* platform/graphics/TiledBackingStore.h:
(WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop): Deleted.

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

5 years agoFix typos in r176203.
rniwa@webkit.org [Thu, 20 Nov 2014 04:28:37 +0000 (04:28 +0000)]
Fix typos in r176203.

* public/v2/app.js:
(App.ChartsController.actions.addPaneByMetricAndPlatform):
(App.AnalysisTaskRoute):

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

5 years agoWeb Inspector: LayoutTests/inspector should not have localStorage side effects
commit-queue@webkit.org [Thu, 20 Nov 2014 02:19:12 +0000 (02:19 +0000)]
Web Inspector: LayoutTests/inspector should not have localStorage side effects
https://bugs.webkit.org/show_bug.cgi?id=138895

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

When running inspector tests, do not restore/save WebInspector.Settings
to localStorage, as that will cause side effects. Instead each Setting
will be initialized with its default value and can be modified during
the run of the test.

* UserInterface/Base/Test.js:
(WebInspector.loaded):
Name the setting to match the normal setting name now that persistence
is not an issue.

* UserInterface/Models/Setting.js:
(WebInspector.Setting.prototype.get value):
(WebInspector.Setting.prototype.set value):
Do not restore/save when in tests.

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

5 years ago[EFL] Fix build failure since r176363.
gyuyoung.kim@samsung.com [Thu, 20 Nov 2014 02:03:47 +0000 (02:03 +0000)]
[EFL] Fix build failure since r176363.
https://bugs.webkit.org/show_bug.cgi?id=138903

Patch by Sun-woo Nam <sunny.nam@samsung.com> on 2014-11-19
Reviewed by Gyuyoung Kim.

The parameter for animation on setTextIndicator() was removed on 'PageClient' class.

* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::setTextIndicator):
* UIProcess/CoordinatedGraphics/WebView.h:

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

5 years agoTry to fix the iOS build
timothy_horton@apple.com [Thu, 20 Nov 2014 01:55:54 +0000 (01:55 +0000)]
Try to fix the iOS build

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):

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

5 years agoRemove "document has no ::before and/or ::after rules" optimization.
akling@apple.com [Thu, 20 Nov 2014 01:36:27 +0000 (01:36 +0000)]
Remove "document has no ::before and/or ::after rules" optimization.
<https://webkit.org/b/138897>

Reviewed by Antti Koivisto.

This optimization has been dead for a long time, since the default UA
style contains both ::before and ::after rules.

* css/RuleFeature.cpp:
(WebCore::recursivelyCollectFeaturesFromSelector):
(WebCore::RuleFeatureSet::add):
(WebCore::RuleFeatureSet::clear):
* css/RuleFeature.h:
(WebCore::RuleFeatureSet::RuleFeatureSet):
* css/StyleResolver.h:
(WebCore::StyleResolver::usesBeforeAfterRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride): Deleted.
* html/HTMLQuoteElement.cpp:
(WebCore::HTMLQuoteElement::insertedInto): Deleted.
* html/HTMLQuoteElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::needsPseudoElement):

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

5 years ago[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
mmaxfield@apple.com [Thu, 20 Nov 2014 01:35:09 +0000 (01:35 +0000)]
[OS X] Upright vertical text is completely broken for multi-code-unit codepoints
https://bugs.webkit.org/show_bug.cgi?id=138891

Reviewed by Dan Bernstein.

Source/WebCore:

We were assuming that we can use the string index (in UTF-16) as the glyph
index. This falls down when a single codepoint (and glyph) contians
multiple code units.

Test: platform/mac/fast/text/multiple-codeunit-vertical-upright.html

* platform/graphics/GlyphPage.h:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):

LayoutTests:

Make sure a single upright vertical multi-code-unit codepoint is rendered the same as
the same codepoint rendered horizontally.

* platform/mac/fast/text/multiple-codeunit-vertical-upright-expected.html: Added.
* platform/mac/fast/text/multiple-codeunit-vertical-upright.html: Added.
* platform/mac/fast/text/resources/multiple-codeunit-vertical-upright.otf: Added.

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

5 years agoAttempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org...
dbates@webkit.org [Thu, 20 Nov 2014 01:23:38 +0000 (01:23 +0000)]
Attempt to fix the Apple Internal Mavericks build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)

Define enumerator NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain when building without
the Apple Internal SDK or with the Apple Internal SDK on OS X Mavericks or earlier.

* platform/spi/cf/CFNetworkSPI.h:

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

5 years agoFix the 32-bit build
timothy_horton@apple.com [Thu, 20 Nov 2014 01:16:11 +0000 (01:16 +0000)]
Fix the 32-bit build

* UIProcess/mac/TextIndicatorWindow.mm:
(WebKit::TextIndicatorWindow::setTextIndicator):

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

5 years agoMove the 'quotes' CSS property to the new StyleBuilder
weinig@apple.com [Thu, 20 Nov 2014 01:02:12 +0000 (01:02 +0000)]
Move the 'quotes' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138788

Reviewed by Chris Dumez.

Source/WebCore:

Test: fast/css/content/content-quotes-07.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Fix the parser to only accept none as a valid primitive identifier. Tested in
the newly added content-quotes-07.html.

* css/CSSPropertyNames.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertQuotes):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Move "quotes" to the new style builder.

* rendering/style/RenderStyle.h:
Add an initialQuotes() function for use in the auto-generated style builder.

LayoutTests:

Add a test for the behavior of non-valid primitive identifiers being
used with the quotes property.

* fast/css/content/content-quotes-07-expected.txt: Added.
* fast/css/content/content-quotes-07.html: Added.

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

5 years agoHandle unprefixed @keyframes rule
dino@apple.com [Thu, 20 Nov 2014 00:59:09 +0000 (00:59 +0000)]
Handle unprefixed @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=138899
<rdar://problem/18943117>

Reviewed by Simon Fraser.

Source/WebCore:

Support the parsing of unprefixed @keyframes. In
CSSParser, assign the same token identifier to
the prefixed and unprefixed forms. This will
keep compatibility with older content. If a page
has both forms, then whatever comes last will
win (as it does if you had duplicate names of the same
form).

Tests: animations/unprefixed-keyframes-rule.html
       animations/unprefixed-keyframes.html

* css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken): Look for the @keyframes style
strings and assign the new token values.

LayoutTests:

Tests for @keyframes, both the OM side and the parsing.

* animations/unprefixed-keyframes-expected.txt: Added.
* animations/unprefixed-keyframes-rule-expected.txt: Added.
* animations/unprefixed-keyframes-rule.html: Added.
* animations/unprefixed-keyframes.html: Added.

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

5 years agoMove pseudo-style code from RenderObject to RenderElement.
akling@apple.com [Thu, 20 Nov 2014 00:17:41 +0000 (00:17 +0000)]
Move pseudo-style code from RenderObject to RenderElement.
<https://webkit.org/b/138880>

Reviewed by Antti Koivisto.

Migrate get*PseudoStyle() to RenderElement, and the selection color
functions along with them. This gets rid of a DOM ancestor walk in
pseudo style lookup.

Narrow down some argument types to keep things building.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::logicalLeftSelectionGap):
(WebCore::RenderBlock::logicalRightSelectionGap):
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlock.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::getCachedPseudoStyle):
(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::selectionColor):
(WebCore::RenderElement::selectionPseudoStyle):
(WebCore::RenderElement::selectionForegroundColor):
(WebCore::RenderElement::selectionEmphasisMarkColor):
(WebCore::RenderElement::selectionBackgroundColor):
* rendering/RenderElement.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionBackgroundColor): Deleted.
(WebCore::RenderObject::selectionColor): Deleted.
(WebCore::RenderObject::selectionPseudoStyle): Deleted.
(WebCore::RenderObject::selectionForegroundColor): Deleted.
(WebCore::RenderObject::selectionEmphasisMarkColor): Deleted.
(WebCore::RenderObject::getCachedPseudoStyle): Deleted.
(WebCore::RenderObject::getUncachedPseudoStyle): Deleted.
* rendering/RenderObject.h:
* rendering/RenderText.h:
(WebCore::RenderText::getCachedPseudoStyle):
(WebCore::RenderText::selectionBackgroundColor):
(WebCore::RenderText::selectionForegroundColor):
(WebCore::RenderText::selectionEmphasisMarkColor):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):

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

5 years agoAdd an optional entry transition (from selection highlight) to TextIndicator
timothy_horton@apple.com [Thu, 20 Nov 2014 00:10:57 +0000 (00:10 +0000)]
Add an optional entry transition (from selection highlight) to TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=138856
<rdar://problem/18840128>

Reviewed by Anders Carlsson.

* Shared/TextIndicator.cpp:
(WebKit::outsetIndicatorRectIncludingShadow):
(WebKit::TextIndicator::createWithRange):
(WebKit::snapshotSelectionWithHighlight):
(WebKit::TextIndicator::createWithSelectionInFrame):
(WebKit::TextIndicator::frameRect):
(WebKit::TextIndicator::Data::encode):
(WebKit::TextIndicator::Data::decode):
Remove TextIndicator::draw and related functions; drawing is handled entirely
by the TextIndicatorWindow now, and TextIndicator just stores the required data.

Unify outsetIndicatorRectIncludingShadow.

Add an argument to createWithRange/createWithSelectionInFrame to indicate
if the TextIndicator should transition from the selection highlight to
the yellow bubble.

If we're doing the transition, paint the selection into a second bitmap,
without forcing the text to black and without hiding the blue highlight.

Encode/decode the second bitmap.

* Shared/TextIndicator.h:
* UIProcess/mac/TextIndicatorWindow.h:
* UIProcess/mac/TextIndicatorWindow.mm:
(-[WKTextIndicatorView initWithFrame:textIndicator:margin:transitionFromSelectionColor:]):
(-[WKTextIndicatorView presentWithCompletionHandler:]):
(-[WKTextIndicatorView hideWithCompletionHandler:]):
(-[WKTextIndicatorView isFlipped]):
(WebKit::TextIndicatorWindow::TextIndicatorWindow):
(WebKit::TextIndicatorWindow::setTextIndicator):
(WebKit::TextIndicatorWindow::closeWindow):
(WebKit::TextIndicatorWindow::startFadeOutTimerFired):
Re-implement the bounce animation using CoreAnimation instead of
the WKSI-based WKWindowBounceAnimation*.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
(WebKit::WebPage::performActionMenuHitTestAtLocation):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
Use the aforementioned transition animation for performDictionaryLookupOfCurrentSelection,
the context menu lookup item, and for Data Detectors.

* WebCore.exp.in:
Add an export.

* platform/spi/cocoa/QuartzCoreSPI.h:
Add some SPI.

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

5 years agoAdd a version of API::Data::createWithoutCopying that takes an NSData
andersca@apple.com [Thu, 20 Nov 2014 00:02:22 +0000 (00:02 +0000)]
Add a version of API::Data::createWithoutCopying that takes an NSData
https://bugs.webkit.org/show_bug.cgi?id=138893

Reviewed by Dan Bernstein.

* Shared/APIData.h:
* Shared/Cocoa/APIDataCocoa.mm: Added.
(API::Data::createWithoutCopying):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
(releaseNSData): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):

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

5 years agoWork around the fact that different masters may have different names for their codebases.
dburkart@apple.com [Wed, 19 Nov 2014 23:58:03 +0000 (23:58 +0000)]
Work around the fact that different masters may have different names for their codebases.
https://bugs.webkit.org/show_bug.cgi?id=138878

Reviewed by Mark Rowe.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(parseRevisionProperty): Changed.
Take a "fallback key" in addition to the primary key, so we can deal with inconsistencies in
opensource / internal codebase naming convention.

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

5 years agoMove 'outline-style' CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 19 Nov 2014 23:53:11 +0000 (23:53 +0000)]
Move 'outline-style' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138882

Reviewed by Sam Weinig.

Move 'outline-style' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyDefault::setValue): Deleted.
(WebCore::ApplyPropertyDefault::applyValue): Deleted.
(WebCore::ApplyPropertyDefault::createHandler): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInheritValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyInitialValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::applyValue): Deleted.
(WebCore::ApplyPropertyOutlineStyle::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyInheritOutlineStyle):
(WebCore::StyleBuilderFunctions::applyInitialOutlineStyle):
(WebCore::StyleBuilderFunctions::applyValueOutlineStyle):

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

5 years agoWeb Inspector: JSContext inspection Resource search does not work
joepeck@webkit.org [Wed, 19 Nov 2014 23:49:40 +0000 (23:49 +0000)]
Web Inspector: JSContext inspection Resource search does not work
https://bugs.webkit.org/show_bug.cgi?id=131252

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::searchInContent):
* inspector/protocol/Debugger.json:
Do some cleanup of the description and implementation of content searching.

Source/WebCore:

Test: inspector/debugger/search-scripts.html

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::searchInResources):
A little cleanup.

Source/WebInspectorUI:

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback):
Cleanup by reordering things a bit.

(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.ResourceSidebarPanel.prototype.performSearch):
Search non-resource scripts individually.

(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForScript):
Lazily create a ScriptTreeElement for the search tree outline as needed.

(WebInspector.ResourceSidebarPanel.prototype._scriptsToSearch):
When searching scripts, just perform a shallow walk of the tree outline to find
Script resources that are not also Resources. Scripts are always guarenteed to
be in a folder when inspecting a web resource. For JSContext inspection, scripts
are promoted to the top level.

* UserInterface/Main.html:
* UserInterface/Models/SourceCodeSearchMatchObject.js: Renamed from Source/WebInspectorUI/UserInterface/Models/ResourceSearchMatchObject.js.
(WebInspector.SourceCodeSearchMatchObject):
* UserInterface/Views/SearchIcons.css:
(.source-code-match-icon .icon):
(.resource-match-icon .icon): Deleted.
* UserInterface/Views/SearchResultTreeElement.js:
(WebInspector.SearchResultTreeElement):
Rename ResourceSearchMatchObject to SourceCodeSearchMatchObject.

LayoutTests:

* inspector/debugger/search-scripts-expected.txt: Added.
* inspector/debugger/search-scripts.html: Added.
Tests for Debugger.searchInContent.

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

5 years agoWeb Inspector: Provide $exception in the console for the thrown exception value
joepeck@webkit.org [Wed, 19 Nov 2014 23:49:36 +0000 (23:49 +0000)]
Web Inspector: Provide $exception in the console for the thrown exception value
https://bugs.webkit.org/show_bug.cgi?id=138726

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::caughtValue):
* debugger/DebuggerScope.h:
Access the caught value if this scope is a catch scope.

* runtime/JSNameScope.h:
(JSC::JSNameScope::isFunctionNameScope):
(JSC::JSNameScope::isCatchScope):
(JSC::JSNameScope::value):
Provide an accessor for the single value in the JSNameScope (with / catch block).

* inspector/InjectedScriptSource.js:
Save the exception value and expose it via $exception. Since the command line api
is recreated on each evaluation, $exception is essentially readonly.

* inspector/ScriptDebugServer.h:
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchDidPause):
(Inspector::ScriptDebugServer::exceptionOrCaughtValue):
When pausing, get the exception or caught value. The exception will be provided
if we are breaking on an explicit exception. When inside of a catch block, we
can get the caught value by walking up the scope chain.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::resume):
(Inspector::InspectorDebuggerAgent::stepOver):
(Inspector::InspectorDebuggerAgent::stepInto):
(Inspector::InspectorDebuggerAgent::stepOut):
Clearing state can be done in didContinue.

(Inspector::InspectorDebuggerAgent::didPause):
Set the exception value explicitly in the injected script when we have it.

(Inspector::InspectorDebuggerAgent::didContinue):
Clear state saved when we had paused, including clearly an exception value if needed.

(Inspector::InspectorDebuggerAgent::clearDebuggerBreakpointState):
(Inspector::InspectorDebuggerAgent::clearExceptionValue):
Call into the injected script only when needed.

* inspector/InjectedScript.cpp:
(Inspector::InjectedScript::setExceptionValue):
(Inspector::InjectedScript::clearExceptionValue):
* inspector/InjectedScript.h:
* inspector/InjectedScriptManager.cpp:
(Inspector::InjectedScriptManager::clearExceptionValue):
* inspector/InjectedScriptManager.h:
Clear on all injected scripts.

Source/WebCore:

Tests: inspector/debugger/command-line-api-exception-nested-catch.html
       inspector/debugger/command-line-api-exception.html

* inspector/CommandLineAPIModuleSource.js:
Expose $exception in the more complete command line API.

Source/WebInspectorUI:

* UserInterface/Base/Test.js:
(WebInspector.loaded):
In order to use RuntimeManager to execute in the global context or on the
active debugger call frame, we need to expose the quickConsole controller.

* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
Expose $exception to completion when we paused because of an exception.

LayoutTests:

Provide some tests to ensure $exception is the value we expect at different times,
such as on the exception line, when there is no exception, or when stepping through
catch blocks (it should always be the most recent caught exception).

* inspector/debugger/command-line-api-exception-expected.txt: Added.
* inspector/debugger/command-line-api-exception-nested-catch-expected.txt: Added.
* inspector/debugger/command-line-api-exception-nested-catch.html: Added.
* inspector/debugger/command-line-api-exception.html: Added.
* inspector/debugger/resources/exceptions.js: Added.
(triggerUncaughtTypeException):
(triggerUncaughtReferenceException):
(triggerUncaughtSyntaxException):
(triggerUncaughtDOMException):
(throwString):
(throwNumber):
(throwNull):
(throwObject):
(throwNode):
(catcher):
(nestedCatchBlocks):

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

5 years agoInvoking an action menu on a selection should result in the text menu
bdakin@apple.com [Wed, 19 Nov 2014 23:48:53 +0000 (23:48 +0000)]
Invoking an action menu on a selection should result in the text menu
https://bugs.webkit.org/show_bug.cgi?id=138892
-and corresponding-
rdar://problem/18996776

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItems]):

Source/WebKit2:

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

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

5 years agoFix iOS build.
andersca@apple.com [Wed, 19 Nov 2014 23:43:09 +0000 (23:43 +0000)]
Fix iOS build.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

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

5 years agoImages/replaced elements that are as tall as a page should be on their own page
hyatt@apple.com [Wed, 19 Nov 2014 23:40:23 +0000 (23:40 +0000)]
Images/replaced elements that are as tall as a page should be on their own page
https://bugs.webkit.org/show_bug.cgi?id=138886 - <rdar://problem/18296371>

Reviewed by Dean Jackson.

Source/WebCore:

Added fast/multicol/tall-image-behavior.html (and RL/LR variants)

* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::computeReplacedAndTextLineTopAndBottom):
* rendering/InlineFlowBox.h:
Add a new method that computes the line top and line bottom ignoring all margins,
overflow and line-height. This allows us to see if a line that is taller than a page
can be made to fit if we ignored margins and unused descent.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
Call the new helper function, computeReplacedAndTextLineTopAndBottom and push
to a new page if we see that we can fit on a page by ourselves without blank space
included.

LayoutTests:

* fast/multicol/tall-image-behavior-lr.html: Added.
* fast/multicol/tall-image-behavior-rl.html: Added.
* fast/multicol/tall-image-behavior.html: Added.
* platform/mac/fast/multicol/tall-image-behavior-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-expected.txt: Added.
* platform/mac/fast/multicol/tall-image-behavior-lr-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-lr-expected.txt: Added.
* platform/mac/fast/multicol/tall-image-behavior-rl-expected.png: Added.
* platform/mac/fast/multicol/tall-image-behavior-rl-expected.txt: Added.

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

5 years agoRename two Cocoa-only .cpp files to .mm.
andersca@apple.com [Wed, 19 Nov 2014 23:03:03 +0000 (23:03 +0000)]
Rename two Cocoa-only .cpp files to .mm.

Rubber-stamped by Sam Weinig.

* Shared/APIWebArchive.mm: Renamed from Source/WebKit2/Shared/APIWebArchive.cpp.
* Shared/APIWebArchiveResource.mm: Renamed from Source/WebKit2/Shared/APIWebArchiveResource.cpp.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoData detected results with no menu items should not fall through to regular text
bdakin@apple.com [Wed, 19 Nov 2014 23:00:48 +0000 (23:00 +0000)]
Data detected results with no menu items should not fall through to regular text
action menus
https://bugs.webkit.org/show_bug.cgi?id=138887
-and corresponding-
rdar://problem/18971616

Reviewed by Tim Horton.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItems]):

Source/WebKit2:

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItems]):

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

5 years agoTake Web Audio into account for the Page::isPlayingAudio() API.
adachan@apple.com [Wed, 19 Nov 2014 22:58:43 +0000 (22:58 +0000)]
Take Web Audio into account for the Page::isPlayingAudio() API.
https://bugs.webkit.org/show_bug.cgi?id=137464

Reviewed by Jer Noble.

Source/WebCore:

Make AudioContext a subclass of AudioProducer. It figures out whether there's
audio playing by checking whether its AudioDestinationNode is playing (and not
silent). It calls Document::updateIsPlayingAudio() whenever its audio playing
state has changed.

Test: webaudio/web-audio-is-playing.html

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::lazyInitialize):
Add itself to the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::uninitialize):
Remove itself from the Document's list of AudioProducers if it's not an offline
audio context.
(WebCore::AudioContext::stop):
Tell the document to update its audio playing state.
(WebCore::AudioContext::isPlayingAudio):
Return true if the audio context hasn't been stopped and its destination node is
playing audio.
(WebCore::AudioContext::pageMutedStateDidChange):
Add a FIXME for now.
(WebCore::AudioContext::isPlayingAudioDidChange):
Call Document::updateIsPlayingAudio().
* Modules/webaudio/AudioContext.h:

* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::AudioDestinationNode):
Initialize m_isSilent and m_isEffectivelyPlayingAudio.
(WebCore::AudioDestinationNode::render):
Call setIsSilent() with the appropriate value after rendering.
(WebCore::AudioDestinationNode::isPlayingDidChange):
Call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::setIsSilent):
If m_isSilent has changed, call updateIsEffectivelyPlayingAudio().
(WebCore::AudioDestinationNode::updateIsEffectivelyPlayingAudio):
If m_isEffectivelyPlayingAudio has changed, call AudioContext::isPlayingAudioDidChange().
* Modules/webaudio/AudioDestinationNode.h:
(WebCore::AudioDestinationNode::isPlaying):
(WebCore::AudioDestinationNode::isPlayingAudio):

* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::isPlaying):
Return whether the AudioDestination is playing.
* Modules/webaudio/DefaultAudioDestinationNode.h:

* platform/audio/AudioIOCallback.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationIOS::stop):
Ditto.
(WebCore::AudioDestinationIOS::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/ios/AudioDestinationIOS.h:

* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestinationMac::start):
Call setIsPlaying() instead.
(WebCore::AudioDestinationMac::stop):
Ditto.
(WebCore::AudioDestinationMac::setIsPlaying):
If m_isPlaying has changed, call AudioIOCallback::isPlayingDidChange().
* platform/audio/mac/AudioDestinationMac.h:

* testing/Internals.cpp:
(WebCore::Internals::isPagePlayingAudio):
* testing/Internals.h:
* testing/Internals.idl:
Add internals.isPagePlayingAudio() for testing.

LayoutTests:

This test checks that Page::isPlayingAudio() returns false before an audio context is created
and before the oscillator node makes a sound. It then starts the oscillator node and checks
that Page::isPlayingAudio() later returns true.

* webaudio/web-audio-is-playing-expected.txt: Added.
* webaudio/web-audio-is-playing.html: Added.

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

5 years agoAttempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit...
dbates@webkit.org [Wed, 19 Nov 2014 22:51:40 +0000 (22:51 +0000)]
Attempt to fix the Apple Internal Mountain Lion build after <https://trac.webkit.org/changeset/176347>
(https://bugs.webkit.org/show_bug.cgi?id=136863)

Only import header CFNSURLConnection.h when building for iOS or OS X Yosemite.

* platform/spi/cf/CFNetworkSPI.h:

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

5 years agoFix TilesAdded bitmask
antti@apple.com [Wed, 19 Nov 2014 22:40:00 +0000 (22:40 +0000)]
Fix TilesAdded bitmask
https://bugs.webkit.org/show_bug.cgi?id=138883

Reviewed by Simon Fraser.

Simon spotted this.

* platform/graphics/ca/GraphicsLayerCA.h:

    Use 1LLU << 29 instead of 1LLU < 29
    This worked before by pure luck as bit 0 is unused.

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

5 years ago[iOS] Make WebKit build with public iOS SDK
dbates@webkit.org [Wed, 19 Nov 2014 22:32:04 +0000 (22:32 +0000)]
[iOS] Make WebKit build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136863

Reviewed by David Kilzer.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add private headers CFNetworkSPI.h and
NS{CalendarDate, String, URLDownload}SPI.h.
* loader/cocoa/DiskCacheMonitorCocoa.mm: Move forward declaration of
CFNetwork data types and functions from here to file CFNetworkSPI.h and
include header CFNetworkSPI.h.
* platform/network/mac/ResourceHandleMac.mm: Substitute CFNetworkSPI.h for
CFURLRequestSPI.h as the content of the latter was incorporated into the former.
* platform/spi/cf/CFNetworkSPI.h: Added.
* platform/spi/cf/CFURLRequestSPI.h: Removed; incorporated its functionality
into CFNetworkSPI.h
* platform/spi/cocoa/NSCalendarDateSPI.h: Added.
* platform/spi/cocoa/NSStringSPI.h: Added.
* platform/spi/cocoa/NSURLDownloadSPI.h: Added.

Source/WebKit/ios:

* Misc/WebGeolocationCoreLocationProvider.mm:  Remove unnecessary include of header <CoreLocation/CoreLocationPriv.h>.
* Misc/WebNSStringExtrasIOS.m: Substitute header <WebCore/NSStringSPI.h> for <Foundation/NSString_NSURLExtras.h>.
* Misc/WebUIKitSupport.mm: Remove unnecessary include of header CoreFoundation/CFPriv.h.

Source/WebKit/mac:

* History/WebHistory.mm: Include header NSCalendarDateSPI.h.
* History/WebHistoryItemPrivate.h: Remove include of private header Foundation/NSCalendarDate.h.
* Misc/WebDownload.h: Forward declare NSURLDownload when building without header Foundation/NSURLDownload.h.
We use __has_include() instead of WTF_USE_APPLE_INTERNAL_SDK since this header
may be used by Apple internal clients that do not include wtf/Platform.h.
* Misc/WebDownload.mm: Include header NSURLDownloadSPI.h instead of including
private Foundation headers directly.
* Misc/WebNSURLExtras.mm: Remove unnecessary include of private Foundation header.
* WebCoreSupport/WebFrameNetworkingContext.mm: Include header CFNetworkSPI.h
instead of including private CFNetwork headers directly. Also fixed up style and
ordering of header include directives.
* WebView/WebView.mm: Include header CFNetworkSPI.h instead of including private
CFNetwork headers directly. Also sort the #import directives.
* WebView/WebViewPrivate.h: Define ENABLE_TOUCH_EVENTS if not otherwise defined
and added ENABLE_TOUCH_EVENTS-guard around -_touchEventRegions.

Source/WebKit2:

* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Moved CFNetwork forward declarations
from this file to file CFNetworkSPI.h and included header CFNetworkSPI.h.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm: Ditto.
* UIProcess/API/Cocoa/WKProcessPool.mm: Ditto.
* UIProcess/mac/WebContextMac.mm: Ditto.
* WebProcess/cocoa/WebProcessCocoa.mm: Ditto.

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

5 years agoAX: Screen braille input doesn't work on forms.
cfleizach@apple.com [Wed, 19 Nov 2014 22:12:19 +0000 (22:12 +0000)]
AX: Screen braille input doesn't work on forms.
https://bugs.webkit.org/show_bug.cgi?id=138804

Unreviewed build fix.

* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::setValue):

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

5 years agoAdd APIs for customizing the user agent
andersca@apple.com [Wed, 19 Nov 2014 22:07:22 +0000 (22:07 +0000)]
Add APIs for customizing the user agent
https://bugs.webkit.org/show_bug.cgi?id=138881
rdar://problem/17233981

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView customUserAgent]):
(-[WKWebView setCustomUserAgent:]):
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::set):
(-[WKWebViewConfiguration copyWithZone:]):
(defaultApplicationNameForUserAgent):
(-[WKWebViewConfiguration applicationNameForUserAgent]):
(-[WKWebViewConfiguration setApplicationNameForUserAgent:]):

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

5 years ago[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which...
simon.fraser@apple.com [Wed, 19 Nov 2014 22:05:03 +0000 (22:05 +0000)]
[WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
https://bugs.webkit.org/show_bug.cgi?id=138877

Reviewed by Tim Horton.

These data members are unused on Mac, but still encoded, so initialize them with
reasonable values.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):

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

5 years agoRefactor iOS selection gestures.
enrica@apple.com [Wed, 19 Nov 2014 21:57:10 +0000 (21:57 +0000)]
Refactor iOS selection gestures.
https://bugs.webkit.org/show_bug.cgi?id=138720
rdar://problem/18964359

Reviewed by Benjamin Poulain.

This is a first step towards refactoring the selection gestures code.
It introduces more general selection movement functions that can be used to build
the gestures.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(toWKTextGranularity):
(toWKSelectionDirection):
(-[WKContentView selectPositionAtPoint:completionHandler:]):
(-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
(-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
(-[WKContentView beginSelectionInDirection:completionHandler:]):
(-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::beginSelectionInDirection):
(WebKit::WebPage::updateSelectionWithExtentPoint):

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

5 years agoUnreviewed build fixes after r176329.
joepeck@webkit.org [Wed, 19 Nov 2014 21:39:33 +0000 (21:39 +0000)]
Unreviewed build fixes after r176329.

  - export all of the codegen python files as they are included by the main generator
  - update the imports of the main generator to match __init__.py
  - remove bundling the python scripts as framework resources, just have them PrivateHeaders

* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

5 years ago[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled...
simon.fraser@apple.com [Wed, 19 Nov 2014 21:31:11 +0000 (21:31 +0000)]
[WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
https://bugs.webkit.org/show_bug.cgi?id=138876

Reviewed by Beth Dakin.

Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
content offset into account.

On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
Mac does UI-side scrolling.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scrollPosition):
(WebKit::RemoteLayerTreeTransaction::setScrollPosition):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):

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

5 years agoAdd layout test for throttling of DOM timer changing the style of visible and invisib...
cdumez@apple.com [Wed, 19 Nov 2014 21:15:00 +0000 (21:15 +0000)]
Add layout test for throttling of DOM timer changing the style of visible and invisible elements
https://bugs.webkit.org/show_bug.cgi?id=138875

Reviewed by Simon Fraser.

Add a layout test to test that a repeating DOM timer changing the style
of both visible and invisible elements does not get throttled.

Also rename existing tests to use "display-none" instead of "invisible"
for clarity.

* fast/dom/nested-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling-expected.txt.
* fast/dom/nested-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/nested-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-display-none-element-throttling-expected.txt: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling-expected.txt.
* fast/dom/repeating-timer-display-none-element-throttling.html: Renamed from LayoutTests/fast/dom/repeating-timer-invisible-element-throttling.html.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling-expected.txt: Added.
* fast/dom/repeating-timer-mixed-visible-display-none-elements-throttling.html: Added.

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

5 years agoGet rid of AccessibilityObject::setRoleValue()
benjamin@webkit.org [Wed, 19 Nov 2014 20:50:54 +0000 (20:50 +0000)]
Get rid of AccessibilityObject::setRoleValue()
https://bugs.webkit.org/show_bug.cgi?id=138861

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-19
Reviewed by Chris Fleizach.

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::setRoleValue): Deleted.

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

5 years agoAdd layout test for DOM timer throttling and element moving into view after layout
cdumez@apple.com [Wed, 19 Nov 2014 20:46:36 +0000 (20:46 +0000)]
Add layout test for DOM timer throttling and element moving into view after layout
https://bugs.webkit.org/show_bug.cgi?id=138874

Reviewed by Simon Fraser.

Add a layout test to make sure we unthrottle a DOM timer changing the
style of an element outside viewport if the element ends up inside
the viewport after layout.

* fast/dom/timer-unthrottle-on-layout-expected.txt: Added.
* fast/dom/timer-unthrottle-on-layout.html: Added.

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

5 years agoWeb Inspector: standardize language-specific protocol generator file, class, and...
burg@cs.washington.edu [Wed, 19 Nov 2014 19:16:23 +0000 (19:16 +0000)]
Web Inspector: standardize language-specific protocol generator file, class, and method prefixes
https://bugs.webkit.org/show_bug.cgi?id=138237

Reviewed by Joseph Pecoraro.

Settle on cpp/objc/js file prefixes and Cpp/ObjC/JS class prefixes for generators.
Move C++-specific static methods into CppGenerator and add cpp_ prefixes where relevant.
Split the templates file into language-specific template files.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* inspector/scripts/codegen/__init__.py:
* inspector/scripts/codegen/cpp_generator.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator.py.
* inspector/scripts/codegen/cpp_generator_templates.py: Copied from Source/JavaScriptCore/inspector/scripts/codegen/generator_templates.py.
(CppGeneratorTemplates):
* inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_alternate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_header.py.
* inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_header.py.
* inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_protocol_types_implementation.py.
* inspector/scripts/codegen/generate_js_backend_commands.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_backend_commands.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_header.py.
* inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_backend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_configuration_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_header.py.
* inspector/scripts/codegen/generate_objc_configuration_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_configuration_implementation.py.
* inspector/scripts/codegen/generate_objc_conversion_helpers.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_conversion_helpers.py.
* inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_frontend_dispatcher_implementation.py.
* inspector/scripts/codegen/generate_objc_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_header.py.
* inspector/scripts/codegen/generate_objc_internal_header.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_internal_header.py.
* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c_types_implementation.py.
* inspector/scripts/codegen/generator.py:
* inspector/scripts/codegen/generator_templates.py:
* inspector/scripts/codegen/objc_generator.py: Renamed from Source/JavaScriptCore/inspector/scripts/codegen/generate_objective_c.py.
* inspector/scripts/codegen/objc_generator_templates.py: Added.
* inspector/scripts/generate-inspector-protocol-bindings.py:

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 19 Nov 2014 18:59:00 +0000 (18:59 +0000)]
Versioning.

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

5 years agoUpdate WebKit to build with LLVM TOT
commit-queue@webkit.org [Wed, 19 Nov 2014 18:46:17 +0000 (18:46 +0000)]
Update WebKit to build with LLVM TOT
https://bugs.webkit.org/show_bug.cgi?id=138519

Patch by Juergen Ributzka <juergen@apple.com> on 2014-11-19
Reviewed by Alexey Proskuryakov.

* Configurations/LLVMForJSC.xcconfig:
* llvm/LLVMAPIFunctions.h:
* llvm/library/LLVMExports.cpp:
(initializeAndGetJSCLLVMAPI):

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

5 years agoWeb Inspector: Debugger should not mutate variable when hovering mouse over ++n expre...
commit-queue@webkit.org [Wed, 19 Nov 2014 18:34:19 +0000 (18:34 +0000)]
Web Inspector: Debugger should not mutate variable when hovering mouse over ++n expression
https://bugs.webkit.org/show_bug.cgi?id=138839

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

* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):

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

5 years agoWeb Inspector: Improve basic JavaScript completion in inline <script>s
commit-queue@webkit.org [Wed, 19 Nov 2014 18:32:30 +0000 (18:32 +0000)]
Web Inspector: Improve basic JavaScript completion in inline <script>s
https://bugs.webkit.org/show_bug.cgi?id=138845

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

* UserInterface/Controllers/CodeMirrorCompletionController.js:
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
Fix up CodeMirror mode handling for JavaScript completion when inside of mixed mode
input (html). Also add completion for CodeMirror's localVars list.

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