WebKit-https.git
5 years ago[ContentExtensions] Prepare for compiling stylesheets of selectors to be used on...
commit-queue@webkit.org [Thu, 19 Mar 2015 04:57:20 +0000 (04:57 +0000)]
[ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
https://bugs.webkit.org/show_bug.cgi?id=142799

Patch by Alex Christensen <achristensen@webkit.org> on 2015-03-18
Reviewed by Brady Eidson.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
Make private headers to use with API tests.
* contentextensions/CompiledContentExtension.cpp:
(WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
* contentextensions/CompiledContentExtension.h:
Added method to get only the selectors from the root of the DFA, which apply to all URLs.
* contentextensions/ContentExtensionCompiler.cpp:
(WebCore::ContentExtensions::compileRuleList):
Added checking if the trigger will match everything.
These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
* contentextensions/DFA.h:
(WebCore::ContentExtensions::DFA::nodeAt):
* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
* contentextensions/DFABytecodeInterpreter.h:
* contentextensions/NFA.h:
* contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::Term::quantifier):
Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
(WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
(WebCore::ContentExtensions::GraphBuilder::finalize):
(WebCore::ContentExtensions::GraphBuilder::parseStatus):
(WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
(WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
(WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
(WebCore::ContentExtensions::GraphBuilder::atomBackReference):
(WebCore::ContentExtensions::GraphBuilder::assertionBOL):
(WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
(WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
(WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
(WebCore::ContentExtensions::GraphBuilder::disjunction):
(WebCore::ContentExtensions::GraphBuilder::hasError):
(WebCore::ContentExtensions::GraphBuilder::fail):
(WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
(WebCore::ContentExtensions::URLFilterParser::addPattern):
(WebCore::ContentExtensions::URLFilterParser::statusString):
(WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
* contentextensions/URLFilterParser.h:
Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::testPattern):
(TestWebKitAPI::TEST_F):
Start testing regex failures.

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

5 years agoFix build failure due to FALLTHROUGH in unreachable code
utatane.tea@gmail.com [Thu, 19 Mar 2015 04:05:51 +0000 (04:05 +0000)]
Fix build failure due to FALLTHROUGH in unreachable code
https://bugs.webkit.org/show_bug.cgi?id=142703

Reviewed by Benjamin Poulain.

FALLTHROUGH should not exist in unreachable code marked by
ASSERT_NOT_REACHABLE.

When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
and it cause build failure.

Here, since CompiledSingle/CompiledSingleWithRootFilter are
not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
and leave ASSERT_NOT_REACHED.
And since ASSERT_NOT_ReACHED is stripped when Release build,
I've inserted FALLTHROUGH() if ASSERT_DISABLED.
This fix is the same to r162906.

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

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

5 years agoES6 Classes: Extends should accept an expression without parenthesis
joepeck@webkit.org [Thu, 19 Mar 2015 03:27:00 +0000 (03:27 +0000)]
ES6 Classes: Extends should accept an expression without parenthesis
https://bugs.webkit.org/show_bug.cgi?id=142840

Reviewed by Ryosuke Niwa.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClass):
"extends" allows a LeftHandExpression (new expression / call expression,
which includes a member expression), not a primary expression. Our
parseMemberExpression does all of these.

LayoutTests:

* js/class-syntax-extends-expected.txt:
* js/script-tests/class-syntax-extends.js:
Extend the test to test cases of extends with different types of expressions.

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

5 years agoWeb Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
joepeck@webkit.org [Thu, 19 Mar 2015 03:26:58 +0000 (03:26 +0000)]
Web Inspector: Replace last use of ObjectPropertiesSection with ObjectTreeView
https://bugs.webkit.org/show_bug.cgi?id=142834

Reviewed by Timothy Hatcher.

* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
Use properties only ObjectTreeView instead of ObjectPropertiesSection.
This doesn't fix the functionality issues, but fixes the appearance.

* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *): Deleted.
(.details-section > .content > .group > .row.properties:not(.empty)): Deleted.
(body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)): Deleted.
Re-add back the small padding at the top of sections. This actually
broke padding in a few sections (Event Listeners) at the expense
of eliminating a few pixels of whitespace at the top of other sections.
We should focus on addressing the extra whitespace separately.

* UserInterface/Main.html:
* UserInterface/Views/ObjectPropertiesSection.js: Removed.
* UserInterface/Views/TypePropertiesSection.js:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove new unused class.

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

5 years agoWeb Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView...
joepeck@webkit.org [Thu, 19 Mar 2015 03:26:55 +0000 (03:26 +0000)]
Web Inspector: Debugger Popovers and Probes should use FormattedValue/ObjectTreeView instead of Custom/ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142830

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::breakpointActionProbe):
Give Probe Samples object previews.

Source/WebInspectorUI:

* UserInterface/Views/ProbeSetDataGrid.css:
(.details-section.probe-set .data-grid .object-tree > :matches(.title, .object-preview)::before):
Another line-height fix for object tree disclosure triangles.

* UserInterface/Views/ProbeSetDataGridNode.js:
(WebInspector.ProbeSetDataGridNode.prototype.createCellContent):
Create an ObjectTree / FormattedValue for the RemoteObject.

* UserInterface/Views/SourceCodeTextEditor.css:
(.popover .debugger-popover-content > .title):
(.popover .debugger-popover-content > .body):
(.popover .debugger-popover-content.function > .body):
Be more specific and don't accidentally style ".title" within the body.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForObject):
Show a properties only ObjectTree instead of an ObjectPropertiesSection.

(WebInspector.SourceCodeTextEditor.prototype._showPopoverForString): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForRegExp): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNumber): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForBoolean): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForNull): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverForUndefined): Deleted.
(WebInspector.SourceCodeTextEditor.prototype._showPopoverWithFormattedValue):
Reduce most of these to a single popover for formatted values.

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

5 years agoDon't paint PDFs on every scroll
simon.fraser@apple.com [Thu, 19 Mar 2015 02:16:12 +0000 (02:16 +0000)]
Don't paint PDFs on every scroll
https://bugs.webkit.org/show_bug.cgi?id=142857
rdar://problem/20130207

Reviewed by Tim Horton.

Don't push a scale factor onto the PDF layer controller if it hasn't
changed, since doing so causes a repaint.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):

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

5 years agoSwitching between two SVG images with no intrinsic sizes causes them to get the defau...
commit-queue@webkit.org [Thu, 19 Mar 2015 02:15:00 +0000 (02:15 +0000)]
Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
https://bugs.webkit.org/show_bug.cgi?id=142805.

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

The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
This function decides to setNeedsLayout() if the intrinsic size of the image
changes. If the size does not change, it only repaints the image rectangle.
When switching the src of the an image between two SVG images and both of
them have no intrinsic size, we do not updateInnerContentRect() and this
means an SVGImageForContainer is not going to be created for this image.
When the image is drawn, it is drawn directly from the SVGImage. And this
means the drawing has to be scaled by container_size / SVG_default_intrinsic_size

After figuring out that I need to updateInnerContentRect() to fix this bug,
I found out Blink has already changed this code to do the same thing. But
they also did more clean-up in this function. Here is the link
https://codereview.chromium.org/114323004. I think their change seems correct
although they did not say what exactly they were trying to fix.

The plan for repaintOrMarkForLayout(), which is the new name of this function,
is the following:
    -- setNeedLayout() if the intrinsic size changes and it affects the size
       of the image.
    -- updateInnerContentRect() if the intrinsic size did not change but the
       image has exiting layout.
    -- repaint the image rectangle if layout is not needed.

This change also removes the call to computeLogicalWidthInRegion(), which is
almost running a layout for the image. This call figures out whether the image
needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
layout if the intrinsic size has changed and it affects the size of the image.

Test: svg/as-image/svg-no-intrinsic-size-switching.html

* rendering/RenderImage.cpp:
(WebCore::RenderImage::styleDidChange): Change the function call.
(WebCore::RenderImage::imageChanged): Rename local variable and change the
function call.

(WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
Call setIntrinsicSize() with the new size unless the image is in error state.

(WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
function since it is called even if the intrinsic size was not changed.
(WebCore::RenderImage::imageDimensionsChanged): Deleted.

* rendering/RenderImage.h: Rename imageDimensionsChanged() and change the
updateIntrinsicSizeIfNeeded() to return void.

* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
Use this information to simplify the logic and order of painting there.

LayoutTests:

* svg/as-image/svg-no-intrinsic-size-switching-expected.html: Added.
* svg/as-image/svg-no-intrinsic-size-switching.html: Added.
Ensure that switching the source of an <img> element between two SVG images,
which have no intrinsic sizes, gets the image the size of the container and
not the default SVG intrinsic size which is 300x150 pixels.

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

5 years agoSource/WTF:
diorahman@rockybars.com [Thu, 19 Mar 2015 01:10:24 +0000 (01:10 +0000)]
Source/WTF:
Fix StringView misplaced implementations after r181525 and r181558
https://bugs.webkit.org/show_bug.cgi?id=142772

Reviewed by Darin Adler.

Fix misplaced implementations in StringView::startsWithIgnoringASCIICase and
StringView::endsWith.

Add some tests in [1] to cover the StringView::startsWith,
StringView::startsWithIgnoringASCIICase, StringView::endsWith and
StringView::endsWithIgnoringASCIICase implementations.

[1] Tools/TestWebKitAPI/Tests/WTF/StringView.cpp.

* wtf/text/StringView.cpp:
(WTF::StringView::startsWithIgnoringASCIICase):
(WTF::StringView::endsWith):
(WTF::StringView::endsWithIgnoringASCIICase):

Tools:
Fix StringView typos after r181525 and r181558
https://bugs.webkit.org/show_bug.cgi?id=142772

Reviewed by Darin Adler.

Add some tests in [1] to cover the StringView::startsWith,
StringView::startsWithIgnoringASCIICase, StringView::endsWith and
StringView::endsWithIgnoringASCIICase implementations.

* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):

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

5 years agoRemove extraneous import to fix the build.
dburkart@apple.com [Thu, 19 Mar 2015 00:14:08 +0000 (00:14 +0000)]
Remove extraneous import to fix the build.

Unreviewed.

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

5 years agoASAN_OPTIONS=allocator_may_return_null=1 needs to be set
dburkart@apple.com [Thu, 19 Mar 2015 00:01:42 +0000 (00:01 +0000)]
ASAN_OPTIONS=allocator_may_return_null=1 needs to be set
https://bugs.webkit.org/show_bug.cgi?id=142547

Reviewed by Alexey Proskuryakov.

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

5 years agoFix typo in playerViewControllerWillCancelOptimizedFullscree.
jeremyj-wk@apple.com [Wed, 18 Mar 2015 23:35:06 +0000 (23:35 +0000)]
Fix typo in playerViewControllerWillCancelOptimizedFullscree.
https://bugs.webkit.org/show_bug.cgi?id=142745

Reviewed by Darin Adler.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
(-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.

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

5 years agowebaudio/convolution-mono-mono.html fails on some machines
ap@apple.com [Wed, 18 Mar 2015 23:29:34 +0000 (23:29 +0000)]
webaudio/convolution-mono-mono.html fails on some machines
rdar://problem/19996807

Rubber-stampted by Jer Noble.

* webaudio/resources/convolution-testing.js: (checkTriangularPulse): Slightly increase
the tolerance. It's still extremely low.

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

5 years agoUse && instead of & when deciding if the network cache should be cleared
andersca@apple.com [Wed, 18 Mar 2015 22:39:46 +0000 (22:39 +0000)]
Use && instead of & when deciding if the network cache should be cleared
https://bugs.webkit.org/show_bug.cgi?id=142845

Reviewed by Antti Koivisto.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::deleteWebsiteData):

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

5 years agoAvoid repaints when changing transform on an element with multiple background images
simon.fraser@apple.com [Wed, 18 Mar 2015 22:17:34 +0000 (22:17 +0000)]
Avoid repaints when changing transform on an element with multiple background images
https://bugs.webkit.org/show_bug.cgi?id=142841

Reviewed by Zalan Bujtas.

Source/WebCore:

Replace the cheap test for changed images in RenderElement::updateFillImages()
with an exhaustive test that walks the entire list of background images,
since any ensuing repaint is way more expensive than a slightly more expensive check here.

Test: fast/repaint/multiple-backgrounds-style-change.html

* rendering/RenderElement.cpp:
(WebCore::RenderElement::updateFillImages):
* rendering/style/FillLayer.cpp:
(WebCore::layerImagesIdentical): See if both images are the same (either none
or both mask images, and same image pointer).
(WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
on each one. Returns false if we reach the end of one list before the other, or the images
are different.
* rendering/style/FillLayer.h: New static function; static because
it compares two FillLayer lists, and I think that makes more sense than
a member function.

LayoutTests:

Test that changes transform on a composited element with 2 background images,
and tests for no repaints.

* fast/repaint/multiple-backgrounds-style-change-expected.txt: Added.
* fast/repaint/multiple-backgrounds-style-change.html: Added.

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

5 years agoPass cookies by reference in CookieHash functions
andersca@apple.com [Wed, 18 Mar 2015 21:06:15 +0000 (21:06 +0000)]
Pass cookies by reference in CookieHash functions
https://bugs.webkit.org/show_bug.cgi?id=142839

Reviewed by Sam Weinig.

* platform/Cookie.h:
(WebCore::CookieHash::hash):
(WebCore::CookieHash::equal):

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

5 years agoTweak how AppleSystemFontOSSubversion default is added
ap@apple.com [Wed, 18 Mar 2015 20:42:11 +0000 (20:42 +0000)]
Tweak how AppleSystemFontOSSubversion default is added
https://bugs.webkit.org/show_bug.cgi?id=142835

Reviewed by Dan Bernstein.

* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):

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

5 years agoAdd WKContextGetWebsiteDataStore API
andersca@apple.com [Wed, 18 Mar 2015 19:54:40 +0000 (19:54 +0000)]
Add WKContextGetWebsiteDataStore API
https://bugs.webkit.org/show_bug.cgi?id=142832
rdar://problem/16544715

Reviewed by Sam Weinig.

Also add WKWebsiteDataStoreRef which is toll-free bridged to _WKWebsiteDataStore.

* Shared/API/c/WKBase.h:
Add new declaration.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::create):
* UIProcess/API/APIWebsiteDataStore.h:
Add a new function that takes a configuration.

* UIProcess/API/C/WKAPICast.h:
Add cast.

* UIProcess/API/C/WKContext.cpp:
(WKContextGetWebsiteDataStore):
Return the context's website data store.

* UIProcess/API/C/WKContext.h:
Add new declaration.

* UIProcess/API/C/WKWebsiteDataStoreRef.cpp: Added.
* UIProcess/API/C/WKWebsiteDataStoreRef.h: Added.
Add new files.

* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
(WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
(WebKit::WebKeyValueStorageManager::deleteAllEntries):
Update now that WebProcessPool holds on to an API::WebsiteDataStore.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
(WebKit::WebProcessPool::createWebPage):
* UIProcess/WebProcessPool.h:
WebProcessPool should hold on to an API::WebsiteDataStore instead of a WebKit::WebsiteDataStore.

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

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

5 years agoTemporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
timothy_horton@apple.com [Wed, 18 Mar 2015 19:07:30 +0000 (19:07 +0000)]
Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Wed, 18 Mar 2015 18:40:48 +0000 (18:40 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

* UIProcess/API/mac/WKView.mm:
Need one more respondsToSelector check.

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

5 years agoWeb Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesS...
joepeck@webkit.org [Wed, 18 Mar 2015 18:30:47 +0000 (18:30 +0000)]
Web Inspector: Scopes sidebar should use new ObjectTreeView and not ObjectPropertiesSection
https://bugs.webkit.org/show_bug.cgi?id=142808

Reviewed by Timothy Hatcher.

* UserInterface/Models/PropertyPath.js:
(WebInspector.PropertyPath):
(WebInspector.PropertyPath.emptyPropertyPathForScope):
Allow a special property empty path for "Scopes". This way for a
"<scopeObject>.property" we can show just the tooltip "property".

* UserInterface/Views/ObjectTreeView.css:
(.object-tree.properties-only > :matches(.title, .object-preview)):
(.object-tree.properties-only .object-tree-outline):
(.object-tree.properties-only .object-tree-property .property-name):
Tweak styles for only properties view, which won't have a top-level
preview and doesn't fade out enumerable properties.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView.prototype.get treeOutline):
Access the TreeOutline.

(WebInspector.ObjectTreeView.prototype.showOnlyProperties):
Properties only view modifies the display slightly.

(WebInspector.ObjectTreeView.prototype.appendExtraPropertyDescriptor):
(WebInspector.ObjectTreeView.prototype._updateProperties):
Allow the client to add its own property descriptors to display
as a property in this ObjectTreeView.

* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
Switch to using an ObjectTreeView.

(WebInspector.ScopeChainDetailsSidebarPanel.prototype._propertyPathIdentifierForTreeElement):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeAddHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler):
Keep track of what properties were expanded so we can auto-expand
them again when the sidebar refreshes.

* UserInterface/Main.html:
* UserInterface/Views/ScopeVariableTreeElement.js: Removed.
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
Remove the now unused ScopeVariableTreeElement.js.

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

5 years agoCall CTFontSetRenderingParameters before rendering text
mmaxfield@apple.com [Wed, 18 Mar 2015 18:12:39 +0000 (18:12 +0000)]
Call CTFontSetRenderingParameters before rendering text
https://bugs.webkit.org/show_bug.cgi?id=142816

Reviewed by Darin Adler.

No new tests.

* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::showGlyphsWithAdvances):
* platform/spi/cocoa/CoreTextSPI.h:

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

5 years ago[WK2] Log the number of network cache requests that we have never seen before
cdumez@apple.com [Wed, 18 Mar 2015 17:50:52 +0000 (17:50 +0000)]
[WK2] Log the number of network cache requests that we have never seen before
https://bugs.webkit.org/show_bug.cgi?id=142828
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key for network cache efficacy logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
(WebCore::DiagnosticLoggingKeys::requestKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log the number of network cache requests that we have never seen before
using diagnostic logging.

* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordNotUsingCacheForRequest):
(WebKit::NetworkCache::Statistics::recordRetrievalFailure):

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

5 years agoUnreviewed GTK Gardening 18th March
commit-queue@webkit.org [Wed, 18 Mar 2015 17:40:56 +0000 (17:40 +0000)]
Unreviewed GTK Gardening 18th March
https://bugs.webkit.org/show_bug.cgi?id=142824

Unreviewed.

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

* platform/gtk/TestExpectations:

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

5 years agoPrune least valuable cache entries first
antti@apple.com [Wed, 18 Mar 2015 17:40:34 +0000 (17:40 +0000)]
Prune least valuable cache entries first
https://bugs.webkit.org/show_bug.cgi?id=142810
rdar://problem/19632130

Reviewed by Darin Adler.

When pruning the cache estimate relative value of each entry using formula

age = current time - creation time
accessAge = last access time - creation time
value = accessAge / age

That is, we value entries that have been accessed recently and survived in the cache longest.

The most valuable entries don't get deleted at all while the deletion probablity ramps up for
lower value entries.

* NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
(WebKit::NetworkCache::fileTimes):

    Get the creation time and access time for a file.

(WebKit::NetworkCache::updateFileAccessTimeIfNeeded):

    Update access time manually if the file system doesn't do it automatically.

* NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::path):
(WebKit::NetworkCache::IOChannel::type):
* NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::open):

    Remember the file path and move most of the work to constructor.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::Storage):
(WebKit::NetworkCache::Storage::remove):
(WebKit::NetworkCache::Storage::updateFileAccessTime):
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::deletionProbability):

    Compute the probability based on entry age and access time.

(WebKit::NetworkCache::Storage::shrinkIfNeeded):
* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::serialBackgroundIOQueue):
(WebKit::NetworkCache::Storage::deleteQueue): Deleted.

    More generic name.

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

5 years agoUse filterRootId in SelectorQuery even if CSS JIT is not enabled
utatane.tea@gmail.com [Wed, 18 Mar 2015 17:27:22 +0000 (17:27 +0000)]
Use filterRootId in SelectorQuery even if CSS JIT is not enabled
https://bugs.webkit.org/show_bug.cgi?id=142703

Reviewed by Benjamin Poulain.

Source/WebCore:

filterRootId pruning path is not inherently related to CSS JIT.
This patch enables filterRootId even in the environment
where CSS JIT is not enabled.

* dom/SelectorQuery.cpp:
(WebCore::filterRootById):
(WebCore::SelectorDataList::executeSingleSelectorData):
(WebCore::SelectorDataList::execute):
* dom/SelectorQuery.h:

LayoutTests:

This is covered by the following layout-tests.
CompilableSingleWithRootFilter and CompilableSingle are covered by them.

- fast/selectors/filter-root-node-with-selector-contains-adjacents.html
- fast/selectors/querySelector-id-filtering.html
- fast/selectors/querySelector-scope-filtered-root.html

And add tests to cover the following cases.

- Failures on selectorForIdLookup()'s rootNode.inDocument().
- Failures on selectorForIdLookup()'s rootNode.document().inQuirksMode().

* fast/selectors/querySelector-with-id-for-detached-element-expected.txt: Added.
* fast/selectors/querySelector-with-id-for-detached-element.html: Added.
* fast/selectors/querySelector-with-id-in-quirks-mode-expected.txt: Added.
* fast/selectors/querySelector-with-id-in-quirks-mode.html: Added.

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

5 years agoSimple line layout: Use Vector<>::const_iterator instead of custom FlowContents:...
zalan@apple.com [Wed, 18 Mar 2015 16:51:37 +0000 (16:51 +0000)]
Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
https://bugs.webkit.org/show_bug.cgi?id=142809

Reviewed by Antti Koivisto.

FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::begin):
(WebCore::SimpleLineLayout::FlowContents::end):
(WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

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

5 years agoSimple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
zalan@apple.com [Wed, 18 Mar 2015 16:47:47 +0000 (16:47 +0000)]
Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
https://bugs.webkit.org/show_bug.cgi?id=142785

Reviewed by Antti Koivisto.

This is in transition to support <br>. A particular position could point to multiple
segments when <br> is directly followed by text.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

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

5 years agoprepare-ChangeLog doesn't understand C string literals split across multiple lines...
mitz@apple.com [Wed, 18 Mar 2015 16:27:07 +0000 (16:27 +0000)]
prepare-ChangeLog doesn't understand C string literals split across multiple lines with \
https://bugs.webkit.org/show_bug.cgi?id=142815

Reviewed by Darin Adler.

* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_cpp): If the line ends with a backslash instead of a matching
quotation mark, use new variable $quotation_mark to remember what we are looking for, and
keep consuming the quoted text until the matching quotation mark is reached. Emit the
warning only if a line ends without a backslash before the matching quotation mark was found.

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

5 years agoSkip trying to paint overlay scrollbars when there are none or they are clipped out
simon.fraser@apple.com [Wed, 18 Mar 2015 16:22:04 +0000 (16:22 +0000)]
Skip trying to paint overlay scrollbars when there are none or they are clipped out
https://bugs.webkit.org/show_bug.cgi?id=142811
rdar://problem/20200725

Reviewed by Darin Adler.

In some content with lots of layers and overflow:scroll, we could spend 20% of
the time under paintOverflowControlsForFragments() setting up an (empty) clip,
and then trying to draw scrollbars that we don't have.

Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
and don't both setting up an empty clip just to paint nothing.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents):
(WebCore::RenderLayer::paintOverflowControlsForFragments):

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

5 years ago[WinCairo] Unreviewed build fix after r181665.
peavo@outlook.com [Wed, 18 Mar 2015 16:15:17 +0000 (16:15 +0000)]
[WinCairo] Unreviewed build fix after r181665.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):

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

5 years agoRemove unused "preprocessor" parameter to sub-CodeGenerators
commit-queue@webkit.org [Wed, 18 Mar 2015 15:56:07 +0000 (15:56 +0000)]
Remove unused "preprocessor" parameter to sub-CodeGenerators
https://bugs.webkit.org/show_bug.cgi?id=142793

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-18
Reviewed by Darin Adler.

Source/WebCore:

* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
(FileNamePrefix):
* bindings/scripts/CodeGeneratorObjC.pm:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(new):

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

5 years agoSimple line layout: Split fragments on renderer boundary on the fly.
zalan@apple.com [Wed, 18 Mar 2015 14:48:01 +0000 (14:48 +0000)]
Simple line layout: Split fragments on renderer boundary on the fly.
https://bugs.webkit.org/show_bug.cgi?id=142579

Reviewed by Antti Koivisto.

Fragment splitting at renderers' boundary at the end of the line is no longer needed.
This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
fragments across renderer boundary.

Source/WebCore:

Test: fast/text/simple-line-with-multiple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::revertRuns):
(WebCore::SimpleLineLayout::LineState::isEmpty):
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
whether neighboring fragments need collapsing.
(WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
a fragment continuation.
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
they all get added to the current line.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
(WebCore::SimpleLineLayout::begin): Deleted.
(WebCore::SimpleLineLayout::end): Deleted.
(WebCore::SimpleLineLayout::preWrap): Deleted.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
(WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
(WebCore::SimpleLineLayout::createTextRuns): Deleted.
(WebCore::SimpleLineLayout::create): Deleted.
(WebCore::SimpleLineLayout::Layout::create): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.

LayoutTests:

* fast/text/simple-line-with-multiple-renderers-expected.html: Added.
* fast/text/simple-line-with-multiple-renderers.html: Added.

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

5 years agoFlex and grid items should be painted as inline-blocks
rego@igalia.com [Wed, 18 Mar 2015 13:47:52 +0000 (13:47 +0000)]
Flex and grid items should be painted as inline-blocks
https://bugs.webkit.org/show_bug.cgi?id=142266

Reviewed by Darin Adler.

Source/WebCore:

Based on Blink r157004 by <cbiesinger@chromium.org>.
https://src.chromium.org/viewvc/blink?revision=157004&view=revision

Both flexbox and grid specs define that the painting order of flex/grid
items is the same as inline blocks. See
http://dev.w3.org/csswg/css-flexbox/#painting and
http://dev.w3.org/csswg/css-grid/#z-order.

Extracted inline blocks painting code from InlineElementBox and moved to
a helper method that will be reused for flexboxes and grids.

Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
       fast/css-grid-layout/grid-item-text-background-not-interleaved.html

* rendering/InlineElementBox.cpp:
(WebCore::InlineElementBox::paint): Move code to
RenderElement::paintAsInlineBlock().
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintChild): Add new argument to paint children
as inline blocks.
* rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
signature to add the new argument.
* rendering/RenderElement.cpp:
(WebCore::paintPhase): Paint element in a phase.
(WebCore::RenderElement::paintAsInlineBlock): Code extracted from
InlineElementBox::paint().
* rendering/RenderElement.h: Add new method signature.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::paintChildren): Call
RenderBlock::paintChild() with the new argument.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::paintChildren): Ditto.

LayoutTests:

* css3/flexbox/flex-item-text-background-not-interleaved-expected.html: Added.
* css3/flexbox/flex-item-text-background-not-interleaved.html: Added.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item-expected.html:
Add some vertical space to avoid issues with backgrounds.
* fast/css-grid-layout/float-not-protruding-into-next-grid-item.html:
Ditto.
* fast/css-grid-layout/grid-item-text-background-not-interleaved-expected.html: Added.
* fast/css-grid-layout/grid-item-text-background-not-interleaved.html: Added.

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

5 years ago[EFL] Bump gstreamer version to 1.4.4
ossy@webkit.org [Wed, 18 Mar 2015 09:32:43 +0000 (09:32 +0000)]
[EFL] Bump gstreamer version to 1.4.4
https://bugs.webkit.org/show_bug.cgi?id=142782

Reviewed by Philippe Normand.

* efl/jhbuild.modules:
* efl/patches/gst-libav.patch:
* efl/patches/gst-plugins-bad-remove-gnustep-support.patch: Added.
* efl/patches/gst-prevent-neon-check-in-configure-from-passing-under-aarch64.patch: Removed.

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

5 years ago[WK2] Log total number of network cache queries using diagnostic logging
cdumez@apple.com [Wed, 18 Mar 2015 07:27:53 +0000 (07:27 +0000)]
[WK2] Log total number of network cache queries using diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=142803
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

Source/WebCore:

Add diagnostic logging key needed for network efficacy logging.

* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
* page/DiagnosticLoggingKeys.h:

Source/WebKit2:

Log total number of network cache queries using diagnostic logging.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::Statistics::recordCacheRetrievalRequest):

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

5 years ago[WK2] We should not even try the network cache for non-HTTP protocol requests
cdumez@apple.com [Wed, 18 Mar 2015 07:26:27 +0000 (07:26 +0000)]
[WK2] We should not even try the network cache for non-HTTP protocol requests
https://bugs.webkit.org/show_bug.cgi?id=142802
<rdar://problem/19632130>

Reviewed by Antti Koivisto.

We should not even try the network cache for non-HTTP protocol requests
and the network cache cannot handle those.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::canRetrieve):
(WebKit::NetworkCache::Cache::retrieve):
* NetworkProcess/cache/NetworkCache.h:
* NetworkProcess/cache/NetworkCacheStatisticsCocoa.mm:
(WebKit::NetworkCache::retrieveDecisionToDiagnosticKey):

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

5 years agoFix the build after r181660
timothy_horton@apple.com [Wed, 18 Mar 2015 07:19:16 +0000 (07:19 +0000)]
Fix the build after r181660

* page/EventHandler.cpp:
(WebCore::EventHandler::setImmediateActionStage):
* page/EventHandler.h:
(WebCore::EventHandler::setImmediateActionStage):
Un-inline setImmediateActionStage, because it is exported to WebCore, and
exporting inline thing causes random weak symbol errors on some platforms.

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

5 years agoIgnore some deprecation warnings
conrad_shultz@apple.com [Wed, 18 Mar 2015 07:05:48 +0000 (07:05 +0000)]
Ignore some deprecation warnings
https://bugs.webkit.org/show_bug.cgi?id=142813

Reviewed by Mark Rowe.

Fixing the deprecations is tracked by: <rdar://problem/20201450>

Source/WebCore:

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):

Source/WebKit/mac:

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::populate):

Source/WebKit2:

* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::populate):

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

5 years agoUnreviewed, rolling out r181667, r181682, and r181683.
commit-queue@webkit.org [Wed, 18 Mar 2015 06:09:56 +0000 (06:09 +0000)]
Unreviewed, rolling out r181667, r181682, and r181683.
https://bugs.webkit.org/show_bug.cgi?id=142812

Broke multiple tests with ASan, plus dependent commits
(Requested by ap on #webkit).

Reverted changesets:

"Simple line layout: Split fragments on renderer boundary on
the fly."
https://bugs.webkit.org/show_bug.cgi?id=142579
http://trac.webkit.org/changeset/181667

"Simple line layout: Change FlowContents::segmentForPosition()
to segmentForRun()."
https://bugs.webkit.org/show_bug.cgi?id=142785
http://trac.webkit.org/changeset/181682

"Simple line layout: Use Vector<>::const_iterator instead of
custom FlowContents::Iterator."
https://bugs.webkit.org/show_bug.cgi?id=142809
http://trac.webkit.org/changeset/181683

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

5 years agofast/images/animated-png.html is crashing / failing on Yosemite
ap@apple.com [Wed, 18 Mar 2015 05:38:20 +0000 (05:38 +0000)]
fast/images/animated-png.html is crashing / failing on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=142726

Further tweaked test expectations.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoSimple line layout: Use Vector<>::const_iterator instead of custom FlowContents:...
zalan@apple.com [Wed, 18 Mar 2015 04:00:40 +0000 (04:00 +0000)]
Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
https://bugs.webkit.org/show_bug.cgi?id=142809

Reviewed by Antti Koivisto.

FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::begin):
(WebCore::SimpleLineLayout::FlowContents::end):
(WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):

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

5 years agoSimple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
zalan@apple.com [Wed, 18 Mar 2015 03:40:51 +0000 (03:40 +0000)]
Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
https://bugs.webkit.org/show_bug.cgi?id=142785

Reviewed by Antti Koivisto.

This is in transition to support <br>. A particular position could point to multiple
segments when <br> is directly followed by text.

No change in functionality.

* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::segmentForRun):
(WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
(WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::Run::text):

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

5 years ago[EFL] Expose JavaScript binding interface through ewk_extension
ryuan.choi@navercorp.com [Wed, 18 Mar 2015 02:42:30 +0000 (02:42 +0000)]
[EFL] Expose JavaScript binding interface through ewk_extension
https://bugs.webkit.org/show_bug.cgi?id=142033

Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Added HEADER_INSTALL_DIR variable.

Source/JavaScriptCore:

* PlatformEfl.cmake: Install Javascript APIs.

Source/WebKit2:

* PlatformEfl.cmake:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Registered test object for new test case.
* UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Added simple binding API test case.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Added.
(toEwkPage):
(EwkPage::EwkPage):
(EwkPage::append):
(EwkPage::remove):
(EwkPage::didFinishDocumentLoadForFrame):
(ewk_page_js_global_context_get):
(ewk_page_client_register):
(ewk_page_client_unregister):
* WebProcess/InjectedBundle/API/efl/ewk_page.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Added.
(EwkPage::page):
* efl/ewebkit2-extension.pc.in:

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

5 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Wed, 18 Mar 2015 01:50:05 +0000 (01:50 +0000)]
[Win] Unreviewed gardening.

Tracked down the tests that were leaving the page cache in a bad state.
By skipping those tests, we can run all the others. These bugs are being
investigated in Bug 140871.

* platform/win/TestExpectations:

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Wed, 18 Mar 2015 01:34:25 +0000 (01:34 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

* UIProcess/API/mac/WKView.mm:
Need a respondsToSelector check.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
Need a respondsToSelector check.

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 18 Mar 2015 01:21:41 +0000 (01:21 +0000)]
Fix the iOS build.

* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):

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

5 years agoWeb Inspector: Debugger Sidebar Icons Misaligned
commit-queue@webkit.org [Wed, 18 Mar 2015 01:13:14 +0000 (01:13 +0000)]
Web Inspector: Debugger Sidebar Icons Misaligned
https://bugs.webkit.org/show_bug.cgi?id=142654

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

The debugger sidebar content was accidentally 1px too small. The
TreeOutline being inside of a .detail-section was getting a smaller
font-size. We should just have the normal font-size for the
debugger navigation sidebar. This matches the Resources sidebar
in the TreeOutline, and icons line up better.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .details-section):

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

5 years agoFix the iOS build
timothy_horton@apple.com [Wed, 18 Mar 2015 00:41:25 +0000 (00:41 +0000)]
Fix the iOS build

* WebView/WebHTMLView.mm:

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

5 years agoFunction bodies should always include braces
ggaren@apple.com [Wed, 18 Mar 2015 00:07:24 +0000 (00:07 +0000)]
Function bodies should always include braces
https://bugs.webkit.org/show_bug.cgi?id=142795

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Having a mode for excluding the opening and closing braces from a function
body was unnecessary and confusing.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Adopt the new one true linking function.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::link):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): No need to pass through
a boolean: there is only one kind of function now.

(JSC::UnlinkedFunctionExecutable::linkInsideExecutable): Deleted.
(JSC::UnlinkedFunctionExecutable::linkGlobalCode): Deleted. Let's only
have one way to do things. This removes the old mode that would pretend
that a function always started at column 1. That pretense was not true:
an attribute event listener does not necessarily start at column 1.

* bytecode/UnlinkedCodeBlock.h:
* generate-js-builtins: Adopt the new one true linking function.

* parser/Parser.h:
(JSC::Parser<LexerType>::parse):
(JSC::parse): needsReparsingAdjustment is always true now, so I removed it.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::initializeGlobalProperties):
(JSC::FunctionExecutable::fromGlobalCode):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
(JSC::FunctionExecutable::bodyIncludesBraces): Deleted. Removed unused stuff.

* runtime/FunctionConstructor.cpp:
(JSC::constructFunctionSkippingEvalEnabledCheck): Always provide a
leading space because that's what this function's comment says is required
for web compatibility. We used to fake this up after the fact when
stringifying, based on the bodyIncludesBraces flag, but that flag is gone now.

* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
(JSC::functionProtoFuncToString): No need to add braces and/or a space
after the fact -- we always have them now.

LayoutTests:

Updated these test results to reflect the fact that JavaScriptCore now
honors the source code text positions provided by WebCore, even for
attribute event handlers.

Unfortunately, the column numbers we used to report were wrong, and they
are still wrong now. The old column numbers were wrong because we would
always pretend that they started on column 1. The new column numbers
are wrong because WebCore records the column number after it finishes
parsing the element, rather than while it is parsing the event listener
attribute.

* fast/events/window-onerror2-expected.txt:
* fast/profiler/dead-time-expected.txt:
* fast/profiler/inline-event-handler-expected.txt:
* fast/profiler/stop-profiling-after-setTimeout-expected.txt:
* js/dom/script-start-end-locations-expected.txt:

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

5 years agoWeb Inspector: Removal of multiline completion hint broken in Details sidebar
commit-queue@webkit.org [Wed, 18 Mar 2015 00:03:07 +0000 (00:03 +0000)]
Web Inspector: Removal of multiline completion hint broken in Details sidebar
https://bugs.webkit.org/show_bug.cgi?id=142796

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-03-17
Reviewed by Joseph Pecoraro.

Prioritize CodeMirrorCompletionController over CSSStyleDeclarationTextEditor.
Both classes control the current CodeMirror instance of the Details Sidebar.
This change prevents possible race conditions during complete or delete-complete phases,
especially during operations on multiple styles in one line.

* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor):

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

5 years ago[Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
cdumez@apple.com [Tue, 17 Mar 2015 23:42:46 +0000 (23:42 +0000)]
[Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
https://bugs.webkit.org/show_bug.cgi?id=142752
<rdar://problem/20176731>

Reviewed by Antti Koivisto.

setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
and iOS on pages using a lot of timers.

For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).

The issue is that we keep creating, adding to run loop modes, and then
destroying the sharedTimer for each firing event. This is very
expensive. In such case, the CFRunLoopTimerRef documentation advises to
"""
... create a repeating timer with an initial firing time in the distant
future (or the initial firing time) and a very large repeat interval—on
the order of decades or more—and add it to all the necessary run loop
modes. Then, when you know when the timer should fire next, you reset
the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
timer’s own callback function. This technique effectively produces a
reusable, asynchronous timer.
""" [1].

Doing so greatly decreases CPU time spend in:
- setSharedTimerFireInterval(): 15.4% -> 4.6%
- stopSharedTimer(): 14.6% -> 8.6%

Overall CPU time spent on bing.com in timerFired() goes down from
~61.2% to ~49.5%.

This patch also refactors the SharedTimer code to share as much as
possible between Mac and iOS.

This patch is based in part on the following patch:
http://trac.webkit.org/changeset/143210

[1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate

* WebCore.xcodeproj/project.pbxproj:
* platform/SharedTimer.h:
(WebCore::SharedTimer::invalidate):
(WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
(WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
(WebCore::MainThreadSharedTimer::stop): Deleted.
* platform/ThreadTimers.cpp:
(WebCore::ThreadTimers::fireTimersInNestedEventLoop):
* platform/cf/SharedTimerCF.mm: Added.
(WebCore::applicationDidBecomeActive):
(WebCore::setupPowerObserver):
(WebCore::setSharedTimerFiredFunction):
(WebCore::timerFired):
(WebCore::restartSharedTimer):
(WebCore::invalidateSharedTimer):
(WebCore::setSharedTimerFireInterval):
(WebCore::stopSharedTimer):
* platform/efl/SharedTimerEfl.cpp:
(WebCore::invalidateSharedTimer):
* platform/gtk/SharedTimerGtk.cpp:
(WebCore::invalidateSharedTimer):
* platform/ios/SharedTimerIOS.mm: Removed.
* platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
* platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
(WebCore::PowerObserver::PowerObserver):
(WebCore::PowerObserver::~PowerObserver):
(WebCore::PowerObserver::didReceiveSystemPowerNotification):
* platform/win/SharedTimerWin.cpp:
(WebCore::removeSharedTimer):

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

5 years agoRefactor execution time limit tests out of testapi.c.
mark.lam@apple.com [Tue, 17 Mar 2015 23:06:37 +0000 (23:06 +0000)]
Refactor execution time limit tests out of testapi.c.
<https://webkit.org/b/142798>

Rubber stamped by Michael Saboff.

These tests were sometimes failing to time out on C loop builds.  Let's
refactor them out of the big monolith that is testapi.c so that we can
reason more easily about them and make adjustments if needed.

* API/tests/ExecutionTimeLimitTest.cpp: Added.
(currentCPUTime):
(currentCPUTimeAsJSFunctionCallback):
(shouldTerminateCallback):
(cancelTerminateCallback):
(extendTerminateCallback):
(testExecutionTimeLimit):
* API/tests/ExecutionTimeLimitTest.h: Added.
* API/tests/testapi.c:
(main):
(currentCPUTime): Deleted.
(currentCPUTime_callAsFunction): Deleted.
(shouldTerminateCallback): Deleted.
(cancelTerminateCallback): Deleted.
(extendTerminateCallback): Deleted.
* JavaScriptCore.xcodeproj/project.pbxproj:

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

5 years agocheck-webkit-style should allow "bool a : 1"
dino@apple.com [Tue, 17 Mar 2015 22:57:40 +0000 (22:57 +0000)]
check-webkit-style should allow "bool a : 1"
https://bugs.webkit.org/show_bug.cgi?id=142794

Reviewed by Brent Fulgham.

We should allow member bitfields of the form:

bool m_var : 1;

It seems that Visual Studio 8 was the last compiler that
wasn't happy about not using unsigned here. We already have
about 500 cases (in WebCore) where people were ignoring this rule.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Allow "bool".
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Add tests.
(CppStyleTest.test_enum_bitfields):
(CppStyleTest.test_plain_integral_bitfields):

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

5 years agoCannot invoke action menus anymore
timothy_horton@apple.com [Tue, 17 Mar 2015 22:48:07 +0000 (22:48 +0000)]
Cannot invoke action menus anymore
https://bugs.webkit.org/show_bug.cgi?id=142797
<rdar://problem/20032670>

Reviewed by Beth Dakin.

* UIProcess/API/mac/WKView.mm:
Don't process mouse events that would make an action menu; call super
and let AppKit take care of it. We have to duplicate the macro so that
we can avoid calling super for the internal-only methods.
Also, otherMouseMoved is simply not a thing, so remove it.

* WebView/WebHTMLView.mm:
(-[WebHTMLView otherMouseDown:]):
Don't override otherMouseDown: if the event would make an action menu.

* platform/spi/mac/NSMenuSPI.h:
Add additional NSMenu SPI.

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

5 years agoSimple line layout: Split fragments on renderer boundary on the fly.
zalan@apple.com [Tue, 17 Mar 2015 22:20:30 +0000 (22:20 +0000)]
Simple line layout: Split fragments on renderer boundary on the fly.
https://bugs.webkit.org/show_bug.cgi?id=142579

Reviewed by Antti Koivisto.

Fragment splitting at renderers' boundary at the end of the line is no longer needed.
This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
fragments across renderer boundary.

Source/WebCore:

Test: fast/text/simple-line-with-multiple-renderers.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::revertRuns):
(WebCore::SimpleLineLayout::LineState::isEmpty):
(WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
whether neighboring fragments need collapsing.
(WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
a fragment continuation.
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
they all get added to the current line.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
(WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
(WebCore::SimpleLineLayout::begin): Deleted.
(WebCore::SimpleLineLayout::end): Deleted.
(WebCore::SimpleLineLayout::preWrap): Deleted.
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
(WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
(WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
(WebCore::SimpleLineLayout::createTextRuns): Deleted.
(WebCore::SimpleLineLayout::create): Deleted.
(WebCore::SimpleLineLayout::Layout::create): Deleted.
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
(WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
(WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
(WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
(WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.

LayoutTests:

* fast/text/simple-line-with-multiple-renderers-expected.html: Added.
* fast/text/simple-line-with-multiple-renderers.html: Added.

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

5 years agoWhen tab hides, pause fullscreen and exit normally.
commit-queue@webkit.org [Tue, 17 Mar 2015 22:12:46 +0000 (22:12 +0000)]
When tab hides, pause fullscreen and exit normally.
https://bugs.webkit.org/show_bug.cgi?id=142685

Patch by Jeremy Jones <jeremyj@apple.com> on 2015-03-17
Reviewed by Eric Carlson.

Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):

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

5 years ago[WinCairo] Video position is incorrect when located inside a frame.
peavo@outlook.com [Tue, 17 Mar 2015 21:29:21 +0000 (21:29 +0000)]
[WinCairo] Video position is incorrect when located inside a frame.
https://bugs.webkit.org/show_bug.cgi?id=142784

Reviewed by Brent Fulgham.

We need to take the enclosing frame's position into account, when finding the video position.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::setSize):

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

5 years agoBuilt-in functions should know that they use strict mode
ggaren@apple.com [Tue, 17 Mar 2015 21:15:03 +0000 (21:15 +0000)]
Built-in functions should know that they use strict mode
https://bugs.webkit.org/show_bug.cgi?id=142788

Reviewed by Mark Lam.

Even though all of our builtin functions use strict mode, the parser
thinks that they don't. This is because Executable::toStrictness treats
builtin-ness and strict-ness as mutually exclusive.

The fix is to disambiguate builtin-ness from strict-ness.

This bug is currently unobservable because of some other parser bugs. But
it causes lots of test failures once those other bugs are fixed.

* API/JSScriptRef.cpp:
(parseScript):
* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createBuiltinExecutable): Adopt the new API
for a separate value to indicate builtin-ness vs strict-ness.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::generateFunctionCodeBlock):
(JSC::UnlinkedFunctionExecutable::codeBlockFor): Ditto.

* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::toStrictness): Deleted. This function
was misleading since it pretended that no builtin function was ever
strict, which is the opposite of true.

* parser/Lexer.cpp:
(JSC::Lexer<T>::Lexer):
* parser/Lexer.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
* parser/Parser.h:
(JSC::parse): Adopt the new API.

* parser/ParserModes.h: Added JSParserBuiltinMode, and tried to give
existing modes clearer names.

* runtime/CodeCache.cpp:
(JSC::CodeCache::getGlobalCodeBlock):
(JSC::CodeCache::getProgramCodeBlock):
(JSC::CodeCache::getEvalCodeBlock):
(JSC::CodeCache::getFunctionExecutableFromGlobalCode): Adopt the new API.

* runtime/CodeCache.h:
(JSC::SourceCodeKey::SourceCodeKey): Be sure to treat strict-ness and
bulitin-ness as separate pieces of the code cache key. We would not want
a user function to match a built-in function in the cache, even if they
agreed about strictness, since builtin functions have different lexing
rules.

* runtime/Completion.cpp:
(JSC::checkSyntax):
* runtime/Executable.cpp:
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::ProgramExecutable::checkSyntax):
* runtime/Executable.h:
(JSC::FunctionExecutable::create):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock): Adopt the new API.

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

5 years agoCompile character ranges targeting the same state as range check in the bytecode
benjamin@webkit.org [Tue, 17 Mar 2015 20:47:42 +0000 (20:47 +0000)]
Compile character ranges targeting the same state as range check in the bytecode
https://bugs.webkit.org/show_bug.cgi?id=142759

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-03-17
Reviewed by Alex Christensen.

Source/WebCore:

Previously, character ranges would be compiled as many individual character checks.
For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
to enormous matchines.

With this patch, we find the ranges at lowering time and generate a single instruction
for them: "CheckValueRange". This helps making the machine denser when the input
use character sets.

The second part of this patch goes further in the case where the transitions out of
a state cover the entire alphabet. In that case, we create a fallback transition
on the fly and remove all the ranges made useless.
That case is common when ranges are used with inverse character set (e.g. [^a]+a).

* contentextensions/DFABytecode.h:
(WebCore::ContentExtensions::instructionSizeWithArguments):
* contentextensions/DFABytecodeCompiler.cpp:
(WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
(WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
* contentextensions/DFABytecodeCompiler.h:
Extend the compiler to detect ranges and lower them as CheckValueRange.

* contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
Range checks in the interpreter.

* contentextensions/NFA.cpp:
(WebCore::ContentExtensions::NFA::setFinal):
This assertion does not make sense with the current codebase. Actions are "compressed",
it is possible to have two patterns with the same action.

* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::simplifyTransitions):
A very simple DFA optimization function: it only reduce the strength of ranges.

(WebCore::ContentExtensions::NFAToDFA::convert):

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):

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

5 years agoREGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore...
jer.noble@apple.com [Tue, 17 Mar 2015 20:28:33 +0000 (20:28 +0000)]
REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
https://bugs.webkit.org/show_bug.cgi?id=142787

Reviewed by Eric Carlson.

Null check m_player before derefencing.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):

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

5 years agoW3C test parser and converter should use test importer host
youenn.fablet@crf.canon.fr [Tue, 17 Mar 2015 20:22:36 +0000 (20:22 +0000)]
W3C test parser and converter should use test importer host
https://bugs.webkit.org/show_bug.cgi?id=142729

Reviewed by Bem Jones-Bey.

When instantiated by TestImporter, TestParser and TestConverter are now using the same host.
This enables adding more TestImporter unit testing.
This patch also ensures that the git object instantiated by TestDownloader is using the
same Executive and FileSystem object as TestDownloader, again to enable TestImporter/TestDownloader unit testing.

* Scripts/webkitpy/common/system/filesystem_mock.py:
(MockFileSystem.copytree): Fixes implementation as it creates a runtime error.
* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.git): Set the executive of the git object to the one of TestDownloader. Refactoring in a new git function for future reuse.
(TestDownloader.checkout_test_repository): Making use of the new git function.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.find_importable_tests): Adding host as parameter to the parser.
(TestImporter.import_tests): Adding host as parameter to the converter.
* Scripts/webkitpy/w3c/test_importer_unittest.py:
(TestImporterTest.create_test_download_importer): Creating a test downloader mock, to be reused by other tests.
(TestImporterTest):
(TestImporterTest.test_harnesslinks_conversion): Adding test to check that test harness links are converted for CSS tests but not WPT tests.
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.__init__): Adding host as parameter constructor.

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

5 years agoDOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
bdakin@apple.com [Tue, 17 Mar 2015 20:20:48 +0000 (20:20 +0000)]
DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on
10.10.2
https://bugs.webkit.org/show_bug.cgi?id=142700
-and corresponding-
rdar://problem/20165168

Reviewed by Tim Horton.

Source/WebCore:

This patch adds a new enum and member variable so that EventHandler can keep track
of the current immediate action state.
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler):

A new mouse press even is starting. We can re-set m_immediateActionStage to none
unless a Hit Test has already been performed.
(WebCore::EventHandler::handleMousePressEvent):

If an immediate action was completed, then send mouse to the DOM and return early.
This will prevent us from doing our own normal mouseup behaviors such as
navigating to a link that was clicked — we only want to do that if the click was
not used to perform an immediate action.
(WebCore::EventHandler::handleMouseReleaseEvent):
* page/EventHandler.h:
(WebCore::EventHandler::setImmediateActionStage):

Source/WebKit2:

No need to tell the WKImmediateActionController about mouse down any more since we
are expecting it at the beginning of an immediate action interaction.
* UIProcess/API/mac/WKView.mm:
(-[WKView mouseDown:]):

Set the delaysPrimaryMouseButtonEvents to NO for the
_immediateActionGestureRecognizer. This will cause AppKit to send up the mouse
events at the expected time.
(-[WKView initWithFrame:processPool:configuration:webView:]):

WebCore::EventHandler now needs to know if an immediate action cancelled or
completed. This plumbs that information down.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::immediateActionDidCancel):
(WebKit::WebPageProxy::immediateActionDidComplete):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController immediateActionRecognizerDidCancelAnimation:]):
(-[WKImmediateActionController immediateActionRecognizerDidCompleteAnimation:]):
(-[WKImmediateActionController wkView:willHandleMouseDown:]): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

Call EventHandler::setImmediateActionStage() with the appropriate stage.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::immediateActionDidCancel):
(WebKit::WebPage::immediateActionDidComplete):

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

5 years agoImplement Scroll Container Animation Triggers
dino@apple.com [Tue, 17 Mar 2015 20:11:53 +0000 (20:11 +0000)]
Implement Scroll Container Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142732

Unreviewed attempt to make the test reproducible.

* animations/trigger-container-scroll-simple.html: Add a step-start timing
function so the animation instantly moves to the end position.

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

5 years agoImplement Scroll Container Animation Triggers
dino@apple.com [Tue, 17 Mar 2015 19:58:15 +0000 (19:58 +0000)]
Implement Scroll Container Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142732

Attempt to fix the build.

* css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.

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

5 years agoUse a better parameter name for Document.getElementsByClassName
commit-queue@webkit.org [Tue, 17 Mar 2015 19:39:54 +0000 (19:39 +0000)]
Use a better parameter name for Document.getElementsByClassName
https://bugs.webkit.org/show_bug.cgi?id=142771

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-17
Reviewed by Chris Dumez.

* bindings/objc/PublicDOMInterfaces.h:
* dom/Document.idl:

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

5 years agoReproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
timothy_horton@apple.com [Tue, 17 Mar 2015 19:15:54 +0000 (19:15 +0000)]
Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
https://bugs.webkit.org/show_bug.cgi?id=142776
<rdar://problem/18921338>

Reviewed by Alexey Proskuryakov.

Test: fast/animation/request-animation-frame-unparented-iframe-crash.html

In some cases (like the new test), we can end up trying to start
requestAnimationFrame on a Document that has no Page. Most paths null-checked
the Page and did the right thing, but one failed to do so. In addition,
the current fallback (when Page is null) can result in us constructing
the wrong kind of DisplayRefreshMonitor, which could lead to trouble
down the road when it's reused. Instead, just completely avoid making a
DisplayRefreshMonitor in the null-page case.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
If the page is null, bail.

* dom/ScriptedAnimationController.h:
* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::create):
Use Optional<> to make it easy to distinguish between ChromeClient
being unreachable (because we don't have a Page for some reason) and
ChromeClient declaring that it doesn't want to override the type of
DisplayRefreshMonitor that is created.

If ChromeClient was unreachable for some reason, we'll get back an engaged
nullptr and return it (instead of creating a DisplayRefreshMonitor based
on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
IFrame).

If instead the client returns a disengaged Nullopt, we'll interpret that as
"construct the default type", which falls back on the platform #ifdefs to
decide what to make.

* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
(WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
Silently handle the case where we failed to make a DisplayRefreshMonitor.

* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/DisplayRefreshMonitorClient.h:
* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
* rendering/RenderLayerCompositor.h:
Adjust to the new signature of createDisplayRefreshMonitor, and return
an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.

* page/ChromeClient.h:
Return Nullopt (indicating a lack of override) by default.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:
Adjust to the new signature.

* fast/animation/request-animation-frame-unparented-iframe-crash-expected.txt: Added.
* fast/animation/request-animation-frame-unparented-iframe-crash.html: Added.
Add a test that ensures that calling requestAnimationFrame on a recently-unparented
frame doesn't crash.

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

5 years agoImplement Scroll Container Animation Triggers
dino@apple.com [Tue, 17 Mar 2015 19:01:46 +0000 (19:01 +0000)]
Implement Scroll Container Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142732

Reviewed by Simon Fraser.

Source/WebCore:

Test: animations/trigger-container-scroll-simple.html

Basic implementation of container-scroll. It only checks
the page scroll position for trigger values (not the scrolling
container in an overflow).

* css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
so that this property will appear in the inspector.

* page/FrameView.cpp:
(WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
controller know about it.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine): Whitespace fix.
(WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
and the scroll position is past it, then tell the state machine that
we should start.
(WebCore::AnimationBase::timeToNextService): Use the scroll position as
an input to the update timer if a trigger is involved.

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
(WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:

* page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
triggered animation.
(WebCore::CompositeAnimation::CompositeAnimation):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
* platform/animation/Animation.cpp:
(WebCore::Animation::operator=):

LayoutTests:

Test that checks if an animation only triggers when the page
is scrolled.

* animations/trigger-container-scroll-simple-expected.txt: Added.
* animations/trigger-container-scroll-simple.html: Added.

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

5 years agoMove some code from LogicalSelectionOffsetCaches into RenderElement
simon.fraser@apple.com [Tue, 17 Mar 2015 18:58:59 +0000 (18:58 +0000)]
Move some code from LogicalSelectionOffsetCaches into RenderElement
https://bugs.webkit.org/show_bug.cgi?id=142758

Reviewed by Myles C. Maxfield.

LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
that should be used in more places, so move it into RenderElement.

No behavior change.

* rendering/LogicalSelectionOffsetCaches.h:
(WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
(WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
(WebCore::isNonRenderBlockInline): Deleted.
(WebCore::containingBlockForFixedPosition): Deleted.
(WebCore::containingBlockForAbsolutePosition): Deleted.
(WebCore::containingBlockForObjectInFlow): Deleted.
* rendering/RenderBlock.cpp: No need to initialize static data.
(WebCore::RenderBlock::positionedObjects): nullptr
* rendering/RenderElement.cpp:
(WebCore::RenderElement::containingBlockForFixedPosition):
(WebCore::RenderElement::containingBlockForAbsolutePosition):
(WebCore::isNonRenderBlockInline):
(WebCore::RenderElement::containingBlockForObjectInFlow):
* rendering/RenderElement.h:
(WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
* rendering/RenderLayer.cpp:
(WebCore::isContainerForPositioned):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::containingBlock):

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

5 years ago[WinCairo] Unreviewed build fix after r181640.
achristensen@apple.com [Tue, 17 Mar 2015 18:02:56 +0000 (18:02 +0000)]
[WinCairo] Unreviewed build fix after r181640.

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
Tell Windows how to find ShaderLang.h.

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

5 years ago[Win] Skip some IndexDB tests that don't apply on Windows.
bfulgham@apple.com [Tue, 17 Mar 2015 17:50:45 +0000 (17:50 +0000)]
[Win] Skip some IndexDB tests that don't apply on Windows.

* platform/win/TestExpectations:

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

5 years agoDisk cache should support Vary: Cookie
antti@apple.com [Tue, 17 Mar 2015 16:09:06 +0000 (16:09 +0000)]
Disk cache should support Vary: Cookie
https://bugs.webkit.org/show_bug.cgi?id=142770
Source/WebKit2:

rdar://problem/19764945

Reviewed by Anders Carlsson.

Cookies are not part of the original request but are added by the networking layer when submitting the request.
Fetch them explicitly when resolving Vary: Cookie.

The implementation is not perfect as it fetches the cookie for the cache entry when saving a Vary:Cookie response,
not when making the request. In principle the cookie may have changed in-between. This should be enough to handle
reasonable cases though. Fetching cookies for every request might be too expensive for this rarely used feature.

* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::headerValueForVary):
(WebKit::NetworkCache::encodeStorageEntry):
(WebKit::NetworkCache::verifyVaryingRequestHeaders):

LayoutTests:

Reviewed by Anders Carlsson.

* http/tests/cache/disk-cache-vary-cookie-expected.txt: Added.
* http/tests/cache/disk-cache-vary-cookie.html: Added.

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

5 years agoDFG IR shouldn't have a separate node for every kind of put hint that could be descri...
fpizlo@apple.com [Tue, 17 Mar 2015 15:50:44 +0000 (15:50 +0000)]
DFG IR shouldn't have a separate node for every kind of put hint that could be described using PromotedLocationDescriptor
https://bugs.webkit.org/show_bug.cgi?id=142769

Reviewed by Michael Saboff.

When we sink an object allocation, we need to have some way of tracking what stores would
have happened had the allocation not been sunk, so that we know how to rematerialize the
object on OSR exit. Prior to this change, trunk had two ways of describing such a "put
hint":

- The PutStrutureHint and PutByOffsetHint node types.
- The PromotedLocationDescriptor class, which has an enum with cases StructurePLoc and
  NamedPropertyPLoc.

We also had ways of converting from a Node with those two node types to a
PromotedLocationDescriptor, and we had a way of converting a PromotedLocationDescriptor to
a Node.

This change removes the redundancy. We now have just one node type that corresponds to a
put hint, and it's called PutHint. It has a PromotedLocationDescriptor as metadata.
Converting between a PutHint node and a PromotedLocationDescriptor and vice-versa is now
trivial.

This means that if we add new kinds of sunken objects, we'll have less pro-forma to write
for the put hints to those objects. This is mainly to simplify the implementation of
arguments elimination in bug 141174.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* 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::dump):
(JSC::DFG::Graph::mergeRelevantToOSR):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.cpp:
(JSC::DFG::Node::convertToPutHint):
(JSC::DFG::Node::convertToPutStructureHint):
(JSC::DFG::Node::convertToPutByOffsetHint):
(JSC::DFG::Node::promotedLocationDescriptor):
* dfg/DFGNode.h:
(JSC::DFG::Node::hasIdentifier):
(JSC::DFG::Node::hasPromotedLocationDescriptor):
(JSC::DFG::Node::convertToPutByOffsetHint): Deleted.
(JSC::DFG::Node::convertToPutStructureHint): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::LocalOSRAvailabilityCalculator::executeNode):
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::run):
(JSC::DFG::ObjectAllocationSinkingPhase::lowerNonReadingOperationsOnPhantomAllocations):
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGPromoteHeapAccess.h:
(JSC::DFG::promoteHeapAccess):
* dfg/DFGPromotedHeapLocation.cpp:
(JSC::DFG::PromotedHeapLocation::createHint):
* dfg/DFGPromotedHeapLocation.h:
(JSC::DFG::PromotedLocationDescriptor::imm1):
(JSC::DFG::PromotedLocationDescriptor::imm2):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validateCPS):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):

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

5 years ago'pageLoaded' diagnostic logging is too verbose
cdumez@apple.com [Tue, 17 Mar 2015 15:48:32 +0000 (15:48 +0000)]
'pageLoaded' diagnostic logging is too verbose
https://bugs.webkit.org/show_bug.cgi?id=142727
<rdar://problem/18937048>

Reviewed by Eric Carlson.

Make 'pageLoaded' diagnostic logging less verbose:
- Log once per main frame instead of once for subframe
- Apply sampling

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

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

5 years ago[l10n] Updated Hebrew translation of WebKitGTK+
commit-queue@webkit.org [Tue, 17 Mar 2015 12:38:38 +0000 (12:38 +0000)]
[l10n] Updated Hebrew translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=142781

Patch by Yosef Or Boczko <yoseforb@gnome.org> on 2015-03-17
Reviewed by Carlos Garcia Campos.

* he.po:

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

5 years ago[GTK] Wrong transfer annotations used in GObject DOM bindings
carlosgc@webkit.org [Tue, 17 Mar 2015 12:22:06 +0000 (12:22 +0000)]
[GTK] Wrong transfer annotations used in GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=142780

Reviewed by Gustavo Noronha Silva.

We are using transfer none for all methods returning a GObject DOM
Object. That's not true. Only objects derived from Node are
automatically released by the DOM object cache and can be transfer
none. All other objects are added to the cache only to avoid
creating the same wrapper twice for the same core object, but
caller should release the returned reference.

* bindings/gobject/WebKitDOMCustomUnstable.h:
* bindings/scripts/CodeGeneratorGObject.pm:
(GetTransferTypeForReturnType):
(GenerateFunction):

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

5 years ago[l10n] Updated Polish translation of WebKitGTK+
berto@igalia.com [Tue, 17 Mar 2015 11:57:40 +0000 (11:57 +0000)]
[l10n] Updated Polish translation of WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=142306

Patch by Piotr Drąg <piotrdrag@gmail.com> on 2015-03-17
Reviewed by Carlos Garcia Campos.

* pl.po:

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

5 years ago[GTK] WebKitDOM objects leaking
carlosgc@webkit.org [Tue, 17 Mar 2015 11:10:13 +0000 (11:10 +0000)]
[GTK] WebKitDOM objects leaking
https://bugs.webkit.org/show_bug.cgi?id=118788

Reviewed by Darin Adler and Sergio Villar Senin.

Source/WebCore:

Use a DOMwindowObserver class, derived from DOMWindowProperty to
be notified when the window object is detached from the frame to
clear the DOM objects associated to that frame in that case too.

* bindings/gobject/DOMObjectCache.cpp:

Tools:

Update DOMObjectCache unit test to check that DOM objects are also
released when new contents are loaded in the web view, and the old
document is detached from the frame.

* TestWebKitAPI/Tests/WebKit2Gtk/TestDOMNode.cpp:
(testWebKitDOMObjectCache):
* TestWebKitAPI/Tests/WebKit2Gtk/WebProcessTest.cpp:
(runTest):

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

5 years ago[WK2] Use C++ lambdas in IPC::Connection
zandobersek@gmail.com [Tue, 17 Mar 2015 10:04:34 +0000 (10:04 +0000)]
[WK2] Use C++ lambdas in IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=138018

Reviewed by Anders Carlsson.

Replace uses of WTF::bind() in the IPC::Connection class with C++ lambdas.

* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
(IPC::Connection::invalidate):
(IPC::Connection::sendMessage):
(IPC::Connection::processIncomingMessage): Simplify the error messages so we
don't have to format strings on-the-fly, removing the issues of cross-thread
string copying altogether.
(IPC::Connection::dispatchDidReceiveInvalidMessage): The parameters are now
of the StringReference type.
(IPC::Connection::enqueueIncomingMessage):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::open):

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

5 years ago[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE...
zandobersek@gmail.com [Tue, 17 Mar 2015 09:45:55 +0000 (09:45 +0000)]
[CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
https://bugs.webkit.org/show_bug.cgi?id=142530

Reviewed by Darin Adler.

Source/ThirdParty/ANGLE:

* ANGLE/ShaderLang.h: Added. Includes include/GLSLANG/ShaderLang.h. Used in WebCore
so we can avoid using ANGLE's EGL headers and use the system-default headers instead.

Source/WebCore:

Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
headers instead.

Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
whole WebCore library anymore, only the ANGLESupport library.

* CMakeLists.txt:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:

Source/WebKit2:

* CMakeLists.txt: Replace the Source/ThirdParty/ANGLE/include/GLSLANG entry
in the list of inclusion directories for WebKit2 with Source/ThirdParty/ANGLE,
possible due to the new forwarding header for ANGLE's ShaderLang.h.

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

5 years agoWindows X86-64 should use the fixed executable allocator
msaboff@apple.com [Tue, 17 Mar 2015 09:33:30 +0000 (09:33 +0000)]
Windows X86-64 should use the fixed executable allocator
https://bugs.webkit.org/show_bug.cgi?id=142749

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Added jit/ExecutableAllocatorFixedVMPool.cpp to Windows build.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* jit/ExecutableAllocatorFixedVMPool.cpp: Don't include unistd.h on Windows.

Source/WTF:

Set ENABLE_EXECUTABLE_ALLOCATOR_FIXED for Windows.
Needed to export MetaAllocator::currentStatistics() for use in JavaScriptCore.

* wtf/MetaAllocator.h:
* wtf/Platform.h:

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

5 years agoW3C test importer default import folder should be LayoutTests/imported/w3c
youenn.fablet@crf.canon.fr [Tue, 17 Mar 2015 09:03:15 +0000 (09:03 +0000)]
W3C test importer default import folder should be LayoutTests/imported/w3c
https://bugs.webkit.org/show_bug.cgi?id=142728

Reviewed by Bem Jones-Bey.

* Scripts/webkitpy/w3c/test_importer.py:
(parse_args): Updating the default destination option value to 'imported/w3c'.

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

5 years agoWeb Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
commit-queue@webkit.org [Tue, 17 Mar 2015 08:43:30 +0000 (08:43 +0000)]
Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=142029

Patch by Matt Baker <mattbaker@apple.com> on 2015-03-17
Reviewed by Timothy Hatcher.

Add UI for showing runloop records and their child records as a frame histogram,
with the recording time on the x-axis and the frame duration on the y-axis. Each frame
is comprised of colored regions representing the time spent in various activities (script,
layout, etc).

Eventually the Frames timeline will replace the Layout & Rendering timeline. Until the views
for the new timeline are finalized the Layout & Rendering timeline will remain in place.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New string and files.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.eventRecorded):
(WebInspector.TimelineManager.prototype.pageDidLoad):
(WebInspector.TimelineManager.prototype._processNestedRecords):
(WebInspector.TimelineManager.prototype._processRecord):
(WebInspector.TimelineManager.prototype._processEvent):
(WebInspector.TimelineManager.prototype._loadNewRecording):
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Deleted.
Added support for new runloop record type and nested record handling.

* UserInterface/Images/Frames.png: Added.
* UserInterface/Images/Frames@2x.png: Added.
* UserInterface/Images/FramesLarge.png: Added.
* UserInterface/Images/FramesLarge@2x.png: Added.
New images for runloop timeline overview graph and runloop tree records.

* UserInterface/Models/RunLoopTimelineRecord.js: Added.
(WebInspector.RunLoopTimelineRecord):
(WebInspector.RunLoopTimelineRecord.prototype.get children):
(WebInspector.RunLoopTimelineRecord.prototype.get durationRemainder):
(WebInspector.RunLoopTimelineRecord.prototype.durationForRecords.get var):
Extends TimelineRecord to add child records and subframe duration details.

* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.get displayName):
(WebInspector.Timeline.prototype.get iconClassName):
New UI strings and icons.

* UserInterface/Models/TimelineRecord.js:
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
* UserInterface/Views/TimelineRecordTreeElement.js:
(WebInspector.TimelineRecordTreeElement):
Added support for new runloop record type.

* UserInterface/Views/RunLoopTimelineOverviewGraph.css: Added.
(.timeline-overview-graph.runloop > .divider):
(.timeline-overview-graph.runloop > .divider > span):
New styles for runloop timeline graph.

* UserInterface/Views/RunLoopTimelineOverviewGraph.js: Added.
(WebInspector.RunLoopTimelineOverviewGraph):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.updateLayout.createFrame):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds.this):
(WebInspector.RunLoopTimelineOverviewGraph.prototype.get graphHeightSeconds):
(WebInspector.RunLoopTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition.get if):
New overview graph for displaying TimelineRecordFrames and horizontal frame budget dividers.

* UserInterface/Views/TimelineIcons.css:
(.runloop-icon .icon):
(.runloop-icon.large .icon):
(.runloop-record .icon):
* UserInterface/Views/TimelineSidebarPanel.js:
New runloop icon styles.

* UserInterface/Views/TimelineOverviewGraph.js:
(WebInspector.TimelineOverviewGraph):
Updated factory to support creation of the new overview graph.

* UserInterface/Views/TimelineRecordFrame.css: Added.
(.timeline-record-frame):
(.timeline-record-frame > .frame):
(.timeline-record-frame > .dropped):
(.timeline-record-frame > .frame > .duration):
(.timeline-record-frame > .frame > .duration:first-child):
(.timeline-record-frame > .frame > .duration:last-child):
(.timeline-record-frame > .frame > .duration.timeline-record-type-network):
(.timeline-record-frame > .frame > .duration.timeline-record-type-layout):
(.timeline-record-frame > .frame > .duration.timeline-record-type-script):
New styles for frame bars in the runloop timeline graph.

* UserInterface/Views/TimelineRecordFrame.js: Added.
(WebInspector.TimelineRecordFrame):
(WebInspector.TimelineRecordFrame.createCombinedFrames):
(WebInspector.TimelineRecordFrame.prototype.get element):
(WebInspector.TimelineRecordFrame.prototype.get duration):
(WebInspector.TimelineRecordFrame.prototype.get records):
(WebInspector.TimelineRecordFrame.prototype.set records):
(WebInspector.TimelineRecordFrame.prototype._updateChildElements.createDurationElement):
New view representing a single frame within the runloop overview graph.

* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
New files.

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

5 years agoWeb Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
commit-queue@webkit.org [Tue, 17 Mar 2015 08:41:19 +0000 (08:41 +0000)]
Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
https://bugs.webkit.org/show_bug.cgi?id=142029

Patch by Matt Baker <mattbaker@apple.com> on 2015-03-17
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/protocol/Timeline.json:
Added new event type for runloop timeline records.

Source/WebCore:

Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::currentRunLoop):
(WebCore::InspectorTimelineAgent::internalStart):
(WebCore::InspectorTimelineAgent::internalStop):
(WebCore::toProtocol):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
Install observers for the begining and end of the runloop when recording begins. All other
instrumented timeline events get added as children of the current runloop record, which is
sent to the frontend once the runloop completes.

* inspector/InspectorTimelineAgent.h:

* platform/cf/RunLoopObserver.cpp:
(WebCore::RunLoopObserver::schedule):
Wrapper changed to allow observing arbitrary runloop activities.

* platform/cf/RunLoopObserver.h:

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

5 years ago[GTK] basic OpenWebRTC build support
philn@webkit.org [Tue, 17 Mar 2015 08:39:05 +0000 (08:39 +0000)]
[GTK] basic OpenWebRTC build support
https://bugs.webkit.org/show_bug.cgi?id=142393

Reviewed by Carlos Garcia Campos.

.:

* Source/cmake/FindOpenWebRTC.cmake: Added.
* Source/cmake/OptionsGTK.cmake: Look for OpenWebRTC library if
mediastream build is enabled.

Source/WebCore:

* PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.

Tools:

* gtk/jhbuild.modules: Add OpenWebRTC and its dependencies. This
is not the upstream OpenWebRTC repository. This temporary fork
contains a few patches needed by WebKit for audio/video rendering.

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

5 years ago[CMake][EFL] Build test tools only for developer mode
gyuyoung.kim@samsung.com [Tue, 17 Mar 2015 07:55:37 +0000 (07:55 +0000)]
[CMake][EFL] Build test tools only for developer mode
https://bugs.webkit.org/show_bug.cgi?id=142761

Reviewed by Csaba Osztrogonác.

Do not build EFL MiniBrowser, WebKitTestRunner, and ImageDiff on production mode.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake: Move ENABLE_MINIBROWSER to common place.
* Source/cmake/WebKitFeatures.cmake: Define ENABLE_MINIBROWSER variable.
* Source/cmakeconfig.h.cmake:

Tools:

* CMakeLists.txt:

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

5 years agoREGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor
yoon@igalia.com [Tue, 17 Mar 2015 07:31:38 +0000 (07:31 +0000)]
REGRESSION(r180924): Unable to build WebKitGTK+ with threaded compositor

Unreviewed build fix.

* WebProcess/WebPage/LayerTreeHost.h:
Remove duplicated declaration of setNativeSurfaceHandleForCompositing.

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

5 years agoRemove never used "useLayerOnTop" bindings generator argument
commit-queue@webkit.org [Tue, 17 Mar 2015 07:15:26 +0000 (07:15 +0000)]
Remove never used "useLayerOnTop" bindings generator argument
https://bugs.webkit.org/show_bug.cgi?id=142773

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-03-17
Reviewed by Darin Adler.

Source/WebCore:

* bindings/scripts/CodeGenerator.pm:
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorObjC.pm:
* bindings/scripts/generate-bindings.pl:

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(new):

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

5 years agoEnable ES6 classes by default
rniwa@webkit.org [Tue, 17 Mar 2015 05:55:46 +0000 (05:55 +0000)]
Enable ES6 classes by default
https://bugs.webkit.org/show_bug.cgi?id=142774

Reviewed by Gavin Barraclough.

.:

* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

Enabled the feature and unskipped tests.

* Configurations/FeatureDefines.xcconfig:
* tests/stress/class-syntax-no-loop-tdz.js:
* tests/stress/class-syntax-no-tdz-in-catch.js:
* tests/stress/class-syntax-no-tdz-in-conditional.js:
* tests/stress/class-syntax-no-tdz-in-loop-no-inline-super.js:
* tests/stress/class-syntax-no-tdz-in-loop.js:
* tests/stress/class-syntax-no-tdz.js:
* tests/stress/class-syntax-tdz-in-catch.js:
* tests/stress/class-syntax-tdz-in-conditional.js:
* tests/stress/class-syntax-tdz-in-loop.js:
* tests/stress/class-syntax-tdz.js:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:

LayoutTests:

Unskipped tests and also fixed tests so that they can run under run-javascript-tests.

* TestExpectations: Unskipped tests.
* js/class-syntax-call-expected.txt:
* js/class-syntax-declaration-expected.txt:
* js/class-syntax-default-constructor-expected.txt:
* js/class-syntax-expression-expected.txt:
* js/class-syntax-extends-expected.txt:
* js/class-syntax-super-expected.txt:
* js/dom/reserved-words-as-property-expected.txt: Rebaselined now that "class" is a non-reserved keyword.
* js/script-tests/class-syntax-call.js: Don't refer to "window" object as it doesn't exit when ran inside jsc.
* js/script-tests/class-syntax-declaration.js: Rebaselined after r181611, which added default constructor support.
* js/script-tests/class-syntax-default-constructor.js: Don't refer to "window" object. Also replaced shouldNotBe
by an explicit !== check as the former is not supported when ran inside jsc.
* js/script-tests/class-syntax-expression.js: Rebaselined after r181611.
* js/script-tests/class-syntax-extends.js: Ditto. Also replaced evalAndLog by shouldNotThrow as the former is not
supported inside jsc.
* js/script-tests/class-syntax-super.js: Don't refer to "window" object as it doesn't exist inside jsc.
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.11-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.5-expected.txt:

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

5 years agoUpdate the debug overlays after layout
simon.fraser@apple.com [Tue, 17 Mar 2015 05:30:46 +0000 (05:30 +0000)]
Update the debug overlays after layout
https://bugs.webkit.org/show_bug.cgi?id=142768

Reviewed by Zalan Bujtas.

The debug overlays need to be updated after layout, in case elements with wheel event handlers
moved around.

DebugPageOverlays::didLayout() is cheap if there are no overlays.

Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
to the main frame's event handler region.

* page/DebugPageOverlays.cpp:
(WebCore::DebugPageOverlays::regionChanged):
* page/DebugPageOverlays.h:
(WebCore::DebugPageOverlays::didLayout):
(WebCore::DebugPageOverlays::didChangeEventHandlers):
* page/FrameView.cpp:
(WebCore::FrameView::layout):

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

5 years agoUnreviewed fix for crash after r181608.
jonlee@apple.com [Tue, 17 Mar 2015 05:15:41 +0000 (05:15 +0000)]
Unreviewed fix for crash after r181608.

* WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.

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

5 years agoGeneralize the Document code that maintains a set of nodes with event handlers
simon.fraser@apple.com [Tue, 17 Mar 2015 04:43:52 +0000 (04:43 +0000)]
Generalize the Document code that maintains a set of nodes with event handlers
https://bugs.webkit.org/show_bug.cgi?id=142762

Reviewed by Zalan Bujtas, Darin Adler.

Document.h defines a TouchEventTargetSet type, which will in future be used for
other event types too (wheel events), so rename it to EventTargetSet.

Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
to take a reference.

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction): References
(WebCore::Document::didAddTouchEventHandler): Ditto.
(WebCore::Document::didRemoveEventTargetNode): Ditto.
* dom/Document.h:
(WebCore::Document::touchEventTargets): No-one calls this; just remove the non
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
(WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::removeAllEventListeners): Pass a ref.

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

5 years agoWeb Inspector: Add more DOM Native Function parameter strings
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:36 +0000 (04:41 +0000)]
Web Inspector: Add more DOM Native Function parameter strings
https://bugs.webkit.org/show_bug.cgi?id=142760

Reviewed by Timothy Hatcher.

* UserInterface/Models/NativeFunctionParameters.js:
Add native parameter strings generated and hand modified
for DOM built-in classes.

* UserInterface/Views/ObjectTreePropertyTreeElement.js:
For native constructors "FooConstructor" the description is just
the name of the Constructor not the function string.

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

5 years agoWeb Inspector: Object Previews in Indexed DB tables
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:34 +0000 (04:41 +0000)]
Web Inspector: Object Previews in Indexed DB tables
https://bugs.webkit.org/show_bug.cgi?id=140813

Reviewed by Timothy Hatcher.

Source/WebCore:

* inspector/InspectorIndexedDBAgent.cpp:
Include previews with object store objects.

Source/WebInspectorUI:

* UserInterface/Views/FormattedValue.js:
(WebInspector.FormattedValue.createObjectTreeOrFormattedValueForRemoteObject):
Add a boolean param for ObjectTree construction if it should force allowing object expansion.

* UserInterface/Views/IndexedDatabaseEntryDataGridNode.js:
(WebInspector.IndexedDatabaseEntryDataGridNode.prototype.createCellContent):
Switch to creating an ObjectTree or FormattedValue.

* UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
(.content-view.indexed-database-object-store > .data-grid tr.selected):
Change row selection color to match the console's lighter blue instead of dark blue.

(.content-view.indexed-database-object-store > .data-grid .object-tree > :matches(.title, .object-preview)::before):
Adjust object tree disclosure triangle placement for larger line heights.

(.content-view.indexed-database-object-store > .data-grid td .section .header): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid td .section .header .title): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .section.expanded .header::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li.parent.expanded::before): Deleted.
(.content-view.indexed-database-object-store > .data-grid:focus tr.selected td .properties-tree li *): Deleted.
Remove now unnecessary styles.

* UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
(.object-tree .object-tree-array-index > .icon):
Increase the specificity to override ".data-grid td .icon" styles.

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

5 years agoWeb Inspector: Better Console Previews for Arrays / Small Objects
joepeck@webkit.org [Tue, 17 Mar 2015 04:41:31 +0000 (04:41 +0000)]
Web Inspector: Better Console Previews for Arrays / Small Objects
https://bugs.webkit.org/show_bug.cgi?id=142322

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
Create deep valuePreviews for simple previewable objects,
such as arrays with 5 values, or basic objects with
3 properties.

Source/WebInspectorUI:

* UserInterface/Views/ObjectPreviewView.js:
If there is a sub-preview, show the sub-preview.

* UserInterface/Views/ObjectTreeView.js:
(WebInspector.ObjectTreeView):
For an ObjectTree that is not a root (e.g. one inside of
an array/set/map property tree element) allow it to be
expanded even if the preview is lossless.

LayoutTests:

* inspector/model/remote-object-expected.txt:
* inspector/model/remote-object.html:
Include a test with cyclic values, and update
results which now have sub-previews.

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

5 years agoSource/JavaScriptCore:
rniwa@webkit.org [Tue, 17 Mar 2015 04:02:52 +0000 (04:02 +0000)]
Source/JavaScriptCore:
Add support for default constructor
https://bugs.webkit.org/show_bug.cgi?id=142388

Reviewed by Filip Pizlo.

Added the support for default constructors. They're generated by ClassExprNode::emitBytecode
via BuiltinExecutables::createDefaultConstructor.

UnlinkedFunctionExecutable now has the ability to override SourceCode provided by the owner
executable. We can't make store SourceCode in UnlinkedFunctionExecutable since CodeCache can use
the same UnlinkedFunctionExecutable to generate code blocks for multiple functions.

Parser now has the ability to treat any function expression as a constructor of the kind specified
by m_defaultConstructorKind member variable.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createDefaultConstructor): Added.
(JSC::BuiltinExecutables::createExecutableInternal): Generalized from createBuiltinExecutable.
Parse default constructors as normal non-builtin functions. Override SourceCode in the unlinked
function executable since the Miranda function's code is definitely not in the owner executable's
source code. That's the whole point.
* builtins/BuiltinExecutables.h:
(UnlinkedFunctionExecutable::createBuiltinExecutable): Added. Wraps createExecutableInternal.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
(JSC::UnlinkedFunctionExecutable::linkInsideExecutable):
(JSC::UnlinkedFunctionExecutable::linkGlobalCode):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedFunctionExecutable::create):
(JSC::UnlinkedFunctionExecutable::symbolTable): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitNewDefaultConstructor): Added.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::ClassExprNode::emitBytecode): Generate the default constructor if needed.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseFunctionInfo): Override ownerClassKind and assume the function as
a constructor if we're parsing a default constructor.
(JSC::Parser<LexerType>::parseClass): Allow omission of the class constructor.
* parser/Parser.h:
(JSC::parse):

LayoutTests:
Implement default constructor

Add support for default constructor
https://bugs.webkit.org/show_bug.cgi?id=142388

Reviewed by Filip Pizlo.

Added tests for default constructors.

* TestExpectations: Skipped the test since ES6 class syntax isn't enabled by default.
* js/class-syntax-default-constructor-expected.txt: Added.
* js/class-syntax-default-constructor.html: Added.
* js/script-tests/class-syntax-default-constructor.js: Added.

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

5 years agoWeb Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage...
nvasilyev@apple.com [Tue, 17 Mar 2015 03:56:18 +0000 (03:56 +0000)]
Web Inspector: Rename ConsoleMessage and ConsoleMessageImpl to LegacyConsoleMessage and LegacyConsoleMessageImpl respectively
https://bugs.webkit.org/show_bug.cgi?id=142712

As a first step of ConsoleMessage refactoring (https://bugs.webkit.org/show_bug.cgi?id=142599):

  - Rename WebInspector.ConsoleMessage class to WebInspector.LegacyConsoleMessage
  - Rename WebInspector.ConsoleMessageImpl class to WebInspector.LegacyConsoleMessageImpl
  - Rename ConsoleMessage.js file to LegacyConsoleMessage.js
  - Rename ConsoleMessageImpl file to LegacyConsoleMessageImpl.js

Reviewed by Joseph Pecoraro.

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessage):
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager.prototype.messageWasAdded):
* UserInterface/Main.html:
* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
* UserInterface/Views/ConsoleCommandResult.js:
(WebInspector.ConsoleCommandResult):
(WebInspector.ConsoleCommandResult.prototype.toMessageElement):
* UserInterface/Views/ConsoleGroup.js:
(WebInspector.ConsoleGroup.prototype.render):
* UserInterface/Views/LegacyConsoleMessage.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessage.js.
(WebInspector.LegacyConsoleMessage):
(WebInspector.LegacyConsoleMessage.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessage.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessage.prototype.clone):
(WebInspector.LegacyConsoleMessage.create):
* UserInterface/Views/LegacyConsoleMessageImpl.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ConsoleMessageImpl.js.
(WebInspector.LegacyConsoleMessageImpl):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldDumpStackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype._shouldHideURL):
(WebInspector.LegacyConsoleMessageImpl.prototype._firstNonNativeCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.get message):
(WebInspector.LegacyConsoleMessageImpl.prototype.get formattedMessage):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyLocation):
(WebInspector.LegacyConsoleMessageImpl.prototype._linkifyCallFrame):
(WebInspector.LegacyConsoleMessageImpl.prototype.isErrorOrWarning):
(WebInspector.LegacyConsoleMessageImpl.prototype._format):
(WebInspector.LegacyConsoleMessageImpl.prototype._isExpandable):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameter):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsValue):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.LegacyConsoleMessageImpl.prototype._rootPropertyPathForObject):
(WebInspector.LegacyConsoleMessageImpl.prototype._userProvidedColumnNames):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatParameterAsTable):
(WebInspector.LegacyConsoleMessageImpl.prototype.):
(WebInspector.LegacyConsoleMessageImpl.prototype.stringFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.floatFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.integerFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.styleFormatter):
(WebInspector.LegacyConsoleMessageImpl.prototype.isWhitelistedProperty):
(WebInspector.LegacyConsoleMessageImpl.prototype.append):
(WebInspector.LegacyConsoleMessageImpl.prototype._formatWithSubstitutionString):
(WebInspector.LegacyConsoleMessageImpl.prototype.decorateMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.toMessageElement):
(WebInspector.LegacyConsoleMessageImpl.prototype._populateStackTraceTreeElement):
(WebInspector.LegacyConsoleMessageImpl.prototype.updateRepeatCount):
(WebInspector.LegacyConsoleMessageImpl.prototype.toString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get text):
(WebInspector.LegacyConsoleMessageImpl.prototype.isEqual):
(WebInspector.LegacyConsoleMessageImpl.prototype.get stackTrace):
(WebInspector.LegacyConsoleMessageImpl.prototype.clone):
(WebInspector.LegacyConsoleMessageImpl.prototype.get levelString):
(WebInspector.LegacyConsoleMessageImpl.prototype.get clipboardPrefixString):
(WebInspector.LegacyConsoleMessageImpl.prototype.toClipboardString):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype.didAppendConsoleMessage):
(WebInspector.LogContentView.prototype._messageAdded):
(WebInspector.LogContentView.prototype._filterMessages):
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
* WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:

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

5 years ago[EFL] fast/css/outline-auto-empty-rects.html is failing
commit-queue@webkit.org [Tue, 17 Mar 2015 03:31:45 +0000 (03:31 +0000)]
[EFL] fast/css/outline-auto-empty-rects.html is failing
https://bugs.webkit.org/show_bug.cgi?id=142570

Unreviewed EFL Gardening. Rebaseline the fast/css/outline-auto-empty-rects.html.

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-03-16

* platform/efl/TestExpectations:
* platform/efl/fast/css/outline-auto-empty-rects-expected.txt: Added.

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

5 years ago[Mac] Update missing image UI
jer.noble@apple.com [Tue, 17 Mar 2015 03:28:10 +0000 (03:28 +0000)]
[Mac] Update missing image UI
https://bugs.webkit.org/show_bug.cgi?id=142592

Reviewed by Darin Adler.

Update the broken image glyphs with new art (including a 3x image).

Test: fast/hidpi/broken-image-icon-very-hidpi.html

* Resources/missingImage.png:
* Resources/missingImage@2x.png:
* Resources/missingImage@3x.png: Added.
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::brokenImage):

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

5 years agoDon't pass nil as a fireDate for NSTimer
conrad_shultz@apple.com [Tue, 17 Mar 2015 02:58:07 +0000 (02:58 +0000)]
Don't pass nil as a fireDate for NSTimer
https://bugs.webkit.org/show_bug.cgi?id=142765

Reviewed by Dan Bernstein.

While we're here, switch to a selector that conforms to documented NSTimer API.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController cancelOperation:]):
Set the timer's fireDate as the future date matching the former interval; update the selector.
(-[WKFullScreenWindowController _watchdogTimerFired:]):
Timer callback; wrap -exitFullScreen.

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

5 years ago[EFL] Unreviewed EFL gardening on 17th Mar.
gyuyoung.kim@samsung.com [Tue, 17 Mar 2015 02:27:03 +0000 (02:27 +0000)]
[EFL] Unreviewed EFL gardening on 17th Mar.

Register new crash, flaky, and timeout tests to EFL TestExpectations files.
Additionally some test related to video, form, accessibility tests are marked as failure.

* platform/efl/TestExpectations:

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