WebKit-https.git
4 years agoWeb Inspector: Improve display of previews with overflow
commit-queue@webkit.org [Thu, 5 Mar 2015 05:13:46 +0000 (05:13 +0000)]
Web Inspector: Improve display of previews with overflow
https://bugs.webkit.org/show_bug.cgi?id=142321

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

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView.prototype._appendEntryPreviews):
(WebInspector.ObjectPreviewView.prototype._appendPropertyPreviews):

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

4 years agoOptimize content extensions.
commit-queue@webkit.org [Thu, 5 Mar 2015 04:54:08 +0000 (04:54 +0000)]
Optimize content extensions.
https://bugs.webkit.org/show_bug.cgi?id=142295

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-04
Reviewed by Benjamin Poulain.

* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::serializeActions):
There is no need to add duplicate sequential actions.
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::operator==):
Added to compare actions.
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
Return early if a block action is found instead of moving to the next extension.

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

4 years agoHide Promise with runtime flags under Cocoa JSContext API
utatane.tea@gmail.com [Thu, 5 Mar 2015 04:25:49 +0000 (04:25 +0000)]
Hide Promise with runtime flags under Cocoa JSContext API
https://bugs.webkit.org/show_bug.cgi?id=141965

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Since there's no run loop in JavaScriptCore APIs, Promises don't work currently.
So until they work, we hide Promise from a global object.
Introduce new JSC runtime flag, PromiseDisabled. When `isPromiseDisabled` is true,
Promise constructor is not attached to JSGlobalObject.

To make 0 as default runtime flags, we choose PromiseDisabled flag
instead of PromiseEnabled flag. So by default, Promise is enabled.

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject<Parent>::JSCallbackObject):
* API/JSContextRef.cpp:
(javaScriptRuntimeFlags):
(JSGlobalContextCreateInGroup):
* API/tests/testapi.c:
(main):
* API/tests/testapi.mm:
(testObjectiveCAPI):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::create):
* runtime/RuntimeFlags.h:
(JSC::RuntimeFlags::createAllEnabled):

Source/WebKit/mac:

Add new JSC runtime flag, PromiseDisabled.

* WebView/WebPreferencesPrivate.h:

Source/WebKit/win:

Add new JSC runtime flag, PromiseDisabled.

* Interfaces/IWebPreferences.idl:
* Interfaces/IWebPreferencesPrivate.idl:

Source/WebKit2:

Add new JSC runtime flag, PromiseDisabled.

* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:

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

4 years agoUnreviewed, rolling out r181054.
commit-queue@webkit.org [Thu, 5 Mar 2015 02:35:59 +0000 (02:35 +0000)]
Unreviewed, rolling out r181054.
https://bugs.webkit.org/show_bug.cgi?id=142320

Broke the api tests (Requested by sundiamonde on #webkit).

Reverted changeset:

"Fix linker warnings in TestWebKitAPI."
https://bugs.webkit.org/show_bug.cgi?id=141912
http://trac.webkit.org/changeset/181054

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

4 years agoUnreviewed, rolling out r181046.
commit-queue@webkit.org [Thu, 5 Mar 2015 02:27:44 +0000 (02:27 +0000)]
Unreviewed, rolling out r181046.
https://bugs.webkit.org/show_bug.cgi?id=142318

Broke two layout tests (Requested by sundiamonde on #webkit).

Reverted changeset:

"Update inline media control icons for OSX."
https://bugs.webkit.org/show_bug.cgi?id=142305
http://trac.webkit.org/changeset/181046

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

4 years agoWeb Inspector: Array/Collection Sizes should be visible and distinct
commit-queue@webkit.org [Thu, 5 Mar 2015 02:27:23 +0000 (02:27 +0000)]
Web Inspector: Array/Collection Sizes should be visible and distinct
https://bugs.webkit.org/show_bug.cgi?id=142254

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

Source/JavaScriptCore:

* runtime/WeakMapData.h:
(JSC::WeakMapData::size):
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::weakMapSize):
* inspector/JSInjectedScriptHost.h:
* inspector/JSInjectedScriptHostPrototype.cpp:
(Inspector::JSInjectedScriptHostPrototype::finishCreation):
(Inspector::jsInjectedScriptHostPrototypeFunctionWeakMapSize):
Add a way to get a WeakMap's size.

* inspector/protocol/Runtime.json:
Include size in RemoteObject and ObjectPreview.

* inspector/InjectedScriptSource.js:
Set the size of RemoteObjects and previews if they
are array/collection types.

Source/WebInspectorUI:

* UserInterface/Models/ObjectPreview.js:
(WebInspector.ObjectPreview):
(WebInspector.ObjectPreview.fromPayload):
(WebInspector.ObjectPreview.prototype.get size):
(WebInspector.ObjectPreview.prototype.hasSize):
* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPrimitiveValue):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get size):
(WebInspector.RemoteObject.prototype.hasSize):
Check if this type has a size and get the size.
Gracefully handle construction for legacy protocols.

* UserInterface/Views/ObjectPreviewView.css:
(.object-preview > .size):
* UserInterface/Views/FormattedValue.css:
(:matches(.formatted-array, .formatted-map, .formatted-set, .formatted-weakmap) > .size):
Style the array/collection size.

* UserInterface/Views/ObjectPreviewView.js:
(WebInspector.ObjectPreviewView):
* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createElementForTypesAndValue):
(WebInspector.FormattedValue.createElementForRemoteObject):
(WebInspector.FormattedValue.createElementForObjectPreview):
(WebInspector.FormattedValue.createElementForPropertyPreview):
Add an element showing the array/collection size.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
(WebInspector.ObjectTreePropertyTreeElement.prototype):
Remove special handling for Array sizes now that this is handled earlier.

* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype.processData):
(WebInspector.StorageManager.prototype.requestIndexedDatabaseData):
Fix what looks like broken RemoteObject construction.

LayoutTests:

* inspector-protocol/runtime/getProperties-expected.txt:
* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Update tests now that RemoteObjects and Previews may have an explicit size.

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

4 years agoGC should compute stack bounds and dump registers at the earliest opportunity.
akling@apple.com [Thu, 5 Mar 2015 02:19:14 +0000 (02:19 +0000)]
GC should compute stack bounds and dump registers at the earliest opportunity.
<https://webkit.org/b/142310>
<rdar://problem/20045624>

Reviewed by Geoffrey Garen.

Make Heap::collect() a wrapper function around a collectImpl() where the work is actually done.
The wrapper function that grabs a snapshot of the current stack boundaries and register values
on entry, and sanitizes the stack on exit.

This is a speculative fix for what appears to be overly conservative behavior in the garbage
collector following r178364 which caused a measurable regression in memory usage on Membuster.
The theory being that we were putting pointers to dead things on the stack before scanning it,
and by doing that ended up marking things that we'd otherwise discover to be garbage.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::collect):
(JSC::Heap::collectImpl):
* heap/Heap.h:
* heap/MachineStackMarker.cpp:
(JSC::MachineThreads::gatherFromCurrentThread):
(JSC::MachineThreads::gatherConservativeRoots):
* heap/MachineStackMarker.h:

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

4 years agoSilence GCC's -Wstrict-prototypes
commit-queue@webkit.org [Thu, 5 Mar 2015 01:51:57 +0000 (01:51 +0000)]
Silence GCC's -Wstrict-prototypes
https://bugs.webkit.org/show_bug.cgi?id=142278

Patch by Debarshi Ray <debarshir@gnome.org> on 2015-03-04
Reviewed by Alexey Proskuryakov.

* API/JSContextRef.h:

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

4 years ago<attachment> icons are low-resolution when transformed or under page scale
timothy_horton@apple.com [Thu, 5 Mar 2015 01:43:07 +0000 (01:43 +0000)]
<attachment> icons are low-resolution when transformed or under page scale
https://bugs.webkit.org/show_bug.cgi?id=142262
<rdar://problem/20035480>

Reviewed by Dean Jackson.

We should use Icon::createIconForFiles, just like <input type="file"> does,
instead of directly talking to IconServices. This results both in less code
and in NSImage's multiresolution magic making the icons sharp even under
the influence of transforms and page scale.

* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac/IconServicesSPI.h: Removed.
* platform/spi/mac/LaunchServicesSPI.h: Removed.
Get rid of IconServicesSPI.h and LaunchServicesSPI.h.

* platform/graphics/Icon.h:
Include RetainPtr just once.
paint() should take a GraphicsContext reference (null is not an option)
and a FloatRect (after all, it just turns around and converts to NSRect).

* platform/graphics/ios/IconIOS.mm:
(WebCore::Icon::paint):
* platform/graphics/mac/IconMac.mm:
(WebCore::Icon::createIconForFiles):
(WebCore::Icon::paint):
* platform/graphics/efl/IconEfl.cpp:
(WebCore::Icon::paint):
* platform/graphics/gtk/IconGtk.cpp:
(WebCore::Icon::paint):
* platform/graphics/win/IconWin.cpp:
(WebCore::Icon::paint):
Adapt to the paint() signature changes, fix some style, etc.

* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintFileUploadIconDecorations):
Adapt to the paint() signature changes.

* rendering/RenderThemeMac.mm:
(WebCore::paintAttachmentIcon):
Use Icon::createIconForFiles instead of IconServices.

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

4 years ago<attachment> should not appear selected when the cursor is adjacent to it
timothy_horton@apple.com [Thu, 5 Mar 2015 01:40:45 +0000 (01:40 +0000)]
<attachment> should not appear selected when the cursor is adjacent to it
https://bugs.webkit.org/show_bug.cgi?id=142311
<rdar://problem/20045862>

Reviewed by Dean Jackson.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::isSelected): Deleted.
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::titleTextColorForAttachment):
(WebCore::RenderThemeMac::paintAttachment):
(WebCore::labelTextColorForAttachment): Deleted.
We were using the wrong (and far too complicated) mechanism to determine
if the attachment is selected (to decide which highlight color to use).
Instead, just check selectionState().

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

4 years ago<attachment> should show the file size as detail text below the icon
timothy_horton@apple.com [Thu, 5 Mar 2015 01:39:27 +0000 (01:39 +0000)]
<attachment> should show the file size as detail text below the icon
https://bugs.webkit.org/show_bug.cgi?id=142261
<rdar://problem/20009570>

Reviewed by Dean Jackson.

Test: fast/attachment/attachment-subtitle.html

* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::setFile):
(WebCore::HTMLAttachmentElement::parseAttribute):
* html/HTMLAttachmentElement.h:
Let RenderAttachment know when the subtitle attribute changes.

* html/HTMLAttributeNames.in:
Add a subtitle attribute.

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::invalidate):
(WebCore::RenderAttachment::representedFileChanged): Deleted.
* rendering/RenderAttachment.h:
Rename representedFileChanged to invalidate; it will cause layout and
repaint of the attachment. Mostly for use from HTMLAttachmentElement,
when properties that affect the display and/or intrinsic size change.

* rendering/RenderThemeMac.mm:
(WebCore::attachmentTitleInactiveBackgroundColor):
(WebCore::attachmentTitleInactiveTextColor):
(WebCore::attachmentSubtitleTextColor):
(WebCore::titleTextColorForAttachment):
(WebCore::AttachmentLayout::addTitleLine):
(WebCore::AttachmentLayout::layOutTitle):
(WebCore::AttachmentLayout::layOutSubtitle):
(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::addAttachmentTitleBackgroundRightCorner):
(WebCore::addAttachmentTitleBackgroundLeftCorner):
(WebCore::paintAttachmentTitleBackground):
(WebCore::paintAttachmentTitle):
(WebCore::paintAttachmentSubtitle):
(WebCore::RenderThemeMac::paintAttachment):
(WebCore::attachmentLabelInactiveBackgroundColor): Deleted.
(WebCore::attachmentLabelInactiveTextColor): Deleted.
(WebCore::labelTextColorForAttachment): Deleted.
(WebCore::AttachmentLayout::addLine): Deleted.
(WebCore::AttachmentLayout::layOutLabel): Deleted.
(WebCore::addAttachmentLabelBackgroundRightCorner): Deleted.
(WebCore::addAttachmentLabelBackgroundLeftCorner): Deleted.
(WebCore::paintAttachmentLabelBackground): Deleted.
(WebCore::paintAttachmentLabel): Deleted.
Rename everything "label" to "title" (except LabelLine, which is not
specifically about the title). We're going to use "title" for the
main text below the icon, and "subtitle" for the secondary text below that.

Avoid keeping the CTFonts on the AttachmentLayout; there's no need for it.

Add layOutSubtitle and paintAttachmentSubtitle, which orient and paint
the subtitle (below the title, in blue, smaller than the label).

* fast/attachment/attachment-subtitle.html: Added.
* platform/mac/fast/attachment/attachment-subtitle-expected.png: Added.
* platform/mac/fast/attachment/attachment-subtitle-expected.txt: Added.
Add a test of the rendering of attachment subtitles, and results for Mac.

* platform/mac-mavericks/fast/attachment/attachment-subtitle-expected.txt: Added.
Add Mavericks baselines.

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

4 years ago[Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining...
ddkilzer@apple.com [Thu, 5 Mar 2015 01:19:57 +0000 (01:19 +0000)]
[Windows] Build fix: Make sure to include <CoreMedia/CoreMedia.h> before redefining CMSampleBuffer

More fallout from:

Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
- Remove include of <CoreMedia/CoreMedia.h> here.  These already
  include CoreMediaSPI.h.
* platform/spi/cf/CoreMediaSPI.h:
- Add include of <CoreMedia/CoreMedia.h> here.
- Remove redundant include of <CoreMedia/CMTime.h> for Windows.

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

4 years agoFix linker warnings in TestWebKitAPI.
commit-queue@webkit.org [Thu, 5 Mar 2015 01:18:41 +0000 (01:18 +0000)]
Fix linker warnings in TestWebKitAPI.
https://bugs.webkit.org/show_bug.cgi?id=141912

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-04
Reviewed by David Kilzer.

* TestWebKitAPI/Configurations/Base.xcconfig:
Use GCC_SYMBOLS_PRIVATE_EXTERN like we do in WebCore.

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

4 years ago[Mac] Set SystemUIFontSelect in DRT and WKTR
ap@apple.com [Thu, 5 Mar 2015 00:51:44 +0000 (00:51 +0000)]
[Mac] Set SystemUIFontSelect in DRT and WKTR
https://bugs.webkit.org/show_bug.cgi?id=142303

Reviewed by Myles C. Maxfield.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):

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

4 years agoMac Perf bots should use WebKitTestRunner instead of DumpRenderTree
cdumez@apple.com [Thu, 5 Mar 2015 00:10:44 +0000 (00:10 +0000)]
Mac Perf bots should use WebKitTestRunner instead of DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=142314
<rdar://problem/20046835>

Reviewed by Ryosuke Niwa.

Mac Perf bots should use WebKitTestRunner instead of DumpRenderTree
to get WK2 code coverage.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years ago[iOS] Fix build with newer clang due to duplicate macro definition
ddkilzer@apple.com [Thu, 5 Mar 2015 00:09:25 +0000 (00:09 +0000)]
[iOS] Fix build with newer clang due to duplicate macro definition

Fallout from:

Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
Remove duplicate kCMTimeIndefinite macro.

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

4 years agoUpdate inline media control icons for OSX.
roger_fong@apple.com [Thu, 5 Mar 2015 00:03:39 +0000 (00:03 +0000)]
Update inline media control icons for OSX.
https://bugs.webkit.org/show_bug.cgi?id=142305.
<rdar://problem/19997484>

Reviewed by Dean Jackson.

Changes include: new volume button, new full screen button, new play/pause button.
Repositioning of 30 second and play buttons.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel button):
(audio::-webkit-media-controls-rewind-button):
(audio::-webkit-media-controls-play-button):
(audio::-webkit-media-controls-play-button.paused):
(audio::-webkit-media-controls-panel .mute-box):
(video::-webkit-media-controls-volume-max-button):
(video::-webkit-media-controls-volume-min-button):
(audio::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-current-time-display):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.configureInlineControls): Swap positions of rewind and play buttons.
(Controller.prototype.handleMuteButtonClicked): Remember to update volume slider when necessary.
(Controller.prototype.updateVolume): Ditto

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

4 years ago[Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
aestes@apple.com [Wed, 4 Mar 2015 23:52:31 +0000 (23:52 +0000)]
[Content Filtering] Rename ContentFilterMac.mm to ContentFilter.cpp
https://bugs.webkit.org/show_bug.cgi?id=142313

Reviewed by Anders Carlsson.

ContentFilterMac.mm no longer contains any Objective-C code, so rename it to ContentFilter.cpp. It is also no longer Mac-specific, so move it up to platform/.

* WebCore.xcodeproj/project.pbxproj:
* platform/ContentFilter.cpp: Renamed from Source/WebCore/platform/mac/ContentFilterMac.mm.
* platform/cocoa/NetworkExtensionContentFilter.h: Replaced NSInteger with long.

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

4 years agoUnreviewed gardening.
achristensen@apple.com [Wed, 4 Mar 2015 23:39:24 +0000 (23:39 +0000)]
Unreviewed gardening.

* http/tests/contentextensions/basic-filter.html.hson: Removed.
* http/tests/contentextensions/basic-filter.html.json: Copied from http/tests/contentextensions/basic-filter.html.hson.
Spell json correctly.  Does not start with h.

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

4 years agoAttempted build fix.
bdakin@apple.com [Wed, 4 Mar 2015 23:25:22 +0000 (23:25 +0000)]
Attempted build fix.

* UIProcess/API/Cocoa/WKViewPrivate.h:

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

4 years agoREGRESSION (r179597): Can't see power saver banner for plugins
dino@apple.com [Wed, 4 Mar 2015 23:18:36 +0000 (23:18 +0000)]
REGRESSION (r179597): Can't see power saver banner for plugins
https://bugs.webkit.org/show_bug.cgi?id=142312
<rdar://problem/20040517>

Reviewed by Brent Fulgham.

We were being a bit too restrictive when deciding a child
should not create a renderer. All shadow root children
of the snapshotted plugin need one.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::childShouldCreateRenderer):
Test if we're part of the shadow tree.

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

4 years ago[Content Filtering] Make it easier to add new content filters
aestes@apple.com [Wed, 4 Mar 2015 22:43:35 +0000 (22:43 +0000)]
[Content Filtering] Make it easier to add new content filters
https://bugs.webkit.org/show_bug.cgi?id=142255

Reviewed by Sam Weinig.

ContentFilter was becoming a bit of a mess, with both the WebFilterEvaluator and NEFilterSource implementations
awkwardly living side-by-side. This patch cleans things up by moving these implementations into two separate
classes and turning ContentFilter itself into an abstract interface that each implements. A new class called
ContentFilterCollection, which also inherits from ContentFilter, manages the collection of individual content
filters and is vended to the rest of the system by ContentFilter::createIfNeeded().

This refactoring will make it easier to add a third type of content filter in a follow-on patch, namely a mock
content filter for testing purposes.

* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived): Called ContentFilter::createIfNeeded() instead of instantiating a ContentFilter directly.
* platform/ContentFilter.h:
(WebCore::ContentFilter::~ContentFilter):
* platform/cocoa/NetworkExtensionContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
* platform/cocoa/NetworkExtensionContentFilter.mm: Added.
(WebCore::NetworkExtensionContentFilter::canHandleResponse): Moved NEFilterSource code from ContentFilterMac.mm to here.
(WebCore::NetworkExtensionContentFilter::create): Ditto.
(WebCore::NetworkExtensionContentFilter::NetworkExtensionContentFilter): Ditto.
(WebCore::NetworkExtensionContentFilter::~NetworkExtensionContentFilter): Ditto.
(WebCore::NetworkExtensionContentFilter::addData): Ditto.
(WebCore::NetworkExtensionContentFilter::finishedAddingData): Ditto.
(WebCore::NetworkExtensionContentFilter::needsMoreData): Ditto.
(WebCore::NetworkExtensionContentFilter::didBlockData): Ditto.
(WebCore::NetworkExtensionContentFilter::getReplacementData): Ditto.
(WebCore::NetworkExtensionContentFilter::unblockHandler): Ditto.
* platform/cocoa/ParentalControlsContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
* platform/cocoa/ParentalControlsContentFilter.mm: Added.
(WebCore::ParentalControlsContentFilter::canHandleResponse): Moved WebFilterEvaluator code from ContentFilterMac.mm to here.
(WebCore::ParentalControlsContentFilter::create): Ditto.
(WebCore::ParentalControlsContentFilter::ParentalControlsContentFilter): Ditto.
(WebCore::ParentalControlsContentFilter::addData): Ditto.
(WebCore::ParentalControlsContentFilter::finishedAddingData): Ditto.
(WebCore::ParentalControlsContentFilter::needsMoreData): Ditto.
(WebCore::ParentalControlsContentFilter::didBlockData): Ditto.
(WebCore::ParentalControlsContentFilter::getReplacementData): Ditto.
(WebCore::ParentalControlsContentFilter::unblockHandler): Ditto.
* platform/mac/ContentFilterMac.mm:
(WebCore::contentFilterType): Added a helper function template that creates a new ContentFilterType.
(WebCore::contentFilterTypes): Registered a ContentFilterType for each type of content filter.
(WebCore::ContentFilter::createIfNeeded): Created a ContentFilterCollection containing each content filter that can handle the given response.
(WebCore::ContentFilterCollection::ContentFilterCollection): Constructs a ContentFilterCollection given a Vector of content filters.
(WebCore::ContentFilterCollection::addData): Forwarded the call to each content filter in m_contentFilters.
(WebCore::ContentFilterCollection::finishedAddingData): Ditto.
(WebCore::ContentFilterCollection::needsMoreData): Ditto.
(WebCore::ContentFilterCollection::didBlockData): Ditto.
(WebCore::ContentFilterCollection::getReplacementData): Returned replacement data for the first filter that blocked the load.
If no filter blocked the load, returned the first filter's replacement data.
(WebCore::ContentFilterCollection::unblockHandler): Returned the unblock handler for the first filter that blocked the load.
(WebCore::ContentFilter::ContentFilter): Deleted.
(WebCore::ContentFilter::~ContentFilter): Deleted.
(WebCore::ContentFilter::canHandleResponse): Deleted.
(WebCore::ContentFilter::addData): Deleted.
(WebCore::ContentFilter::finishedAddingData): Deleted.
(WebCore::ContentFilter::needsMoreData): Deleted.
(WebCore::ContentFilter::didBlockData): Deleted.
(WebCore::ContentFilter::getReplacementData): Deleted.
(WebCore::ContentFilter::unblockHandler): Deleted.

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

4 years agoSwitch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
ddkilzer@apple.com [Wed, 4 Mar 2015 22:41:24 +0000 (22:41 +0000)]
Switch remaining CoreMedia soft-linking in WebCore over to CoreMediaSoftLink.{cpp,h}
<http://webkit.org/b/141870>

Reviewed by Alex Christensen.

* Configurations/WebCore.unexp:
- Remove all weak symbols for CoreMedia.framework as they should
  no longer appear.

* Modules/plugins/QuickTimePluginReplacement.mm:
* platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
- Clean up headers.

* platform/cf/CoreMediaSoftLink.cpp:
* platform/cf/CoreMediaSoftLink.h:
- Add soft-link functions and constants from remaining source
  files.

* platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isAvailable):
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
* platform/mac/PlatformClockCM.mm:
* platform/mediastream/mac/AVMediaCaptureSource.mm:
* platform/mediastream/mac/AVVideoCaptureSource.mm:
- Switch to using CoreMediaSoftLink.h.

* platform/mac/SoftLinking.h:
* platform/win/SoftLinking.h:
- Remove 'const' from SOFT_LINK_CONSTANT_{HEADER,SOURCE}()
  macros since it won't work with const structs.

* platform/spi/cf/CoreMediaSPI.h:
- Add SPI declarations for Windows originally from
  InbandTextTrackPrivateAVF.cpp.

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

4 years ago[JSC] Add a node for Math.log()
benjamin@webkit.org [Wed, 4 Mar 2015 22:39:28 +0000 (22:39 +0000)]
[JSC] Add a node for Math.log()
https://bugs.webkit.org/show_bug.cgi?id=142126

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

This patch adds the DFG node ArithLog for LogIntrinsic.

Having a direct call to log has very little value by itself, the implementation
in DFG and FTL is a simple function call.

What is useful in ArithLog is that we know the operation is pure.
This allow us to hoist it out of loops when the argument is independent
is an invariant of the loop.

Perf wise, this patch gives:
-Kraken's imaging-darkroom: definitely 1.2372x faster.
-AsmBench's Towers.c: definitely 1.0261x faster.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
(JSC::DFG::PredictionPropagationPhase::doDoubleVoting):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithLog):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithLog):
* ftl/FTLOutput.h:
(JSC::FTL::Output::doubleLog):
* tests/stress/math-log-basics.js: Added.
* tests/stress/math-log-with-constants.js: Added.

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

4 years agoMove content extensions test to properly named directory.
achristensen@apple.com [Wed, 4 Mar 2015 22:10:21 +0000 (22:10 +0000)]
Move content extensions test to properly named directory.
https://bugs.webkit.org/show_bug.cgi?id=142299

Reviewed by Tim Horton.

Tools:

* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

* TestExpectations:
* http/tests/contentextensions: Added.
* http/tests/contentextensions/basic-filter-expected.txt: Copied from platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt.
* http/tests/contentextensions/basic-filter.html: Copied from http/tests/usercontentfilter/basic-filter.html.
* http/tests/contentextensions/basic-filter.html.hson: Copied from http/tests/usercontentfilter/basic-filter.html.json.
* http/tests/contentextensions/block-cookies-basic-expected.txt: Copied from http/tests/usercontentfilter/block-cookies-basic-expected.txt.
* http/tests/contentextensions/block-cookies-basic.html: Copied from http/tests/usercontentfilter/block-cookies-basic.html.
* http/tests/contentextensions/block-cookies-basic.html.json: Copied from http/tests/usercontentfilter/block-cookies-basic.html.json.
* http/tests/contentextensions/block-cookies-send-expected.txt: Copied from http/tests/usercontentfilter/block-cookies-send-expected.txt.
* http/tests/contentextensions/block-cookies-send.html: Copied from http/tests/usercontentfilter/block-cookies-send.html.
* http/tests/contentextensions/block-cookies-send.html.json: Copied from http/tests/usercontentfilter/block-cookies-send.html.json.
* http/tests/contentextensions/css-display-none-expected.txt: Copied from http/tests/usercontentfilter/css-display-none-expected.txt.
* http/tests/contentextensions/css-display-none.html: Copied from http/tests/usercontentfilter/css-display-none.html.
* http/tests/contentextensions/css-display-none.html.json: Copied from http/tests/usercontentfilter/css-display-none.html.json.
* http/tests/usercontentfilter/basic-filter.html: Removed.
* http/tests/usercontentfilter/basic-filter.html.json: Removed.
* http/tests/usercontentfilter/block-cookies-basic-expected.txt: Removed.
* http/tests/usercontentfilter/block-cookies-basic.html: Removed.
* http/tests/usercontentfilter/block-cookies-basic.html.json: Removed.
* http/tests/usercontentfilter/block-cookies-send-expected.txt: Removed.
* http/tests/usercontentfilter/block-cookies-send.html: Removed.
* http/tests/usercontentfilter/block-cookies-send.html.json: Removed.
* http/tests/usercontentfilter/css-display-none-expected.txt: Removed.
* http/tests/usercontentfilter/css-display-none.html: Removed.
* http/tests/usercontentfilter/css-display-none.html.json: Removed.
* platform/mac-wk2/TestExpectations:
* platform/mac/http/tests/usercontentfilter/basic-filter-expected.txt: Removed.

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

4 years agoUnreviewed, rolling out r181001 and r181003.
commit-queue@webkit.org [Wed, 4 Mar 2015 21:47:30 +0000 (21:47 +0000)]
Unreviewed, rolling out r181001 and r181003.
https://bugs.webkit.org/show_bug.cgi?id=142307

Broke many tests (Requested by ap on #webkit).

Reverted changesets:

"Make JavaScript binding get and set legacy event listener
attributes directly"
https://bugs.webkit.org/show_bug.cgi?id=142282
http://trac.webkit.org/changeset/181001

"Update bindings tests after r181001."
http://trac.webkit.org/changeset/181003

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

4 years agoMessage UI process when contentSize changes
bdakin@apple.com [Wed, 4 Mar 2015 21:45:36 +0000 (21:45 +0000)]
Message UI process when contentSize changes
https://bugs.webkit.org/show_bug.cgi?id=142294
-and corresponding-
rdar://problem/19963165

Reviewed by Andreas Kling.

This patch un-ifdefs the didChangeContentSize message so that we can use it on Mac
as well.

New private method that subclasses can override when they need to do something
with contentSize changes.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _didChangeContentSize:]):
* UIProcess/PageClient.h:

Un-ifdef.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeContentSize):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::contentsSizeChanged):

Stubs for other platforms now that the pure-virtual is un-masked.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didChangeContentSize):
* UIProcess/API/gtk/PageClientImpl.h:

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

4 years ago[Win] Rebaseline a few tests. Mark some failures.
bfulgham@apple.com [Wed, 4 Mar 2015 21:41:00 +0000 (21:41 +0000)]
[Win] Rebaseline a few tests. Mark some failures.

* platform/win/TestExpectations:
* platform/win/fast/attachment/attachment-disabled-rendering-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoFactor platform I/O out from NetworkCacheStorage
antti@apple.com [Wed, 4 Mar 2015 21:35:11 +0000 (21:35 +0000)]
Factor platform I/O out from NetworkCacheStorage
https://bugs.webkit.org/show_bug.cgi?id=142279

Reviewed by Chris Dumez.

* NetworkProcess/cache/NetworkCacheData.h: Added.
* NetworkProcess/cache/NetworkCacheDataCocoa.mm: Added.

    NetworkCacheStorage::Data -> NetworkCacheData
    Move to files of its own.

* NetworkProcess/cache/NetworkCacheIOChannel.h: Added.
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm: Added.

    Add abstraction for dispatch IO channels.

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

4 years agoOnly Heap should be in charge of deciding how to select a subspace for a type
fpizlo@apple.com [Wed, 4 Mar 2015 21:32:27 +0000 (21:32 +0000)]
Only Heap should be in charge of deciding how to select a subspace for a type
https://bugs.webkit.org/show_bug.cgi?id=142304

Reviewed by Mark Lam.

This slightly reduces the code duplication for selecting subspace based on type, and what
duplication is left is at least localized in HeapInlines.h. The immediate effect is that
the DFG and FTL don't have to duplicate this pattern.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateJSObject):
(JSC::DFG::SpeculativeJIT::emitAllocateVariableSizedJSObject):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::allocateObject):
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::allocateObjectOfType):
(JSC::Heap::subspaceForObjectOfType):
(JSC::Heap::allocatorForObjectOfType):
* runtime/JSCellInlines.h:
(JSC::allocateCell):

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

4 years agoUpdate elapsed/remaining time displays on media inline controls on OSX.
roger_fong@apple.com [Wed, 4 Mar 2015 21:12:50 +0000 (21:12 +0000)]
Update elapsed/remaining time displays on media inline controls on OSX.
https://bugs.webkit.org/show_bug.cgi?id=142264.
<rdar://problem/19997487>
Reviewed by Dean Jackson.
Div surrounding times are set widths. A larger width is used for times that are
an hour or longer. Time elapsed is right justified. Time remaining is left justified.
Times are displayed in 11pt Helvetica Neue.
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-time-remaining-display):
(audio::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display.hour-long-time):
(audio::-webkit-media-controls-current-time-display.hour-long-time):
(audio::-webkit-media-controls-time-remaining-display.ten-hour-long-time):
(audio::-webkit-media-controls-current-time-display.ten-hour-long-time):
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateDuration):

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

4 years agoW3C test importer should use filesystem instead of os.walk
youenn.fablet@crf.canon.fr [Wed, 4 Mar 2015 21:02:33 +0000 (21:02 +0000)]
W3C test importer should use filesystem instead of os.walk
https://bugs.webkit.org/show_bug.cgi?id=142085

Reviewed by Bem Jones-Bey.

Added FileSystem.dirs_under to remove the use of os.walk in test importer.
Added MockFileSystem.dirs_under and MockFileSystem.getsize to enable unit testing of test importer.
Added unit test for FileSystem.dirs_under and MockFileSystem.dirs_under.

Made use of FileSystem.dirs_under within TestImporter.find_importable_tests.
Added a unit test to check that test importer is now black-box testable using a Mock system.

* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.dirs_under): Returns a list of filtered sub-directories.
(FileSystem.dirs_under.filter_all):
* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.dirs_under):
(MockFileSystem.dirs_under.filter_all):
(MockFileSystem.getsize):
* Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
(MockFileSystemTest.test_dirs_under):
(MockFileSystemTest.test_dirs_under.filter_dir):
* Scripts/webkitpy/common/system/filesystem_unittest.py:
(RealFileSystemTest.test_sep):
(RealFileSystemTest):
(RealFileSystemTest.test_dirs_under):
(RealFileSystemTest.test_dirs_under.filter_this_dir):
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.do_import):
(TestImporter.find_importable_tests.should_keep_subdir):
(TestImporter.find_importable_tests):
(TestImporter.should_keep_subdir): Deleted.
(TestImporter.should_skip_file): Deleted.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.test_import_dir_with_empty_init_py): Added test to ensure empty __init__.py are no longer empty once imported.

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

4 years agoImplement -apple-trailing-word: -apple-partially-balanced
mmaxfield@apple.com [Wed, 4 Mar 2015 20:48:04 +0000 (20:48 +0000)]
Implement -apple-trailing-word: -apple-partially-balanced
https://bugs.webkit.org/show_bug.cgi?id=142253

Reviewed by David Hyatt.

Source/WebCore:

This patch implements a history mechanism for line breaking. In particular, this patch partitions
the updates to the current line breaking location into two kinds: conceptually new breaking locations,
and fixups to existing locations. Then, this patch remembers all the fixed up breaking locations, up
to a maximum number of remembered locations.

The patch then uses this memory to change the line-breaking selection based on the rules of
-apple-trailing-word.

Test: fast/text/trailing-word.html

* rendering/line/BreakingContextInlineHeaders.h:
Use InlineIteratorHistory as a proxy for the current breaking location. Note that all these functions
are inlined, so the overhead should be next to nothing when -apple-trailing-word is not in use.
(WebCore::BreakingContext::BreakingContext): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::lineBreak): Ditto.
(WebCore::BreakingContext::clearLineBreakIfFitsOnLine): Ditto
(WebCore::BreakingContext::commitLineBreakAtCurrentWidth): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::InlineIteratorHistory): Keeps track of historical
breaking locations
(WebCore::BreakingContext::InlineIteratorHistory::push): Remember a new breaking location
(WebCore::BreakingContext::InlineIteratorHistory::update): Update an existing breaking location
(WebCore::BreakingContext::InlineIteratorHistory::renderer): Forwarded to the current breaking location
(WebCore::BreakingContext::InlineIteratorHistory::offset): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::atTextParagraphSeparator):  Ditto
(WebCore::BreakingContext::InlineIteratorHistory::previousInSameNode): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::get): Get one of the remembered breaking locations
(WebCore::BreakingContext::InlineIteratorHistory::current): Get the current breaking location
(WebCore::BreakingContext::InlineIteratorHistory::historyLength):
(WebCore::BreakingContext::InlineIteratorHistory::moveTo): Forwarded to the current breaking location.
(WebCore::BreakingContext::InlineIteratorHistory::increment): Ditto
(WebCore::BreakingContext::InlineIteratorHistory::clear): Ditto
(WebCore::BreakingContext::handleBR): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::handleFloat): Ditto
(WebCore::BreakingContext::handleText): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded): Style
(WebCore::checkMidpoints): Use InlineIteratorHistory instead of InlineIterator
(WebCore::BreakingContext::handleEndOfLine): If -apple-trailing-word is in effect, use
optimalLineBreakLocationForTrailingWord().
(WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord): Use the remembered breaking
locations and choose the optimal one.
(WebCore::BreakingContext::lineBreakRef): Deleted.

LayoutTests:

* fast/text/trailing-word-expected.html: Added.
* fast/text/trailing-word.html: Added.

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

4 years agoUnreviewed Gardening 4th March
commit-queue@webkit.org [Wed, 4 Mar 2015 20:30:09 +0000 (20:30 +0000)]
Unreviewed Gardening 4th March

https://bugs.webkit.org/show_bug.cgi?id=142271

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

* platform/gtk/TestExpectations:

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

4 years agoWeb Inspector: TimelineViews should be displayed in a ContentViewContainer
burg@cs.washington.edu [Wed, 4 Mar 2015 20:24:03 +0000 (20:24 +0000)]
Web Inspector: TimelineViews should be displayed in a ContentViewContainer
https://bugs.webkit.org/show_bug.cgi?id=142290

Reviewed by Timothy Hatcher.

TimelineRecordingContentView has a bunch of logic to manage the currently visible TimelineView.
This could be delegated to a ContentViewContainer to simplify the logic. It also opens the possibility
for other views to be displayed beneath the timeline overview graphs when it makes sense to do so.

In order to be displayable in the container, TimelineView and its subclasses have been upgraded to
be ContentView subclasses. This also reduces some code duplication for basic view management.

* UserInterface/Views/ContentView.js:
(WebInspector.ContentView): Move base class instantiation pattern from TimelineView to here.
(WebInspector.ContentView.isViewable):
* UserInterface/Views/LayoutTimelineView.js: Use ContentView events and base methods.
(WebInspector.LayoutTimelineView.prototype.shown):
(WebInspector.LayoutTimelineView.prototype.hidden):
(WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/NetworkTimelineView.js: Use ContentView events and base methods.
(WebInspector.NetworkTimelineView.prototype.shown):
(WebInspector.NetworkTimelineView.prototype.hidden):
(WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/OverviewTimelineView.js: Use ContentView events and base methods.
(WebInspector.OverviewTimelineView.prototype.shown):
(WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ScriptTimelineView.js: Use ContentView events and base methods.
(WebInspector.ScriptTimelineView.prototype.shown):
(WebInspector.ScriptTimelineView.prototype.hidden):
(WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
* UserInterface/Views/TimelineRecordingContentView.css: Use WebInspector.ContentViewContainer class.
(.content-view.timeline-recording > .content-view-container):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid td):
(.content-view.timeline-recording > .content-view-container > .timeline-view > .data-grid table.data):
(.content-view.timeline-recording > .view-container): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid td): Deleted.
(.content-view.timeline-recording > .view-container > .timeline-view > .data-grid table.data): Deleted.

* UserInterface/Views/TimelineRecordingContentView.js:
Many of the changes here mirror the implementation of ClusterContentView. Searching is disabled since
none of the timeline views are currently searchable using ContentViewContainer's full-text search.

In cases where we update the current timeline view, the currentTimelineView accessor returns the
content view if a TimelineView is shown in the content view container, otherwise null.

(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype.showOverviewTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.showTimelineViewForTimeline):
(WebInspector.TimelineRecordingContentView.prototype.get supplementalRepresentedObjects):
(WebInspector.TimelineRecordingContentView.prototype.get handleCopyEvent):
(WebInspector.TimelineRecordingContentView.prototype.get supportsSave):
(WebInspector.TimelineRecordingContentView.prototype.get saveData):
(WebInspector.TimelineRecordingContentView.prototype.get currentTimelineView):
(WebInspector.TimelineRecordingContentView.prototype.shown):
(WebInspector.TimelineRecordingContentView.prototype.hidden):
(WebInspector.TimelineRecordingContentView.prototype.closed):
(WebInspector.TimelineRecordingContentView.prototype.canGoBack):
(WebInspector.TimelineRecordingContentView.prototype.canGoForward):
(WebInspector.TimelineRecordingContentView.prototype.goBack):
(WebInspector.TimelineRecordingContentView.prototype.goForward):
(WebInspector.TimelineRecordingContentView.prototype.updateLayout):
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie):
(WebInspector.TimelineRecordingContentView.prototype.get filterDidChange):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSupplementalRepresentedObjectsDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._timelineRemoved):
(WebInspector.TimelineRecordingContentView.prototype._timelineCountChanged):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._timelineViewSelectionPathComponentsDidChange): Deleted.
(WebInspector.TimelineRecordingContentView.prototype._showTimelineView): Deleted.
* UserInterface/Views/TimelineView.js: Remove duplicated functionality and use ContentView equivalents instead.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.filterUpdated):
(WebInspector.TimelineView.prototype.needsLayout):
(WebInspector.TimelineView.prototype.get representedObject): Deleted.
(WebInspector.TimelineView.prototype.get visible): Deleted.
(WebInspector.TimelineView.prototype.shown): Deleted.
(WebInspector.TimelineView.prototype.hidden): Deleted.

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

4 years agoStale entries in WeakGCMaps are keeping tons of WeakBlocks alive unnecessarily.
akling@apple.com [Wed, 4 Mar 2015 20:00:00 +0000 (20:00 +0000)]
Stale entries in WeakGCMaps are keeping tons of WeakBlocks alive unnecessarily.
<https://webkit.org/b/142115>
<rdar://problem/19992268>

Reviewed by Geoffrey Garen.

Prune stale entries from WeakGCMaps as part of every full garbage collection.
This frees up tons of previously-stuck WeakBlocks that were only sitting around
with finalized handles waiting to die.

Note that WeakGCMaps register/unregister themselves with the GC heap in their
ctor/dtor, so creating one now requires passing the VM.

Average time spent in the PruningStaleEntriesFromWeakGCMaps GC phase appears
to be between 0.01ms and 0.3ms, though I've seen a few longer ones at ~1.2ms.
It seems somewhat excessive to do this on every Eden collection, so it's only
doing work in full collections for now.

* API/JSWeakObjectMapRefInternal.h:
(OpaqueJSWeakObjectMap::create):
(OpaqueJSWeakObjectMap::OpaqueJSWeakObjectMap):
* API/JSWeakObjectMapRefPrivate.cpp:
* API/JSWrapperMap.mm:
(-[JSWrapperMap initWithContext:]):
(-[JSWrapperMap jsWrapperForObject:]): Pass VM to WeakGCMap constructor.

* JavaScriptCore.xcodeproj/project.pbxproj: Add WeakGCMapInlines.h and make
it project-private so WebCore clients can access it.

* heap/Heap.cpp:
(JSC::Heap::collect):
(JSC::Heap::pruneStaleEntriesFromWeakGCMaps): Added a new GC phase for pruning
stale entries from WeakGCMaps. This is only executed during full collections.

* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::registerWeakGCMap):
(JSC::Heap::unregisterWeakGCMap): Added a mechanism for WeakGCMaps to register
themselves with the Heap and provide a pruning callback.

* runtime/PrototypeMap.h:
(JSC::PrototypeMap::PrototypeMap):
* runtime/Structure.cpp:
(JSC::StructureTransitionTable::add): Pass VM to WeakGCMap constructor.

* runtime/JSCInlines.h: Add "WeakGCMapInlines.h"

* runtime/JSGlobalObject.cpp: Include "WeakGCMapInlines.h" so this builds.

* runtime/VM.cpp:
(JSC::VM::VM): Pass VM to WeakGCMap constructor.

* runtime/WeakGCMap.h:
(JSC::WeakGCMap::set):
(JSC::WeakGCMap::add):
(JSC::WeakGCMap::WeakGCMap): Deleted.
(JSC::WeakGCMap::gcMap): Deleted.
(JSC::WeakGCMap::gcMapIfNeeded): Deleted.
* runtime/WeakGCMapInlines.h: Added.
(JSC::WeakGCMap::WeakGCMap):
(JSC::WeakGCMap::~WeakGCMap):
(JSC::WeakGCMap::pruneStaleEntries): Moved ctor, dtor and pruning callback
to WeakGCMapInlines.h to fix interdependent header issues. Removed code that
prunes WeakGCMap at certain growth milestones and instead rely on the GC
callback for housekeeping.

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

4 years ago<attachment> title text disappears when dragging
timothy_horton@apple.com [Wed, 4 Mar 2015 19:33:46 +0000 (19:33 +0000)]
<attachment> title text disappears when dragging
https://bugs.webkit.org/show_bug.cgi?id=142263
<rdar://problem/20035515>

Reviewed by Sam Weinig.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintAttachment):
We use NSColors with CoreText, which requires that Cocoa knows the current
CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
Otherwise, sometimes (especially when dragging), it will try to apply the
text foreground color to a null context, complain to the system log, and fail
to render the text.

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

4 years ago[WebEditingTester] Add support for the find and replace bar
timothy_horton@apple.com [Wed, 4 Mar 2015 19:27:39 +0000 (19:27 +0000)]
[WebEditingTester] Add support for the find and replace bar
https://bugs.webkit.org/show_bug.cgi?id=142247

Reviewed by Enrica Casucci.

While it's not hooked up yet in WKWebView, adding support for the
find bar to WebEditingTester will help us implement that functionality.

* WebEditingTester/AppDelegate.h:
* WebEditingTester/AppDelegate.m:
(-[WebEditingAppDelegate performTextFinderAction:]):
* WebEditingTester/MainMenu.xib:
Receive performTextFinderAction: and forward it to the frontmost WebDocumentController.

* WebEditingTester/WK2WebDocumentController.m:
(-[WK2WebDocumentController awakeFromNib]):
(-[WK2WebDocumentController performTextFinderAction:]):
(-[WK2WebDocumentController findBarView]):
(-[WK2WebDocumentController setFindBarView:]):
(-[WK2WebDocumentController isFindBarVisible]):
(-[WK2WebDocumentController setFindBarVisible:]):
(-[WK2WebDocumentController findBarViewDidChangeHeight]):
(-[WK2WebDocumentController layout]):
Implement performTextFinderAction: for WebKit2, and have a NSTextFinder
pointing at the WKWebView (currently nothing will work, but the bar will
show up). Install and uninstall the bar as needed.

* WebEditingTester/WebDocument.xib:
Don't use a full-size content view. There's no need, and it makes find
bar layout harder.

* WebEditingTester/WebDocumentController.h:
* WebEditingTester/WebDocumentController.m:
(-[WebDocumentController performTextFinderAction:]):

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

4 years ago[Mac] YouTube playback at 1.5x speed has audible distortion
jer.noble@apple.com [Wed, 4 Mar 2015 19:26:22 +0000 (19:26 +0000)]
[Mac] YouTube playback at 1.5x speed has audible distortion
https://bugs.webkit.org/show_bug.cgi?id=142280

Reviewed by Eric Carlson.

Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the
AVSampleBufferAudioRenderer rather than its default value of
AVAudioTimePitchAlgorithmTimeDomain.

Drive-by fix:

Might as well add support for MediaPlayer::setPreservesPitch() while we're
changing the audio pitch algorithm. If preservesPitch() is false use the
AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
(MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):

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

4 years ago[MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors...
jer.noble@apple.com [Wed, 4 Mar 2015 19:22:59 +0000 (19:22 +0000)]
[MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
https://bugs.webkit.org/show_bug.cgi?id=142285

Reviewed by Eric Carlson.

When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
underlying AVStreamSession is invalidated, the decryption context for in-flight
CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
asynchronously the next time the layer needs new samples.

Add a workaround until framework-level support lands to fully flush enqueued and
encrypted frames.

When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
check to see if the session has been stopped. If so, and if the error in question is
one that indicates that the samples decryption context has been invalidated, suppress
the error and instruct the sender to suppress the error as well. This workaround will
be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>

Still, we'll make our best effort to flush undisplayed frames when our CDM session is
invalidated. Move away from std::map and instead use HashMap to store the set of
AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
the HashMap's set of values.

* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
(WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
    error code and bail before issuing the error.
(WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
    the layer is in the set of listened-to layers only back in the main thread; the
    listnener may have been unregistered by the time the main thread was called.
(WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
(WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
(WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
    layers and audio renderers.
(WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
    asked to ignore the error, and if so, bail.
(WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.

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

4 years agoRemove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
joepeck@webkit.org [Wed, 4 Mar 2015 18:48:50 +0000 (18:48 +0000)]
Remove WK_AVAILABLE and related macros when we cannot determine iOS/Mac version
https://bugs.webkit.org/show_bug.cgi?id=142252
rdar://problem/19983833

Reviewed by David Kilzer.

When mac / ios version was unable to be determined strip the WK_AVAILABLE
and WK_DEPRECATED macros to avoid outputing a broken macro.

* mac/postprocess-framework-headers.sh:

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

4 years agoUpdate bindings tests after r181001.
achristensen@apple.com [Wed, 4 Mar 2015 18:40:08 +0000 (18:40 +0000)]
Update bindings tests after r181001.

* bindings/scripts/test/JS/*.cpp:
Class names changed to auto.

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

4 years ago[Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
bfulgham@apple.com [Wed, 4 Mar 2015 17:50:18 +0000 (17:50 +0000)]
[Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
https://bugs.webkit.org/show_bug.cgi?id=142284

Reviewed by David Kilzer.

Make DerivedSources.make understand its build dependency on FeatureDefines.props
when building on Windows:
1. Modify DerivedSources.make to declare a default dependency (on Windows)
   to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
2. Update the Windows script 'build-generated-files.pl' to specify the correct
   FeatureDefines{Cairo}.props value to use, depending on build environment.

* DerivedSources.make:
* WebCore.vcxproj/build-generated-files.pl:

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

4 years agoMake JavaScript binding get and set legacy event listener attributes directly
darin@apple.com [Wed, 4 Mar 2015 17:30:32 +0000 (17:30 +0000)]
Make JavaScript binding get and set legacy event listener attributes directly
https://bugs.webkit.org/show_bug.cgi?id=142282

Reviewed by Sam Weinig.

Test: fast/dom/legacy-event-handler-attributes.html

This patch changes the JavaScript getters and setters for these attributes
to work directly without requiring any functions in the C++ DOM implementation.
A subsequent patch will remove the now-unused C++ DOM implementation.

* bindings/js/JSEventListener.cpp:
(WebCore::legacyEventListenerAttribute): Added.
(WebCore::createEventListenerForLegacyAttribute): Added.
(WebCore::setLegacyEventListenerAttribute): Added.
(WebCore::legacyWindowEventListenerAttribute): Added.
(WebCore::setLegacyWindowEventListenerAttribute): Added.

* bindings/js/JSEventListener.h:
(WebCore::createJSEventListenerForAttribute): Deleted.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributeEventListenerCall): Deleted.
(LegacyEventListenerAttributeEventName): Added.
(LegacyEventListenerAttributePrefix): Added.
(GenerateImplementation): Use "auto" in lots of places to simplify the code
generation. Replaced the old inlined code to deal with legacy event listener
attributes with code that simply calls the new functions from JSEventLister.h.
(GenerateCallWith): Use "auto".
(GenerateConstructorDefinition): Ditto.

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

4 years ago[Content Extensions] Split parsing and compiling of content extensions into their...
weinig@apple.com [Wed, 4 Mar 2015 16:41:31 +0000 (16:41 +0000)]
[Content Extensions] Split parsing and compiling of content extensions into their own files
https://bugs.webkit.org/show_bug.cgi?id=142259

Reviewed by Anders Carlsson.

Source/WebCore:

Added new unit test:
    ContentFilterTest.Basic

* WebCore.xcodeproj/project.pbxproj:
Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)

* contentextensions/CompiledContentExtension.cpp: Added.
* contentextensions/CompiledContentExtension.h: Added.
Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
to move between threads which will be important in a subsequent patch where we enable compilation on a background
thread.

* contentextensions/ContentExtensionCompiler.cpp: Added.
(WebCore::ContentExtensions::serializeActions):
(WebCore::ContentExtensions::compileRuleList):
* contentextensions/ContentExtensionCompiler.h: Added.
Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
we will want to be able to compile without the need of a backend.

* contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
* contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.

* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
(WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
(WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
(WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
(WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
(WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
* contentextensions/ContentExtensionsBackend.h:
Change the backend to use the new CompiledContentExtension and change the terminology to
reference content extensions, rather than rule lists.

* page/UserContentController.cpp:
(WebCore::UserContentController::addUserContentFilter):
(WebCore::UserContentController::removeUserContentFilter):
(WebCore::UserContentController::removeAllUserContentFilters):
Update for new names and change addUserContentFilter to explicitly compile the JSON
rule list before handing it to the backend. In subsequent changes, addUserContentFilter
should be changed to take the compiled content extension, and it should become the responsibility
of the called (WebKit) to create them.

Tools:

Add basic unit test for the content filter compiler.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/ContentFilter.cpp: Added.
(WebCore::ContentExtensions::operator<<):
(TestWebKitAPI::ContentFilterTest::SetUp):
(TestWebKitAPI::TEST_F):

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

4 years agoCleaned up BuildAndTestFactory to not be a near duplicate of TestFactory
mmirman@apple.com [Wed, 4 Mar 2015 15:52:13 +0000 (15:52 +0000)]
Cleaned up BuildAndTestFactory to not be a near duplicate of TestFactory
https://bugs.webkit.org/show_bug.cgi?id=142230

Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(TestFactory):
(TestFactory.getProduct): Added
(TestFactory.__init__): moved downloader to getProduct
(BuildAndTestFactory):
(BuildAndTestFactory.getProduct): Added
(BuildAndTestFactory.__init__): made to call TestFactory.__init__ and append steps to the end.
(BuildAndTestWebKit2Factory): Deleted.  Wasn't used anywhere.

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

4 years ago[GTK] WebView should hold a reference on WebContext because non-default contexts...
commit-queue@webkit.org [Wed, 4 Mar 2015 14:19:47 +0000 (14:19 +0000)]
[GTK] WebView should hold a reference on WebContext because non-default contexts are a reality
https://bugs.webkit.org/show_bug.cgi?id=142225

Patch by Debarshi Ray <debarshir@gnome.org> on 2015-03-04
Reviewed by Carlos Garcia Campos.

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewRequestFavicon):
(webkitWebViewWatchForChangesInFavicon):
(webkitWebViewDisconnectFaviconDatabaseSignalHandlers):
(webkitWebViewConstructed):
(webkitWebViewGetProperty):
(webkitWebViewDispose):
(webkitWebViewLoadChanged):
(webkitWebViewLoadFailedWithTLSErrors):
(webkit_web_view_get_context):
(webkit_web_view_download_uri):

Tools:

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:
(testWebViewWebContextLifetime):
(beforeAll):

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

4 years ago[GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
commit-queue@webkit.org [Wed, 4 Mar 2015 13:24:43 +0000 (13:24 +0000)]
[GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
https://bugs.webkit.org/show_bug.cgi?id=142274

Patch by Philippe Normand <pnormand@igalia.com> on 2015-03-04
Reviewed by Carlos Garcia Campos.

Don't handle scheduling queries if building against versions of
GStreamer older than 1.2.0.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(webKitWebSrcQueryWithParent):

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

4 years agoAdd a microtask abstraction
yoav@yoav.ws [Wed, 4 Mar 2015 07:55:28 +0000 (07:55 +0000)]
Add a microtask abstraction
https://bugs.webkit.org/show_bug.cgi?id=137496

Reviewed by Sam Weinig.

Source/WebCore:

This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
That abstraction is required in order to enable async loading of images,
which is in turn required to enable support for the picture element, as well as
to make sure that the order of properties set on HTMLImageElement has no implications.

A similar patch was rolled back in r180914. This patch is an improved version.

* WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
* WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
* WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
* dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
* dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
(WebCore::MicroTask::~MicroTask):
(WebCore::MicroTask::run): Run the microtask.
* dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
(WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
(WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
(WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
* dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
(WebCore::ScriptRunner::timerFired):
* html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
(WebCore::HTMLScriptRunner::runScript):
* testing/Internals.cpp: Add a method to queue a test microtask.
(WebCore::Internals::queueMicroTask):
* testing/Internals.h: Add a method to queue a test microtask.
(WebCore::Internals::queueMicroTask):
* testing/Internals.idl: Expose test microtask queueing to test JS.
* testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
(WebCore::MicroTaskTest::run): Run the microtask
(WebCore::MicroTaskTest::create): Create a test microtask.
* testing/MicroTaskTest.h: Add a test class that implements a microtask.
(WebCore::MicroTaskTest::run):
(WebCore::MicroTaskTest::create):

LayoutTests:

Adding a test for microtask abstraction.
A similar patch was rolled back in r180914.

* fast/dom/microtask-detach.html: Added.
* fast/dom/microtask-detach-expected.txt: Added.
* fast/dom/microtask-inorder.html: Added.
* fast/dom/microtask-inorder-expected.txt: Added.
* fast/dom/microtask-reverse.html: Added.
* fast/dom/microtask-reverse-expected.txt: Added.

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

4 years agoVersioning.
bshafiei@apple.com [Wed, 4 Mar 2015 07:52:56 +0000 (07:52 +0000)]
Versioning.

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

4 years agoDFG IR should refer to FunctionExecutables directly and not via the CodeBlock
fpizlo@apple.com [Wed, 4 Mar 2015 06:55:52 +0000 (06:55 +0000)]
DFG IR should refer to FunctionExecutables directly and not via the CodeBlock
https://bugs.webkit.org/show_bug.cgi?id=142229

Reviewed by Mark Lam and Benjamin Poulain.

Anytime a DFG IR node refers to something in CodeBlock, it has three effects:

- Cumbersome API for accessing the thing that the node refers to.

- Not obvious how to create a new such node after bytecode parsing, especially if the
  thing it refers to isn't already in the CodeBlock. We have done this in the past, but
  it usually involves subtle changes to CodeBlock.

- Not obvious how to inline code that ends up using such nodes. Again, when we have done
  this, it involved subtle changes to CodeBlock.

Prior to this change, the NewFunction* node types used an index into tables in CodeBlock.
For this reason, those operations were not inlineable. But the functin tables in CodeBlock
just point to FunctionExecutables, which are cells; this means that we can just abstract
these operands in DFG IR as cellOperands. cellOperands use DFG::FrozenValue, which means
that GC registration happens automagically. Even better, our dumping for cellOperand
already did FunctionExecutable dumping - so that functionality gets to be deduplicated.

Because this change increases the number of users of cellOperand, it also adds some
convenience methods for using it. For example, whereas before you'd say things like:

    jsCast<Foo*>(node->cellOperand()->value())

you can now just say:

    node->castOperand<Foo*>()

This change also changes existing cellOperand users to use the new conveniance API when
applicable.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::jettisonFunctionDeclsAndExprs):
* bytecode/CodeBlock.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGFrozenValue.h:
(JSC::DFG::FrozenValue::cell):
(JSC::DFG::FrozenValue::dynamicCast):
(JSC::DFG::FrozenValue::cast):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::registerFrozenValues):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::castOperand):
(JSC::DFG::Node::hasFunctionDeclIndex): Deleted.
(JSC::DFG::Node::functionDeclIndex): Deleted.
(JSC::DFG::Node::hasFunctionExprIndex): Deleted.
(JSC::DFG::Node::functionExprIndex): Deleted.
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewFunctionNoCheck):
(JSC::DFG::SpeculativeJIT::compileNewFunctionExpression):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileCheckCell):
(JSC::FTL::LowerDFGToLLVM::compileNativeCallOrConstruct):

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

4 years agoDelayedReleaseScope drops locks during GC which can cause a thread switch and code...
msaboff@apple.com [Wed, 4 Mar 2015 05:33:37 +0000 (05:33 +0000)]
DelayedReleaseScope drops locks during GC which can cause a thread switch and code reentry
https://bugs.webkit.org/show_bug.cgi?id=141275

Reviewed by Geoffrey Garen.

The original issue is that the CodeCache uses an unsafe method to add new UnlinkedCodeBlocks.
It basically adds a null UnlinkedCodeBlock if there isn't a cached entry and then later
updates the null entry to the result of the compilation.  If during that compilation and
related processing we need to garbage collect, the DelayedReleaseScope would drop locks
possibly allowing another thread to try to get the same source out of the CodeCache.
This second thread would find the null entry and crash.  The fix is to move the processing of
DelayedReleaseScope to when we drop locks and not drop locks during GC.  That was done in
the original patch with the new function releaseDelayedReleasedObjects().

Updated releaseDelayedReleasedObjects() so that objects are released with all locks
dropped.  Now its processing follows these steps
    Increment recursion counter and do recursion check and exit if recursing
    While there are objects to release
        ASSERT that lock is held by current thread
        Take all items from delayed release Vector and put into temporary Vector
        Release API lock
        Release and clear items from temporary vector
        Reaquire API lock
This meets the requirement that we release while the API lock is released and it is
safer processing of the delayed release Vector.

Added new regression test to testapi.

Also added comment describing how recursion into releaseDelayedReleasedObjects() is
prevented.

* API/tests/Regress141275.h: Added.
* API/tests/Regress141275.mm: Added.
(+[JSTEvaluatorTask evaluatorTaskWithEvaluateBlock:completionHandler:]):
(-[JSTEvaluator init]):
(-[JSTEvaluator initWithScript:]):
(-[JSTEvaluator _accessPendingTasksWithBlock:]):
(-[JSTEvaluator insertSignPostWithCompletion:]):
(-[JSTEvaluator evaluateScript:completion:]):
(-[JSTEvaluator evaluateBlock:completion:]):
(-[JSTEvaluator waitForTasksDoneAndReportResults]):
(__JSTRunLoopSourceScheduleCallBack):
(__JSTRunLoopSourcePerformCallBack):
(__JSTRunLoopSourceCancelCallBack):
(-[JSTEvaluator _jsThreadMain]):
(-[JSTEvaluator _sourceScheduledOnRunLoop:]):
(-[JSTEvaluator _setupEvaluatorThreadContextIfNeeded]):
(-[JSTEvaluator _callCompletionHandler:ifNeededWithError:]):
(-[JSTEvaluator _sourcePerform]):
(-[JSTEvaluator _sourceCanceledOnRunLoop:]):
(runRegress141275):
* API/tests/testapi.mm:
(testObjectiveCAPI):
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::releaseDelayedReleasedObjects):
* runtime/JSLock.cpp:
(JSC::JSLock::unlock):

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

4 years agoMark fast/css/object-fit/object-fit-canvas.html as a flakey
simon.fraser@apple.com [Wed, 4 Mar 2015 05:31:23 +0000 (05:31 +0000)]
Mark fast/css/object-fit/object-fit-canvas.html as a flakey
image failure, since it keeps breaking EWS.

* platform/mac/TestExpectations:

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

4 years ago[Win] [Attachment] New Tests fail on Windows
bfulgham@apple.com [Wed, 4 Mar 2015 05:29:12 +0000 (05:29 +0000)]
[Win] [Attachment] New Tests fail on Windows
https://bugs.webkit.org/show_bug.cgi?id=142017

WebKitLibraries:

Unreviewed test fix. Just activate the feature.

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

LayoutTests:

Unreviewed. Rebaseline tests for Windows display metrics.

* platform/win/fast/attachment/attachment-disabled-rendering-expected.txt:
* platform/win/fast/attachment/attachment-rendering-expected.txt:

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

4 years agoDFG should constant fold GetScope, and accesses to the scope register in the ByteCode...
fpizlo@apple.com [Wed, 4 Mar 2015 05:26:54 +0000 (05:26 +0000)]
DFG should constant fold GetScope, and accesses to the scope register in the ByteCodeParser should not pretend that it's a constant as that breaks OSR exit liveness tracking
https://bugs.webkit.org/show_bug.cgi?id=106202

Rubber stamped by Benjamin Poulain.

This fixes a bug discovered by working on https://bugs.webkit.org/show_bug.cgi?id=142229,
which was in turn discovered by working on https://bugs.webkit.org/show_bug.cgi?id=141174.
Our way of dealing with scopes known to be constant is very sketchy, and only really works
when a function is inlined. When it is, we pretend that every load of the scopeRegister sees
a constant. But this breaks the DFG's tracking of the liveness of the scopeRegister. The way
this worked made us miss oppportunities for optimizing based on a constant scope, and it also
meant that in some cases - particularly like when we inline code that uses NewFuction and
friends, as I do in bug 142229 - it makes OSR exit think that the scope is dead even though
it's most definitely alive and it's a constant.

The problem here is that we were doing too many optimizations in the ByteCodeParser, and not
later. Later optimization phases know how to preserve OSR exit liveness. They're actually
really good at it. Also, later phases know how to infer that any variable is a constant no
matter how that constant arose - rather than the inlining-specific thing in ByteCodeParser.

This changes the ByteCodeParser to largely avoid doing constant folding on the scope, except
making the GetScope operation itself a constant. This is a compilation-time hack for small
functions, and it doesn't break the loads of local variables - so OSR exit liveness still
sees that the scopeRegister is in use. This then adds a vastly more powerful GetScope and
GetClosureVar constant folder in the AbstractInterpreter. This handles most general cases
including those that arise in complex control flow. This will catch cases where the scope
is constant for any number of reasons. Basically anytime that the callee is inferred constant
this will give us a constant scope. Also, we still have the parse-time constant folding of
ResolveScope based on the reentry watchpoint, which luckily did the right thing with respect
to OSR exit liveness (it splats a Phantom on its inputs, and it produces a constant result
which is then set() normally).

This appears to be a broad speed-up, albeit a small one. But mainly it unblocks bug 142229,
which then should unblock bug 141174.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::getLocal):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::tryGetConstantClosureVar):
(JSC::DFG::Graph::tryGetRegisters):
(JSC::DFG::Graph::tryGetActivation): Deleted.
* dfg/DFGGraph.h:
* dfg/DFGNode.h:
(JSC::DFG::Node::hasVariableWatchpointSet):
(JSC::DFG::Node::hasSymbolTable): Deleted.
(JSC::DFG::Node::symbolTable): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetClosureVar):
* runtime/SymbolTable.cpp:
(JSC::SymbolTable::visitChildren):
(JSC::SymbolTable::localToEntry):
(JSC::SymbolTable::entryFor):
* runtime/SymbolTable.h:
(JSC::SymbolTable::add):
(JSC::SymbolTable::set):
* tests/stress/function-expression-exit.js: Added.
* tests/stress/function-reentry-infer-on-self.js: Added.
(thingy):
* tests/stress/goofy-function-reentry-incorrect-inference.js: Added.

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

4 years agoFix build warning in WebKit2/Shared module.
shiva.jm@samsung.com [Wed, 4 Mar 2015 05:25:50 +0000 (05:25 +0000)]
Fix build warning in WebKit2/Shared module.
https://bugs.webkit.org/show_bug.cgi?id=142213

Reviewed by Simon Fraser.

Fix build warning by removing argument name from function.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::pathPointCountApplierFunction):

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

4 years agoScroll snap points are not supported on the main frame
bfulgham@apple.com [Wed, 4 Mar 2015 04:56:44 +0000 (04:56 +0000)]
Scroll snap points are not supported on the main frame
https://bugs.webkit.org/show_bug.cgi?id=141973
<rdar://problem/19938393>

Reviewed by Simon Fraser.

No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.

Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
ScrollController. This involves the following:
1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea

We also need to hold a copy of the snap points vector to send to the scrolling thread.

* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
Scroll Snap Points on top-level frames.
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
* platform/cocoa/ScrollController.h:
* platform/cocoa/ScrollController.mm:
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
(WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
settings in the scrolling thread.
* platform/mac/AxisScrollSnapAnimator.h:
* platform/mac/AxisScrollSnapAnimator.mm:
(WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
(WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
(WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
when the scrollable area has already reached its final destination.
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
empty. Update method to account for m_snapOffsets being a value, instead of a pointer.

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

4 years agoUpdate TestExpectations after http://trac.webkit.org/changeset/180965 to skip new...
slewis@apple.com [Wed, 4 Mar 2015 04:47:05 +0000 (04:47 +0000)]
Update TestExpectations after trac.webkit.org/changeset/180965 to skip new test on Mavericks.

Unreviewed.

* platform/mac/TestExpectations:

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

4 years ago[Content Filtering] Separate unblock handling into its own class
aestes@apple.com [Wed, 4 Mar 2015 03:36:10 +0000 (03:36 +0000)]
[Content Filtering] Separate unblock handling into its own class
https://bugs.webkit.org/show_bug.cgi?id=142251

Reviewed by Andreas Kling.
Source/WebCore:

Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.

* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
(WebCore::DocumentLoader::dataReceived): Ditto.
* loader/FrameLoaderClient.h:
* platform/ContentFilter.h:
* platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
(WebCore::ContentFilterUnblockHandler::clear):
* platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
(WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
(WebCore::ContentFilterUnblockHandler::encode):
(WebCore::ContentFilterUnblockHandler::decode):
(WebCore::scheme):
(WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
* platform/mac/ContentFilterMac.mm:
(WebCore::ContentFilter::unblockHandler):
(WebCore::ContentFilter::ContentFilter): Deleted.
(WebCore::ContentFilter::encode): Deleted.
(WebCore::ContentFilter::decode): Deleted.

Source/WebKit/mac:

Adopted ContentFilterUnblockHandler.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
* WebView/WebFrame.mm:
(-[WebFrame _contentFilterDidHandleNavigationAction:]):
* WebView/WebFrameInternal.h:

Source/WebKit2:

Adopted ContentFilterUnblockHandler.

* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::encode):
(IPC::ArgumentCoder<ContentFilterUnblockHandler>::decode):
(IPC::ArgumentCoder<ContentFilter>::encode): Deleted.
(IPC::ArgumentCoder<ContentFilter>::decode): Deleted.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
(WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction):
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::setContentFilterUnblockHandler):
(WebKit::WebFrameProxy::setContentFilterForBlockedLoad): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

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

4 years ago[Mac] Track localized name follows locale instead of primary language
ap@apple.com [Wed, 4 Mar 2015 03:33:42 +0000 (03:33 +0000)]
[Mac] Track localized name follows locale instead of primary language
https://bugs.webkit.org/show_bug.cgi?id=142242
rdar://problem/20000365

Reviewed by Eric Carlson.

Source/WebCore:

* page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
language for localization, as CFBundle does.

LayoutTests:

* platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: This
test now successfully switches to Japanese, as originally intended.

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

4 years ago[iOS] Crash logs can't be found on ios-simulator because WebKitTestRunner returns...
ddkilzer@apple.com [Wed, 4 Mar 2015 02:51:43 +0000 (02:51 +0000)]
[iOS] Crash logs can't be found on ios-simulator because WebKitTestRunner returns the wrong process name
<http://webkit.org/b/142243>

Reviewed by Alexey Proskuryakov.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::webProcessName):
(WTR::TestController::networkProcessName):
- Return the same process name on iOS and Mac because they both
  use the same process name for local engineering builds.

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

4 years ago[WK2] Fix memory leak in _getCookieHeadersForTask
cdumez@apple.com [Wed, 4 Mar 2015 02:51:16 +0000 (02:51 +0000)]
[WK2] Fix memory leak in _getCookieHeadersForTask
https://bugs.webkit.org/show_bug.cgi?id=142245

Reviewed by Alexey Proskuryakov.

Fix memory leak in _getCookieHeadersForTask. We are leaking the CFDictionary
returned by webKitCookieStorageCopyRequestHeaderFieldsForURL().

This patch addresses the issue by storing the return CFDictionary in a
RetainPtr<CFDictionaryRef>.

* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):

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

4 years agocheck-webkit-style: Add exception for FrameworkSoftLink.h header order
ddkilzer@apple.com [Wed, 4 Mar 2015 02:47:53 +0000 (02:47 +0000)]
check-webkit-style: Add exception for FrameworkSoftLink.h header order
<http://webkit.org/b/141872>

Reviewed by Alex Christensen.

* Scripts/webkitpy/style/checkers/cpp.py: Remove unneeded
semi-colons in various places and fix whitespace.
(_IncludeState): Add _SOFT_LINK_HEADER and _SOFT_LINK_SECTION
constants.
(_IncludeState.__init__): Add self._visited_soft_link_section
boolean state variable.
(_IncludeState.visited_soft_link_section): Getter for
self._visited_soft_link_section.
(_IncludeState.check_next_include_order): Update state machine
for soft-link headers.  Add check that soft-link headers always
appear last.
(_classify_include): Add check for soft-link header type.
(check_include_line): Return early if there is a soft-link
header error.

* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_public_primary_header): Add tests for
including soft-link headers.
(OrderOfIncludesTest.test_classify_include): Add test for
_SOFT_LINK_HEADER type.

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

4 years ago[Win] Unreviewed build fix.
achristensen@apple.com [Wed, 4 Mar 2015 02:09:40 +0000 (02:09 +0000)]
[Win] Unreviewed build fix.

* WebCore.vcxproj/WebCoreIncludeCommon.props:
Include contentextensions subdirectory.

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

4 years agoPrepare to use CSS selectors in content extensions.
achristensen@apple.com [Wed, 4 Mar 2015 01:57:19 +0000 (01:57 +0000)]
Prepare to use CSS selectors in content extensions.
https://bugs.webkit.org/show_bug.cgi?id=142227

Reviewed by Benjamin Poulain.

Source/WebCore:

Test: http/tests/usercontentfilter/css-display-none.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* contentextensions/ContentExtensionActions.h: Added.
* contentextensions/ContentExtensionRule.cpp:
(WebCore::ContentExtensions::Action::deserialize):
* contentextensions/ContentExtensionRule.h:
(WebCore::ContentExtensions::Action::Action):
(WebCore::ContentExtensions::Action::type):
(WebCore::ContentExtensions::Action::cssSelector):
* contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
Put action descriptions into a compact format in a Vector
to be able to be put into one block of shared read-only memory.
(WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
Put an index of the beginning of the description into the NFA instead of the index of the rule
because we will be sharing the descriptions of the actions and not the rules.
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
(WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
Return a vector of actions to be able to do multiple actions for one URL.
* contentextensions/ContentExtensionsBackend.h:
* contentextensions/ContentExtensionsManager.cpp:
(WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
(WebCore::ContentExtensions::ExtensionsManager::loadAction):
Added the css-display-none action type, which requires a selector.
(WebCore::ContentExtensions::ExtensionsManager::loadRule):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
* page/UserContentController.cpp:
(WebCore::UserContentController::actionsForURL):
(WebCore::UserContentController::actionForURL): Deleted.
* page/UserContentController.h:

LayoutTests:

* http/tests/usercontentfilter/css-display-none-expected.txt: Added.
* http/tests/usercontentfilter/css-display-none.html: Added.
* http/tests/usercontentfilter/css-display-none.html.json: Added.

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

4 years agoWeb Inspector: selecting overview timeline tree elements without source locations...
burg@cs.washington.edu [Wed, 4 Mar 2015 01:55:31 +0000 (01:55 +0000)]
Web Inspector: selecting overview timeline tree elements without source locations doesn't update selection components
https://bugs.webkit.org/show_bug.cgi?id=142248

Reviewed by Timothy Hatcher.

Add a missing event dispatch to trigger recalculation of path components when showing the overview timeline view.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):

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

4 years ago[Win] Add baseline for new legacy-event-handler test.
bfulgham@apple.com [Wed, 4 Mar 2015 01:51:19 +0000 (01:51 +0000)]
[Win] Add baseline for new legacy-event-handler test.

* platform/win/fast/dom/legacy-event-handler-attributes-expected.txt: Added.

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

4 years ago<attachment> label can get very wide, doesn't wrap/truncate
timothy_horton@apple.com [Wed, 4 Mar 2015 01:46:39 +0000 (01:46 +0000)]
<attachment> label can get very wide, doesn't wrap/truncate
https://bugs.webkit.org/show_bug.cgi?id=142214
<rdar://problem/19982499>

* fast/attachment/attachment-label-highlight-expected.png: Added.
* fast/attachment/attachment-label-highlight-expected.txt: Added.
Add (empty) platform independent baselines.

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

4 years agoMove scroll animating functions from ScrollAnimator to ScrollController
bfulgham@apple.com [Wed, 4 Mar 2015 01:36:51 +0000 (01:36 +0000)]
Move scroll animating functions from ScrollAnimator to ScrollController
https://bugs.webkit.org/show_bug.cgi?id=142102
<rdar://problem/20007161>

Reviewed by Simon Fraser.

Source/WebCore:

Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.

Do some refactoring of the various scrolling classes:
1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
   and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
3. Move code from ScrollAnimator{Mac} -> ScrollController.
4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
5. Rename immediateScrollInAxis -> immediateScrollOnAxis

* WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
* page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
events, just as is done for the "event not handled" case in EventHandler.cpp.
(WebCore::EventHandler::platformCompleteWheelEvent):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
methods, now that ScrollController is controlling this state.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
need to clean up the CFRunLoopTimer.
(WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
state is updated after rubber band snap.
(WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
until Bug1973 is completed.).
(WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
(WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
* platform/ScrollAnimator.cpp:
(WebCore::ScrollAnimator::ScrollAnimator):
(WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
(WebCore::ScrollAnimator::handleWheelEvent): Ditto.
(WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
(WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
(WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
(WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
(WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
(WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
(WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
(WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
(WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
* platform/ScrollAnimator.h:
* platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
(WebCore::ScrollControllerClient::startSnapRubberbandTimer):
(WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
(WebCore::ScrollControllerClient::startScrollSnapTimer):
(WebCore::ScrollControllerClient::stopScrollSnapTimer):
* platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
(WebCore::ScrollController::ScrollController): Update to initialize new timers.
(WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
(WebCore::ScrollController::startSnapRubberbandTimer): Added.
(WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
require client to maintain timers.
(WebCore::ScrollController::snapRubberBand): Ditto.
(WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
(WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
(WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
(WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
(WebCore::ScrollController::immediateScrollOnAxis): Ditto.
* platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
* platform/mac/AxisScrollSnapAnimator.mm:
(WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
(WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
(WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
(WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
(WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
controlled in the ScrollController)
(WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
(WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
(WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
* platform/mac/ScrollController.h: Removed.
* platform/mac/ScrollController.mm: Removed.

LayoutTests:

Add a new test that confirms that rubberband snap animations work properly when combined
with text zooming.

* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html: Added.

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

4 years agoRemove unused compression code
andersca@apple.com [Wed, 4 Mar 2015 01:15:46 +0000 (01:15 +0000)]
Remove unused compression code
https://bugs.webkit.org/show_bug.cgi?id=142237

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* bytecode/UnlinkedCodeBlock.h:

Source/WTF:

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Compression.cpp: Removed.
* wtf/Compression.h: Removed.

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

4 years agoIncomplete dictation results in text fields in a web page.
enrica@apple.com [Wed, 4 Mar 2015 01:14:43 +0000 (01:14 +0000)]
Incomplete dictation results in text fields in a web page.
https://bugs.webkit.org/show_bug.cgi?id=142240
rdar://problem/19953432

Reviewed by Tim Horton.

The empty stub for insertDictationResult:withCorrectionIdentifier
must be removed. This way UIKit will call insertText and do the right thing.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView insertDictationResult:withCorrectionIdentifier:]): Deleted.

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

4 years agoUnreviewed, rolling out r180683.
commit-queue@webkit.org [Wed, 4 Mar 2015 01:03:15 +0000 (01:03 +0000)]
Unreviewed, rolling out r180683.
https://bugs.webkit.org/show_bug.cgi?id=142249

Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).

Reverted changeset:

"Setting any of the <object> element plugin controlling
attributes does not have any affect."
https://bugs.webkit.org/show_bug.cgi?id=141936
http://trac.webkit.org/changeset/180683

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

4 years agoControls panel should have system blurry background
dino@apple.com [Wed, 4 Mar 2015 00:39:36 +0000 (00:39 +0000)]
Controls panel should have system blurry background
https://bugs.webkit.org/show_bug.cgi?id=142154
<rdar://problem/20000964>

Reviewed by Simon Fraser.

Source/WebCore:

In order to replicate the system style of media controls
on OS X and iOS, we need to expose a special -webkit-appearance.
This patch adds the new property value, and implements
the iOS part of the appearance, which is a blurry shaded
background.

Test: compositing/media-controls-bar-appearance.html

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
keywords from ControlParts.

* css/CSSValueKeywords.in: Add media-controls-light-bar-background
and media-controls-dark-bar-background. Darin suggested they
be sorted, so I did this at the same time.
* platform/ThemeTypes.h: New ControlParts for the values, and
sort the values since they need to be in sync with
CSSValueKeywords.in.

* platform/graphics/GraphicsLayer.h: Expose two new custom appearance
values.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::layerTypeForCustomBackdropAppearance): Helper function.
(WebCore::isCustomBackdropLayerType): Ditto.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
a system backdrop layer in with the code that swaps to/from tiled layers.
(WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
swapFromOrToTiledLayer implemented, but also allows us to change to a
system backdrop layer.
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:

* platform/graphics/ca/PlatformCALayer.h: New layer types.
* platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
as regular backdrop layers.
(PlatformCALayerMac::PlatformCALayerMac):
(PlatformCALayerMac::updateCustomAppearance):

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
custom appearance,
(WebCore::RenderLayerBacking::updateCustomAppearance): New method.
* rendering/RenderLayerBacking.h:

Source/WebKit2:

In order to replicate the system style of media controls
on OS X and iOS, we need to expose a special -webkit-appearance.
This patch adds the new property value, and implements
the iOS part of the appearance, which is a blurry shaded
background.

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext): Add entries for
the new layer types, even though they are not correct yet.

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::updateCustomAppearance):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): UIBackdropViews
have a defined hierarchy that we don't create. We need to make sure we add our
children to the right subview.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::description): Logging.

* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Rename existing WKBackdropView
to WKSimpleBackdropView, and add a new WKBackdropView that inherits
from UIBackdropView.
(-[WKBackdropView hitTest:withEvent:]):
(-[WKBackdropView description]):
(WebKit::RemoteLayerTreeHost::createLayer): Handle the new LayerTypes.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):

LayoutTests:

Make sure content with a -webkit-appearance of
media-controls-light-bar-background or
media-controls-dark-bar-background doesn't get composited
unless explicitly requested. This avoids a
performance hit for a rarely used feature.

* compositing/media-controls-bar-appearance-expected.txt: Added.
* compositing/media-controls-bar-appearance.html: Added.

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

4 years agobmalloc: Don't branch when setting the owner of a large object
ggaren@apple.com [Wed, 4 Mar 2015 00:30:01 +0000 (00:30 +0000)]
bmalloc: Don't branch when setting the owner of a large object
https://bugs.webkit.org/show_bug.cgi?id=142241

Reviewed by Andreas Kling.

* bmalloc/BoundaryTag.h:
(bmalloc::BoundaryTag::owner):
(bmalloc::BoundaryTag::setOwner):

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

4 years agoAccess ApplicationCacheStorage global instance via singleton() static member function
cdumez@apple.com [Wed, 4 Mar 2015 00:10:08 +0000 (00:10 +0000)]
Access ApplicationCacheStorage global instance via singleton() static member function
https://bugs.webkit.org/show_bug.cgi?id=142239

Reviewed by Anders Carlsson.

Access ApplicationCacheStorage global instance via singleton() static
member function as per WebKit coding style.

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

4 years agoBuild Fix: Add fall back handling in postprocess script for missing/unknown platform...
joepeck@webkit.org [Wed, 4 Mar 2015 00:08:34 +0000 (00:08 +0000)]
Build Fix: Add fall back handling in postprocess script for missing/unknown platform name.

Rubber-stamped by David Kilzer.

* mac/postprocess-framework-headers.sh:

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

4 years agoBuild fix for iOS.
enrica@apple.com [Tue, 3 Mar 2015 23:36:23 +0000 (23:36 +0000)]
Build fix for iOS.

Unreviewed.

* UIProcess/ios/WKContentViewInteraction.mm: Adding forward declaration.

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

4 years agobmalloc should implement malloc introspection (to stop false-positive leaks when...
ggaren@apple.com [Tue, 3 Mar 2015 23:27:46 +0000 (23:27 +0000)]
bmalloc should implement malloc introspection (to stop false-positive leaks when MallocStackLogging is off)
https://bugs.webkit.org/show_bug.cgi?id=141802

Reviewed by Andreas Kling.

Re-enabled this feature on iOS, now that the iOS crash should be fixed.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:

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

4 years agobuild.webkit.org/dashboard: Don't repeatedly handle each test type
ap@apple.com [Tue, 3 Mar 2015 23:22:59 +0000 (23:22 +0000)]
build.webkit.org/dashboard: Don't repeatedly handle each test type
https://bugs.webkit.org/show_bug.cgi?id=142211

Reviewed by Tim Horton and Matt Hanson.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Buildbot.js:
(Buildbot.prototype.javascriptTestResultsURLForIteration): Deleted.
(Buildbot.prototype.apiTestResultsURLForIteration): Deleted.
(Buildbot.prototype.platformAPITestResultsURLForIteration): Deleted.
(Buildbot.prototype.webkitpyTestResultsURLForIteration): Deleted.
(Buildbot.prototype.webkitperlTestResultsURLForIteration): Deleted.
(Buildbot.prototype.bindingsTestResultsURLForIteration): Deleted.
Removed functions that build a link to test step results. The buildbot provides
these links in JSON.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration): Put failing tests into an array, instead of named variables.
(BuildbotIteration.ProductiveSteps): Removed step names that are not used on build.webkit.org.
We can easily add them to the map as needed.
(BuildbotIteration.TestSteps): Added a list of test steps to be displayed by test queues.
(BuildbotIteration.prototype._parseData): Moved code for parsing step results away
to BuildbotTestResults class. We used to parse here, build an intermediate data structure,
and then build a BuildbotTestResults object, which was strange.
(BuildbotIteration.prototype.loadLayoutTestResults): Ditto.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
Corrected an unrelated assertion that was buggy, and kept firing.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTestResults.js:
(BuildbotTestResults):
(BuildbotTestResults.prototype._parseResults.resultSummarizer):
(BuildbotTestResults.prototype._parseResults):
(BuildbotTestResults.prototype.addFullLayoutTestResults):
Moved the code for parsing JSON results for a single step here.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
(BuildbotTesterQueueView.prototype._testStepFailureDescription):
(BuildbotTesterQueueView.prototype._testStepFailureDescriptionWithCount):
(BuildbotTesterQueueView.prototype._presentPopoverForGenericTestFailures):
(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): Deleted.
(BuildbotTesterQueueView.prototype.update): Deleted.
(BuildbotTesterQueueView.prototype._presentPopoverForMultipleFailureKinds): Deleted.
Updated for the new data structures. One behavior change is that we now display individual
counts when multiple test kinds fail, e.g. "1 javascript test failure, 83+ layout
test failures, 3 platform api test failures".

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

4 years agobmalloc: Added missing features to the malloc zone introspection API
ggaren@apple.com [Tue, 3 Mar 2015 22:45:59 +0000 (22:45 +0000)]
bmalloc: Added missing features to the malloc zone introspection API
https://bugs.webkit.org/show_bug.cgi?id=142235

Reviewed by Andreas Kling.

This should fix the crash we saw on the iOS PLT bot
(c.f. http://trac.webkit.org/changeset/180604).

* bmalloc/Zone.cpp:
(bmalloc::good_size):
(bmalloc::check):
(bmalloc::print):
(bmalloc::log):
(bmalloc::force_lock):
(bmalloc::force_unlock):
(bmalloc::statistics):
(bmalloc::size):
(bmalloc::enumerator): Provide all of these functions since they are called
indiscriminately on all zones.

(bmalloc::Zone::Zone):
(bmalloc::Zone::size): Deleted.
(bmalloc::Zone::enumerator): Deleted. Moved these functions out of the
Zone class since they can stand alone.

* bmalloc/Zone.h:

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

4 years agoConvert ManualTests/svg-tooltip.svg to a DRT test
commit-queue@webkit.org [Tue, 3 Mar 2015 22:43:34 +0000 (22:43 +0000)]
Convert ManualTests/svg-tooltip.svg to a DRT test
https://bugs.webkit.org/show_bug.cgi?id=140480

Patch by Daniel Bates <dabates@apple.com> on 2015-03-03
Reviewed by Alex Christensen.

.:

* ManualTests/svg-tooltip.svg: Removed.

LayoutTests:

* svg/hittest/svg-tooltip-expected.txt: Added.
* svg/hittest/svg-tooltip.svg: Added.

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

4 years agoJIT debugging features that selectively disable the JITs for code blocks need to...
fpizlo@apple.com [Tue, 3 Mar 2015 22:35:14 +0000 (22:35 +0000)]
JIT debugging features that selectively disable the JITs for code blocks need to stay out of the way of the critical path of JIT management
https://bugs.webkit.org/show_bug.cgi?id=142234

Reviewed by Mark Lam and Benjamin Poulain.

Long ago, we used to selectively disable compilation of CodeBlocks for debugging purposes by
adding hacks to DFGDriver.cpp.  This was all well and good.  It used the existing
CompilationFailed mode of the DFG driver to signal failure of CodeBlocks that we didn't want
to compile.  That's great because CompilationFailed is a well-supported return value on the
critical path, usually used for when we run out of JIT memory.

Later, this was moved into DFGCapabilities. This was basically incorrect. It introduced a bug
where disabling compiling of a CodeBlock meant that we stopped inlining it as well.  So if
you had a compiler bug that arose if foo was inlined into bar, and you bisected down to bar,
then foo would no longer get inlined and you wouldn't see the bug.  That's busted.

So then we changed the code in DFGCapabilities to mark bar as CanCompile and foo as
CanInline. Now, foo wouldn't get compiled alone but it would get inlined.

But then we removed CanCompile because that capability mode only existed for the purpose of
our old varargs hacks.  After that removal, "CanInline" became CannotCompile.  This means
that if you bisect down on bar in the "foo inlined into bar" case, you'll crash in the DFG
because the baseline JIT wouldn't have known to insert profiling on foo.

We could fix this by bringing back CanInline.

But this is all a pile of nonsense.  The debug support to selectively disable compilation of
some CodeBlocks shouldn't cross-cut our entire engine and should most certainly never involve
adding new capability modes.  This support is a hack at best and is for use by JSC hackers
only.  It should be as unintrusive as possible.

So, as in the ancient times, the only proper place to put this hack is in DFGDriver.cpp, and
return CompilationFailed.  This is correct not just because it takes capability modes out of
the picture (and obviates the need to introduce new ones), but also because it means that
disabling compilation doesn't change the profiling mode of other CodeBlocks in the Baseline
JIT.  Capability mode influences profiling mode which in turn influences code generation in
the Baseline JIT, sometimes in very significant ways - like, we sometimes do additional
double-to-int conversions in Baseline if we know that we might tier-up into the DFG, since
this buys us more precise profiling.

This change reduces the intrusiveness of debugging hacks by making them use the very simple
CompilationFailed mechanism rather than trying to influence capability modes. Capability
modes have very subtle effects on the whole engine, while CompilationFailed just makes the
engine pretend like the DFG compilation will happen at timelike infinity. That makes these
hacks much more likely to continue working as we make other changes to the system.

This brings back the ability to bisect down onto a function bar when bar inlines foo. Prior
to this change, we would crash in that case.

* dfg/DFGCapabilities.cpp:
(JSC::DFG::isSupported):
(JSC::DFG::mightCompileEval):
(JSC::DFG::mightCompileProgram):
(JSC::DFG::mightCompileFunctionForCall):
(JSC::DFG::mightCompileFunctionForConstruct):
* dfg/DFGCapabilities.h:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):

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

4 years ago<attachment> label can get very wide, doesn't wrap/truncate
timothy_horton@apple.com [Tue, 3 Mar 2015 22:12:49 +0000 (22:12 +0000)]
<attachment> label can get very wide, doesn't wrap/truncate
https://bugs.webkit.org/show_bug.cgi?id=142214
<rdar://problem/19982499>

* platform/mac-mavericks/fast/attachment: Added.
* platform/mac-mavericks/fast/attachment/attachment-label-highlight-expected.txt: Added.
Add a Mavericks result because text metrics differ.

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

4 years agobmalloc should implement malloc introspection (to stop false-positive leaks when...
ggaren@apple.com [Tue, 3 Mar 2015 21:58:02 +0000 (21:58 +0000)]
bmalloc should implement malloc introspection (to stop false-positive leaks when MallocStackLogging is off)
https://bugs.webkit.org/show_bug.cgi?id=141802

Reviewed by Andreas Kling.

Rolling back in but disabled on iOS until I can debug why the iOS PLT crashes.

* bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::grow):
* bmalloc/VMHeap.h:
* bmalloc/Zone.cpp:
(bmalloc::Zone::size):
(bmalloc::Zone::Zone):
* bmalloc/Zone.h:

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

4 years agobmalloc: Miscellaneous cleanup
ggaren@apple.com [Tue, 3 Mar 2015 21:47:49 +0000 (21:47 +0000)]
bmalloc: Miscellaneous cleanup
https://bugs.webkit.org/show_bug.cgi?id=142231

Reviewed by Andreas Kling.

No performance change -- maybe a tiny reduction in memory use.

* bmalloc/Heap.cpp: Moved the sleep function into StaticMutex, since
it's a helper for working with mutexes.

(bmalloc::Heap::scavenge): Make sure to wait before we start any
scavenging, since individual scavenging functions now always scavenge
at least one page before waiting themselves.

(bmalloc::Heap::scavengeSmallPages):
(bmalloc::Heap::scavengeMediumPages):
(bmalloc::Heap::scavengeLargeObjects): Use the new wait helper to
simplify this code. Also, we now require our caller to wait until at
least one deallocation is desirable. This simplifies our loop.

(bmalloc::Heap::allocateSmallPage):
(bmalloc::Heap::allocateMediumPage):
(bmalloc::Heap::allocateXLarge):
(bmalloc::Heap::allocateLarge): Don't freak out any time the heap does
an allocation. Only consider the heap to be growing if it actually needs
to allocate new VM. This allows us to shrink the heap back down from a
high water mark more reliably even if heap activity continues.

(bmalloc::sleep): Deleted.
(bmalloc::Heap::scavengeLargeRanges): Renamed to match our use of
"LargeObject".

* bmalloc/Heap.h:

* bmalloc/LargeObject.h:
(bmalloc::LargeObject::operator bool): Added to simplify a while loop.

* bmalloc/StaticMutex.h:
(bmalloc::sleep):
(bmalloc::waitUntilFalse): New helper for waiting until a condition
becomes reliably false.

* bmalloc/Vector.h:
(bmalloc::Vector<T>::~Vector): Oops! Don't deallocate the null pointer.
We don't actually run any Vector destructors, but an iteration of this
patch did, and then crashed. So, let's fix that.

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

4 years agoTest legacy event handler attributes (ones with names like "onclick")
darin@apple.com [Tue, 3 Mar 2015 21:20:14 +0000 (21:20 +0000)]
Test legacy event handler attributes (ones with names like "onclick")
https://bugs.webkit.org/show_bug.cgi?id=142221

Reviewed by Anders Carlsson.

* fast/dom/legacy-event-handler-attributes-expected.txt: Added.
* fast/dom/legacy-event-handler-attributes.html: Added.

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

4 years agoTry to fix the build.
andersca@apple.com [Tue, 3 Mar 2015 21:13:48 +0000 (21:13 +0000)]
Try to fix the build.

* platform/spi/cf/CFNetworkSPI.h:

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

4 years ago<attachment> label can get very wide, doesn't wrap/truncate
timothy_horton@apple.com [Tue, 3 Mar 2015 20:16:50 +0000 (20:16 +0000)]
<attachment> label can get very wide, doesn't wrap/truncate
https://bugs.webkit.org/show_bug.cgi?id=142214
<rdar://problem/19982499>

Reviewed by Simon Fraser.

Test: fast/attachment/attachment-label-highlight.html

* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::labelTextColorForAttachment):
(WebCore::AttachmentLayout::addLine):
(WebCore::AttachmentLayout::layOutText):
(WebCore::AttachmentLayout::AttachmentLayout):
Make it possible to lay out multiple lines of label text.
We lay out the whole string normally, but then only draw N (where N=1 for now,
but is adjustable) of the lines. The remainder of the string is then
merged into a single line, which is middle-truncated with an ellipsis
and drawn in place of the N+1 line.

(WebCore::addAttachmentLabelBackgroundRightCorner):
(WebCore::addAttachmentLabelBackgroundLeftCorner):
(WebCore::paintAttachmentLabelBackground):
Wrap the label background around the multiple lines of text with curved edges.
We run first down the right side of the label, determining whether to use
concave or convex arcs based on the relative widths of adjacent lines.
Then, we run back up the left side of the label doing the same thing.

If the background rects of two lines are very similar (within the rounded rect radius),
they will be expanded to the larger of the two, because otherwise the arcs
look quite wrong.

(WebCore::paintAttachmentLabel):
Draw the label with CoreText directly instead of bothering with WebCore
text layout primitives. There's no need, and it makes wrapping much more complicated.

(WebCore::RenderThemeMac::paintAttachment):
(WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
(WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.

* fast/attachment/attachment-label-highlight.html: Added.
* platform/mac/fast/attachment/attachment-label-highlight-expected.png: Added.
* platform/mac/fast/attachment/attachment-label-highlight-expected.txt: Added.
Add a test for various <attachment> highlight cases.

* platform/mac/fast/attachment/attachment-rendering-expected.txt:
Update expected result for attachment-rendering, which changed size
because we now bail from text layout if we don't have any text.

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

4 years agoInclude key to NetworkCacheStorage::Entry
antti@apple.com [Tue, 3 Mar 2015 20:13:01 +0000 (20:13 +0000)]
Include key to NetworkCacheStorage::Entry
https://bugs.webkit.org/show_bug.cgi?id=142215

Reviewed by Chris Dumez.

This simplified code. The key is saved as part of the entry so it makes logical sense too.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::makeCacheKey):
(WebKit::encodeStorageEntry):
(WebKit::NetworkCache::retrieve):
(WebKit::NetworkCache::store):
(WebKit::NetworkCache::update):
(WebKit::NetworkCache::traverse):
(WebKit::entryAsJSON):
(WebKit::NetworkCache::dumpContentsToFile):
* NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCacheKey::operator=):
* NetworkProcess/cache/NetworkCacheKey.h:
(WebKit::NetworkCacheKey::isNull):
* NetworkProcess/cache/NetworkCacheStorage.h:
* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::decodeEntry):
(WebKit::encodeEntryHeader):
(WebKit::retrieveFromMemory):
(WebKit::NetworkCacheStorage::retrieve):
(WebKit::NetworkCacheStorage::store):
(WebKit::NetworkCacheStorage::update):
(WebKit::NetworkCacheStorage::traverse):
(WebKit::NetworkCacheStorage::dispatchPendingWriteOperations):
(WebKit::NetworkCacheStorage::dispatchFullWriteOperation):
(WebKit::NetworkCacheStorage::dispatchHeaderWriteOperation):

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

4 years agoAvoid applying the clip-path when painting, if a layer also has a shape layer mask
simon.fraser@apple.com [Tue, 3 Mar 2015 20:12:54 +0000 (20:12 +0000)]
Avoid applying the clip-path when painting, if a layer also has a shape layer mask
https://bugs.webkit.org/show_bug.cgi?id=142212

Reviewed by Zalan Bujtas.

After r180882 we translate clip-path into a composited shape mask when the layer
is composited. However, we were also still applying the clip-path when painting
the layer contents.

Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
rather than always. To ensure that masks and clip-path get applied for software paints,
add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
and when doing a flattening paint.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
the clipped area for us.
(WebCore::RenderLayer::calculateClipRects):
(WebCore::RenderLayer::paintsWithClipPath): Deleted.
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
when having a mask forces us onto the painting path.

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

4 years agoCache shrink leaves behind empty partition directories
antti@apple.com [Tue, 3 Mar 2015 20:10:07 +0000 (20:10 +0000)]
Cache shrink leaves behind empty partition directories
https://bugs.webkit.org/show_bug.cgi?id=142217

Reviewed by Andreas Kling.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::traverseCacheFiles):

    No need for std::function.

* NetworkProcess/cache/NetworkCacheStorageCocoa.mm:
(WebKit::NetworkCacheStorage::shrinkIfNeeded):

    After shrink traverse through the partition directories and try to delete them.
    System knows if they are actually empty.

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

4 years agoUse the correct display name for website data for local files
andersca@apple.com [Tue, 3 Mar 2015 19:56:32 +0000 (19:56 +0000)]
Use the correct display name for website data for local files
https://bugs.webkit.org/show_bug.cgi?id=142228

Reviewed by Dan Bernstein.

Source/WebCore:

* English.lproj/Localizable.strings:
Add local file display name.

* platform/spi/cf/CFNetworkSPI.h:
Add kCFHTTPCookieLocalFileDomain declaration.

Source/WebKit2:

* UIProcess/WebsiteData/WebsiteDataRecord.cpp:
(displayNameForLocalFiles):
Add new helper function.

(WebKit::WebsiteDataRecord::displayNameForCookieHostName):
Check if the hostname is kCFHTTPCookieLocalFileDomain.

(WebKit::WebsiteDataRecord::displayNameForOrigin):
Handle file URLs as well.

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

4 years agoJSC tests should not be repeated twice for each branch builder, and should if possibl...
mmirman@apple.com [Tue, 3 Mar 2015 19:14:24 +0000 (19:14 +0000)]
JSC tests should not be repeated twice for each branch builder, and should if possible have their own queue.
https://bugs.webkit.org/show_bug.cgi?id=142094

Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json: Added bots 155 and 157
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(TestFactory):
(TestFactory.__init__): Made running of JSC tests conditional.
(TestAllButJSCFactory):
(TestJSCFactory): Added.
(TestJSCFactory.__init__):
(TestWebKit2AndJSCFactory): Added factory to not run JSC tests on WebKit2.

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

4 years agoBreakingContext cleanup
mmaxfield@apple.com [Tue, 3 Mar 2015 19:13:13 +0000 (19:13 +0000)]
BreakingContext cleanup
https://bugs.webkit.org/show_bug.cgi?id=142146

Reviewed by Dean Jackson.

1. Use commitLineBreakAtCurrentWidth() instead of directly
updating m_width and m_lineBreak, because the name makes the
intent clearer.
2. Remove duplicate function LineBreaker::nextSegmentBreak().
3. lineStyle() takes care of inspecting RenderText's parent's
style.
4. Add FIXME to BreakingContext::initializeForCurrentObject()
because it seems like we are ignoring first-line style for
some properties.

No new tests because there is no behavior change.

* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::BreakingContext::BreakingContext):
(WebCore::BreakingContext::initializeForCurrentObject):
(WebCore::BreakingContext::handleReplaced):
(WebCore::BreakingContext::handleText):
(WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
(WebCore::BreakingContext::handleEndOfLine):
* rendering/line/LineBreaker.cpp:
(WebCore::LineBreaker::nextLineBreak): Deleted.
(WebCore::LineBreaker::nextSegmentBreak): Deleted.
* rendering/line/LineBreaker.h:
* rendering/line/LineInlineHeaders.h:
(WebCore::lineStyle):

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

4 years agoFixed typo in platform guard in http://trac.webkit.org/changeset/180939.
enrica@apple.com [Tue, 3 Mar 2015 18:52:00 +0000 (18:52 +0000)]
Fixed typo in platform guard in trac.webkit.org/changeset/180939.

Unreviewed.

* UIProcess/ios/WKContentViewInteraction.mm:

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

4 years ago`build-webkit --help` is wrong about how to build for the iOS simulator
ddkilzer@apple.com [Tue, 3 Mar 2015 18:50:49 +0000 (18:50 +0000)]
`build-webkit --help` is wrong about how to build for the iOS simulator
<http://webkit.org/b/142223>

Reviewed by Csaba Osztrogonác.

* Scripts/build-webkit: Fix help.

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

4 years agoWeb Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
nvasilyev@apple.com [Tue, 3 Mar 2015 18:10:56 +0000 (18:10 +0000)]
Web Inspector: Refactoring: separate ConsoleSession from ConsoleGroup
https://bugs.webkit.org/show_bug.cgi?id=142141

ConsoleSession doesn't have a title and it's not collapsible either.
Simplify ConsoleSession by removing excessive markup.

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.startNewSession):
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
(WebInspector.JavaScriptLogViewController.prototype.get topConsoleGroup): Deleted.
* UserInterface/Main.html:
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup):
(WebInspector.ConsoleGroup.prototype.render):
(WebInspector.ConsoleGroup.prototype.addMessage):
(WebInspector.ConsoleGroup.prototype.append):
(WebInspector.ConsoleGroup.prototype.hasMessages): Deleted.
* UserInterface/Views/ConsoleSession.js: Added.
(WebInspector.ConsoleSession):
(WebInspector.ConsoleSession.prototype.addMessage):
(WebInspector.ConsoleSession.prototype.append):
(WebInspector.ConsoleSession.prototype.hasMessages):
* UserInterface/Views/LogContentView.css:
(.console-session + .console-session):
(.console-group.new-session .console-group-messages .console-item:first-child): Deleted.
(.console-group.new-session): Deleted.

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

4 years agoUnreviewed. Bump libsoup version to 2.49.91.1 to fix 32 bit build.
carlosgc@webkit.org [Tue, 3 Mar 2015 18:05:59 +0000 (18:05 +0000)]
Unreviewed. Bump libsoup version to 2.49.91.1 to fix 32 bit build.

* gtk/jhbuild.modules:

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

4 years agoAdopt new API for keyboard interaction.
enrica@apple.com [Tue, 3 Mar 2015 17:46:00 +0000 (17:46 +0000)]
Adopt new API for keyboard interaction.
https://bugs.webkit.org/show_bug.cgi?id=142201
rdar://problem/19924949

Reviewed by Joseph Pecoraro.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputAssistantItem]):
(-[WKContentView _inputAssistantItem]):

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

4 years ago[Win64] JSC compile error.
commit-queue@webkit.org [Tue, 3 Mar 2015 17:32:39 +0000 (17:32 +0000)]
[Win64] JSC compile error.
https://bugs.webkit.org/show_bug.cgi?id=142216

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-03-03
Reviewed by Mark Lam.

There is missing a version of setupArgumentsWithExecState when NUMBER_OF_ARGUMENT_REGISTERS == 4.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):

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