timothy@apple.com [Tue, 7 Jul 2015 22:57:01 +0000 (22:57 +0000)]
Web Inspector: Timeline record bars are not white when the row is selected from the sidebar
https://bugs.webkit.org/show_bug.cgi?id=146694
Reviewed by Joseph Pecoraro.
* UserInterface/Views/TimelineRecordBar.css:
(:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment):
(:matches(:focus, .force-focus) .selected .timeline-record-bar > .segment.inactive):
(:matches(:focus, .force-focus) .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186481
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Tue, 7 Jul 2015 22:32:54 +0000 (22:32 +0000)]
REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
https://bugs.webkit.org/show_bug.cgi?id=146695
<rdar://problem/
21441466>
Reviewed by Tim Horton.
When we would currently use dictionary lookup to decide on our text selection, first check if we
are targeting an editable field. If we are, use the original selection behavior. Otherwise, use
the new "dictionary lookup" selection.
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Only use dictionary lookup
when our target node is not editable.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186480
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Tue, 7 Jul 2015 22:26:10 +0000 (22:26 +0000)]
Another attempt to fix CURL/Soup builds after r186476
Reviewed by NOBODY.
* platform/network/curl/SocketStreamHandle.h:
* platform/network/soup/SocketStreamHandle.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186479
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Tue, 7 Jul 2015 21:37:21 +0000 (21:37 +0000)]
Attempt to fix CURL/Soup builds after r186476
Reviewed by NOBODY.
* platform/network/curl/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/soup/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186478
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Tue, 7 Jul 2015 21:21:36 +0000 (21:21 +0000)]
Web Inspector: Unnecessary space added after -webkit- prefixed property values
https://bugs.webkit.org/show_bug.cgi?id=146671
Reviewed by Joseph Pecoraro.
* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css: Added.
* Tools/PrettyPrinting/index.html:
* UserInterface/Views/CodeMirrorFormatters.js: Now only adds a space if both the current and previous
tokens are a property, value, or atom.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186477
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Tue, 7 Jul 2015 21:13:31 +0000 (21:13 +0000)]
HTTP Auth cached after disabling private browsing/reset.
<rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
Reviewed by Tim Horton.
Source/WebCore:
Test: http/tests/security/private-browsing-http-auth.html
- Change most static CredentialStorage methods to be instance methods instead.
- Make a CredentialStorage objects be per-NetworkStorageSession.
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::WebSocketChannel):
(WebCore::WebSocketChannel::connect): Only start the web socket load if a networking
context is available.
* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::defaultCredentialStorage): Returns the credential storage
from the default NetworkStorageSession.
(WebCore::CredentialStorage::set):
(WebCore::CredentialStorage::get):
(WebCore::CredentialStorage::remove):
(WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
(WebCore::CredentialStorage::clearCredentials):
(WebCore::protectionSpaceToCredentialMap): Deleted.
(WebCore::originsWithCredentials): Deleted.
(WebCore::pathToDefaultProtectionSpaceMap): Deleted.
(WebCore::findDefaultProtectionSpaceForURL): Deleted.
(WebCore::CredentialStorage::setPrivateMode): Deleted. Was a no-op anyways.
* platform/network/CredentialStorage.h:
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::credentialStorage):
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::createCFURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
* platform/network/cf/SocketStreamHandle.h:
(WebCore::SocketStreamHandle::create):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):
(WebCore::SocketStreamHandle::getStoredCONNECTProxyCredentials):
(WebCore::getStoredCONNECTProxyCredentials): Deleted.
* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::applyAuthenticationToRequest):
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::willSendRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::applyAuthenticationToRequest):
(WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
(WebCore::ResourceHandle::receivedCredential):
Source/WebKit/mac:
* Misc/WebCache.h:
* Misc/WebCache.mm:
(+[WebCache clearCachedCredentials]): Clear the global CredentialStorage as well as the
storages belonging to each main frame of each WebView. This method is for DRT.
* Misc/WebDownload.mm:
(-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
* Plugins/WebBaseNetscapePluginView.mm:
(WebKit::getAuthenticationInfo):
* WebView/WebView.mm:
(-[WebView _clearCredentials]): Clear the storage belonging to the current networking session
of the main frame of this WebView.
* WebView/WebViewInternal.h:
Source/WebKit/win:
* WebDownloadCFNet.cpp:
(WebDownload::didReceiveAuthenticationChallenge):
Source/WebKit2:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::getAuthenticationInfo):
Tools:
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting): Clear in-memory credentials in between test runs.
LayoutTests:
* http/tests/security/private-browsing-http-auth-expected.txt: Added.
* http/tests/security/private-browsing-http-auth.html: Added.
* http/tests/security/resources/auth-echo.php: Added.
* http/tests/security/resources/basic-auth.php: Added.
* platform/wk2/TestExpectations:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186476
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Tue, 7 Jul 2015 20:09:22 +0000 (20:09 +0000)]
REGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is inside a column flow.
https://bugs.webkit.org/show_bug.cgi?id=146529
rdar://problem/
21613670
Reviewed by Mihnea Ovidenie and David Kilzer.
This patch ensures that RenderObject::selectionRoot() handles column flows properly while searching for the associated
selection root.
When the renderer is inside a column flow and the column flow is part of a named flow, we stop
traversing the ancestor chain, searching for the selection root, when we reach the column flow.
Since the column flow is not a selection root, we mistakenly fall back to the RenderView as selection root.
Instead, we should check if the column is inside a named flow and return the selection root accordingly.
Returning the wrong selection root confuses RenderView::splitSelectionBetweenSubtrees() logic and this particular
RenderObject could end up in multiple selection trees.
Source/WebCore:
Test: fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html
* rendering/RenderObject.cpp:
(WebCore::RenderObject::selectionRoot):
LayoutTests:
* fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow-expected.txt: Added.
* fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186474
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Tue, 7 Jul 2015 20:03:50 +0000 (20:03 +0000)]
[Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
https://bugs.webkit.org/show_bug.cgi?id=146689
<rdar://problem/
21393490>
Reviewed by Dean Jackson.
The changes in r184794 did not take full screen mode into account. This needed to be corrected.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.handlePanelTransitionEnd):
(Controller.prototype.setPlaying):
(Controller.prototype.showControls):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186472
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mattbaker@apple.com [Tue, 7 Jul 2015 19:58:03 +0000 (19:58 +0000)]
Web Inspector: Pad ruler selection area by 1px in the Rendering Frames timeline overview
https://bugs.webkit.org/show_bug.cgi?id=146248
Reviewed by Timothy Hatcher.
* UserInterface/Views/RenderingFrameTimelineOverview.js:
Enable duration pixel alignment.
* UserInterface/Views/TimelineOverview.css:
(.timeline-overview.frames > .timeline-ruler > .header > .divider):
(.timeline-overview.frames > .timeline-ruler > .selection-handle.right):
(.timeline-overview.frames > .timeline-ruler > .shaded-area.right):
Shift ruler elements 1 pixel to the right, so that selection boundaries and dividers are
positioned inside the gap between frame elements.
* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
(WebInspector.TimelineOverview.prototype.set secondsPerPixel):
(WebInspector.TimelineOverview.prototype.get pixelAlignDuration):
(WebInspector.TimelineOverview.prototype.set pixelAlignDuration):
(WebInspector.TimelineOverview.prototype._handleWheelEvent):
Added a property to force the overview graph to align duration units on the y-axis to pixel boundaries.
When enabled, frame elements are displayed in integer widths while zooming, preventing subpixel blurring
and maintaining a consistent 1 pixel gap between frames.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186471
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Tue, 7 Jul 2015 19:24:06 +0000 (19:24 +0000)]
Make sure to remove the download message receiver before freeing it
https://bugs.webkit.org/show_bug.cgi?id=146687
Reviewed by Simon Fraser.
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::downloadFinished):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186470
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Tue, 7 Jul 2015 19:12:22 +0000 (19:12 +0000)]
Snap point regions containing X and Y snap points should do a better job animating
https://bugs.webkit.org/show_bug.cgi?id=142523
<rdar://problem/
20100753>
Patch by Wenson Hsieh <whsieh@berkeley.edu> on 2015-07-07
Reviewed by Brent Fulgham.
Source/WebCore:
Reimplemented snap point animations to use a single timer for both horizontal and
vertical axes to better support 2D snap scrolling. Instead of making velocity
dependent on progress to the snap point and handling 2D snapping with different
timer update functions, this implementation uses a fixed animation time to coordinate
the snapping animation across both axes.
Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Refactored to use a single scroll snap timer.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: See above.
(WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): See above.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): See above.
* platform/cocoa/ScrollController.h: Refactored to use a single scroll snap timer and update function to handle
snapping in both axes. This entails removing the ScrollEventAxis parameter from various functions below. Also
removed methods that computed "snap" and "glide" offsets.
(WebCore::ScrollControllerClient::startScrollSnapTimer): See above.
(WebCore::ScrollControllerClient::stopScrollSnapTimer): See above.
* platform/cocoa/ScrollController.mm: See above.
(WebCore::ScrollController::ScrollController): Added new constants used to compute animation offsets.
(WebCore::ScrollController::snapRubberBandTimerFired): Added a check to prevent the rubber band timer from firing
alongside the scroll snap timer. This results in scroll snapping taking precedence over rubber banding when
scrolling against the edge of a container in the case of 2D scrolling. We didn't run into this issue before
because snapping wasn't working properly at the edges of a 2D scrolling container. In the future, we may want
to unify both snap scrolling and rubber banding timers to solve this issue.
(WebCore::ScrollController::isScrollSnapInProgress): Refactored to use a single scroll snap timer.
(WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Fixed an issue where wheel deltas were being pushed
to the snap state incorrectly.
(WebCore::ScrollController::processWheelEventForScrollSnap): Fixed an issue with 2D snapping where scrolling in 2 axes
simultaneously would cause the vertical axis to override the horizontal axis. This is more like a sub-issue of fixing
2D scrolling, and is required for 2D snap animations to work properly.
(WebCore::ScrollController::startScrollSnapTimer): Refactored to use a single scroll snap timer.
(WebCore::ScrollController::stopScrollSnapTimer): See above.
(WebCore::ScrollController::scrollSnapTimerFired): This new method handles snap scroll updates on both axes.
(WebCore::ScrollController::beginScrollSnapAnimation): Refactored to account for single scroll snap timer.
(WebCore::ScrollController::endScrollSnapAnimation): See above.
(WebCore::ScrollController::initializeScrollSnapAnimationParameters): New method that initializes parameters used to
coordinate the animation state across horizontal and vertical axes.
(WebCore::ScrollController::isSnappingOnAxis): Checks whether or not a given axis is currently scroll snapping. This will
return true in the case of active 2D scroll snapping.
(WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Deleted.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Deleted.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Deleted.
(WebCore::ScrollController::scrollSnapAnimationUpdate): Deleted.
(WebCore::ScrollController::initializeGlideParameters): Deleted.
(WebCore::snapProgress): Deleted.
(WebCore::clampedSnapMagnitude): Deleted.
(WebCore::ScrollController::computeSnapDelta): Deleted.
(WebCore::snapGlide): Deleted.
(WebCore::ScrollController::computeGlideDelta): Deleted.
* platform/cocoa/ScrollSnapAnimatorState.h: Added a new datastructure, ScrollSnapAnimationCurveState, which tracks
the scroll snap animation state across both axes.
* platform/cocoa/ScrollSnapAnimatorState.mm: Removed fields relevant to the former "gliding" model and renamed the
initial wheel delta variable to reflect this.
(WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Fixed an issue where wheel deltas were being pushed
to the snap state incorrectly.
(WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Tiny for loop incrementor style fix.
(WebCore::ScrollSnapAnimatorState::isSnapping): Checks whether this state is in either snapping or gliding mode.
(WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Checks whether the scroll velocity is
consistent with the initial and target offsets.
(WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Interpolates the offset for a given progress value.
(WebCore::ScrollSnapAnimationCurveState::ScrollSnapAnimationCurveState): New constants.
(WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Abstracts out part of the initialization process.
(WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Abstracts out part of the
initialization process.
(WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Abstracts out curve interpolation.
(WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Added.
(WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Added.
LayoutTests:
Tests that snap points are honored when scrolling in a 2D overflow container.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186469
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Tue, 7 Jul 2015 18:28:45 +0000 (18:28 +0000)]
Web Inspector: Tabbing in the styles sidebar doesn't highlight the next section of text
https://bugs.webkit.org/show_bug.cgi?id=146676
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._highlightNextNameOrValue): Modified the logic to only search the
remaining text after the current cursor position.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey): Now only searches for matches before the colon.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186468
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Tue, 7 Jul 2015 17:28:26 +0000 (17:28 +0000)]
Unreviewed, Fix non-Mac build after r186464.
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186467
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Tue, 7 Jul 2015 17:25:48 +0000 (17:25 +0000)]
Web Inspector: Option+Click not jumping to resource
https://bugs.webkit.org/show_bug.cgi?id=146498
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js: Always show the tab which contains the represented object.
(WebInspector._domNodeWasInspected):
(WebInspector._frameWasAdded):
(WebInspector.showConsoleTab):
(WebInspector.showRepresentedObject): Removed forceShowTab parameter.
(WebInspector.showMainFrameDOMTree):
(WebInspector.showContentFlowDOMTree):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseButtonWasReleasedOverEditor):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186466
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Tue, 7 Jul 2015 17:22:28 +0000 (17:22 +0000)]
Unreviewed, attempt to fix iOS build.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186465
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Tue, 7 Jul 2015 17:12:41 +0000 (17:12 +0000)]
Make sure to remove message receivers before they are deallocated
https://bugs.webkit.org/show_bug.cgi?id=146666
rdar://problem/
21331118
Reviewed by Tim Horton.
Add code so we can assert that there are no message receiver maps pointing to a message receiver
when it's being destroyed. Fix all the assertions by calling removeMessageReceiver in the right places.
* Platform/IPC/MessageReceiver.h:
(IPC::MessageReceiver::~MessageReceiver):
(IPC::MessageReceiver::willBeAddedToMessageReceiverMap):
(IPC::MessageReceiver::willBeRemovedFromMessageReceiverMap):
* Platform/IPC/MessageReceiverMap.cpp:
(IPC::MessageReceiverMap::addMessageReceiver):
(IPC::MessageReceiverMap::removeMessageReceiver):
(IPC::MessageReceiverMap::invalidate):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::removeMessageReceiver):
* Shared/ChildProcess.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::removeMessageReceiver):
* Shared/ChildProcessProxy.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController dealloc]):
* UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
* UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
(WebKit::CustomProtocolManagerProxy::~CustomProtocolManagerProxy):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::invalidate):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController dealloc]):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::invalidate):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186464
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Tue, 7 Jul 2015 17:11:43 +0000 (17:11 +0000)]
Web Inspector: Regression: CSS autocompletion suggestion applies on pressing delete
https://bugs.webkit.org/show_bug.cgi?id=146672
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now returns if completions are showing.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186463
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Tue, 7 Jul 2015 16:25:37 +0000 (16:25 +0000)]
Web Inspector: Properly align checkboxes in the styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=146673
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.css:
(.css-style-text-editor > .CodeMirror .CodeMirror-lines input[type=checkbox]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186462
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Tue, 7 Jul 2015 15:54:20 +0000 (15:54 +0000)]
REGRESSION(r183706): HTMLImageElement sometimes fails to register as document named item.
<https://webkit.org/b/146679>
<rdar://problem/
21613839>
Reviewed by Antti Koivisto.
Source/WebCore:
After r183706, Element::hasName() no longer returns outdated information when called
inside a parseAttribute() override. HTMLImageElement was relying on this to check
if it *used* to have a name attribute before the currently parsing one was set.
Since parseAttribute() only shows subclasses the new attribute value, I'm adding a
flag to HTMLImageElement that remembers whether we had a name attribute or not.
Test: fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
* html/HTMLImageElement.h:
LayoutTests:
Add a test that would assert when removing a named HTMLImageElement from the DOM
after having failed to register it as a document named item.
* fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash-expected.txt: Added.
* fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186461
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 7 Jul 2015 11:27:15 +0000 (11:27 +0000)]
REGRESSION (r186388): http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html always fails on Windows
* platform/win/TestExpectations: Consolidate WebAudio skips.
Mark test as always failing:
- http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186447
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 7 Jul 2015 11:27:09 +0000 (11:27 +0000)]
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html crashes on Windows sometimes
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-deny-meta-tag-parent-same-origin-allow.html>
* platform/win/TestExpectations: Mark test as crashing, too:
- http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag-parent-same-origin-allow.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186446
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 7 Jul 2015 11:07:44 +0000 (11:07 +0000)]
El Capitan: Hangs caused by PDFs should be fixed
* platform/mac-wk1/TestExpectations: Remove skipped tests as the
PDF hangs should be fixed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186442
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Tue, 7 Jul 2015 11:07:38 +0000 (11:07 +0000)]
REGRESSION (r186391): css3/masking/mask-repeat-space-padding.html image-only failure on El Capitan WK1
* platform/mac-wk1/TestExpectations: Mark as image-only failure:
- css3/masking/mask-repeat-space-padding.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186441
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
youenn.fablet@crf.canon.fr [Tue, 7 Jul 2015 08:00:22 +0000 (08:00 +0000)]
Source/WebCore:
[Streams API] Remove ReadableStreamReader.read() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146643
Reviewed by Darin Adler.
Moved ReadableStreamReader.read handling from callbacks to promises.
Introduced DOMPromiseIteratorWithCallback for that purpose: it takes resolve() to resolve a promise with a not-ending iterator value,
resolveEnd() to resolve a promise with a terminating iterator value and reject().
Added template helper routine to convert typed values to JS iterator wrapping the value.
Removed ReadableStreamReader.read custom binding.
Covered by rebased tests.
* Modules/streams/ReadableStream.cpp: Updated code to use DOMPromiseIteratorWithCallback API.
(WebCore::ReadableStream::releaseReader):
(WebCore::ReadableStream::changeStateToErrored):
(WebCore::ReadableStream::read):
(WebCore::ReadableStream::resolveReadCallback):
* Modules/streams/ReadableStream.h:
* Modules/streams/ReadableStreamReader.cpp:
(WebCore::ReadableStreamReader::read):
* Modules/streams/ReadableStreamReader.h:
* Modules/streams/ReadableStreamReader.idl: Removed custom binding.
* bindings/js/JSDOMBinding.h:
(WebCore::toJSIterator): create JS iterator from typed value.
(WebCore::toJSIteratorEnd): create JS end iterator.
* bindings/js/JSDOMPromise.cpp:
(WebCore::DeferredWrapper::globalObject): Added globaObject getter and removed promise getter.
* bindings/js/JSDOMPromise.h:
(WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback):
(WebCore::Error>::resolve):
(WebCore::Error>::resolveEnd):
(WebCore::Error>::reject):
* bindings/js/JSReadableStreamReaderCustom.cpp: Removed custom binding.
LayoutTests:
[Streams API] Remove ReadableStreamStream.read() custom binding
https://bugs.webkit.org/show_bug.cgi?id=146643
Reviewed by Darin Adler.
* streams/reference-implementation/brand-checks-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186414
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Tue, 7 Jul 2015 05:04:36 +0000 (05:04 +0000)]
REGRESSION: Slider thumb does not render properly (image tests with <input type="range">)
https://bugs.webkit.org/show_bug.cgi?id=146669
rdar://problem/
21677831
Reviewed by Simon Fraser.
Draw NSSliderCell's knob only when slider's thumb paint is requested.
Covered by existing tests.
Source/WebCore:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):
LayoutTests:
* platform/mac/TestExpectations: Unskip slider tests.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186399
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ossy@webkit.org [Tue, 7 Jul 2015 04:27:03 +0000 (04:27 +0000)]
Move shouldIgnoreAttributeCase inline function to Element.h
https://bugs.webkit.org/show_bug.cgi?id=146588
Reviewed by Andreas Kling.
* dom/Element.cpp:
(WebCore::shouldIgnoreAttributeCase): Deleted.
* dom/Element.h:
(WebCore::shouldIgnoreAttributeCase):
* dom/NamedNodeMap.cpp:
(WebCore::shouldIgnoreAttributeCase): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186398
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ossy@webkit.org [Tue, 7 Jul 2015 04:20:28 +0000 (04:20 +0000)]
Remove the unused HeapBlock.h
https://bugs.webkit.org/show_bug.cgi?id=146580
Reviewed by Andreas Kling.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopiedBlock.h:
* heap/CopiedSpace.h:
* heap/CopiedSpaceInlines.h:
* heap/HandleBlock.h:
* heap/HeapBlock.h: Removed.
* heap/MarkedBlock.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186397
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Tue, 7 Jul 2015 03:40:19 +0000 (03:40 +0000)]
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/
18033944>
Reviewed by Brady Eidson.
Source/WebCore:
* Modules/webaudio/AudioContext.cpp:
(WebCore::WebAudio::hostingDocument): Added.
* Modules/webaudio/AudioContext.h:
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hostingDocument): Added.
* dom/Document.cpp:
(WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
* platform/audio/PlatformMediaSession.h:
Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
playback on elements that match the provided document.
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
on all elements in the current process.
* platform/audio/PlatformMediaSessionManager.h:
Source/WebKit2:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
the process is being shut down.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186396
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Tue, 7 Jul 2015 03:12:14 +0000 (03:12 +0000)]
Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
should be exempt from Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=144830
<rdar://problem/
18860261>
Inadvertently omitted argument overrideContentSecurityPolicy in calls to ContentSecurityPolicy::allowEval()
that explicitly specified a report status. And the report status, which is an enum, was being implicitly
converted to bool.
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initScript):
* page/DOMSecurityPolicy.cpp:
(WebCore::DOMSecurityPolicy::allowsEval):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186395
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Tue, 7 Jul 2015 01:42:15 +0000 (01:42 +0000)]
Unreviewed, rolling out r186385.
https://bugs.webkit.org/show_bug.cgi?id=146668
crashes 3 webaudio tests in debug builds (Requested by
alexchristensen on #webkit).
Reverted changeset:
"Ensure media playback is stopped during page close"
https://bugs.webkit.org/show_bug.cgi?id=146554
http://trac.webkit.org/changeset/186385
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186394
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Tue, 7 Jul 2015 01:37:40 +0000 (01:37 +0000)]
Crash when setting text direction via MakeTextWritingDirection* editing commands.
<https://webkit.org/b/146665>
<rdar://problem/
20835477>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Fix two buggy clients of enclosingBlock(node) that would fail if the returned
element is the same as the node passed in.
Test: editing/style/change-text-direction-crash.html
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
LayoutTests:
Add a test that covers some very simple MakeTextWritingDirection* command usage.
* editing/style/change-text-direction-crash-expected.txt: Added.
* editing/style/change-text-direction-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186393
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Tue, 7 Jul 2015 01:16:24 +0000 (01:16 +0000)]
Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494)
https://bugs.webkit.org/show_bug.cgi?id=146653
Reviewed by Dean Jackson.
Fixes rdar://problem/
21435233.
r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.
This patch reverts r176798.
* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSValue.cpp:
(WebCore::CSSValue::cssText): Deleted.
(WebCore::CSSValue::destroy): Deleted.
* css/CSSValue.h:
(WebCore::CSSValue::isWebKitCSSResourceValue): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::maskImageValueFromIterator): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear): Deleted.
* css/StyleResolver.h:
(WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments): Deleted.
* css/WebKitCSSResourceValue.cpp: Removed.
* css/WebKitCSSResourceValue.h: Removed.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::addCachedResource): Deleted.
* loader/cache/CachedResourceLoader.h:
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading):
(WebCore::CachedSVGDocument::CachedSVGDocument): Deleted.
* loader/cache/CachedSVGDocument.h:
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
(WebCore::CachedSVGDocumentReference::load):
* loader/cache/CachedSVGDocumentReference.h:
* page/FrameView.cpp:
(WebCore::FrameView::containsSVGDocument): Deleted.
* page/FrameView.h:
* page/Page.cpp:
(WebCore::Page::createPageFromBuffer): Deleted.
* page/Page.h:
* platform/ScrollView.h:
(WebCore::ScrollView::containsSVGDocument): Deleted.
* platform/graphics/MaskImageOperation.cpp: Removed.
* platform/graphics/MaskImageOperation.h: Removed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::RenderLayer): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerFilterInfo.cpp:
* rendering/RenderLayerFilterInfo.h:
* rendering/RenderLayerMaskImageInfo.h: Removed.
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::operator==):
(WebCore::FillLayer::cullEmptyLayers):
(WebCore::layerImagesIdentical):
(WebCore::FillLayer::FillLayer): Deleted.
(WebCore::FillLayer::operator=): Deleted.
(WebCore::FillLayer::hasNonEmptyMaskImage): Deleted.
(WebCore::FillLayer::imagesAreLoaded): Deleted.
* rendering/style/FillLayer.h:
(WebCore::FillLayer::maskImage): Deleted.
(WebCore::FillLayer::imageOrMaskImage): Deleted.
(WebCore::FillLayer::setMaskImage): Deleted.
(WebCore::FillLayer::clearMaskImage): Deleted.
(WebCore::FillLayer::hasMaskImage): Deleted.
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
(WebCore::RenderSVGResourceMasker::applySVGMask): Deleted.
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer): Deleted.
* rendering/svg/RenderSVGResourceMasker.h:
* svg/SVGMaskElement.cpp:
(WebCore::SVGMaskElement::createElementRenderer):
(WebCore::SVGMaskElement::addClientRenderLayer): Deleted.
(WebCore::SVGMaskElement::removeClientRenderLayer): Deleted.
* svg/SVGMaskElement.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateExternalDocument):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186392
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Tue, 7 Jul 2015 01:15:01 +0000 (01:15 +0000)]
Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
https://bugs.webkit.org/show_bug.cgi?id=146653
Reviewed by Dean Jackson.
Fixes rdar://problem/
21435233.
r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.
This patch reverts r177494.
Source/WebCore:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFillProperty):
(WebCore::CSSParser::parseMaskImage): Deleted.
* css/CSSParser.h:
* css/CSSPropertyNames.in:
* css/CSSValue.h:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertMaskImageOperations): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::loadPendingSVGDocuments):
(WebCore::StyleResolver::loadPendingImages):
(WebCore::StyleResolver::adjustStyleForMaskImages): Deleted.
(WebCore::StyleResolver::applyMatchedProperties): Deleted.
* css/StyleResolver.h:
* page/FrameView.cpp:
(WebCore::FrameView::containsSVGDocument):
* page/FrameView.h:
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
(WebCore::blendFunc): Deleted.
(WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): Deleted.
(WebCore::MaskImagePropertyWrapper::equals): Deleted.
* platform/ScrollView.h:
(WebCore::ScrollView::containsSVGDocument):
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::~MaskImageOperation): Deleted.
(WebCore::MaskImageOperation::operator==): Deleted.
* platform/graphics/MaskImageOperation.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::maskClipRect):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::updateFillImages):
(WebCore::RenderElement::~RenderElement): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::~RenderLayer): Deleted.
(WebCore::RenderLayer::calculateClipRects): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerMaskImageInfo.cpp: Removed.
* rendering/style/FillLayer.h:
(WebCore::FillLayer::image):
(WebCore::FillLayer::imageOrMaskImage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::setMaskImage): Deleted.
* rendering/style/RenderStyle.h:
LayoutTests:
* css3/masking/mask-base64-expected.html: Removed.
* css3/masking/mask-base64.html: Removed.
* css3/masking/mask-multiple-values-expected.html: Removed.
* css3/masking/mask-multiple-values.html: Removed.
* css3/masking/mask-repeat-space-padding-expected.html:
* css3/masking/mask-repeat-space-padding.html:
* css3/masking/mask-svg-clipped-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-clipped-fragmentId.html: Removed.
* css3/masking/mask-svg-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-fragmentId.html: Removed.
* css3/masking/mask-svg-inline-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-inline-fragmentId.html: Removed.
* css3/masking/mask-svg-inline-invalid-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-inline-invalid-fragmentId.html: Removed.
* css3/masking/mask-svg-invalid-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-invalid-fragmentId.html: Removed.
* css3/masking/mask-svg-no-fragmentId-expected.html: Removed.
* css3/masking/mask-svg-no-fragmentId-tiled-expected.html: Removed.
* css3/masking/mask-svg-no-fragmentId-tiled.html: Removed.
* css3/masking/mask-svg-no-fragmentId.html: Removed.
* css3/masking/mask-svg-script-entire-svg-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-entire-svg-to-mask.html: Removed.
* css3/masking/mask-svg-script-mask-to-entire-svg-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-entire-svg.html: Removed.
* css3/masking/mask-svg-script-mask-to-none-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-none.html: Removed.
* css3/masking/mask-svg-script-mask-to-png-expected.html: Removed.
* css3/masking/mask-svg-script-mask-to-png.html: Removed.
* css3/masking/mask-svg-script-none-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-none-to-mask.html: Removed.
* css3/masking/mask-svg-script-none-to-png-expected.html: Removed.
* css3/masking/mask-svg-script-none-to-png.html: Removed.
* css3/masking/mask-svg-script-png-to-mask-expected.html: Removed.
* css3/masking/mask-svg-script-png-to-mask.html: Removed.
* css3/masking/mask-svg-script-png-to-none-expected.html: Removed.
* css3/masking/mask-svg-script-png-to-none.html: Removed.
* css3/masking/resources/masks.svg: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186391
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Tue, 7 Jul 2015 01:11:49 +0000 (01:11 +0000)]
Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
https://bugs.webkit.org/show_bug.cgi?id=146653
Fixes rdar://problem/
21435233.
This patch reverts r186180, but keeps the layout test.
This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
was not being maintained, so revert it.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource): Deleted.
* loader/cache/CachedResourceRequest.h:
(WebCore::CachedResourceRequest::acceptOverride): Deleted.
(WebCore::CachedResourceRequest::setAcceptOverride): Deleted.
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::load): Deleted.
* loader/cache/CachedSVGDocumentReference.h:
(WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted.
* platform/graphics/MaskImageOperation.cpp:
(WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
(WebCore::MaskImageOperation::notifyFinished):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186390
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Tue, 7 Jul 2015 01:05:48 +0000 (01:05 +0000)]
Fix the Windows build following <https://trac.webkit.org/changeset/186388>
(https://bugs.webkit.org/show_bug.cgi?id=144830)
As we for for Mac in WebCoreAVFResourceLoader::startLoading(), instantiate ResourceLoaderOptions
with ContentSecurityPolicyImposition::DoPolicyCheck.
* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
(WebCore::WebCoreAVCFResourceLoader::startLoading):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186389
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Tue, 7 Jul 2015 00:42:50 +0000 (00:42 +0000)]
Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
should be exempt from Content Security Policy
https://bugs.webkit.org/show_bug.cgi?id=144830
<rdar://problem/
18860261>
Reviewed by Geoffrey Garen.
Source/WebCore:
Make scripts that run in an isolated world be subject to the Content Security Policy (CSP) of the page
and exempt features implemented using a user agent shadow DOM. As a side effect of this change,
Safari Content Extensions will respect the CSP policy of the page when loading subresources (e.g. an image).
Tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
* css/CSSCanvasValue.h:
(WebCore::CSSCanvasValue::loadSubimages): Modified to take argument ResourceLoaderOptions (unused).
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSCrossfadeValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
(WebCore::CSSCrossfadeValue::image): Explicitly instantiate default ResourceLoaderOptions and pass it
when requesting a cached image. Added FIXME comment to skip Content Security Policy check when the cross
fade is applied to an element in a user agent shadow tree.
* css/CSSCrossfadeValue.h:
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::cachedImage): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
* css/CSSCursorImageValue.h:
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSFilterImageValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
(WebCore::CSSFilterImageValue::loadSubimages): Explicitly instantiate default ResourceLoaderOptions and pass
pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
the cross fade is applied to an element in a user agent shadow tree.
(WebCore::CSSFilterImageValue::image):
* css/CSSFilterImageValue.h:
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::cachedFont): Take a boolean, isInitiatingElementInUserAgentShadowTree,
so as to determine the appropriate CSP imposition. In particular, we skip the CSP check when the initiating element
(e.g. SVG font-face element) is in a user agent shadow tree.
* css/CSSFontFaceSrcValue.h:
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::addFontFaceRule): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
it as appropriate.
* css/CSSFontSelector.h:
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
as appropriate.
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::loadSubimages): Ditto.
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
* css/CSSImageGeneratorValue.h:
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::cachedImageSet): Deleted.
* css/CSSImageSetValue.h:
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::cachedImage): Deleted.
* css/CSSImageValue.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
it as appropriate.
(WebCore::RuleSet::addRulesFromSheet): Added FIXME comment to skip Content Security Policy check when
when stylesheet is in a user agent shadow tree.
* css/RuleSet.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver): Determine whether the SVG font-face element is in a user agent shadow tree
and pass the appropriate value when calling CSSFontSelector::addFontFaceRule(). Also, modernized code; used C++11 range
-based for-loop instead of const_iterator idiom.
(WebCore::StyleResolver::loadPendingSVGDocuments): Skip CSP check when requesting subresources as a byproduct of
resolving style for an element in a user agent shadow tree.
(WebCore::StyleResolver::loadPendingImage): Ditto.
(WebCore::StyleResolver::loadPendingShapeImage): Ditto.
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::requestStyleSheet): Added FIXME comment to skip Content Security Policy check when
when stylesheet is in a user agent shadow tree.
* dom/Element.h:
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet): Skip CSP check for an inline <style> that is in a user agent shadow tree.
* dom/Node.cpp:
(WebCore::Node::isInUserAgentShadowTree): Added.
* dom/Node.h:
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript): Skip CSP check for an external JavaScript script in a user agent shadow tree.
(WebCore::ScriptElement::executeScript): Skip CSP check for an inline JavaScript script that is in a user agent shadow tree.
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged): Skip CSP check when modifying the inline style of an element in a user
agent shadow tree.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::isSafeToLoadURL): Skip CSP check for a <audio>, <video> in a user agent shadow tree.
(WebCore::HTMLMediaElement::outOfBandTrackSources): Ditto.
* html/HTMLTrackElement.cpp:
(WebCore::HTMLTrackElement::canLoadURL): Ditto.
* html/track/LoadableTextTrack.cpp:
(WebCore::LoadableTextTrack::loadTimerFired): Determine whether the <track> is in a user agent shadow tree
and pass the appropriate value when calling TextTrackLoader::load().
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startLoadingMainResource): Do CSP check when loading a resource by default.
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement): Skip CSP check for an image that is in a user agent shadow tree.
* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::start): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added FIXME comment to skip Content Security Policy check
when when associated plugin element is in a user agent shadow tree.
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy): Skip CSP check for a <iframe> in a user agent shadow tree.
* loader/ResourceLoaderOptions.h: Defined enum class ContentSecurityPolicyImposition with explicit type uint8_t so
as to provide a hint to the compiler (for better packing) when it computes the memory layout for struct that
contains an instance of this class.
(WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added argument contentSecurityPolicyImposition.
(WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Added.
(WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Added.
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::pluginIsLoadable): Skip CSP check for a plugin element that is in a user agent shadow tree.
(WebCore::SubframeLoader::createJavaAppletWidget): Skip CSP check for an applet element that is in a user agent shadow tree.
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load): Take a boolean, isInitiatingElementInUserAgentShadowTree, and sets the appropriate
Content Security Policy imposition for the text track request.
* loader/TextTrackLoader.h:
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Skip CSP check for a user-specified stylesheet.
(WebCore::CachedResourceLoader::canRequest): Only check the CSP of the page if specified in the resource loader options for the request.
(WebCore::CachedResourceLoader::defaultCachedResourceOptions): Add ContentSecurityPolicyImposition::DoPolicyCheck to the default
resource loader options so that do check the CSP policy of the page before performing a resource request by default.
* loader/cache/CachedSVGDocumentReference.cpp:
(WebCore::CachedSVGDocumentReference::load): Take a ResourceLoaderOptions as an argument and passes it as appropriate.
* loader/cache/CachedSVGDocumentReference.h:
* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* page/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Take an argument called overrideContentSecurityPolicy (defaults to false). When
overrideContentSecurityPolicy := true, this function unconditionally returns true.
(WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
(WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
(WebCore::ContentSecurityPolicy::allowEval): Ditto.
(WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
(WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
(WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
(WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
(WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
* page/ContentSecurityPolicy.h:
* page/DOMSecurityPolicy.cpp:
* page/EventSource.cpp:
(WebCore::EventSource::create): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::requestImageResource): Skip CSP check for a SVG FEImage element in a user agent shadow tree.
* svg/SVGFontFaceUriElement.cpp:
(WebCore::SVGFontFaceUriElement::loadFont): Skip CSP check for a SVG font-face-uri element in a user agent shadow tree.
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::updateExternalDocument): Skip CSP check for a SVG use element in a user agent shadow tree.
* testing/Internals.cpp:
(WebCore::Internals::ensureUserAgentShadowRoot): Added.
* testing/Internals.h:
* testing/Internals.idl: Added declaration for ensureUserAgentShadowRoot().
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
LayoutTests:
Add tests to ensure that we exempt nodes in a user agent shadow tree from the Content Security Policy (CSP) of the page.
Updated test LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html to ensure that
we do not bypass the CSP of the page for a script that executes in an isolated world and renamed the
file image-load-should-not-bypass-main-world-csp.html.
* http/tests/security/contentSecurityPolicy/resources/alert-pass-and-notify-done.js: Added.
* http/tests/security/contentSecurityPolicy/resources/wait-until-done.js: Added.
(alertAndDone):
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/ABCFont.svg: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/allow-inline-script.js: Added.
(window.onload):
(testPassed):
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/resources/floodGreenFilter.svg: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html: Added.
* http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp-expected.txt: Renamed from LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp-expected.txt.
* http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html: Renamed from LayoutTests/http/tests/security/isolatedWorld/bypass-main-world-csp.html.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186388
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mattbaker@apple.com [Tue, 7 Jul 2015 00:23:04 +0000 (00:23 +0000)]
Web Inspector: Rendering Frame bars appear misaligned and contain gaps when displaying small task segments
https://bugs.webkit.org/show_bug.cgi?id=146475
Reviewed by Timothy Hatcher.
Displaying all task segments within a frame in the Rendering Frames graph is impossible, as very short tasks
would result in a bar with a height of less than 1 pixel. Consecutive small tasks, each less than a visible
pixel, appear as gaps in the frame bar. This patch addresses these shortcomings by introducing a minimum
displayable frame height (3 pixels), and setting the height of every frame to a multiple of the minimum height.
* UserInterface/Base/Utilities.js:
(.value):
Added Math.roundTo to simplify rounding to arbitrary intervals.
* UserInterface/Views/TimelineRecordFrame.css:
(.timeline-record-frame):
(.timeline-record-frame > .frame > .duration):
Enforce 3px min height for frames & segments. TimelineRenderingFrame's segment height calculator
creates segments that are always at least 3px, this is just a precaution.
* UserInterface/Views/TimelineRecordFrame.js:
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.updateDurationRemainder):
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.pushCurrentSegment):
(WebInspector.TimelineRecordFrame.prototype._calculateFrameDisplayData.invisibleSegments.forEach):
(WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement): Deleted.
Added algorithm for calculating frame segment heights, rather than simply dividing each task's
duration by the frame duration. Results are cached so the segment heights aren't needlessly
recalculated on every scroll/zoom.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186387
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Tue, 7 Jul 2015 00:21:07 +0000 (00:21 +0000)]
Web Inspector: Force show Console tab when supportsSplitContentBrowser is false
https://bugs.webkit.org/show_bug.cgi?id=146661
Reviewed by Joseph Pecoraro.
* UserInterface/Base/Main.js:
(WebInspector.showConsoleTab):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186386
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 6 Jul 2015 23:41:25 +0000 (23:41 +0000)]
Ensure media playback is stopped during page close
https://bugs.webkit.org/show_bug.cgi?id=146554
<rdar://problem/
18033944>
Reviewed by Brady Eidson.
Source/WebCore:
* Modules/webaudio/AudioContext.h:
(WebCore::WebAudio::hostingDocument): Added.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hostingDocument): Added.
* dom/Document.cpp:
(WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
* platform/audio/PlatformMediaSession.h:
Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
playback on elements that match the provided document.
(WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
on all elements in the current process.
* platform/audio/PlatformMediaSessionManager.h:
Source/WebKit2:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didClose): Make sure to clean up any running media sessions when
the process is being shut down.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186385
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Mon, 6 Jul 2015 23:27:32 +0000 (23:27 +0000)]
Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
https://bugs.webkit.org/show_bug.cgi?id=146652
<rdar://problem/
21567767>
Follow-up fix.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186384
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Mon, 6 Jul 2015 23:26:40 +0000 (23:26 +0000)]
[Content Extensions] Remove memory page reporting
https://bugs.webkit.org/show_bug.cgi?id=146659
Reviewed by Benjamin Poulain.
Source/WebCore:
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
* contentextensions/ContentExtension.cpp:
(WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
* contentextensions/ContentExtension.h:
(WebCore::ContentExtensions::ContentExtension::compiledExtension):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::getBits):
(WebCore::ContentExtensions::getInstruction):
(WebCore::ContentExtensions::jumpSizeInBytes):
(WebCore::ContentExtensions::getJumpSize):
(WebCore::ContentExtensions::getJumpDistance):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
Don't keep track of memory page usage. It wasn't even correct anyways.
Tools:
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186383
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Mon, 6 Jul 2015 23:01:40 +0000 (23:01 +0000)]
[Content Extensions] Increase maxNFASize
https://bugs.webkit.org/show_bug.cgi?id=146656
Reviewed by Benjamin Poulain.
Because of memory improvements in r186375, r186374, and r186079,
we can now increase the maximum number of NFA nodes in order to avoid
long compile times of some large, complicated content blockers.
This also improves the interpreting time of content blockers.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Increase maxNFASize to 75000 to avoid long compile times.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186381
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Mon, 6 Jul 2015 22:34:57 +0000 (22:34 +0000)]
Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
https://bugs.webkit.org/show_bug.cgi?id=146652
<rdar://problem/
21567767>
Reviewed by Brent Fulgham.
The expression "(numVertex + 1) * 4 * sizeof(GC3Dfloat)" could potentially
overflow. Make it use checked arithmetic.
I couldn't make a test case that reliably exercised this.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Used Checked<GC3Dsizeiptr>
for calculating the size of the buffer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186380
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
saambarati1@gmail.com [Mon, 6 Jul 2015 22:18:58 +0000 (22:18 +0000)]
JSC's parser should follow the ES6 spec with respect to parsing Declarations
https://bugs.webkit.org/show_bug.cgi?id=146621
Reviewed by Mark Lam.
Source/JavaScriptCore:
There were a few locations where JSC would allow declaration statements
in incorrect ways. JSC didn't distinguish between 'Statement' and
'StatementListItem' grammar productions. The relevant grammar is here:
http://www.ecma-international.org/ecma-262/6.0/index.html#sec-statements
From the ECMA Script 6.0 spec:
1. Section 13.6 The if Statement (http://www.ecma-international.org/ecma-262/6.0/index.html#sec-if-statement)
says that IfStatements only takes Statements for the "then-else" clauses, not StatementListItems.
(Same with 'while/for/do-while' loop bodies).
2. Section 13 ECMAScript Language: Statements and Declarations
(http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-language-statements-and-declarations)
defines the syntax of Statements, and they do not include ClassDeclarations and LexicalDeclarations
(const, let, see 13.3.1 Let and Const Declarations).
Declarations can only be in the “then-else” clauses when embedded in a StatementListItem in a BlockStatement (see 13.2).
Hence, the following style of declarations are no longer allowed:
'if/for/while (condition) const x = 40;'
'if/for/while (condition) class C { }'
Instead, we mandate such declaration constructs are within a StatementList
(which is the production that JSC's Parser::parseSourceElements function parses):
'if/for/while (condition) { const x = 40; }'
'if/for/while (condition) { class C { } }'
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseSourceElements):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseVarDeclaration):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseExpressionStatement):
* parser/Parser.h:
(JSC::Parser::getLabel):
LayoutTests:
* js/parser-syntax-check-expected.txt:
* js/script-tests/const.js:
(with1):
(with2):
* js/script-tests/parser-syntax-check.js:
* js/script-tests/statement-list-item-syntax-errors.js: Added.
(testSyntax):
(runTests):
* js/statement-list-item-syntax-errors-expected.txt: Added.
* js/statement-list-item-syntax-errors.html: Added.
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186379
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Mon, 6 Jul 2015 22:03:37 +0000 (22:03 +0000)]
http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html crashes on Windows sometimes
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-deny-meta-tag.html>
* platform/win/TestExpectations: Mark test as crashing, too:
- http/tests/security/XFrameOptions/x-frame-options-deny-meta-tag.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186378
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 6 Jul 2015 21:31:06 +0000 (21:31 +0000)]
Allow UIDelegate to customize link actions in preview.
https://bugs.webkit.org/show_bug.cgi?id=146567
Add a new UIDelegate method to pass the defaultActions and elementInfo to client to allow
the client customize the actions based on the element. Also add a new SPI runActionWithElementInfo:
to _WKElementAction and make it aware of the WKActionSheetAssistant that creates it, so that
the client can run the action without knowing WKActionSheetAssistant.
Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2015-07-06
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Add delegate method _webView:previewViewControllerForURL:defaultActions:elementInfo:.
* UIProcess/API/Cocoa/_WKElementAction.h: Add a SPI runActionWithElementInfo:.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(-[_WKElementAction _initWithTitle:actionHandler:type:assistant:]): Modified initializer, also initialize _defaultActionSheetAssistant
iVar if the caller provides that.
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Use the new initializer.
(+[_WKElementAction _elementActionWithType:customTitle:assistant:]): A new helper method to create _WKElementAction with assistant.
(+[_WKElementAction _elementActionWithType:assistant:]):
(+[_WKElementAction elementActionWithType:customTitle:]):
(-[_WKElementAction runActionWithElementInfo:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheetAssistant.h: Add a method defaultActionsForLinkSheet.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet]): Get default actions for current link that is activated.
(-[WKActionSheetAssistant showLinkSheet]): Use defaultActionsForLinkSheet.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewViewControllerForPosition:inSourceView:]): Pass defaultActions and elementInfo to UIDelegate when querying
for preview view controller.
(-[WKContentView didDismissPreviewViewController:committing:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186377
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 6 Jul 2015 21:11:17 +0000 (21:11 +0000)]
[Mac] REGRESSION: (r181403) Enter/Exit full screen on 1x secondary display plugged into 2x Mac displays WebView as 1/4 size during transition
https://bugs.webkit.org/show_bug.cgi?id=146651
Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-07-06
Reviewed by Simon Fraser.
* platform/mac/WebCoreFullScreenPlaceholderView.mm: set layerContentsPlacement
to NSViewLayerContentsPlacementScaleProportionallyToFit so AppKit resizes the
content CALayer to fit in the WebView.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186376
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Mon, 6 Jul 2015 21:07:31 +0000 (21:07 +0000)]
Reduce the memory usage of the prefix tree
https://bugs.webkit.org/show_bug.cgi?id=146615
Reviewed by Sam Weinig.
This patch introduces two little changes that reduces the size
of the prefix tree by about 40%.
First, the Terms are interned. The new class CombinedFiltersAlphabet
takes care of keeping a unique version of each term for use
by the CombinedURLFilters.
Since each Term is fairly big but we have a small number of
unique term, we significantly reduce the edge size.
Second, the actions are no longer stored on each Vertex.
They are now stored on the side, in a HashMap indexed by
their Vertex.
This works well because the Actions are sparse over the tree.
Typically, only the leaves have actions. Internal vertices
sometime get actions but that's uncommon.
---
The next step to reduce the memory footprint would be to
make PrefixTreeVertex into a custom packed structure instead
of using a Vector.
Such change is very invasive and more error prone so I decided
against it for this patch.
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/CombinedFiltersAlphabet.cpp: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
(WebCore::ContentExtensions::TermCreatorTranslator::hash):
(WebCore::ContentExtensions::TermCreatorTranslator::equal):
(WebCore::ContentExtensions::TermCreatorTranslator::translate):
(WebCore::ContentExtensions::CombinedFiltersAlphabet::interned):
(WebCore::ContentExtensions::CombinedFiltersAlphabet::memoryUsed):
* contentextensions/CombinedFiltersAlphabet.h: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
(WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::hash):
(WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::equal):
* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::recursiveMemoryUsed):
(WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
(WebCore::ContentExtensions::prefixTreeVertexToString):
(WebCore::ContentExtensions::recursivePrint):
(WebCore::ContentExtensions::CombinedURLFilters::addPattern):
(WebCore::ContentExtensions::generateNFAForSubtree):
(WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
* contentextensions/CombinedURLFilters.h:
* contentextensions/ContentExtensionsDebugging.h:
* contentextensions/Term.h:
(WebCore::ContentExtensions::Term::isValid):
(WebCore::ContentExtensions::Term::destroy):
(WebCore::ContentExtensions::Term::memoryUsed):
(WebCore::ContentExtensions::Term::toString): Deleted.
(WebCore::ContentExtensions::TermHash::hash): Deleted.
(WebCore::ContentExtensions::TermHash::equal): Deleted.
(WebCore::ContentExtensions::Term::Term): Deleted.
(WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
(WebCore::ContentExtensions::Term::hasFixedLength): Deleted.
(WebCore::ContentExtensions::Term::operator==): Deleted.
(WebCore::ContentExtensions::Term::hash): Deleted.
(WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
(WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
(WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186375
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Mon, 6 Jul 2015 21:06:30 +0000 (21:06 +0000)]
[Content Extensions] Make the DFA transitions ranges instead of characters
https://bugs.webkit.org/show_bug.cgi?id=146575
Patch by Benjamin Poulain <benjamin@webkit.org> on 2015-07-06
Reviewed by Alex Christensen.
Source/WebCore:
This patch changes the DFA and code using the DFA to use ranges
to represent the transitions between any two nodes.
This patch builds on top of the tools introduced in r186079.
The DFA structure is basically the same as ImmutableNFA but without
any epsilon transitions.
This patch introduces a transition iterator to make the DFA
compatible with the existing algorithms.
---
The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions
of two nodes is one by merging the range list of each not into a common
MutableRangeList.
The data converter takes care of creating the signature of the combination.
The code got simpler since MutableRangeList does most of the work now. It is also
much faster.
---
The minimizer is more intersting.
With the current algorithm, we cannot resolve overlaps between ranges. On the other
hand, the minimizer does not care about the symbol of the transitions if we are careful
to partition transitions of the same symbol together.
What I did was to turn the minimizer into a pure transition based one, BUT each
"symbol" is actually an unbreakable range.
The first step is to go over all the transitions of all the nodes and find the largest
ranges such that the alphabet of interest is covered but there is not a single intersection
between any two nodes (what I called "singular transitions" in the code).
This can be done efficiently with MutableRangeList.
A little trick there is that I also used the converter to count how many real transition
overlaps any singular transition.
Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet
is simply the position of the singular transition in the list.
The partition of transition is created by populating each set with all the transition that
overlaps the symbols.
Note that since the partition is created on the fly, the Transition structure used for
repartitioning only contains the source of the transitions.
Once our transition parition has been carefuly created, we can completely forget about
the symbols and only work with subsets.
Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer
will find the minimial solution for well formed input.
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/DFA.cpp:
(WebCore::ContentExtensions::DFA::memoryUsed):
(WebCore::ContentExtensions::printTransitions):
(WebCore::ContentExtensions::DFANode::actions): Deleted.
(WebCore::ContentExtensions::DFANode::transitions): Deleted.
(WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted.
(WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted.
(WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted.
(WebCore::ContentExtensions::DFANode::containsTransition): Deleted.
(WebCore::ContentExtensions::DFANode::kill): Deleted.
(WebCore::ContentExtensions::DFA::debugPrintDot): Deleted.
* contentextensions/DFA.h:
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::range):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::target):
(WebCore::ContentExtensions::DFANode::RangeIterator::range):
(WebCore::ContentExtensions::DFANode::RangeIterator::target):
(WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
(WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
* contentextensions/DFACombiner.cpp:
(WebCore::ContentExtensions::DFAMerger::TargetConverter::convert):
(WebCore::ContentExtensions::DFAMerger::TargetConverter::extend):
(WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature):
(WebCore::ContentExtensions::DFAMerger::merge):
(WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
(WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted.
(WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted.
(WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted.
(WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted.
(WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted.
* contentextensions/DFAMinimizer.cpp:
(WebCore::ContentExtensions::DFAMinimizer::minimize):
* contentextensions/DFANode.cpp: Added.
(WebCore::ContentExtensions::DFANode::actions):
(WebCore::ContentExtensions::DFANode::containsTransition):
(WebCore::ContentExtensions::DFANode::kill):
(WebCore::ContentExtensions::DFANode::canUseFallbackTransition):
(WebCore::ContentExtensions::DFANode::bestFallbackTarget):
* contentextensions/DFANode.h:
(WebCore::ContentExtensions::CharRange::size):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::first):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::last):
(WebCore::ContentExtensions::DFANode::ConstRangeIterator::data):
(WebCore::ContentExtensions::DFANode::IterableConstRange::begin):
(WebCore::ContentExtensions::DFANode::IterableConstRange::end):
(WebCore::ContentExtensions::DFANode::transitions):
(WebCore::ContentExtensions::DFANode::RangeIterator::operator*):
(WebCore::ContentExtensions::DFANode::RangeIterator::operator==):
(WebCore::ContentExtensions::DFANode::RangeIterator::operator!=):
(WebCore::ContentExtensions::DFANode::RangeIterator::operator++):
(WebCore::ContentExtensions::DFANode::RangeIterator::first):
(WebCore::ContentExtensions::DFANode::RangeIterator::last):
(WebCore::ContentExtensions::DFANode::RangeIterator::data):
(WebCore::ContentExtensions::DFANode::IterableRange::begin):
(WebCore::ContentExtensions::DFANode::IterableRange::end):
(WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted.
(WebCore::ContentExtensions::DFANode::transitionsLength): Deleted.
(WebCore::ContentExtensions::DFANode::transitionsStart): Deleted.
(WebCore::ContentExtensions::DFANode::resetTransitions): Deleted.
(WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted.
* contentextensions/ImmutableNFA.h:
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first):
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last):
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range):
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted.
(WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted.
* contentextensions/ImmutableNFANodeBuilder.h:
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first):
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last):
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted.
(WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted.
* contentextensions/MutableRange.h:
(WebCore::ContentExtensions::MutableRange::size): Deleted.
* contentextensions/MutableRangeList.h:
(WebCore::ContentExtensions::MutableRangeList::ConstIterator::first):
(WebCore::ContentExtensions::MutableRangeList::ConstIterator::last):
(WebCore::ContentExtensions::MutableRangeList::ConstIterator::data):
(WebCore::ContentExtensions::MutableRangeList::extend):
(WebCore::ContentExtensions::MutableRangeList::size):
(WebCore::ContentExtensions::MutableRangeList::initializeFrom):
* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::NFAToDFA::convert):
(WebCore::ContentExtensions::canUseFallbackTransition): Deleted.
(WebCore::ContentExtensions::findBestFallbackTarget): Deleted.
Tools:
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
* TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp:
Since the minimizer is perfect, we get the minimal solution now,
which is really cool!
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186374
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Mon, 6 Jul 2015 20:51:04 +0000 (20:51 +0000)]
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html crashes on Windows sometimes
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-parent-same-origin-deny.html>
* platform/win/TestExpectations: Mark test as crashing, too:
- http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-deny.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186373
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 20:45:48 +0000 (20:45 +0000)]
Fix ASSERT causing crashes in Inspector tests on the bots.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::enable): Reset stopwatch before starting it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186372
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Mon, 6 Jul 2015 20:14:01 +0000 (20:14 +0000)]
ShouldOpenExternalURLsPolicy should default to "Allow" for WK2 API loads.
<rdar://problem/
21640050> and https://bugs.webkit.org/show_bug.cgi?id=146563
Reviewed by Geoff Garen.
Source/WebKit2:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]): Move _loadRequest:withOptions: logic back here, just without options.
(-[WKWebView _loadRequest:withOptions:]): This SPI is now unneeded, but must remain inactive.
* UIProcess/WebPageProxy.h:
Tools:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke): For testing purposes, all pages should start with the
ShouldOpenExternalURLsPolicy set to "ShouldNotAllow"
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186371
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Mon, 6 Jul 2015 19:55:38 +0000 (19:55 +0000)]
Web Inspector: Clearing the console does not remove the unread message icon
https://bugs.webkit.org/show_bug.cgi?id=146649
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._clearLog): Removes the "unread" class from all scope bar items.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186370
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
beidson@apple.com [Mon, 6 Jul 2015 19:45:26 +0000 (19:45 +0000)]
Remove unused "m_isPrivate" flag on NetworkStorageSession.
https://bugs.webkit.org/show_bug.cgi?id=146648
Reviewed by Alex Christensen.
No new tests (No behavior change).
* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isPrivateBrowsingSession): Deleted.
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186369
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 19:44:23 +0000 (19:44 +0000)]
Web Inspector: Add a dedicated Network tab that is always live
https://bugs.webkit.org/show_bug.cgi?id=146568
Source/WebCore:
Make sure the executionStopwatch is always started and never stops so resource loads
always get timestamps, even when Timeline is not recording.
Reviewed by Joseph Pecoraro.
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::enable): Start executionStopwatch.
(WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
(WebCore::InspectorTimelineAgent::internalStop): Ditto.
Source/WebInspectorUI:
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.isTabTypeAllowed):
(WebInspector._tabContentViewForType):
(WebInspector._updateNewTabButtonState):
Add NetworkTabContentView to the right places.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.get persistentNetworkTimeline):
(WebInspector.TimelineManager.prototype._mainResourceDidChange):
(WebInspector.TimelineManager.prototype._resourceWasAdded):
Add a persistent network timeline that always has all resources.
* UserInterface/Images/Network.svg: Added.
* UserInterface/Main.html: Added new files.
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
Drive-by fix. The bottom was off by one. This caused misalignment between sidebar and content view when
scrolled all the way to the bottom of the content view.
* UserInterface/Views/NetworkGridContentView.css: Added.
(.content-view.network-grid > .data-grid):
(.content-view.network-grid > .data-grid th):
(.content-view.network-grid > .data-grid td):
(.content-view.network-grid > .data-grid table.data):
Mostly copied from TimelineView.css and NetworkTimelineView.css.
* UserInterface/Views/NetworkGridContentView.js: Added.
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline):
(WebInspector.NetworkGridContentView.prototype.get selectionPathComponents):
(WebInspector.NetworkGridContentView.prototype.get zeroTime):
(WebInspector.NetworkGridContentView.prototype.shown):
(WebInspector.NetworkGridContentView.prototype.hidden):
(WebInspector.NetworkGridContentView.prototype.closed):
(WebInspector.NetworkGridContentView.prototype.updateLayout):
(WebInspector.NetworkGridContentView.prototype.needsLayout):
(WebInspector.NetworkGridContentView.prototype.reset):
(WebInspector.NetworkGridContentView.prototype._processPendingRecords):
(WebInspector.NetworkGridContentView.prototype._networkTimelineReset):
(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkGridContentView.prototype._treeElementPathComponentSelected):
(WebInspector.NetworkGridContentView.prototype._dataGridNodeSelected):
Mostly copied from NetworkTimelineView.
* UserInterface/Views/NetworkSidebarPanel.css: Added.
(.sidebar > .panel.navigation.network > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.network > .navigation-bar):
(.sidebar > .panel.navigation.network > .title-bar):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
(.sidebar > .panel.navigation.network .item:hover:not(.selected) .status .close.status-button):
(.sidebar > .panel.navigation.network:not(.network-grid-content-view-showing) .status .go-to-arrow.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .status .close.status-button):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing .navigation-sidebar-panel-content-tree-outline.network-grid .item .subtitle):
(.sidebar > .panel.navigation.network > .content > .navigation-sidebar-panel-content-tree-outline):
(.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .navigation-sidebar-panel-content-tree-outline):
Mostly copied from TimelineSidebarPanel.css and NetworkTimelineView.css.
* UserInterface/Views/NetworkSidebarPanel.js: Added.
(WebInspector.NetworkSidebarPanel):
(WebInspector.NetworkSidebarPanel.prototype.closed):
(WebInspector.NetworkSidebarPanel.prototype.showDefaultContentView):
(WebInspector.NetworkSidebarPanel.prototype.saveStateToCookie):
(WebInspector.NetworkSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.NetworkSidebarPanel.prototype.hasCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
(WebInspector.NetworkSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
(WebInspector.NetworkSidebarPanel.prototype.treeElementAddedOrChanged):
(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
(WebInspector.NetworkSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.NetworkSidebarPanel.prototype._treeElementGoToArrowWasClicked):
(WebInspector.NetworkSidebarPanel.prototype._treeElementCloseButtonClicked):
(WebInspector.NetworkSidebarPanel.prototype._canShowDifferentContentView):
(WebInspector.NetworkSidebarPanel.prototype._treeElementSelected):
(WebInspector.NetworkSidebarPanel.prototype._scopeBarSelectionDidChange):
A hybrid of ResourceSidebarPanel and TimelineSidebarPanel.
* UserInterface/Views/NetworkTabContentView.js: Added.
(WebInspector.NetworkTabContentView):
(WebInspector.NetworkTabContentView.prototype.get type):
(WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
* UserInterface/Views/NewTabContentView.js:
(WebInspector.NewTabContentView): Add Network tab and sort the tabs by their localized name.
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.prototype._handleNewTabClick):
Drive-by fix. Don't fire the click event if the new tab button is disabled.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186368
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 19:44:16 +0000 (19:44 +0000)]
Update the localized strings file.
* English.lproj/Localizable.strings: Updated with the script.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186367
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zalan@apple.com [Mon, 6 Jul 2015 19:37:31 +0000 (19:37 +0000)]
Crash: LayoutState root's container is nullptr when the layout root is detached.
https://bugs.webkit.org/show_bug.cgi?id=146646
rdar://problem/
21371544
Reviewed by Simon Fraser.
This is a speculative fix to ensure that when the root of the LayoutState is detached
we don't try to access its container (nullptr).
This is related to trac.webkit.org/r185484.
Not reproducible.
* rendering/LayoutState.cpp:
(WebCore::LayoutState::LayoutState):
* rendering/LayoutState.h:
(WebCore::LayoutState::LayoutState): Deleted.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186366
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ossy@webkit.org [Mon, 6 Jul 2015 19:19:32 +0000 (19:19 +0000)]
URTBF after r186357 to fix non Cocoa platforms.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186365
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
achristensen@apple.com [Mon, 6 Jul 2015 18:14:18 +0000 (18:14 +0000)]
Unreviewed debug build fix after r186358.
* runtime/JSArray.cpp:
(JSC::JSArray::fastConcatWith):
Pass vm parameter to fastConcatType.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186363
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Mon, 6 Jul 2015 18:04:38 +0000 (18:04 +0000)]
With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
https://bugs.webkit.org/show_bug.cgi?id=146630
<rdar://problem/
21677340>
Follow-up.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Typo 1014 -> 1024
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186362
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
eric.carlson@apple.com [Mon, 6 Jul 2015 18:04:10 +0000 (18:04 +0000)]
[Mac] Inactive AirPlay route should automatically timeout
https://bugs.webkit.org/show_bug.cgi?id=146642
<rdar://problem/
21602955>
Automatically clear a media element's AirPlay connection after it has been paused
for 60 minutes, or after 8 minutes if it played to the end before pausing.
Reviewed by Brent Fulgham.
* Modules/mediasession/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionManager::WebMediaSessionManager): Initialize m_watchdogTimer.
(WebCore::WebMediaSessionManager::clientStateDidChange): Schedule watchdog timer configuration
if the client started playing or paused.
(WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Schedule watchdog timer configuration.
(WebCore::WebMediaSessionManager::toString): Print watchdog configuration flag.
(WebCore::WebMediaSessionManager::taskTimerFired): Call configureWatchdogTimer.
(WebCore::WebMediaSessionManager::configureWatchdogTimer): New, start or stop watchdog timer.
(WebCore::WebMediaSessionManager::watchdogTimerFired): Stop monitoring for targets, which
clears the route.
* Modules/mediasession/WebMediaSessionManager.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaState): Set DidPlayToEnd when appropriate.
* page/MediaProducer.h: Add DidPlayToEnd.
* platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
(WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Clear m_client, call
stopMonitoringPlaybackTargets.
(WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Send a neutered
MediaPlaybackTarget when m_outputDeviceMenuController is NULL.
(WebCore::MediaPlaybackTargetPickerMac::devicePicker): Add logging.
(WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Clear the menu
controller to cancel the route.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186361
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 6 Jul 2015 17:59:18 +0000 (17:59 +0000)]
Unreviewed, rolling out r185896.
https://bugs.webkit.org/show_bug.cgi?id=146647
Caused by a refcounting error in GTK+; it's actually legal for
the event to be null, just the gi annotations were wrong.
(Requested by mcatanzaro on #webkit).
Reverted changeset:
"[GTK] Crash performing drag-and-drop"
https://bugs.webkit.org/show_bug.cgi?id=146267
http://trac.webkit.org/changeset/185896
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186360
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 6 Jul 2015 17:45:29 +0000 (17:45 +0000)]
Array.concat should be fast for integer or double arrays
https://bugs.webkit.org/show_bug.cgi?id=146260
Reviewed by Darin Adler.
Added a fast path to Array.prototype.concat. When concatenating two Int32, Double, or Contiguous
arrays, simply memcopy the arrays into a new uninitialized buffer.
This improves huffman encoding in CompressionBench by 3.7x on a Mid 2014 MacBookPro.
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncConcat):
* runtime/JSArray.cpp:
(JSC::JSArray::fastConcatWith): Added.
* runtime/JSArray.h:
(JSC::JSArray::fastConcatType): Added. Returns the resultant array's indexing type if we can use
the fact path. Returns NonArray otherwise.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186358
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Mon, 6 Jul 2015 17:42:27 +0000 (17:42 +0000)]
Provide API to clear the HSTS cache
https://bugs.webkit.org/show_bug.cgi?id=146565
rdar://problem/
20023805
Reviewed by Tim Horton.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::clearHSTSCache):
* Shared/WebsiteData/WebsiteDataTypes.h:
* UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
(dataTypesToString):
* UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
(WebKit::toWebsiteDataTypes):
(WebKit::toWKWebsiteDataTypes):
* UIProcess/API/Cocoa/WKWebsiteDataRecordPrivate.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186357
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Mon, 6 Jul 2015 17:10:05 +0000 (17:10 +0000)]
Unreviewed, rolling out r170639.
Broke using webkit-patch apply-attachment to apply an
attachment from a security bug. The patch incorrectly assumed
that Bugzilla returns a non-HTTP 200 status code in its HTTP
response when authentication is required.
Reverted changeset:
"webkit-patch apply-from-bug / apply-attachment should not ask
for credentials if none are required"
https://bugs.webkit.org/show_bug.cgi?id=40095
http://trac.webkit.org/changeset/170639
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186356
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Mon, 6 Jul 2015 16:44:37 +0000 (16:44 +0000)]
With multipart/replaced (e.g. motion JPEG), m_bufferedDataForCache grows unbounded in Networking process
https://bugs.webkit.org/show_bug.cgi?id=146630
<rdar://problem/
21677340>
Reviewed by Chris Dumez.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't buffer multipart/x-mixed-replace. We never want to cache these.
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Limit the maximum size of the cache buffer to 10MB. This prevents unbounded memory growth if the resource
keeps streaming. It also prevents giant entries from pushing other data out of the cache.
(WebKit::NetworkResourceLoader::didFinishLoading):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186355
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Mon, 6 Jul 2015 15:08:36 +0000 (15:08 +0000)]
Web Inspector: Mark console filters that have unseen messages by colored dots
https://bugs.webkit.org/show_bug.cgi?id=146616
Reviewed by Timothy Hatcher.
* UserInterface/Views/LogContentView.css:
(.log-scope-bar > li.unread::before):
(.log-scope-bar > li.unread:hover::before):
(.log-scope-bar > li.unread.errors::before):
(.log-scope-bar > li.unread.warnings::before):
(.log-scope-bar > li.unread.logs::before):
(@keyframes unread-background-pulse):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186354
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 6 Jul 2015 09:48:38 +0000 (09:48 +0000)]
[GTK] Guard X11-specific code in webkitWebViewBaseDidRelaunchWebProcess()
https://bugs.webkit.org/show_bug.cgi?id=146627
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDidRelaunchWebProcess):
Guard calls to DrawingAreaImpl::setNativeSurfaceHandleForCompositing()
that pass in an X11 Window ID with the PLATFORM(X11) build guards.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186333
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 6 Jul 2015 09:41:04 +0000 (09:41 +0000)]
[GTK] Fix build errors with OpenGL ES
https://bugs.webkit.org/show_bug.cgi?id=146626
Reviewed by Carlos Garcia Campos.
* platform/graphics/ANGLEWebKitBridge.h: Include <GLES2/gl2.h>
when building with OpenGL ES 2 support enabled.
(WebCore::ANGLEShaderSymbol::isSampler): Don't test for
OpenGL-specific GL_SAMPLER_2D_RECT_ARB value when OpenGL ES 2
support is enabled.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186330
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
youenn.fablet@crf.canon.fr [Mon, 6 Jul 2015 09:02:29 +0000 (09:02 +0000)]
[Streams API] Remove ReadableStream custom constructor
https://bugs.webkit.org/show_bug.cgi?id=146547
Reviewed by Darin Adler.
Source/JavaScriptCore:
Adding helper function to throw range errors.
* runtime/Error.h:
(JSC::throwRangeError):
(JSC::throwVMRangeError):
Source/WebCore:
Removed custom binding.
Made use of Dictionary in lieu of JSObject to reduce readable stream constructor parameter parsing.
Added support for passing ExecState to construtor within binding generator.
No change in behavior.
* Modules/streams/ReadableStream.cpp:
(WebCore::ReadableStream::create):
* Modules/streams/ReadableStream.h:
(WebCore::ReadableStream::create):
* Modules/streams/ReadableStream.idl:
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
* bindings/js/JSReadableStreamCustom.cpp:
* bindings/js/ReadableJSStream.cpp:
(WebCore::ReadableJSStream::create):
(WebCore::ReadableJSStream::ReadableJSStream):
* bindings/js/ReadableJSStream.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186323
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
youenn.fablet@crf.canon.fr [Mon, 6 Jul 2015 08:10:26 +0000 (08:10 +0000)]
Promise-returning functions should reject promises if the callee is not of the expected type
https://bugs.webkit.org/show_bug.cgi?id=146585
Reviewed by Darin Adler.
Source/WebCore:
Updated binding generator to reject promise in case the casting of the thisValue is not working properly
(i.e. the callee is not wrapping a DOM object of the expected class.
Covered by rebased test and binding expectations.
* bindings/js/JSDOMPromise.h:
(WebCore::callPromiseFunction): Removed wrapper class parameter.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp: Updated binding expectations.
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
(WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise):
LayoutTests:
* streams/reference-implementation/brand-checks-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186312
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 07:13:43 +0000 (07:13 +0000)]
Web Inspector: Exceptions in Network timeline when resource updates and filters are applied
https://bugs.webkit.org/show_bug.cgi?id=146609
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.insertChild):
(WebInspector.DataGrid.prototype.removeChild):
(WebInspector.DataGridNode.prototype.savePosition):
Convert exceptions to asserts and early returns.
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes): Add some asserts and checks.
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline.prototype.appendChild):
(WebInspector.TreeOutline.prototype.insertChild):
(WebInspector.TreeOutline.prototype.removeChildAtIndex):
(WebInspector.TreeOutline.prototype.removeChild):
Convert exceptions to asserts and early returns.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186306
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Mon, 6 Jul 2015 06:32:02 +0000 (06:32 +0000)]
[WK2] Current page's scroll position is lost when transferring sessionState from one view to another
https://bugs.webkit.org/show_bug.cgi?id=146625
<rdar://problem/
21585268>
Reviewed by Gavin Barraclough.
Source/WebCore:
Export HistoryController:saveScrollPositionAndViewStateToItem()
so that it can be called from WebKit2.
* loader/HistoryController.h:
Source/WebKit2:
The current page's scroll position was lost when transferring the
sessionState from one view to another. This is because we only update
the current WebBackForwardListItem after navigating away.
However, when the client swaps WebViews for navigating, we don't detect
this as navigating away and the current WebBackForwardListItem is not
updated with the current page's state (including the scroll position).
This means that the information is not transferred via the sessionState
and the scroll position (among other things) ends up being lost when
navigating back in the new WebView.
Retrieving the session state is a synchronous API and we want to avoid
doing a synchronous IPC between the UIProcess and the WebProcess to
retrieve the current page's state. Therefore, the approach chosen in
this patch is to detect when the user is done scrolling the main frame
(using a HystererisActivity) and then update the scroll position on the
current HistoryItem. This way, the current WebBackForwardListItem
normally has an up-to-date scroll position for the main frame when the
sessionState is queried by the client.
The solution is not perfect as we don't keep the whole page state
up-to-date for the current WebBackForwardListItem, only the main frame
state. However, the proposed solution is cheap, avoid synchronous IPC
and provides a much better user experience in most cases.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::pageDidScroll):
(WebKit::WebPage::pageStoppedScrolling):
* WebProcess/WebPage/WebPage.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186304
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 06:26:06 +0000 (06:26 +0000)]
Web Inspector: Cached resources are missing startTime and size in Network timeline
https://bugs.webkit.org/show_bug.cgi?id=146607
Reviewed by Joseph Pecoraro.
* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache): Pass elapsedTime in the right argument order.
Add missing calls to Resource.increaseSize and Resource.increaseTransferSize.
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse): Pass elapsedTime in the right argument order.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186303
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 06:23:57 +0000 (06:23 +0000)]
Web Inspector: Dim more borders when the window is inactive
https://bugs.webkit.org/show_bug.cgi?id=146608
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.css:
(body.window-inactive .data-grid th):
(body.window-inactive .data-grid :matches(th, td):not(:last-child)):
* UserInterface/Views/NavigationSidebarPanel.css:
(body.window-inactive .sidebar > .panel.navigation > .overflow-shadow):
* UserInterface/Views/OverviewTimelineView.css:
(body.window-inactive .timeline-view.overview > .timeline-ruler > .header):
* UserInterface/Views/TimelineDataGrid.css:
(body.window-inactive .data-grid.timeline th):
(body.window-inactive .data-grid.timeline > .navigation-bar-container > .navigation-bar):
* UserInterface/Views/TimelineRuler.css:
(body.window-inactive .timeline-ruler > .header):
(body.window-inactive .timeline-ruler > .header > .divider):
* UserInterface/Views/TimelineSidebarPanel.css:
(body.window-inactive .sidebar > .panel.navigation.timeline > .status-bar):
(body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar):
(body.window-inactive .sidebar > .panel.navigation.timeline > .title-bar.timeline-events):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186302
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Mon, 6 Jul 2015 06:20:27 +0000 (06:20 +0000)]
Web Inspector: Timeline row selection should have same background color in sidebar and data grid
https://bugs.webkit.org/show_bug.cgi?id=146606
Support a force-focus class name that TreeOutlineDataGridSynchronizer applies when one of the
elements is focused, so the other can look focused too.
Reviewed by Joseph Pecoraro.
* UserInterface/Views/DataGrid.css:
(.data-grid:matches(:focus, .force-focus) tr.selected td:not(:last-child)):
(.data-grid:matches(:focus, .force-focus) tr.parent.selected td.disclosure::before):
(.data-grid:matches(:focus, .force-focus) tr.parent.expanded.selected td.disclosure::before):
(.data-grid:matches(:focus, .force-focus) tr.selected):
(.data-grid:matches(:focus, .force-focus) tr.selected td .subtitle):
* UserInterface/Views/Main.css:
(:matches(:focus, .force-focus) .selected .go-to-arrow):
(:matches(:focus, .force-focus) .selected .go-to-arrow:active):
* UserInterface/Views/NavigationSidebarPanel.css:
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .disclosure-button):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected.expanded .disclosure-button):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected):
(.navigation-sidebar-panel-content-tree-outline:matches(:focus, .force-focus) .item.selected .subtitle):
* UserInterface/Views/TreeElementStatusButton.css:
(:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .filled):
(:matches(:focus, .force-focus) .item.selected > .status > .status-button > svg .stroked):
* UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
(WebInspector.TreeOutlineDataGridSynchronizer):
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridGainedFocus): Added.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridLostFocus): Added.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineGainedFocus): Added.
(WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineLostFocus): Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186301
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 6 Jul 2015 04:36:01 +0000 (04:36 +0000)]
Update toLength / toInteger names in control profiler test results
https://bugs.webkit.org/show_bug.cgi?id=146229
Reviewed by Simon Fraser.
ToLength / ToInteger are renamed to toLength / toInteger.
Update the names in the test results for control profiler.
* fast/profiler/built-in-function-calls-anonymous-expected.txt:
* fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186300
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
simon.fraser@apple.com [Mon, 6 Jul 2015 04:29:25 +0000 (04:29 +0000)]
REGRESSION (r180582): background-attachment: local; does not scroll the background image when scrolling the the element's contents
https://bugs.webkit.org/show_bug.cgi?id=146623
Reviewed by Zalan Bujtas.
Source/WebCore:
r180582 erroneously asserted that m_destOrigin in BackgroundImageGeometry was unused.
However, it is needed to compute the correct phase when the destination rect is
altered by clipping.
Test: fast/backgrounds/background-attachment-local.html
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
* rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundImageGeometry::relativePhase):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
LayoutTests:
Ref test for background-attachment: local.
* fast/backgrounds/background-attachment-local-expected.html: Added.
* fast/backgrounds/background-attachment-local.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186299
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
utatane.tea@gmail.com [Mon, 6 Jul 2015 02:01:27 +0000 (02:01 +0000)]
[ES6] Implement the latest Promise spec in JS
https://bugs.webkit.org/show_bug.cgi?id=146229
Reviewed by Sam Weinig.
Source/JavaScriptCore:
Updated the Promise implementation to meet to the ES6 spec.
This patch
1. Implement ES6 Promise and related abstract operations in builtins JS
2. Expose @enqueueJob private function to JS world to post the microtask
Updated implementation has one-on-one correspondence to the ES6 spec description.
And keep the JSPromiseDeferred because it is the interface used from the WebCore.
* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/Array.prototype.js:
(reduce):
(reduceRight):
(every):
(forEach):
(filter):
(map):
(some):
(fill):
(find):
(findIndex):
(includes):
(copyWithin):
ToInteger / ToLength are renamed to toInteger and toLength.
* builtins/ArrayConstructor.js:
(from):
ToInteger / ToLength are renamed to toInteger and toLength.
* builtins/GlobalObject.js:
(toInteger):
(toLength):
(isObject):
(ToInteger): Deleted.
(ToLength): Deleted.
ToInteger / ToLength are renamed to toInteger and toLength.
Add new abstract operation, isObject.
* builtins/Operations.Promise.js: Added.
(isPromise):
(newPromiseReaction):
(newPromiseDeferred):
(newPromiseCapability.executor):
(newPromiseCapability):
(triggerPromiseReactions):
(rejectPromise):
(fulfillPromise):
(createResolvingFunctions.resolve):
(createResolvingFunctions.reject):
(createResolvingFunctions):
(promiseReactionJob):
(promiseResolveThenableJob):
(initializePromise):
Added Promise related abstract operations.
* builtins/Promise.prototype.js:
(catch):
(.onFulfilled):
(.onRejected):
(then):
Promise#then implementation in JS.
* builtins/PromiseConstructor.js: Added.
(all.newResolveElement):
(all):
(race):
(reject):
(resolve):
Promise static functions implementations in JS.
* builtins/StringConstructor.js:
(raw):
ToInteger / ToLength are renamed to toInteger and toLength.
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::enqueueJob):
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::initializePromiseFunction):
(JSC::JSGlobalObject::newPromiseDeferredFunction):
* runtime/JSJob.cpp: Renamed from Source/JavaScriptCore/runtime/JSPromiseReaction.h.
(JSC::createJSJob):
(JSC::JSJobMicrotask::run):
* runtime/JSJob.h: Renamed from Source/JavaScriptCore/runtime/JSPromiseFunctions.h.
* runtime/JSPromise.cpp:
(JSC::JSPromise::create):
(JSC::JSPromise::JSPromise):
(JSC::JSPromise::finishCreation):
(JSC::JSPromise::result):
(JSC::JSPromise::destroy): Deleted.
(JSC::JSPromise::visitChildren): Deleted.
(JSC::JSPromise::reject): Deleted.
(JSC::JSPromise::resolve): Deleted.
(JSC::JSPromise::appendResolveReaction): Deleted.
(JSC::JSPromise::appendRejectReaction): Deleted.
(JSC::triggerPromiseReactions): Deleted.
* runtime/JSPromise.h:
(JSC::JSPromise::status): Deleted.
(JSC::JSPromise::result): Deleted.
(JSC::JSPromise::constructor): Deleted.
* runtime/JSPromiseConstructor.cpp:
(JSC::constructPromise):
(JSC::JSPromiseConstructorFuncResolve): Deleted.
(JSC::JSPromiseConstructorFuncReject): Deleted.
(JSC::performPromiseRaceLoop): Deleted.
(JSC::JSPromiseConstructorFuncRace): Deleted.
(JSC::performPromiseAll): Deleted.
(JSC::JSPromiseConstructorFuncAll): Deleted.
* runtime/JSPromiseDeferred.cpp:
(JSC::JSPromiseDeferred::create):
(JSC::createJSPromiseDeferredFromConstructor): Deleted.
(JSC::updateDeferredFromPotentialThenable): Deleted.
(JSC::performDeferredResolve): Deleted.
(JSC::performDeferredReject): Deleted.
(JSC::abruptRejection): Deleted.
* runtime/JSPromiseDeferred.h:
* runtime/JSPromiseFunctions.cpp: Removed.
(JSC::deferredConstructionFunction): Deleted.
(JSC::createDeferredConstructionFunction): Deleted.
(JSC::identifyFunction): Deleted.
(JSC::createIdentifyFunction): Deleted.
(JSC::promiseAllCountdownFunction): Deleted.
(JSC::createPromiseAllCountdownFunction): Deleted.
(JSC::promiseResolutionHandlerFunction): Deleted.
(JSC::createPromiseResolutionHandlerFunction): Deleted.
(JSC::rejectPromiseFunction): Deleted.
(JSC::createRejectPromiseFunction): Deleted.
(JSC::resolvePromiseFunction): Deleted.
(JSC::createResolvePromiseFunction): Deleted.
(JSC::throwerFunction): Deleted.
(JSC::createThrowerFunction): Deleted.
* runtime/JSPromisePrototype.cpp:
(JSC::JSPromisePrototypeFuncThen): Deleted.
* runtime/JSPromiseReaction.cpp: Removed.
(JSC::createExecutePromiseReactionMicrotask): Deleted.
(JSC::ExecutePromiseReactionMicrotask::run): Deleted.
(JSC::JSPromiseReaction::create): Deleted.
(JSC::JSPromiseReaction::JSPromiseReaction): Deleted.
(JSC::JSPromiseReaction::finishCreation): Deleted.
(JSC::JSPromiseReaction::visitChildren): Deleted.
* runtime/VM.cpp:
(JSC::VM::VM): Deleted.
* runtime/VM.h:
LayoutTests:
Add a test to guarantee that `Promise.resolve` looks up `then` field synchronously.
* js/dom/Promise-resolve-lookup-then-expected.txt: Added.
* js/dom/Promise-resolve-lookup-then.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186298
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 23:09:44 +0000 (23:09 +0000)]
REGRESSION (El Capitan): Slider thumb of range input is rotated on reference tests
Fix tracked by <rdar://problem/
21677831>.
* platform/mac/TestExpectations: Mark tests as image-only failures:
- css3/flexbox/flexitem-stretch-range.html
- fast/forms/range/input-appearance-range-rtl.html
- fast/forms/range/range-change-min-max.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186297
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
timothy@apple.com [Sun, 5 Jul 2015 20:36:10 +0000 (20:36 +0000)]
Crash when closing the web inspector
https://bugs.webkit.org/show_bug.cgi?id=146620
Reviewed by Darin Adler.
* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::closeWindow): Null check the connection, like it is
in other places where it is used.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186296
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:35 +0000 (19:10 +0000)]
REGRESSION (r186198): js/dom/global-constructors-attributes.html fails on El Capitan
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
Update results after r186198.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186295
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:30 +0000 (19:10 +0000)]
fast/canvas/webgl/oes-texture-half-float-linear.html is flakey on Yosemite Release/Debug WK1/WK2
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fcanvas%2Fwebgl%2Foes-texture-half-float-linear.html>
* platform/mac/TestExpectations: Mark test as flaky:
- fast/canvas/webgl/oes-texture-half-float-linear.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186294
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:25 +0000 (19:10 +0000)]
fast/forms/textarea/textarea-state-restore.html is flaky on WK2
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fforms%2Ftextarea%2Ftextarea-state-restore.html>
Fix tracked by <http://webkit.org/b/90980>.
* platform/efl/TestExpectations: Move expectation from here...
* platform/gtk/TestExpectations: ...and here...
* platform/wk2/TestExpectations: ...to here:
- fast/forms/textarea/textarea-state-restore.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186293
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:19 +0000 (19:10 +0000)]
http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html crashes on Windows Debug
<https://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2Fsecurity%2FXFrameOptions%2Fx-frame-options-parent-same-origin-allow.html>
* platform/win/TestExpectations: Mark as crashing:
- http/tests/security/XFrameOptions/x-frame-options-parent-same-origin-allow.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186292
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:13 +0000 (19:10 +0000)]
webgl/1.0.2/conformance/more/functions/copyTexImage2DBadArgs.html fails due to truncated expected results on Yosemite Debug WK1
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=webgl%2F1.0.2%2Fconformance%2Fmore%2Ffunctions%2FcopyTexImage2DBadArgs.html>
Fix tracked by <http://webkit.org/b/146622>.
* platform/mac-wk1/TestExpectations: Mark as flaky:
- webgl/1.0.2/conformance/more/functions/copyTexImage2DBadArgs.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186291
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 5 Jul 2015 19:10:08 +0000 (19:10 +0000)]
fast/preloader/document-write-2.html is flaky on WK2
<http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fpreloader%2Fdocument-write-2.html>
When the test fails, the first two lines are reversed:
@@ -1,2 +1,2 @@
+script1.js has MIME type text/javascript
document-write-plaintext.js has MIME type text/javascript
-script1.js has MIME type text/javascript
* platform/wk2/TestExpectations: Mark test as flaky:
- fast/preloader/document-write-2.html
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186290
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sun, 5 Jul 2015 18:46:54 +0000 (18:46 +0000)]
Web Inspector: Deleting in the CSS sidebar causes the warning icon to appear mid-word
https://bugs.webkit.org/show_bug.cgi?id=146617
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): Now removes all marks whenever the user deletes.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded): The invalid marker now calculates
it's position based off of where the semicolon is in the property text.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186289
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sun, 5 Jul 2015 18:23:44 +0000 (18:23 +0000)]
Web Inspector: CSS rule with 2 pseudo-selectors appears twice
https://bugs.webkit.org/show_bug.cgi?id=146576
Reviewed by Timothy Hatcher.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh):
Only adds pseudo-elements if the previous pseudo-element has a different selector.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186288
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sun, 5 Jul 2015 08:15:03 +0000 (08:15 +0000)]
[WK2] WebBackForwardListItems' pageState is not kept up-to-date
https://bugs.webkit.org/show_bug.cgi?id=146614
<rdar://problem/
21585268>
Reviewed by Gavin Barraclough.
WebBackForwardListItems' pageState on UIProcess-side were not kept
up-to-date when it was updated on WebContent process side. This meant
that we were losing the scroll position (among other things) when
transferring the session state over from one view to another.
We now call notifyHistoryItemChanged(item) after saving the scroll
position and the view state on the HistoryItem. As a result, the
WebBackForwardListProxy will send the updated pageState to the
UIProcess.
* history/HistoryItem.cpp:
(WebCore::HistoryItem::notifyChanged):
* history/HistoryItem.h:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186287
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:51:32 +0000 (21:51 +0000)]
Web Inspector: Wrong cursor position in styles panel when deleting a line break
https://bugs.webkit.org/show_bug.cgi?id=146577
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleBeforeChange): If the change is a deletion at the beginning of a line,
remove all markers on that line to ensure that there is no blank space on the previous line after deleting.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186286
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:49:54 +0000 (21:49 +0000)]
Web Inspector: Pressing tab on a newline in the console should insert a tab character
https://bugs.webkit.org/show_bug.cgi?id=146612
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsolePrompt.js:
(WebInspector.ConsolePrompt.prototype._handleTabKey): Tabs can now be inserted at the beginning of newlines and before the first
non-space character on any other line.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186285
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:48:09 +0000 (21:48 +0000)]
Web Inspector: Pressing enter on a newline in the styles sidebar inserts a semicolon
https://bugs.webkit.org/show_bug.cgi?id=146611
Reviewed by Timothy Hatcher.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._handleEnterKey): Now returns if the line is empty.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186284
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:46:29 +0000 (21:46 +0000)]
Web Inspector: Console should indicate if you have unseen messages in console due to filters
https://bugs.webkit.org/show_bug.cgi?id=143166
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.updatePreviousMessageRepeatCount): Now returns true/false depending on if
the message count was actually updated.
* UserInterface/Views/LogContentView.css:
(.log-scope-bar > li.unread): Applies the unread-border-pulse keyframe animation.
(.log-scope-bar > li.unread.errors): The pulsing border is colored red.
(.log-scope-bar > li.unread.warnings): The pulsing border is colored yellow(ish).
(.log-scope-bar > li.unread.logs): The pulsing border is colored grey.
(@keyframes unread-border-pulse): Changes the color of the border from transparent to whatever is specificed.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype._determineMessageLevel):
(WebInspector.LogContentView.prototype._pulseScopeBarItemBorder): Adds the class "unread" to the scope bar item whose panel
the newest message belongs to, but only if that panel or the All panel is not visible.
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
(WebInspector.LogContentView.prototype._scopeBarSelectionDidChange): Clears the "unread" class on the selected scope bar item.
(WebInspector.LogContentView.prototype._filterMessageElements):
* UserInterface/Views/ScopeBar.js:
(WebInspector.ScopeBar.prototype.get items): Returns a list of all the items in the scope bar.
* UserInterface/Views/ScopeBarItem.js:
(WebInspector.ScopeBarItem): Added another parameter to allow for a custom class name.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186283
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:44:46 +0000 (21:44 +0000)]
Web Inspector: Pseudo Styles Ordering and Media Queries
https://bugs.webkit.org/show_bug.cgi?id=145979
Reviewed by Timothy Hatcher.
* UserInterface/Views/RulesStyleDetailsPanel.css:
(.sidebar > .panel.details.css-style > .content.filter-in-progress .label:not(.filter-section-non-matching) + .label.filter-matching-label:not(.filter-section-non-matching)):
Fix filter label styling with pseudo selectors.
* UserInterface/Views/RulesStyleDetailsPanel.js:
(WebInspector.RulesStyleDetailsPanel.prototype.refresh): Pseudo-selector rules will now order directly after the last style that
matches the pseudo-selector without the pseudo-element. If no rules match, place the pseudo-selector rules above the first
inherited or UserAgent rule (whichever comes first).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186282
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
drousso@apple.com [Sat, 4 Jul 2015 21:41:27 +0000 (21:41 +0000)]
REGRESSION(r184000): Web Inspector: Multiline CSS in Styles Sidebar is marked as invalid
https://bugs.webkit.org/show_bug.cgi?id=146178
Reviewed by Timothy Hatcher.
First changes made by Tobias Reiss <tobi+webkit@basecode.de>
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css: Added.
* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values-expected.css: Added.
* Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values.css: Added.
* Tools/PrettyPrinting/index.html:
Add regression tests.
* UserInterface/Views/CodeMirrorFormatters.js:
Remove newlines before values that belong in one line and add whitespace between values.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186281
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sat, 4 Jul 2015 21:31:08 +0000 (21:31 +0000)]
Unreviewed Windows build fix after r186279.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::destroyVideoLayer):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::destroyRenderer):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186280
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
cdumez@apple.com [Sat, 4 Jul 2015 19:42:18 +0000 (19:42 +0000)]
Drop RefPtr::clear() method
https://bugs.webkit.org/show_bug.cgi?id=146556
Reviewed by Brady Eidson.
Source/JavaScriptCore:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebCore:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit/mac:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit/win:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit2:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WTF:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Also made the "= nullptr;" pattern as efficient as clear()
by providing a operator=(nullptr_t) overload. Local micro-
benchmarking showed that "= nullptr;" used to be ~1.7% slower
than clear().
Tools:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186279
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
nvasilyev@apple.com [Sat, 4 Jul 2015 14:45:09 +0000 (14:45 +0000)]
Web Inspector: The arrow that appears for Web Inspector Layout & Rendering records overlaps the category switcher
https://bugs.webkit.org/show_bug.cgi?id=146605
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineDataGrid.css:
(.data-grid.timeline > .navigation-bar-container):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186278
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sat, 4 Jul 2015 04:13:00 +0000 (04:13 +0000)]
Just give up on -Wunreachable-code in JavaScriptCore.
* Configurations/Base.xcconfig:
* llint/LowLevelInterpreter.cpp:
(JSC::CLoop::execute):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186277
268f45cc-cd09-0410-ab3c-
d52691b4dbfc