WebKit-https.git
5 years ago[Win] Update DRT Accessibility implementation to better match Mac.
bfulgham@apple.com [Fri, 23 Jan 2015 21:31:34 +0000 (21:31 +0000)]
[Win] Update DRT Accessibility implementation to better match Mac.
https://bugs.webkit.org/show_bug.cgi?id=140830

Reviewed by Dean Jackson.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::titleUIElement):
(AccessibilityUIElement::parentElement):
(convertToDRTLabel):
(AccessibilityUIElement::role):
(AccessibilityUIElement::title):
(AccessibilityUIElement::description):
(AccessibilityUIElement::stringValue):
(AccessibilityUIElement::helpText):
(AccessibilityUIElement::isFocused):

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

5 years agoFix the pre-Yosemite build.
timothy_horton@apple.com [Fri, 23 Jan 2015 20:53:41 +0000 (20:53 +0000)]
Fix the pre-Yosemite build.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):

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

5 years agoWeb Inspector: Object Previews in the Console
joepeck@webkit.org [Fri, 23 Jan 2015 20:05:44 +0000 (20:05 +0000)]
Web Inspector: Object Previews in the Console
https://bugs.webkit.org/show_bug.cgi?id=129204

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Update the very old, unused object preview code. Part of this comes from
the earlier WebKit legacy implementation, and the Blink implementation.

A RemoteObject may include a preview, if it is asked for, and if the
RemoteObject is an object. Previews are a shallow (single level) list
of a limited number of properties on the object. The previewed
properties are always stringified (even if primatives). Previews are
limited to just 5 properties or 100 indices. Previews are marked
as lossless if they are a complete snapshot of the object.

There is a path to make previews two levels deep, that is currently
unused but should soon be used for tables (e.g. IndexedDB).

* inspector/InjectedScriptSource.js:
- Move some code off of InjectedScript to be generic functions
usable by RemoteObject as well.
- Update preview generation to use

* inspector/protocol/Runtime.json:
- Add a new type, "accessor" for preview objects. This represents
a getter / setter. We currently don't get the value.

Source/WebInspectorUI:

* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
* UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
(get WebInspector.JavaScriptRuntimeCompletionProvider.prototype.):
Update RuntimeManager callsites that do not need object previews.

* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evalCallback):
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
Update the main evaluate method to include a boolean parameter for
object previews. Most callers do not need them. Also, since previews
were not available on iOS 6, switch to invoke, to conditionally
include the command parameter.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject):
(WebInspector.RemoteObject.fromPayload):
(WebInspector.RemoteObject.prototype.get preview):
Store the preview from the payload.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl.prototype._format):
(WebInspector.ConsoleMessageImpl.prototype._formatParameter):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsString):
(WebInspector.ConsoleMessageImpl.prototype._formatAsArrayEntry):
Pass an explicit false for most formatters to not use a preview if available.

(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
(WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
Currently only object types are previewed. Though we request previews
for arrays, we don't use the preview because we show a better preview
by just immediately requesting for a full non-preview property list.

(WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
Quickly output an object preview into the title element. The format
is "ClassName {prop: value...}". Elide the class name if it is "Object".
Also skip over certain preview properties that may not be useful
at a glance (like constructor, or accessors without values).

* UserInterface/Views/LogContentView.css:
(.console-object-preview):
(.console-formatted-array .console-object-preview):
(.console-object-preview-lossless):
(.expanded .console-object-preview):
Show lossy previews in italics.
Show lossless previews and array previews without italics.
Do not show the class name in the preview in italics when expanded.

(.console-object-preview .name):
Give preview property names the same color as ObjectPropertiesSection property names.

(.expanded .console-object-preview > .console-object-preview-body):
When expanding an object, hide the preview.

(.console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
(.expanded .console-object-preview > .console-object-preview-name.console-object-preview-name-Object):
For "Object" previews, hide the name "Object" when not expanded, and show it when expanded.

LayoutTests:

* inspector/debugger/command-line-api-exception-nested-catch.html:
* inspector/debugger/command-line-api-exception.html:
* inspector/model/remote-object-get-properties.html:
Update RuntimeManager callsites to not ask for previews when evaluating.

* inspector/model/remote-object-expected.txt: Added.
* inspector/model/remote-object.html: Added.
Add a test specifically for Remote Object. This test can also be
opened in a browser. It attempts to run the gamut of all different
types of objects and shows the RemoteObject constructed for it.

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

5 years agoLeverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
cdumez@apple.com [Fri, 23 Jan 2015 20:01:50 +0000 (20:01 +0000)]
Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
https://bugs.webkit.org/show_bug.cgi?id=140829

Reviewed by Andreas Kling.

Leverage CSSValuePool's font family cache in CSSComputedStyleDeclaration
by calling CSSValuePool::createFontFamilyValue() to create the font
family CSSPrimitiveValue instead of cssValuePool().createValue().

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForFamily):

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

5 years agoWeb Inspector: Disable *Annotators on minified files that aren't pretty printed
saambarati1@gmail.com [Fri, 23 Jan 2015 19:57:02 +0000 (19:57 +0000)]
Web Inspector: Disable *Annotators on minified files that aren't pretty printed
https://bugs.webkit.org/show_bug.cgi?id=140550

Reviewed by Timothy Hatcher.

When SourceCodeTextEditor speculates that a file is minified it
sets a flag on itself that the Annotators will notice when pretty
printing and turning on type profiling.

SourceCodeTextEditor enforces the following two behaviors:

1. Always pretty print a file if we think it's minified while
viewing type annotations. So, while viewing a minified file,
if you press the type profiling button, the pretty printer will
first reformat the file, then the type profiler will insert type annotations.

2. If the type profiler is enabled and we're viewing a pretty
printed file that we think originally was minified, and the
pretty printer is disabled via pressing the button, then the
type profiler will also be disabled.

These two behaviors maintain a good user experience because
it prevents a bad visual representation of profiler data and
also prevents bad performance.

* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):

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

5 years agoImmediate crash when setting JS breakpoint
msaboff@apple.com [Fri, 23 Jan 2015 19:52:25 +0000 (19:52 +0000)]
Immediate crash when setting JS breakpoint
https://bugs.webkit.org/show_bug.cgi?id=140811

Reviewed by Mark Lam.

When the DFG stack layout phase doesn't allocate a register for the scope register,
it incorrectly sets the scope register in the code block to a bad value, one with
an offset of 0.  Changed it so that we set the code block's scope register to the
invalid VirtualRegister instead.

No tests needed as adding the ASSERT in setScopeRegister() was used to find the bug.
We crash with that ASSERT in testapi and likely many other tests as well.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::setScopeRegister):
(JSC::CodeBlock::scopeRegister):
Added ASSERTs to catch any future improper setting of the code block's scope register.

* dfg/DFGStackLayoutPhase.cpp:
(JSC::DFG::StackLayoutPhase::run):

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

5 years agoQLPreviewMenuItem popovers don't close when the page scrolls
timothy_horton@apple.com [Fri, 23 Jan 2015 19:43:20 +0000 (19:43 +0000)]
QLPreviewMenuItem popovers don't close when the page scrolls
https://bugs.webkit.org/show_bug.cgi?id=140806
<rdar://problem/19555618>

Reviewed by Beth Dakin.

Now that QLPreviewMenuItem's popover doesn't eat scrolls, we need to dismiss it if the page scrolls.

* WebView/WebHTMLView.mm:
(-[WebHTMLView scrollWheel:scrollWheel:]):
Send scrollWheel along to WebImmediateActionController.

* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController webView:didHandleScrollWheel:]):
(-[WebImmediateActionController _clearImmediateActionState]):
(-[WebImmediateActionController _defaultAnimationController]):
Keep track of the active QLPreviewMenuItem, and close it upon scroll.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissContentRelativeChildWindows]):
Send _dismissContentRelativeChildWindows on to WKImmediateActionController.

* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
(-[WKImmediateActionController dismissContentRelativeChildWindows]):
(-[WKImmediateActionController _defaultAnimationController]):
Keep track of the active QLPreviewMenuItem, and close it upon scroll.

* platform/spi/mac/QuickLookMacSPI.h:
Add some SPI.

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

5 years agoInfinite recursion in _clearImmediateActionState
timothy_horton@apple.com [Fri, 23 Jan 2015 19:42:03 +0000 (19:42 +0000)]
Infinite recursion in _clearImmediateActionState
https://bugs.webkit.org/show_bug.cgi?id=140807
<rdar://problem/19571601>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController _clearImmediateActionState]):
Clear _hasActivatedActionContext before calling didUseActions, because
didUseActions can call _clearImmediateActionState.

* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _clearImmediateActionState]):
Use this opportunity to bring identical code to WebKit1, to avoid
getting DataDetectors stuck when an immediate action is canceled.

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

5 years agoHang CSSFontSelector off Document instead of StyleResolver.
akling@apple.com [Fri, 23 Jan 2015 18:44:22 +0000 (18:44 +0000)]
Hang CSSFontSelector off Document instead of StyleResolver.
<https://webkit.org/b/140820>

Reviewed by Antti Koivisto.

Move the CSSFontSelector from StyleResolver to Document. This is the first
step towards making the CSSFontSelector be able to survive full style recalc.

Clearing a Document's StyleResolver will still nuke the CSSFontSelector,
though that is done in Document::clearStyleResolver() now.

* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::CSSFontSelector):
* css/CSSFontSelector.h:

    Modernize CSSFontSelector construction a bit by having create() return
    a Ref and the constructor take a Document& instead of a Document*.
    Also made the constructor explicit.

(WebCore::StyleResolver::~StyleResolver):
* dom/Document.cpp:
(WebCore::Document::clearStyleResolver):

    Nuke the current CSSFontSelector in clearStyleResolver() instead of
    in ~StyleResolver. It's a minor change, but shows the way forward.
    Added a FIXME about how CSSFontSelector should eventually survive
    this operation.

(WebCore::Document::fontSelector):
* css/FontLoader.cpp:
(WebCore::FontLoader::loadFont):
(WebCore::FontLoader::checkFont):
(WebCore::FontLoader::resolveFontStyle):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/StyleResolver.h:
(WebCore::StyleResolver::fontSelector): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::appendAuthorStyleSheets):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::defaultStyleForElement):
(WebCore::StyleResolver::updateFont):
* dom/Document.h:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
(WebCore::RenderListBox::paintItemForeground):
* rendering/RenderMenuList.cpp:
(RenderMenuList::fontSelector):
* rendering/RenderSearchField.cpp:
(WebCore::RenderSearchField::fontSelector):
* rendering/TextAutoSizing.cpp:
(WebCore::TextAutoSizingValue::adjustNodeSizes):
(WebCore::TextAutoSizingValue::reset):
* rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::resolveTree):

    Move CSSFontSelector ownership from StyleResolver to Document.

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

5 years agoCreate a "load and stall" cgi that support byte ranges.
eric.carlson@apple.com [Fri, 23 Jan 2015 18:28:05 +0000 (18:28 +0000)]
Create a "load and stall" cgi that support byte ranges.
https://bugs.webkit.org/show_bug.cgi?id=140628

Reviewed by Jer Noble.

* http/tests/media/resources/serve-video.php: Add support for "stallOffset", "stallDuration",
    and "chunkSize" parameters.

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

5 years agoLayout Test http/tests/media/track-in-band-hls-metadata.html is flaky
jer.noble@apple.com [Fri, 23 Jan 2015 18:27:27 +0000 (18:27 +0000)]
Layout Test http/tests/media/track-in-band-hls-metadata.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=140827

Reviewed by Eric Carlson.

Create the m_metadataTrack by calling prepareMetadataTrack() before deref-ing it.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):

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

5 years ago[GTK] Add missing null check in some derefGPtr implementations
carlosgc@webkit.org [Fri, 23 Jan 2015 16:33:04 +0000 (16:33 +0000)]
[GTK] Add missing null check in some derefGPtr implementations
https://bugs.webkit.org/show_bug.cgi?id=140822

Reviewed by Sergio Villar Senin.

It's missing in GHashTable and GVariant implementations.

* wtf/gobject/GRefPtr.cpp:
(WTF::derefGPtr):

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

5 years agoREGRESSION: run-perf-tests --profiler= seems to have broken
svillar@igalia.com [Fri, 23 Jan 2015 14:56:54 +0000 (14:56 +0000)]
REGRESSION: run-perf-tests --profiler= seems to have broken
https://bugs.webkit.org/show_bug.cgi?id=113528

Reviewed by Daniel Bates.

The problem is that "perf --record" (or the equivalent call for
other profilers) is never called whenever there is a wrapper
option in the port. We should inject the profiler call first
(should it exists) and then use the port wrapper.

* Scripts/webkitpy/port/driver.py:
(Driver._command_wrapper):
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test_profiler_and_wrapper): New unit test.

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

5 years ago[GTK] Add initial database process support
carlosgc@webkit.org [Fri, 23 Jan 2015 14:30:21 +0000 (14:30 +0000)]
[GTK] Add initial database process support
https://bugs.webkit.org/show_bug.cgi?id=139491

Reviewed by Sergio Villar Senin.

.:

* Source/cmake/OptionsGTK.cmake: Set WebKit2_DatabaseProcess_OUTPUT_NAME.

Source/WebCore:

* platform/sql/SQLiteFileSystem.cpp:
(WebCore::SQLiteFileSystem::openDatabase): Use
WebCore::fileSystemRepresentation() for the database filename,
otherwise sqlite3_open() fails when the filename contains "%2E".

Source/WebKit2:

Add initial support for DatabaseProcess, disabled by default for
now.

* CMakeLists.txt: Add required files to compilation.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::createDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* DatabaseProcess/EntryPoint/unix/DatabaseProcessMain.cpp: Added.
(main):
* DatabaseProcess/gtk/DatabaseProcessMainGtk.cpp: Added.
(WebKit::DatabaseProcessMainUnix):
* DatabaseProcess/unix/DatabaseProcessMainUnix.h: Added.
* PlatformGTK.cmake: Add required files to compilation.
* Shared/ProcessExecutablePath.h:
* Shared/gtk/KeyedDecoder.cpp: Added.
(WebKit::KeyedDecoder::KeyedDecoder):
(WebKit::KeyedDecoder::~KeyedDecoder):
(WebKit::KeyedDecoder::buildDictionaryFromGVariant):
(WebKit::KeyedDecoder::decodeBytes):
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeInt64):
(WebKit::KeyedDecoder::decodeFloat):
(WebKit::KeyedDecoder::decodeDouble):
(WebKit::KeyedDecoder::decodeString):
(WebKit::KeyedDecoder::beginObject):
(WebKit::KeyedDecoder::endObject):
(WebKit::KeyedDecoder::beginArray):
(WebKit::KeyedDecoder::beginArrayElement):
(WebKit::KeyedDecoder::endArrayElement):
(WebKit::KeyedDecoder::endArray):
* Shared/gtk/KeyedDecoder.h: Added.
* Shared/gtk/KeyedEncoder.cpp: Added.
(WebKit::KeyedEncoder::KeyedEncoder):
(WebKit::KeyedEncoder::~KeyedEncoder):
(WebKit::KeyedEncoder::encodeBytes):
(WebKit::KeyedEncoder::encodeBool):
(WebKit::KeyedEncoder::encodeUInt32):
(WebKit::KeyedEncoder::encodeInt32):
(WebKit::KeyedEncoder::encodeInt64):
(WebKit::KeyedEncoder::encodeFloat):
(WebKit::KeyedEncoder::encodeDouble):
(WebKit::KeyedEncoder::encodeString):
(WebKit::KeyedEncoder::beginObject):
(WebKit::KeyedEncoder::endObject):
(WebKit::KeyedEncoder::beginArray):
(WebKit::KeyedEncoder::beginArrayElement):
(WebKit::KeyedEncoder::endArrayElement):
(WebKit::KeyedEncoder::endArray):
(WebKit::KeyedEncoder::finishEncoding):
* Shared/gtk/KeyedEncoder.h: Added.
* Shared/gtk/ProcessExecutablePathGtk.cpp:
(WebKit::executablePathOfDatabaseProcess):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didCreateDatabaseToWebProcessConnection):
Add the unix domain sockets implementation.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Handle the
DatabaseProcess too.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureWebToDatabaseProcessConnection): Add
the unix domain sockets implementation.

Source/WTF:

Add support for using GRefPtr with GVariantBuilder.

* wtf/gobject/GRefPtr.cpp:
(WTF::refGPtr):
(WTF::derefGPtr):
* wtf/gobject/GRefPtr.h:
* wtf/gobject/GTypedefs.h:

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

5 years agoInitialization for some member variable of FontPlatformData
commit-queue@webkit.org [Fri, 23 Jan 2015 10:33:33 +0000 (10:33 +0000)]
Initialization for some member variable of FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=136327

Patch by Byeongha Cho <byeongha.cho@samsung.com> on 2015-01-23
Reviewed by Myles C. Maxfield.

No new tests. There's no functional change.

* platform/graphics/freetype/FontPlatformDataFreeType.cpp:
(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::operator=):
(WebCore::FontPlatformData::~FontPlatformData):

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

5 years agosvg-resource-fragment-identifier-img-src.html is a hidpi reftest, but its -expected...
ap@apple.com [Fri, 23 Jan 2015 08:52:56 +0000 (08:52 +0000)]
svg-resource-fragment-identifier-img-src.html is a hidpi reftest, but its -expected.html
counterpart isn't hidpi
https://bugs.webkit.org/show_bug.cgi?id=140815

Reviewed by Simon Fraser.

* svg/css/svg-resource-fragment-identifier-img-src-expected.html: Make the expectation
match its test.

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

5 years agoRename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
g.czajkowski@samsung.com [Fri, 23 Jan 2015 08:49:39 +0000 (08:49 +0000)]
Rename ChildNodeRemovalNotifier::m_insertionPoint to m_removalPoint
https://bugs.webkit.org/show_bug.cgi?id=140766

Reviewed by Andreas Kling.

ChildNodeRemovalNotifier::ChildNodeRemovalNotifier(...) should take
a node as removal point.
It's probably Copy/Paste from ChildNodeInsertionNotifier::m_insertionPoint.

No new tests. No behavior change.

* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeRemovalNotifier::ChildNodeRemovalNotifier):
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument):
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):

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

5 years agoRewrite the fast/css/css2-system-fonts.html test to be more useful on all platforms
cdumez@apple.com [Fri, 23 Jan 2015 08:25:22 +0000 (08:25 +0000)]
Rewrite the fast/css/css2-system-fonts.html test to be more useful on all platforms
https://bugs.webkit.org/show_bug.cgi?id=140810

Reviewed by Andreas Kling.

Make the fast/css/css2-system-fonts.html explicit about the font styles
expected on each platform instead of just Mac.

It also converts the test to be text only as the style information is
now displayed in text format.

This change is in preparation for a refactor of system font handling.

This change is based on the following Blink revision by
<alancutter@chromium.org>:
http://src.chromium.org/viewvc/blink?view=revision&revision=169612

* fast/css/css2-system-fonts.html:
* platform/efl/fast/css/css2-system-fonts-expected.png: Removed.
* platform/efl/fast/css/css2-system-fonts-expected.txt: Removed.
* platform/gtk/fast/css/css2-system-fonts-expected.png: Removed.
* platform/gtk/fast/css/css2-system-fonts-expected.txt: Removed.
* platform/ios-simulator-wk2/fast/css/css2-system-fonts-expected.txt:
* platform/mac-mavericks/fast/css/css2-system-fonts-expected.png: Removed.
* platform/mac-mavericks/fast/css/css2-system-fonts-expected.txt:
* platform/mac-mountainlion/fast/css/css2-system-fonts-expected.txt: Removed.
* platform/mac/fast/css/css2-system-fonts-expected.png: Removed.
* platform/mac/fast/css/css2-system-fonts-expected.txt:

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

5 years ago[GTK] Fix debug build after r178940
commit-queue@webkit.org [Fri, 23 Jan 2015 08:19:47 +0000 (08:19 +0000)]
[GTK] Fix debug build after r178940
https://bugs.webkit.org/show_bug.cgi?id=140814

Patch by Hunseop Jeong <hs85.jeong@samsung.com> on 2015-01-23
Reviewed by Carlos Garcia Campos.

* platform/graphics/opentype/OpenTypeVerticalData.cpp:
(WebCore::OpenTypeVerticalData::substituteWithVerticalGlyphs):

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

5 years agoEdenCollections unnecessarily visit SmallStrings
mhahnenb@gmail.com [Fri, 23 Jan 2015 07:04:05 +0000 (07:04 +0000)]
EdenCollections unnecessarily visit SmallStrings
https://bugs.webkit.org/show_bug.cgi?id=140762

Reviewed by Geoffrey Garen.

* heap/Heap.cpp:
(JSC::Heap::copyBackingStores): Also added a GCPhase for copying
backing stores, which is a significant portion of garbage collection.
(JSC::Heap::visitSmallStrings): Check to see if we need to visit
SmallStrings based on the collection type.
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::SmallStrings):
(JSC::SmallStrings::visitStrongReferences): Set the fact that we have
visited the SmallStrings since the last modification.
* runtime/SmallStrings.h:
(JSC::SmallStrings::needsToBeVisited): If we're doing a
FullCollection, we need to visit. Otherwise, it depends on whether
we've been visited since the last modification/allocation.

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

5 years agoSimple line layout: Move leading whitespace handling from removeTrailingWhitespace...
zalan@apple.com [Fri, 23 Jan 2015 06:26:28 +0000 (06:26 +0000)]
Simple line layout: Move leading whitespace handling from removeTrailingWhitespace() to initializeNewLine().
https://bugs.webkit.org/show_bug.cgi?id=140757

Reviewed by Antti Koivisto.

Checking if overflowed pre-wrap whitespace needs to be ignored should not be part of the trailing whitespace handling.
Move it to initializeNewLine().

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::preWrap):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::isLineBreak):

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

5 years ago[iOS][WK2] Ignore synthetic click initiated on a previous page
benjamin@webkit.org [Fri, 23 Jan 2015 04:17:11 +0000 (04:17 +0000)]
[iOS][WK2] Ignore synthetic click initiated on a previous page
https://bugs.webkit.org/show_bug.cgi?id=139556
rdar://problem/18586008

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-01-22
Reviewed by David Kilzer.

Under the right accumulation of bad luck, a synthetic click could be generated
on a page that never asked for it.

What happened was:
1) Page Foo listen to touch event.
2) In response to touch events, Foo decides to navigate to page Bar
   *but* it does not cancel the native gesture recognizers with preventDefault().
3) Page Bar loads.
4) The native gesture recognizer ask us to click, we forward that to the WebProcess
   and generate a synthetic mouse event.
-> Bar receives a click.
If you are unlucky enough, it looks like a single tap does a double click.

There are two ways this patch avoids the problem:

First, in the UIProcess, we just cancel the HighlightLongPressGestureRecognizer
on didCommitLoadForMainFrame. This prevents "fast clicks" from accidentally going through.
This is not bullet proof because we get didCommitLoadForMainFrame asynchronously but
killing the timer and gesture seems like a good idea.

Second, we skip any tap command at the WebProcess level when it was issued for
the previous page. This is using the same principle we used for VisibleContentRect:
any input generated before the current layer tree commit is useless for the current page.

We track the commit ID in the UIProcess when we decide to do the tracking or not.
Note that we keep the ID regardless of the tracking state, it does not matter if we have sent
touch events, what matters is what content was on screen when the touch events were handled.

If the user interaction result in a tap, we send the commit ID along the tap commands.
In the WebProcess, we know the actual layer tree commit associated with the current page.
If the tap was generated with a layer ID preceding the current page, we fail the command.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _attemptClickAtLocation:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::handleTap):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):
(WebKit::WebPage::commitPotentialTap):

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

5 years agoconfigure-xcode-for-ios-development needs to import webkitdirs.pm
ddkilzer@apple.com [Fri, 23 Jan 2015 04:06:40 +0000 (04:06 +0000)]
configure-xcode-for-ios-development needs to import webkitdirs.pm
<http://webkit.org/b/140704>

Fixes the following runtime error:

    Undefined subroutine &main::exitStatus called at ./Tools/Scripts/configure-xcode-for-ios-development line 167.

* Scripts/configure-xcode-for-ios-development: Add back code to
import webkitdirs.pm for the exitStatus() method.  Not sure why
I removed it before patch review.

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

5 years agoRemove unused class EmojiFallbackFontSelector.
akling@apple.com [Fri, 23 Jan 2015 03:32:57 +0000 (03:32 +0000)]
Remove unused class EmojiFallbackFontSelector.
<https://webkit.org/b/140809>

Reviewed by Antti Koivisto.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/ios:

This class no longer has any clients.

* Misc/EmojiFallbackFontSelector.cpp: Removed.
* Misc/EmojiFallbackFontSelector.h: Removed.

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

5 years agoImport fast/css/font-shorthand-line-height.html layout test from Blink
cdumez@apple.com [Fri, 23 Jan 2015 02:17:32 +0000 (02:17 +0000)]
Import fast/css/font-shorthand-line-height.html layout test from Blink
https://bugs.webkit.org/show_bug.cgi?id=140801

Reviewed by Andreas Kling.

Import fast/css/font-shorthand-line-height.html layout test from Blink
to get better test coverage for 'line-height' font shorthands cascades:
https://src.chromium.org/viewvc/blink?view=rev&revision=184346

I am working on expanding the font shorthand at parsing time (like
other shorthands) via Bug 140577 and I want to make sure I don't break
line-height in the process.

* fast/css/font-shorthand-line-height-expected.txt: Added.
* fast/css/font-shorthand-line-height.html: Added.

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

5 years ago[WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
cdumez@apple.com [Fri, 23 Jan 2015 01:57:31 +0000 (01:57 +0000)]
[WK2][Cocoa] Drop WKWebViewConfiguration._featureCounterEnabled SPI.
https://bugs.webkit.org/show_bug.cgi?id=140799

Reviewed by Dan Bernstein.

Drop WKWebViewConfiguration._featureCounterEnabled SPI now that the
client-side has been updated.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]):
(-[WKWebViewConfiguration _featureCounterEnabled]): Deleted.
(-[WKWebViewConfiguration _setFeatureCounterEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

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

5 years agoFix ENABLE(NETWORK_CACHE) build
antti@apple.com [Fri, 23 Jan 2015 01:19:20 +0000 (01:19 +0000)]
Fix ENABLE(NETWORK_CACHE) build

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

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

5 years ago[Win] Unreviewed test fix after r178965.
bfulgham@apple.com [Fri, 23 Jan 2015 01:16:04 +0000 (01:16 +0000)]
[Win] Unreviewed test fix after r178965.

* WebView.cpp: Supply missing implementation of 'setEditable'. It
currently asserts, causing all debug tests to fail.

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

5 years agoREGRESSION (r178847): Yosemite 32-bit bot isn't doing any work
timothy_horton@apple.com [Fri, 23 Jan 2015 00:47:31 +0000 (00:47 +0000)]
REGRESSION (r178847): Yosemite 32-bit bot isn't doing any work
https://bugs.webkit.org/show_bug.cgi?id=140795

Reviewed by Jon Honeycutt.

* BuildSlaveSupport/build.webkit.org-config/config.json:
r178847 accidentally remove the scheduler for this bot. Re-add it to the
Yosemite scheduler.

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

5 years agoWeb Inspector: ResourceContentView.js incorrectly contains call to WebInspector.UIStr...
jonowells@apple.com [Fri, 23 Jan 2015 00:44:45 +0000 (00:44 +0000)]
Web Inspector: ResourceContentView.js incorrectly contains call to WebInspector.UIString with a variable parameter
https://bugs.webkit.org/show_bug.cgi?id=140268

Reviewed by Timothy Hatcher.

UIString no longer incorrectly used around variables. Drive-by fixes to prototype inheritance style.
Use of Promises corrected such that requesting content for a resource resolves rather than rejects if
a resource can't be found or has another error that isn't a web inspector error.

* Localizations/en.lproj/localizedStrings.js: Updated.
* UserInterface/Models/Resource.js: Change reject to resolve.
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.requestContentFromBackend): Proper use of Error object.
* UserInterface/Models/SourceCode.js: Use correct inheritance style.
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype._contentAvailable): Handle error now that promise resolves.
(WebInspector.ResourceContentView.prototype._contentError): Remove incorrect use of UIString.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._contentAvailable): Handle error now that promise resolves.

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

5 years ago[iOS] Media controls disappear when loading a HLS live stream
jer.noble@apple.com [Fri, 23 Jan 2015 00:31:24 +0000 (00:31 +0000)]
[iOS] Media controls disappear when loading a HLS live stream
https://bugs.webkit.org/show_bug.cgi?id=140792
rdar://problem/19491658

Reviewed by Dean Jackson.

Overload reconnectControls to reconnect the "start playback" button
if the control type has been set to "StartPlaybackButton".

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.reconnectControls):

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

5 years ago[Win] No plugin content on some sites.
commit-queue@webkit.org [Fri, 23 Jan 2015 00:18:35 +0000 (00:18 +0000)]
[Win] No plugin content on some sites.
https://bugs.webkit.org/show_bug.cgi?id=140780

Patch by peavo@outlook.com <peavo@outlook.com> on 2015-01-22
Reviewed by Anders Carlsson.

Source/WebCore:

Return script instance from ScriptController::createScriptInstanceForWidget(),
instead of always returning null.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::createScriptInstanceForWidget):
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::bindingInstance):

Source/WebKit/win:

Add override modifier to bindingInstance method.

* Plugins/PluginView.h:

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

5 years ago[Mac][EME] Adopt changes to AVStreamSession class methods
jer.noble@apple.com [Fri, 23 Jan 2015 00:17:13 +0000 (00:17 +0000)]
[Mac][EME] Adopt changes to AVStreamSession class methods
https://bugs.webkit.org/show_bug.cgi?id=140778
rdar://problem/19458200

Reviewed by Eric Carlson.

AVStreamSession class methods have added a "storageDirectoryAtURL:" parameter so as to be able to
read and modify records stored at non-default storage locations.

* Modules/encryptedmedia/MediaKeySession.cpp:
(WebCore::MediaKeySession::mediaKeysStorageDirectory): Implement client method by querying document and settings.
* Modules/encryptedmedia/MediaKeySession.h:
* platform/graphics/CDMSession.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Check whether the AVStreamSession class responds to new selector before calling.
(WebCore::CDMSessionMediaSourceAVFObjC::update): Ditto.
(WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage): Ditto.
(WebCore::CDMSessionMediaSourceAVFObjC::storagePath): Fetch the storage path from the client.

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

5 years agoREGRESSION (174847): can't view NHK(Japan's national public broadcasting organization...
msaboff@apple.com [Fri, 23 Jan 2015 00:15:51 +0000 (00:15 +0000)]
REGRESSION (174847): can't view NHK(Japan's national public broadcasting organization)’s news pages
https://bugs.webkit.org/show_bug.cgi?id=140794

Reviewed by Anders Carlsson.

Source/WebCore:

If a document.open has been set, return it instead of always returning a new,
non-cached instance of jsHTMLDocumentPrototypeFunctionOpen.

Test: js/dom/document-overwrite-open.html

* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::getOwnPropertySlot):

LayoutTests:

* js/dom/document-overwrite-open-expected.txt: Added.
* js/dom/document-overwrite-open.html: Added.

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

5 years ago[Win] Expose missing editing features through WebView interface
bfulgham@apple.com [Thu, 22 Jan 2015 23:46:41 +0000 (23:46 +0000)]
[Win] Expose missing editing features through WebView interface
https://bugs.webkit.org/show_bug.cgi?id=140773
<rdar://problem/19565421>

Reviewed by Dean Jackson.

Connect the various WebView editing delegate methods to our
test infrastructure. Also prefer _bstr_t to raw BSTR types
to simplify life cycle management.

Source/WebKit/win:

* DOMCoreClasses.cpp: Flesh out the DOMRange object.
(DOMElement::createInstance):
(DOMRange::QueryInterface):
(DOMRange::DOMRange):
(DOMRange::~DOMRange):
(DOMRange::createInstance):
(DOMRange::startContainer):
(DOMRange::startOffset):
(DOMRange::endContainer):
(DOMRange::endOffset):
(DOMRange::collapsed):
(DOMRange::commonAncestorContainer):
(DOMRange::setStart):
(DOMRange::setEnd):
(DOMRange::setStartBefore):
(DOMRange::setStartAfter):
(DOMRange::setEndBefore):
(DOMRange::setEndAfter):
(DOMRange::collapse):
(DOMRange::selectNode):
(DOMRange::selectNodeContents):
(DOMRange::compareBoundaryPoints):
(DOMRange::deleteContents):
(DOMRange::extractContents):
(DOMRange::cloneContents):
(DOMRange::insertNode):
(DOMRange::surroundContents):
(DOMRange::cloneRange):
(DOMRange::toString):
(DOMRange::detach):
* DOMCoreClasses.h:
(DOMRange::AddRef):
(DOMRange::Release):
(DOMRange::throwException):
(DOMRange::callWebScriptMethod):
(DOMRange::evaluateWebScript):
(DOMRange::removeWebScriptKey):
(DOMRange::stringRepresentation):
(DOMRange::webScriptValueAtIndex):
(DOMRange::setWebScriptValueAtIndex):
(DOMRange::setException):
* Interfaces/IWebEditingDelegate.idl:
* Interfaces/IWebView.idl:
* WebCoreSupport/WebEditorClient.cpp: Connect more methods
to actual editing features in WebCore.
(WebEditorClient::shouldBeginEditing):
(WebEditorClient::shouldEndEditing):
(WebEditorClient::didBeginEditing):
(WebEditorClient::respondToChangedContents):
(WebEditorClient::respondToChangedSelection):
(WebEditorClient::didEndEditing):
(WebEditorClient::shouldDeleteRange):
(WebEditorClient::shouldInsertNode):
(WebEditorClient::shouldInsertText):
(WebEditorClient::shouldChangeSelectedRange):
(WebEditorClient::webViewDidChangeTypingStyle):
(WebEditorClient::webViewDidChangeSelection):
(WebEditorClient::isSelectTrailingWhitespaceEnabled):
* WebView.cpp:
(WebView::setEditingDelegate): Added.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebViewToConsistentStateBeforeTesting):
* DumpRenderTree/win/EditingDelegate.cpp:
(EditingDelegate::QueryInterface):
(dumpPath):
(dump):
(EditingDelegate::shouldBeginEditingInDOMRange):
(EditingDelegate::shouldEndEditingInDOMRange):
(EditingDelegate::shouldInsertNode):
(EditingDelegate::shouldInsertText):
(EditingDelegate::shouldDeleteDOMRange):
(EditingDelegate::shouldChangeSelectedDOMRange):
(EditingDelegate::shouldApplyStyle):
(EditingDelegate::shouldChangeTypingStyle):
(EditingDelegate::doPlatformCommand):
(EditingDelegate::webViewDidBeginEditing):
(EditingDelegate::webViewDidChange):
(EditingDelegate::webViewDidEndEditing):
(EditingDelegate::webViewDidChangeTypingStyle):
(EditingDelegate::webViewDidChangeSelection):
(EditingDelegate::checkSpellingOfString):
(EditingDelegate::onNotify):
* DumpRenderTree/win/EditingDelegate.h:

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

5 years agoSimple line layout: Reset LineState when starting a new line.
zalan@apple.com [Thu, 22 Jan 2015 23:42:46 +0000 (23:42 +0000)]
Simple line layout: Reset LineState when starting a new line.
https://bugs.webkit.org/show_bug.cgi?id=140789

Reviewed by Antti Koivisto.

Reset LineState when starting a new line to ensure we always
start with a clean state.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::updateLineConstrains):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::createTextRuns):

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

5 years ago[WebGL2] Create empty interface files for new WebGL2 objects.
roger_fong@apple.com [Thu, 22 Jan 2015 23:35:15 +0000 (23:35 +0000)]
[WebGL2] Create empty interface files for new WebGL2 objects.
https://bugs.webkit.org/show_bug.cgi?id=140779.
<rdar://problem/15002288>

Reviewed by Dean Jackson.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/canvas/WebGLQuery.cpp: Added.
(WebCore::WebGLQuery::create):
(WebCore::WebGLQuery::~WebGLQuery):
(WebCore::WebGLQuery::WebGLQuery):
(WebCore::WebGLQuery::deleteObjectImpl):
* html/canvas/WebGLQuery.h: Added.
* html/canvas/WebGLQuery.idl: Added.
* html/canvas/WebGLSampler.cpp: Added.
(WebCore::WebGLSampler::create):
(WebCore::WebGLSampler::~WebGLSampler):
(WebCore::WebGLSampler::WebGLSampler):
(WebCore::WebGLSampler::deleteObjectImpl):
* html/canvas/WebGLSampler.h: Added.
* html/canvas/WebGLSampler.idl: Added.
* html/canvas/WebGLSharedObject.h:
(WebCore::WebGLSharedObject::isQuery):
(WebCore::WebGLSharedObject::isSampler):
(WebCore::WebGLSharedObject::isSync):
(WebCore::WebGLSharedObject::isTransformFeedback):
(WebCore::WebGLSharedObject::isVertexArrayObject):
* html/canvas/WebGLSync.cpp: Added.
(WebCore::WebGLSync::create):
(WebCore::WebGLSync::~WebGLSync):
(WebCore::WebGLSync::WebGLSync):
(WebCore::WebGLSync::deleteObjectImpl):
* html/canvas/WebGLSync.h: Added.
* html/canvas/WebGLSync.idl: Added.
* html/canvas/WebGLTransformFeedback.cpp: Added.
(WebCore::WebGLTransformFeedback::create):
(WebCore::WebGLTransformFeedback::~WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::deleteObjectImpl):
* html/canvas/WebGLTransformFeedback.h: Added.
* html/canvas/WebGLTransformFeedback.idl: Added.
* html/canvas/WebGLVertexArrayObject.cpp: Added.
(WebCore::WebGLVertexArrayObject::create):
(WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject):
(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
(WebCore::WebGLVertexArrayObject::deleteObjectImpl):
* html/canvas/WebGLVertexArrayObject.h: Added.
* html/canvas/WebGLVertexArrayObject.idl: Added.
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

5 years ago[iOS] Fix build for external iphoneos SDK
ddkilzer@apple.com [Thu, 22 Jan 2015 23:34:34 +0000 (23:34 +0000)]
[iOS] Fix build for external iphoneos SDK

Reviewed by Daniel Bates.

* WebKitSystemInterface.h: Remove import of the
<IOSurface/IOSurface.h> header, and add a typedef for
IOSurfaceRef in its place.

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

5 years agoUserData decoding of WKTypeRefWrapper always fails
timothy_horton@apple.com [Thu, 22 Jan 2015 23:21:37 +0000 (23:21 +0000)]
UserData decoding of WKTypeRefWrapper always fails
https://bugs.webkit.org/show_bug.cgi?id=140791
<rdar://problem/19438402>

Reviewed by Anders Carlsson.

* Shared/mac/ObjCObjectGraph.mm:
(WebKit::ObjCObjectGraph::decode):
Add a missing break.

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

5 years agoSkip another copy of oes-vertex-array-object test, because it has the same problems
ap@apple.com [Thu, 22 Jan 2015 23:20:33 +0000 (23:20 +0000)]
Skip another copy of oes-vertex-array-object test, because it has the same problems
as the old one.

* platform/mac/TestExpectations:

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

5 years ago[Win] Unreviewed test gardening.
bfulgham@apple.com [Thu, 22 Jan 2015 23:16:30 +0000 (23:16 +0000)]
[Win] Unreviewed test gardening.

Clean up editing-related tests and rebaseline some output.

* platform/win/TestExpectations:
* platform/win/editing/input/reveal-caret-of-multiline-contenteditable-expected.txt:
* platform/win/editing/input/reveal-caret-of-multiline-input-expected.txt:
* platform/win/editing/inserting/4960120-1-expected.txt:
* platform/win/editing/inserting/break-blockquote-after-delete-expected.txt:
* platform/win/editing/inserting/insert-3907422-fix-expected.txt: Removed.
* platform/win/editing/pasteboard/4641033-expected.txt: Added.
* platform/win/editing/pasteboard/4944770-1-expected.txt: Added.
* platform/win/editing/pasteboard/4944770-2-expected.txt: Added.
* platform/win/editing/pasteboard/drop-text-without-selection-expected.txt: Added.
* platform/win/editing/selection/3690703-2-expected.txt:
* platform/win/editing/selection/3690703-expected.txt:
* platform/win/editing/selection/3690719-expected.txt:
* platform/win/editing/selection/4975120-expected.txt: Added.
* platform/win/editing/selection/5240265-expected.txt:
* platform/win/editing/selection/caret-before-select-expected.txt: Added.
* platform/win/editing/selection/caret-rtl-2-expected.txt: Added.
* platform/win/editing/selection/caret-rtl-2-left-expected.txt:
* platform/win/editing/selection/caret-rtl-expected.txt: Added.
* platform/win/editing/selection/caret-rtl-right-expected.txt:
* platform/win/editing/selection/drag-select-1-expected.txt: Added.
* platform/win/editing/selection/mixed-editability-10-expected.txt:
* platform/win/editing/selection/replaced-boundaries-3-expected.txt: Added.
* platform/win/editing/selection/select-box-expected.txt: Added.
* platform/win/editing/selection/select-element-paragraph-boundary-expected.txt: Added.
* platform/win/editing/selection/select-from-textfield-outwards-expected.txt:
* platform/win/editing/selection/selection-button-text-expected.txt:
* platform/win/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.txt:
* platform/win/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.txt:
* platform/win/editing/selection/vertical-rl-rtl-extend-line-backward-br-expected.txt:

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

5 years agoFix remaining multiple targets per rule issues in DerivedSources.make
cdumez@apple.com [Thu, 22 Jan 2015 23:13:36 +0000 (23:13 +0000)]
Fix remaining multiple targets per rule issues in DerivedSources.make
https://bugs.webkit.org/show_bug.cgi?id=140790

Reviewed by David Kilzer.

Fix remaining multiple target per rule issues in DerivedSources.make,
similarly to Bug 140784 and Bug 140756.

This was causing us to run scripts several times to generate the same
files and may lead to malformed files in case of concurrency.

* DerivedSources.make:

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

5 years agoAdd a build flag for ES6 class syntax
rniwa@webkit.org [Thu, 22 Jan 2015 23:12:26 +0000 (23:12 +0000)]
Add a build flag for ES6 class syntax
https://bugs.webkit.org/show_bug.cgi?id=140760

Reviewed by Michael Saboff.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

Added ES6_CLASS_SYNTAX build flag and used it in tokenizer to recognize
"class", "extends", "static" and "super" keywords.

* Configurations/FeatureDefines.xcconfig:
* parser/Keywords.table:
* parser/ParserTokens.h:

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:

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

5 years agoUnreviewed, skip flakey inspector test.
joepeck@webkit.org [Thu, 22 Jan 2015 23:09:53 +0000 (23:09 +0000)]
Unreviewed, skip flakey inspector test.

* TestExpectations:

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

5 years agoSVGNames.cpp and HTMLNames.cpp are sometimes malformed
cdumez@apple.com [Thu, 22 Jan 2015 22:23:55 +0000 (22:23 +0000)]
SVGNames.cpp and HTMLNames.cpp are sometimes malformed
https://bugs.webkit.org/show_bug.cgi?id=140784
<rdar://problem/17701233>

Reviewed by David Kilzer.

Due to bad rules in DerivedSources.make, make_names.pl was called
several times with the same arguments during build. This is because
SVG/HTML/MathML each had several targets associated to the same
command. This would cause the command (make_names.pl) to be called
once per target. However, make_names.pl only needs to be executed
once to generate all of the files currently marked as target.

Calling make_names.pl several times for the same files is not only
wasteful, but it can also lead to malformed generated files if the
scripts instances are executed in parallel as they will read / write
from / to the same files.

This patch uses INTERMEDIATE targets instead so that we can still
indicate which files are generated by make_names.pl but only run
the script once.

This is a similar fix as for Bug 140756. There may several other
similar issues in DerivedSources.make but this patch focuses on
make_names.pl. I will take care of other in follow-ups if needed.

* DerivedSources.make:

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

5 years agoHave Counter::create() return a Ref<Counter>
cdumez@apple.com [Thu, 22 Jan 2015 22:21:08 +0000 (22:21 +0000)]
Have Counter::create() return a Ref<Counter>
https://bugs.webkit.org/show_bug.cgi?id=140777

Reviewed by Andreas Kling.

Have Counter::create() return a Ref<Counter> instead of a PassRefPtr.

The CSSPrimitiveValue class needed some updates as well to support
constructing a CSSPrimitiveValue object from a Ref<>.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::init):
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::create):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/Counter.h:
(WebCore::Counter::create):
(WebCore::Counter::cloneForCSSOM):

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

5 years agoDrop the legacy FeatureCounter class
cdumez@apple.com [Thu, 22 Jan 2015 22:19:46 +0000 (22:19 +0000)]
Drop the legacy FeatureCounter class
https://bugs.webkit.org/show_bug.cgi?id=140749

Reviewed by Andreas Kling.

Drop the legacy FeatureCounter class and use DiagnosticLoggingClient
instead.

Source/WebCore:

* CMakeLists.txt:
* Configurations/WebCore.xcconfig:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequest):
(WebCore::SubresourceLoader::didReceiveResponse):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::logMemoryCacheResourceRequest):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey):
(WebCore::DiagnosticLoggingKeys::playedKey):
(WebCore::DiagnosticLoggingKeys::noCacheKey):
(WebCore::DiagnosticLoggingKeys::noStoreKey):
(WebCore::DiagnosticLoggingKeys::notInMemoryCacheKey):
(WebCore::DiagnosticLoggingKeys::mediaKey):
(WebCore::DiagnosticLoggingKeys::isExpiredKey):
(WebCore::DiagnosticLoggingKeys::loadingKey):
(WebCore::DiagnosticLoggingKeys::inMemoryCacheKey):
(WebCore::DiagnosticLoggingKeys::reasonKey):
(WebCore::DiagnosticLoggingKeys::audioKey):
(WebCore::DiagnosticLoggingKeys::cachedResourceRevalidationKey):
(WebCore::DiagnosticLoggingKeys::resourceRequestKey):
(WebCore::DiagnosticLoggingKeys::revalidatingKey):
(WebCore::DiagnosticLoggingKeys::unusedKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonErrorKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonNoStoreKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonRedirectChainKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonReloadKey):
(WebCore::DiagnosticLoggingKeys::unusedReasonTypeMismatchKey):
(WebCore::DiagnosticLoggingKeys::usedKey):
(WebCore::DiagnosticLoggingKeys::userKey):
(WebCore::DiagnosticLoggingKeys::videoKey):
(WebCore::DiagnosticLoggingKeys::webViewKey):
(WebCore::DiagnosticLoggingKeys::zoomedKey):
* page/DiagnosticLoggingKeys.h:
* page/Settings.in:
* platform/FeatureCounter.cpp: Removed.
* platform/FeatureCounter.h: Removed.
* platform/FeatureCounterKeys.h: Removed.
* platform/ios/FeatureCounter.mm: Removed.

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _featureCounterEnabled]):
(-[WKWebViewConfiguration _setFeatureCounterEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::willStartUserTriggeredZooming):

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

5 years agoWhen extending the fallback transitions with their closure, we are modifying the...
benjamin@webkit.org [Thu, 22 Jan 2015 22:17:32 +0000 (22:17 +0000)]
When extending the fallback transitions with their closure, we are modifying the Set while iterating it
https://bugs.webkit.org/show_bug.cgi?id=140785

Reviewed by Andreas Kling.

* contentextensions/NFAToDFA.cpp:
(WebCore::ContentExtensions::populateTransitions):
Make that in two steps: accumulate the fallback transitions then add the closure
of every element.

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=140755
ap@apple.com [Thu, 22 Jan 2015 22:13:19 +0000 (22:13 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=140755
rdar://problem/7881290

* http/tests/appcache/404-resource-with-slow-main-resource.php: Try updating the
tiemout, as it's not sufficient for appcache load to fail on some bots.

* http/tests/appcache/404-resource-with-slow-main-resource.php:

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

5 years agoRename SimpleFontData to Font
antti@apple.com [Thu, 22 Jan 2015 21:57:04 +0000 (21:57 +0000)]
Rename SimpleFontData to Font
https://bugs.webkit.org/show_bug.cgi?id=140496

Reviewed by Zalan Bujtas.

The fallback supporting Font type was renamed FontCascade.
We can now rename SimpleFontData to Font matching the usual definition.

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

5 years agoSimple line layout: Make trailing whitespace handling more explicit.
zalan@apple.com [Thu, 22 Jan 2015 21:54:53 +0000 (21:54 +0000)]
Simple line layout: Make trailing whitespace handling more explicit.
https://bugs.webkit.org/show_bug.cgi?id=140776

Reviewed by Antti Koivisto.

Differentiate between committed and uncommitted trailing whitespace.
This enables further cleanup in removeTrailingWhitespace().

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::hasWhitespaceOnly):
(WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::LineState): Deleted.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace): Deleted.
(WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace): Deleted.

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

5 years agoibtoold crash below -[WebView close]
bdakin@apple.com [Thu, 22 Jan 2015 21:40:02 +0000 (21:40 +0000)]
ibtoold crash below -[WebView close]
https://bugs.webkit.org/show_bug.cgi?id=140782
-and corresponding-
rdar://problem/19558472

Reviewed by Tim Horton.

Retain the NSImmediateActionGestureRecognizer. This should not be necessary, but
Source/WebKit/mac:

it is because interface builder is messing with our views.
* WebView/WebImmediateActionController.h:
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController webViewClosed]):
(-[WebImmediateActionController _cancelImmediateAction]):
(-[WebImmediateActionController immediateActionRecognizerWillPrepare:]):
(-[WebImmediateActionController _updateImmediateActionItem]):

Source/WebKit2:

it is because interface builder can mess with our views.
* UIProcess/mac/WKImmediateActionController.h:
* UIProcess/mac/WKImmediateActionController.mm:
(-[WKImmediateActionController willDestroyView:]):
(-[WKImmediateActionController _cancelImmediateAction]):
(-[WKImmediateActionController _cancelImmediateActionIfNeeded]):
(-[WKImmediateActionController _updateImmediateActionItem]):

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

5 years agoCrash in URL::protocol() after appcache load fails
ap@apple.com [Thu, 22 Jan 2015 21:04:39 +0000 (21:04 +0000)]
Crash in URL::protocol() after appcache load fails
https://bugs.webkit.org/show_bug.cgi?id=140755
rdar://problem/7881290

Reviewed by Dan Bates.

Source/WebCore:

Test: http/tests/appcache/404-resource-with-slow-main-resource.php

Not every cache that isn't being updated is complete. It could also be in a zombie
state after failing to load. We get rid of the cache once the main resource finishes
loading, but while it's being loaded, the zombie still looks like a regular
candidate application cache.

* loader/appcache/ApplicationCache.cpp: (WebCore::ApplicationCache::isComplete):
* loader/appcache/ApplicationCache.h:
Removed const from isComplete(), because otherwise we couldn't use ApplicationCacheGroup::m_caches.contains().
Constness doesn't make a lot of sense for these objects anyway.

* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::failedLoadingMainResource): Toned down an assertion.
We can fail a main resource load when the document has a zombie appcache, too.

* loader/appcache/ApplicationCacheGroup.h:
(WebCore::ApplicationCacheGroup::cacheIsComplete):
(WebCore::ApplicationCacheGroup::cacheIsBeingUpdated): Deleted.
These functions are only used in ApplicationCache::isComplete().

LayoutTests:

* http/tests/appcache/404-resource-with-slow-main-resource-expected.txt: Added.
* http/tests/appcache/404-resource-with-slow-main-resource.php: Added.

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

5 years agoAvoid defining always empty Vector<TextCheckingResult>
g.czajkowski@samsung.com [Thu, 22 Jan 2015 20:01:24 +0000 (20:01 +0000)]
Avoid defining always empty Vector<TextCheckingResult>
https://bugs.webkit.org/show_bug.cgi?id=140765

Reviewed by Alexey Proskuryakov.

Pass an empty vector direclty instead.

No new tests. No behavior change.

* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheckCancel):

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

5 years agomakeprop.pl script is called too many times during build
cdumez@apple.com [Thu, 22 Jan 2015 19:38:43 +0000 (19:38 +0000)]
makeprop.pl script is called too many times during build
https://bugs.webkit.org/show_bug.cgi?id=140756
<rdar://problem/19467942>

Reviewed by David Kilzer.

The makeprop.pl script was called 4 times (instead of once) during
build due to a bad Makefile rule in DerivedSources.make. makeprop.pl
had 4 associated targets and thus was called 4 times (with the same
parameter). Calling it once is sufficient to generate all 4 files
that were marked as target. This patch uses an INTERMEDIATE target
instead so that we can indicate that several files are generated
by the same command.

I believe this may be the reason for the sporatic build failures
that look like:
"""
CSSPropertyNames.gperf: No keywords in input file!
calling gperf failed: 256 at WebCore/css/makeprop.pl line 1036.
"""
The makeprop.pl script is generating gperf's input file and calling the
gperf executable on this file. If the script is executed several times
in parallel, it would explain the build failures as several instances
of makeprop.pl may be writing / reading from the same
CSSPropertyNames.gperf file.

* DerivedSources.make:

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

5 years agoUnreviewed, rolling out r178894.
commit-queue@webkit.org [Thu, 22 Jan 2015 19:34:34 +0000 (19:34 +0000)]
Unreviewed, rolling out r178894.
https://bugs.webkit.org/show_bug.cgi?id=140775

Broke JSC and bindings tests (Requested by ap_ on #webkit).

Reverted changeset:

"put_by_val_direct need to check the property is index or not
for using putDirect / putDirectIndex"
https://bugs.webkit.org/show_bug.cgi?id=140426
http://trac.webkit.org/changeset/178894

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

5 years ago[iOS] Fix iphoneos SDK builds for ios-ews queue
ddkilzer@apple.com [Thu, 22 Jan 2015 19:27:25 +0000 (19:27 +0000)]
[iOS] Fix iphoneos SDK builds for ios-ews queue
<http://webkit.org/b/140748>

Reviewed by Daniel Bates.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add new SPI headers.
* platform/graphics/cg/ImageBufferCG.cpp: Switch to using
"IOSurfaceSPI.h" from <IOSurface/IOSurface.h>.
* platform/graphics/cg/ImageBufferDataCG.cpp: Ditto.
* platform/graphics/cocoa/IOSurface.mm: Ditto.  Move definitions
in <IOSurface/IOSurfacePrivate.h> into "IOSurfaceSPI.h".
* platform/spi/cg/CoreGraphicsSPI.h: Switch to
WTF_EXTERN_C_{BEGIN,END}.  Add
CGContextGetFontAntialiasingStyle() and
CGContextSetFontAntialiasingStyle().
* platform/spi/cocoa/IOPMLibSPI.h: Switch to use IOReturnSPI.h.
* platform/spi/cocoa/IOReturnSPI.h: Add.
* platform/spi/cocoa/IOSurfaceSPI.h: Add.
* platform/spi/cocoa/IOTypesSPI.h: Add.

Source/WebKit2:

* Platform/spi/ios/BKSProcessAssertionSPI.h: Add -invalidate
definition.  Sort @property to the top of BKSProcessAssertion.

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

5 years agoBytecodeGenerator::initializeCapturedVariable() sets a misleading value for the 5th...
mark.lam@apple.com [Thu, 22 Jan 2015 19:05:42 +0000 (19:05 +0000)]
BytecodeGenerator::initializeCapturedVariable() sets a misleading value for the 5th operand of op_put_to_scope.
<https://webkit.org/b/140743>

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

BytecodeGenerator::initializeCapturedVariable() was setting the 5th operand to
op_put_to_scope to an inappropriate value (i.e. 0).  As a result, the execution
of put_to_scope could store a wrong inferred value into the VariableWatchpointSet
for which ever captured variable is at local index 0.  In practice, this turns
out to be the local for the Arguments object.  In this reproduction case in the
bug, the wrong inferred value written there is the boolean true.

Subsequently, DFG compilation occurs and CreateArguments is emitted to first do
a check of the local for the Arguments object.  But because that local has a
wrong inferred value, the check always discovers a non-null value and we never
actually create the Arguments object.  Immediately after this, an OSR exit
occurs leaving the Arguments object local uninitialized.  Later on at arguments
tear off, we run into a boolean true where we had expected to find an Arguments
object, which in turn, leads to the crash.

The fix is to:
1. In the case where the resolveModeType is LocalClosureVar, change the
   5th operand of op_put_to_scope to be a boolean.  True means that the
   local var is watchable.  False means it is not watchable.  We no longer
   pass the local index (instead of true) and UINT_MAX (instead of false).

   This allows us to express more clearer in the code what that value means,
   as well as remove the redundant way of getting the local's identifier.
   The identifier is always the one passed in the 2nd operand.

2. Previously, though intuitively, we know that the watchable variable
   identifier should be the same as the one that is passed in operand 2, this
   relationship was not clear in the code.  By code analysis, I confirmed that
   the callers of BytecodeGenerator::emitPutToScope() always use the same
   identifier for operand 2 and for filling out the ResolveScopeInfo from
   which we get the watchable variable identifier later.  I've changed the
   code to make this clear now by always using the identifier passed in
   operand 2.

3. In the case where the resolveModeType is LocalClosureVar,
   initializeCapturedVariable() and emitPutToScope() will now query
   hasWatchableVariable() to determine if the local is watchable or not.
   Accordingly, we pass the boolean result of hasWatchableVariable() as
   operand 5 of op_put_to_scope.

Also added some assertions.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeCapturedVariable):
(JSC::BytecodeGenerator::hasConstant):
(JSC::BytecodeGenerator::emitPutToScope):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::hasWatchableVariable):
(JSC::BytecodeGenerator::watchableVariableIdentifier):
(JSC::BytecodeGenerator::watchableVariable): Deleted.

LayoutTests:

* js/dfg-osr-exit-between-create-and-tearoff-arguments-expected.txt: Added.
* js/dfg-osr-exit-between-create-and-tearoff-arguments.html: Added.
* js/script-tests/dfg-osr-exit-between-create-and-tearoff-arguments.js: Added.
(foo):

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

5 years ago[iOS] run-webkit-tests --ios-sim dies with an error; fails to parse Apple Internal
dbates@webkit.org [Thu, 22 Jan 2015 18:51:56 +0000 (18:51 +0000)]
[iOS] run-webkit-tests --ios-sim dies with an error; fails to parse Apple Internal
runtime in simctl output
https://bugs.webkit.org/show_bug.cgi?id=140751

Reviewed by David Kilzer.

Following the fix for <rdar://problem/19444383>, run-webkit-tests --ios-sim dies
with an error because it does not know how to parse the output of the simctl tool
to identify an Apple Internal runtime.

* Scripts/webkitpy/xcode/simulator.py:
(Runtime.__init__): Add parameter is_internal_runtime (defaults to False).
(Runtime.__eq__): Take is_internal_runtime when comparing two Runtime objects for equality.
(Runtime.__repr__): Update printable representation of Runtime object to indicate whether
the runtime is an internal runtime.
(Simulator): Update regular expressions runtime_re and version_re to match an internal runtime.
(Simulator._parse_runtimes): Pass is_internal_runtime to the Runtime constructor with the
appropriate value.
(Simulator._parse_devices): Pass argument is_internal_runtime to Simulator.runtime() so that
it updates the appropriate Runtime object.
(Simulator.runtime): Added optional parameter, is_internal_runtime. Modified to support
looking up a Runtime object for an internal runtime.

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

5 years ago[Win] More unskips and rebaselines.
bfulgham@apple.com [Thu, 22 Jan 2015 18:25:18 +0000 (18:25 +0000)]
[Win] More unskips and rebaselines.

* platform/win/TestExpectations:
* platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
* platform/win/fast/repaint/repaint-across-writing-mode-boundary-expected.txt:
* platform/win/inspector-protocol: Added.
* platform/win/inspector-protocol/debugger: Added.
* platform/win/inspector-protocol/debugger/breakpoint-eval-with-exception-expected.txt: Added.
* platform/win/inspector-protocol/debugger/setBreakpoint-actions-expected.txt: Added.
* platform/win/inspector-protocol/debugger/setBreakpoint-dfg-callee-and-examine-dfg-local-expected.txt: Added.
* platform/win/svg/text/kerning-expected.txt:
* platform/win/svg/text/multichar-glyph-expected.txt:
* platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.png:
* platform/win/svg/transforms/text-with-mask-with-svg-transform-expected.txt:

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

5 years agoPropertyListNode::emitNode duplicates the code to put a constant property
rniwa@webkit.org [Thu, 22 Jan 2015 18:07:16 +0000 (18:07 +0000)]
PropertyListNode::emitNode duplicates the code to put a constant property
https://bugs.webkit.org/show_bug.cgi?id=140761

Reviewed by Geoffrey Garen.

Extracted PropertyListNode::emitPutConstantProperty to share the code.

Also made PropertyListNode::emitBytecode private since nobody is calling this function directly.

* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode):
(JSC::PropertyListNode::emitPutConstantProperty): Added.
* parser/Nodes.h:

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

5 years agoLeaksViewer doesn't show recent builds if there are less than 10
ap@apple.com [Thu, 22 Jan 2015 17:59:08 +0000 (17:59 +0000)]
LeaksViewer doesn't show recent builds if there are less than 10
https://bugs.webkit.org/show_bug.cgi?id=140716

Reviewed by Tim Horton.

* BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:

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

5 years ago[Win] Unreviewed gardening.
bfulgham@apple.com [Thu, 22 Jan 2015 17:21:59 +0000 (17:21 +0000)]
[Win] Unreviewed gardening.

Activate ENABLE(MOUSE_CURSOR_SCALE). This works on Windows and causes more tests to pass.

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

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

5 years agoFix up slave distribution for Apple bots.
lforschler@apple.com [Thu, 22 Jan 2015 13:46:36 +0000 (13:46 +0000)]
Fix up slave distribution for Apple bots.

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

5 years agoFix json.
lforschler@apple.com [Thu, 22 Jan 2015 13:14:19 +0000 (13:14 +0000)]
Fix json.

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

5 years agoAdd Apple build slaves.
lforschler@apple.com [Thu, 22 Jan 2015 13:12:23 +0000 (13:12 +0000)]
Add Apple build slaves.
Fixed text alignment for slave list.

Unreviewed.

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

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

5 years agoAX: [ATK] Mark accessibility/list-detection.html as a suitable test for EFL and GTK.
commit-queue@webkit.org [Thu, 22 Jan 2015 12:22:03 +0000 (12:22 +0000)]
AX: [ATK] Mark accessibility/list-detection.html as a suitable test for EFL and GTK.
https://bugs.webkit.org/show_bug.cgi?id=140721

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2015-01-22
Reviewed by Chris Fleizach.

The test checks the heuristic to determine if a 'list' is really a list.
In the area of ATK a role for description list has been separated from the role AXList.
This made the test stopped giving positive results for ports EFL and GTK.
The proposed amendment restores test for these ports.

* accessibility/list-detection.html:
* platform/efl/TestExpectations:
* platform/efl/accessibility/list-detection-expected.txt: Added.
* platform/gtk/TestExpectations:
* platform/gtk/accessibility/list-detection-expected.txt: Added.

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

5 years agoWeb Inspector: Expected gutter highlight when selecting console input line, just...
commit-queue@webkit.org [Thu, 22 Jan 2015 10:23:35 +0000 (10:23 +0000)]
Web Inspector: Expected gutter highlight when selecting console input line, just like output line
https://bugs.webkit.org/show_bug.cgi?id=140696

Patch by Nikita Vasilyev <nvasilyev@apple.com> on 2015-01-22
Reviewed by Timothy Hatcher.

* UserInterface/Views/LogContentView.css:

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

5 years agoFix build warning in WebKit2/UIProcess module
ossy@webkit.org [Thu, 22 Jan 2015 10:21:44 +0000 (10:21 +0000)]
Fix build warning in WebKit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=140758

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2015-01-22
Reviewed by Csaba Osztrogonác.

Fix build warnings by using UNUSED_PARAM macro

* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):

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

5 years ago[CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
svillar@igalia.com [Thu, 22 Jan 2015 08:56:13 +0000 (08:56 +0000)]
[CSS Grid Layout] Skip items spanning flex tracks when sizing content based tracks
https://bugs.webkit.org/show_bug.cgi?id=140720

Reviewed by David Hyatt.

Source/WebCore:

Section "11.5. Resolve Intrinsic Track Sizes" of the specs forces
us to ignore items spanning tracks with flex sizing functions when
resolving the content-based track sizing functions. Items with
span < 2 are not affected by this rule (as they will belong to a
single track). This way the algorithm ensures that min-content and
max-content restrictions are fulfilled before distributing the
extra space.

Test: fast/css-grid-layout/flex-and-content-sized-resolution-columns.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
(WebCore::integerSpanForDirection):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt: Added.
* fast/css-grid-layout/flex-and-content-sized-resolution-columns.html: Added.

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

5 years agoput_by_val_direct need to check the property is index or not for using putDirect...
utatane.tea@gmail.com [Thu, 22 Jan 2015 08:54:52 +0000 (08:54 +0000)]
put_by_val_direct need to check the property is index or not for using putDirect / putDirectIndex
https://bugs.webkit.org/show_bug.cgi?id=140426

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

In the put_by_val_direct operation, we use JSObject::putDirect.
However, it only accepts non-index property. For index property, we need to use JSObject::putDirectIndex.
This patch changes Identifier::asIndex() to return Optional<uint32_t>.
It forces callers to check the value is index or not explicitly.
Additionally, it checks toString-ed Identifier is index or not to choose putDirect / putDirectIndex.

* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDirectPutById):
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* jit/JITOperations.cpp:
* jit/Repatch.cpp:
(JSC::emitPutTransitionStubAndGetOldStructure):
* jsc.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::put):
(JSC::Arguments::deleteProperty):
(JSC::Arguments::defineOwnProperty):
* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSort):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):
(JSC::JSGenericTypedArrayView<Adaptor>::put):
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):
(JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::putDirectAccessor):
(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::putDirectMayBeIndex):
(JSC::JSObject::defineOwnProperty):
* runtime/JSObject.h:
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::putDirectInternal):
* runtime/JSString.cpp:
(JSC::JSString::getStringPropertyDescriptor):
* runtime/JSString.h:
(JSC::JSString::getStringPropertySlot):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::parse):
* runtime/PropertyName.h:
(JSC::toUInt32FromCharacters):
(JSC::toUInt32FromStringImpl):
(JSC::PropertyName::asIndex):
* runtime/PropertyNameArray.cpp:
(JSC::PropertyNameArray::add):
* runtime/StringObject.cpp:
(JSC::StringObject::deleteProperty):
* runtime/Structure.cpp:
(JSC::Structure::prototypeChainMayInterceptStoreTo):

Source/WebCore:

Test: js/dfg-put-by-val-direct-with-edge-numbers.html

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::getOwnPropertySlot):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::callHTMLAllCollection):
(WebCore::JSHTMLAllCollection::item):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateGetOwnPropertySlotBody):
(GenerateImplementation):
* bindings/scripts/test/JS/JSFloat64Array.cpp:
(WebCore::JSFloat64Array::getOwnPropertySlot):
(WebCore::JSFloat64Array::getOwnPropertyDescriptor):
(WebCore::JSFloat64Array::put):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTarget::getOwnPropertySlot):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::put):

LayoutTests:

* js/dfg-put-by-val-direct-with-edge-numbers-expected.txt: Added.
* js/dfg-put-by-val-direct-with-edge-numbers.html: Added.
* js/script-tests/dfg-put-by-val-direct-with-edge-numbers.js: Added.
(lookupWithKey):
(dfgShouldThrow):
(lookupWithKey2):
(toStringThrowsError.toString):

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

5 years ago[CSS Grid Layout] Size tracks using a list of all items sorted by span
svillar@igalia.com [Thu, 22 Jan 2015 08:36:07 +0000 (08:36 +0000)]
[CSS Grid Layout] Size tracks using a list of all items sorted by span
https://bugs.webkit.org/show_bug.cgi?id=140615

Reviewed by Andreas Kling.

Source/WebCore:

In r173620 we fixed
RenderGrid::resolveContentBasedTrackSizingFunctions() so that it
now collects all items spanning content-sized tracks and process
them one by one after sorting them by ascending span.

The problem is that it was incorrectly implemented, it has two
important bugs. First one is that the hash table that collects
items is regenerated after processing each track, so it's actually
doing nothing. Secondly we're only sorting the items on each
track, instead of all the items in the grid.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):

LayoutTests:

* fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt:
Added tons of new test cases.
* fast/css-grid-layout/grid-content-sized-columns-resolution.html: Ditto.
* fast/css-grid-layout/grid-preferred-logical-widths.html:
Adjusted results.

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

5 years ago[GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
carlosgc@webkit.org [Thu, 22 Jan 2015 08:30:39 +0000 (08:30 +0000)]
[GTK] Use API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
https://bugs.webkit.org/show_bug.cgi?id=138467

Reviewed by Gustavo Noronha Silva.

* UIProcess/API/gtk/WebKitContextMenu.cpp:
(webkitContextMenuPopulate): Add a version that receives a Vector<WebContextMenuItemData>&.
(webkitContextMenuCreate): Change it to receive a const
Vector<WebContextMenuItemData>& instead of a API::Array* and also
add a another version that receives const Vector<ContextMenuItem>&.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
(attachContextMenuClientToView): Use a class derived from
API::ContextMenuClient to implement the context menu client.
(getContextMenuFromProposedMenu): Deleted.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate): Change it to receive a const
WebContextMenuItemData& and added another version that receives a
const ContextMenuItem&.
* UIProcess/API/gtk/WebKitContextMenuItemPrivate.h:
* UIProcess/API/gtk/WebKitContextMenuPrivate.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewPopulateContextMenu): Remove the creation of a
WebHitTestResult::Data, since it receives it now as parameter.
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp:
(webkitWebHitTestResultCreate): Change it to receive a const
HitTestResult& instead of const InjectedBundleHitTestResult&.
* WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate): Use a class derived from
API::InjectedBundle::PageContextMenuClient to implement the
context menu client.
(getContextMenuFromDefaultMenu): Deleted.

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

5 years agoUnreviewed. Try to fix Debug build after r178889.
carlosgc@webkit.org [Thu, 22 Jan 2015 08:05:45 +0000 (08:05 +0000)]
Unreviewed. Try to fix Debug build after r178889.

* UIProcess/API/C/WKPage.cpp: Include Logging.h.

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

5 years agoAdd API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
carlosgc@webkit.org [Thu, 22 Jan 2015 07:53:01 +0000 (07:53 +0000)]
Add API::ContextMenuClient and API::InjectedBundle::PageContextMenuClient classes
https://bugs.webkit.org/show_bug.cgi?id=138466

Reviewed by Anders Carlsson.

Move ContextMenuClient to use API classes in both UI and Injected
Bundle APIs.

* CMakeLists.txt: Remove WebPageContextMenuClient.cpp.
* UIProcess/API/APIContextMenuClient.h: Renamed from Source/WebKit2/UIProcess/WebPageContextMenuClient.h.
(API::ContextMenuClient::~ContextMenuClient):
(API::ContextMenuClient::getContextMenuFromProposedMenu):
(API::ContextMenuClient::customContextMenuItemSelected):
(API::ContextMenuClient::contextMenuDismissed):
(API::ContextMenuClient::showContextMenu):
(API::ContextMenuClient::hideContextMenu):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageContextMenuClient):
* UIProcess/WebPageContextMenuClient.cpp: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setContextMenuClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::contextMenuItemSelected):
(WebKit::WebPageProxy::initializeContextMenuClient): Deleted.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj: Remove deleted files and add
new files to compilation.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageContextMenuClient.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h.
(API::InjectedBundle::PageContextMenuClient::~PageContextMenuClient):
(API::InjectedBundle::PageContextMenuClient::getCustomMenuFromDefaultItems):
(API::InjectedBundle::PageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetContextMenuClient):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
(WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
(WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
(WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
* WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::menuItemsWithUserData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setInjectedBundleContextMenuClient):
(WebKit::WebPage::close):
(WebKit::WebPage::initializeInjectedBundleContextMenuClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleContextMenuClient):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):

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

5 years agoConsolidate out arguments of parseFunctionInfo into a struct
rniwa@webkit.org [Thu, 22 Jan 2015 06:39:31 +0000 (06:39 +0000)]
Consolidate out arguments of parseFunctionInfo into a struct
https://bugs.webkit.org/show_bug.cgi?id=140754

Reviewed by Oliver Hunt.

Introduced ParserFunctionInfo for storing out arguments of parseFunctionInfo.

* JavaScriptCore.xcodeproj/project.pbxproj:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createFunctionExpr):
(JSC::ASTBuilder::createGetterOrSetterProperty): This one takes a property name in addition to
ParserFunctionInfo since the property name and the function name could differ.
(JSC::ASTBuilder::createFuncDeclStatement):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/Parser.h:
* parser/ParserFunctionInfo.h: Added.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createFunctionExpr):
(JSC::SyntaxChecker::createFuncDeclStatement):
(JSC::SyntaxChecker::createClassDeclStatement):
(JSC::SyntaxChecker::createGetterOrSetterProperty):

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

5 years ago[Win] Rebaseline SVG results from test machine.
bfulgham@apple.com [Thu, 22 Jan 2015 06:01:16 +0000 (06:01 +0000)]
[Win] Rebaseline SVG results from test machine.

* platform/win/css2.1/20110323/c543-txt-decor-000-expected.png: Added.
* platform/win/css2.1/20110323/c543-txt-decor-000-expected.txt: Added.
* platform/win/css2.1/20110323/replaced-elements-001-expected.png: Added.
* platform/win/css2.1/20110323/replaced-elements-001-expected.txt: Added.
* platform/win/svg/W3C-SVG-1.1-SE/styling-css-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1/filters-light-04-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-05-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-elem-06-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/fonts-kern-01-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/masking-mask-01-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-06-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-07-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-elems-08-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-groups-01-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/render-groups-03-t-expected.txt:
* platform/win/svg/W3C-SVG-1.1/text-align-08-b-expected.txt:
* platform/win/svg/W3C-SVG-1.1/text-tselect-02-f-expected.txt:

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

5 years ago[Win] Update expectations file for failures on test machine.
bfulgham@apple.com [Thu, 22 Jan 2015 05:31:05 +0000 (05:31 +0000)]
[Win] Update expectations file for failures on test machine.

* platform/win/TestExpectations:

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

5 years ago[Win] Add more tests and baselines.
bfulgham@apple.com [Thu, 22 Jan 2015 04:57:33 +0000 (04:57 +0000)]
[Win] Add more tests and baselines.

Stop skipping a number of tests that are fully functional. Add some
Windows baselines.

* platform/win/TestExpectations:
* platform/win/printing/setPrinting-expected.txt: Added.
* platform/win/printing/width-overflow-expected.txt: Added.

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

5 years agoChange Heap::m_compiledCode to use a Vector
mhahnenb@gmail.com [Thu, 22 Jan 2015 02:56:26 +0000 (02:56 +0000)]
Change Heap::m_compiledCode to use a Vector
https://bugs.webkit.org/show_bug.cgi?id=140717

Reviewed by Andreas Kling.

Right now it's a DoublyLinkedList, which is iterated during each
collection. This contributes to some of the longish Eden pause times.
A Vector would be more appropriate and would also allow ExecutableBase
to be 2 pointers smaller.

* heap/Heap.cpp:
(JSC::Heap::deleteAllCompiledCode):
(JSC::Heap::deleteAllUnlinkedFunctionCode):
(JSC::Heap::clearUnmarkedExecutables):
* heap/Heap.h:
* runtime/Executable.h: No longer need to inherit from DoublyLinkedListNode.

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

5 years ago[Win] More gardening.
bfulgham@apple.com [Thu, 22 Jan 2015 02:08:00 +0000 (02:08 +0000)]
[Win] More gardening.

Unskip the flexbox tests. These have been functional in Windows for YEARS!

* platform/win/TestExpectations:

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

5 years agoBytecodeGenerator shouldn't expose all of its member variables
rniwa@webkit.org [Thu, 22 Jan 2015 02:06:33 +0000 (02:06 +0000)]
BytecodeGenerator shouldn't expose all of its member variables
https://bugs.webkit.org/show_bug.cgi?id=140752

Reviewed by Mark Lam.

Added "private:" and removed unused data members as detected by clang.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::lastOpcodeID): Added. Used in BinaryOpNode::emitBytecode.
* bytecompiler/NodesCodegen.cpp:
(JSC::BinaryOpNode::emitBytecode):

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

5 years agoTeach build.webkit.org about bot308 and bot309.
lforschler@apple.com [Thu, 22 Jan 2015 02:06:22 +0000 (02:06 +0000)]
Teach build.webkit.org about bot308 and bot309.

Unreviewed.

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

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

5 years ago[Win] Gardening pass over file.
bfulgham@apple.com [Thu, 22 Jan 2015 01:31:43 +0000 (01:31 +0000)]
[Win] Gardening pass over file.

Convert Skips to Failure wherever possible. Try to delete unnecessary skips/failures.

* platform/win/TestExpectations:

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

5 years agoAfter updating tests to use kerning, ligatures, and printer fonts, some tests fail
timothy_horton@apple.com [Thu, 22 Jan 2015 01:10:42 +0000 (01:10 +0000)]
After updating tests to use kerning, ligatures, and printer fonts, some tests fail
https://bugs.webkit.org/show_bug.cgi?id=139968

* platform/mac/TestExpectations:
Mark svg/custom/svg-fonts-without-missing-glyph.xhtml as flaky.

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

5 years agoWeb Inspector: ASSERT expanding objects in console PrimitiveBindingTraits<T>::assertV...
commit-queue@webkit.org [Thu, 22 Jan 2015 01:03:15 +0000 (01:03 +0000)]
Web Inspector: ASSERT expanding objects in console PrimitiveBindingTraits<T>::assertValueHasExpectedType
https://bugs.webkit.org/show_bug.cgi?id=140746

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

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
Do not add impure properties to the descriptor object that will
eventually be sent to the frontend.

LayoutTests:

* TestExpectations:
Unskip the test now that is doesn't ASSERT in debug builds.

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

5 years agoFix the iOS release build after <http://trac.webkit.org/changeset/178868>
dbates@webkit.org [Thu, 22 Jan 2015 00:50:01 +0000 (00:50 +0000)]
Fix the iOS release build after <trac.webkit.org/changeset/178868>
(https://bugs.webkit.org/show_bug.cgi?id=140742)

Substitute ASSERT_UNUSED() for ASSERT() since the parameter layer is used only in the assertion expression.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack):

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

5 years agoAdd two Apple Mavericks slaves.
lforschler@apple.com [Thu, 22 Jan 2015 00:22:36 +0000 (00:22 +0000)]
Add two Apple Mavericks slaves.

Unreviewed.

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

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

5 years agoUpdate iOS WebKit2 expected results for compositing tests
dbates@webkit.org [Thu, 22 Jan 2015 00:04:14 +0000 (00:04 +0000)]
Update iOS WebKit2 expected results for compositing tests

Following the patch for bug #140742, <https://bugs.webkit.org/show_bug.cgi?id=140742>, we can remove
all iOS WebKit2-specific expected results that are identical to the platform-independent results.

* platform/ios-simulator-wk2/TestExpectations: Add WebKit2-specific failures: compositing/reflections/nested-reflection-on-overflow.html
and compositing/repaint/invalidations-on-composited-layers.html.
* platform/ios-simulator-wk2/compositing/absolute-inside-out-of-view-fixed-expected.txt: Removed.
[...]
* platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Removed.
* platform/ios-simulator-wk2/compositing/visibility/layer-visible-content-expected.txt: Removed.
* platform/ios-simulator-wk2/compositing/visible-rect/3d-transform-style-expected.txt: Removed.
* platform/ios-simulator/TestExpectations: Remove tests that now pass in both iOS WebKit1 and WebKit2.

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

5 years agoUpdate iOS WebKit test expectations for compositing tests
dbates@webkit.org [Wed, 21 Jan 2015 23:52:14 +0000 (23:52 +0000)]
Update iOS WebKit test expectations for compositing tests

* platform/ios-simulator-wk1/TestExpectations:
* platform/ios-simulator/TestExpectations:

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

5 years ago[iOS] WebKitTestRunner: Tests fail due to incorrect web view size
jhoneycutt@apple.com [Wed, 21 Jan 2015 23:47:43 +0000 (23:47 +0000)]
[iOS] WebKitTestRunner: Tests fail due to incorrect web view size

<https://bugs.webkit.org/show_bug.cgi?id=139736>
<rdar://problem/19282196>

This starts happening after we fail to reset the test controller to
consistent values in TestInvocation::invoke(). When we terminate the
web process and relaunch it, the new WebPage object created in the web
process is using the default ViewportConfiguration with dimensions of
1024x768.

The PageClient on iOS currently notifies the WKWebView and the
WKContentView when the web process is relaunched. This patch extends
that to also notify the WKView.

Reviewed by Benjamin Poulain.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare -_didRelaunchProcess.

* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Call the new method that accepts a WKView.
(-[WKView _didRelaunchProcess]):
Call -_frameOrBoundsChanged to update the web process's size to the
size of the WKView.

* UIProcess/ios/PageClientImplIOS.h:
Add a constructor that takes a WKView, and add a member var to hold it.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
Implement the constructor that takes a WKView.
(WebKit::PageClientImpl::didRelaunchProcess):
Tell the WKView that the web process relaunched.

* UIProcess/ios/WKContentView.h:
Declare an initializer that takes a WKView.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
Split out from -[WKContentView initWithFrame:processPool:configuration:webView:].
(-[WKContentView initWithFrame:processPool:configuration:webView:]):
Perform some initialization, including creating the PageClient, and
call the common initializer.
(-[WKContentView initWithFrame:processPool:configuration:wkView:]):
Ditto.

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

5 years agoAdd WKPageGroupRef SPI for user content filters
weinig@apple.com [Wed, 21 Jan 2015 23:44:35 +0000 (23:44 +0000)]
Add WKPageGroupRef SPI for user content filters
https://bugs.webkit.org/show_bug.cgi?id=140728

Reviewed by Anders Carlsson.

While Safari is transitioning to WKUserContentController, it is useful
for them to have access to have access to content filters on the page group
where they currently have user content related functionality.

* Shared/WebPageGroupData.cpp:
(WebKit::WebPageGroupData::encode):
(WebKit::WebPageGroupData::decode):
* Shared/WebPageGroupData.h:
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserContentFilter):
(WKPageGroupRemoveAllUserContentFilters):
* UIProcess/API/C/WKPageGroup.h:
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::addUserContentFilter):
(WebKit::WebPageGroup::removeAllUserContentFilters):
* UIProcess/WebPageGroup.h:
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::WebPageGroupProxy):
(WebKit::WebPageGroupProxy::addUserContentFilter):
(WebKit::WebPageGroupProxy::removeAllUserContentFilters):
* WebProcess/WebPage/WebPageGroupProxy.h:
* WebProcess/WebPage/WebPageGroupProxy.messages.in:

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

5 years ago[iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
dbates@webkit.org [Wed, 21 Jan 2015 23:42:14 +0000 (23:42 +0000)]
[iOS] Many compositing tests fail in DumpRenderTree due to contentsOpaque difference
https://bugs.webkit.org/show_bug.cgi?id=140742

Reviewed by Simon Fraser.

Source/WebCore:

Make RenderLayerBacking::layerTreeAsText() (including internals.layerTreeAsText()) always
report that the main frame's RenderView layer is opaque when running iOS DumpRenderTree to
avoid test failures and the need to maintain for iOS WebKit1 an almost identical copy of the
platform-independent compositing test results.

The main frame's RenderView layer is always transparent in iOS WebKit1 since it does
not make use of a tiled cache layer and defers to UIKit to handle the final compositing
of the web view, including applying the page scale factor.

* platform/RuntimeApplicationChecksIOS.mm:
(WebCore::applicationIsDumpRenderTree): The app bundle identifier of DumpRenderTree has
the form org.webkit.DumpRenderTreeX where X is some non-negative integer.
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::dumpProperties): Modified to report that a layer is opaque when
GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack() returns true.
* platform/graphics/GraphicsLayerClient.h:
(WebCore::GraphicsLayerClient::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added
default implementation (returns false).
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::needsIOSDumpRenderTreeMainFrameRenderViewLayerIsAlwaysOpaqueHack): Added;
returns true when running in DumpRenderTree and the passed GraphicsLayer corresponds to the main frame's
RenderView layer.
* rendering/RenderLayerBacking.h:

LayoutTests:

Update test expectations and remove an unnecessary test result.

* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/compositing/backing/backface-visibility-flip-expected.txt: Removed.

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

5 years agoAdd iOS WebKit1 TestExpectation file
dbates@webkit.org [Wed, 21 Jan 2015 23:29:50 +0000 (23:29 +0000)]
Add iOS WebKit1 TestExpectation file
https://bugs.webkit.org/show_bug.cgi?id=140739

Reviewed by David Kilzer.

Tools:

Teach run-webkit-tests to look for iOS WebKit1-specific test results and
expectations in directory LayoutTests/platform/ios-simulator-wk1.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_baseline_search_path):

LayoutTests:

iOS WebKit1 is different enough from iOS WebKit2 that it would benefit from having its
own TestExpectation file. We can work to reduce such differences over time.

* platform/ios-simulator-wk1/TestExpectations: Added.
* platform/ios-simulator/TestExpectations: Move iOS WebKit1-specific test expectation from here
to file LayoutTests/platform/ios-simulator-wk1/TestExpectations.

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

5 years ago[iOS] Update configure-xcode-for-ios-development to copy missing headers to iphoneos SDK
ddkilzer@apple.com [Wed, 21 Jan 2015 23:21:59 +0000 (23:21 +0000)]
[iOS] Update configure-xcode-for-ios-development to copy missing headers to iphoneos SDK
<http://webkit.org/b/140704>

Reviewed by Daniel Bates.

* Scripts/configure-xcode-for-ios-development:
- Update copyright.
- Remove FIXME addressed by r178709.
- Call copyMissingHeadersToIPhoneOSSDKIfNeeded().
(copyMissingHeadersToIPhoneOSSDKIfNeeded): Add method to copy
missing headers from iphonesimulator SDK to iphoneos SDK.
(sdkDirectory): Add method that returns SDK directory.
(sdkPlatformDirectory): Extract method from
xcodeSDKSpecificationsPath() that returns SDK platform
directory.
(xcodeSDKSpecificationsPath): Update to use
sdkPlatformDirectory().

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

5 years agoWebGL2 (spec section 3.1): Add new types to WebGL2 API.
roger_fong@apple.com [Wed, 21 Jan 2015 23:14:48 +0000 (23:14 +0000)]
WebGL2 (spec section 3.1): Add new types to WebGL2 API.
https://bugs.webkit.org/show_bug.cgi?id=140741.
<rdar://problem/19552962>

Reviewed by Dean Jackson.

* html/canvas/WebGL2RenderingContext.idl:

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

5 years agoWeb Inspector: Change Annotator's isActive getter into an isActive() function.
saambarati1@gmail.com [Wed, 21 Jan 2015 23:04:12 +0000 (23:04 +0000)]
Web Inspector: Change Annotator's isActive getter into an isActive() function.
https://bugs.webkit.org/show_bug.cgi?id=140729

Reviewed by Timothy Hatcher.

This patch also makes the child classes of Annotator use
the function instead of accessing the property directly.

* UserInterface/Controllers/Annotator.js:
(WebInspector.Annotator.prototype.isActive):
(WebInspector.Annotator.prototype.get isActive): Deleted.
* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.insertAnnotations):
* UserInterface/Controllers/TypeTokenAnnotator.js:
(WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):

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

5 years agoWeb Inspector: Don't allow the BasicBlockAnnotator to highlight a section if it's...
saambarati1@gmail.com [Wed, 21 Jan 2015 22:51:31 +0000 (22:51 +0000)]
Web Inspector: Don't allow the BasicBlockAnnotator to highlight a section if it's only a closing brace
https://bugs.webkit.org/show_bug.cgi?id=140727

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/BasicBlockAnnotator.js:
(WebInspector.BasicBlockAnnotator.prototype.set _highlightTextForBasicBlock):
(WebInspector.BasicBlockAnnotator.prototype._isTextRangeOnlyClosingBrace):
BasicBlockAnnotator tries to no longer highlight a basic block if it is only
whitespace and a closing brace. These ranges are often after statements
that make these basic blocks unreachable, such as a return/break/continue
statement occurring inside a if/else/while/for block. This check won't
match every highlighted empty closing brace, but catches most of them
because it only does intra block analysis instead of inter block analysis.

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

5 years agoSimple line layout: Move nextTextFragment() to FlowContents class.
zalan@apple.com [Wed, 21 Jan 2015 22:51:02 +0000 (22:51 +0000)]
Simple line layout: Move nextTextFragment() to FlowContents class.
https://bugs.webkit.org/show_bug.cgi?id=140738

Reviewed by Antti Koivisto.

This is in preparation to make FlowContents an iterator class.

No change in functionality.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::TextFragment::TextFragment): Deleted.
(WebCore::SimpleLineLayout::TextFragment::isEmpty): Deleted.
(WebCore::SimpleLineLayout::nextFragment): Deleted.
* rendering/SimpleLineLayoutFlowContents.cpp:
(WebCore::SimpleLineLayout::FlowContents::nextTextFragment):
* rendering/SimpleLineLayoutFlowContents.h:
(WebCore::SimpleLineLayout::FlowContents::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::FlowContents::TextFragment::isEmpty):

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

5 years agobmalloc: support aligned allocation
ggaren@apple.com [Wed, 21 Jan 2015 22:49:45 +0000 (22:49 +0000)]
bmalloc: support aligned allocation
https://bugs.webkit.org/show_bug.cgi?id=140732

Reviewed by Andreas Kling.

PerformanceTests:

* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
* MallocBench/MallocBench/memalign.cpp:
(test):
(benchmark_memalign): Added a test for specific interesting memalign values.

* MallocBench/MallocBench/stress_aligned.cpp: Added.
(benchmark_stress_aligned):
* MallocBench/MallocBench/stress_aligned.h: Added. Added a stress test
for arbitrary memalign values.

Source/bmalloc:

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::allocate): New function for aligned allocation.

Small and medium requests just allocate and free until they find an
aligned pointer. This is slightly inefficient in the worst case, but
still constant-time with little-to-no space overhead.

Large requests use a new API that requires the client to specify both
its ideal size and alignment, and the worst-case size you would have to
allocate in order to produce some interior pointer of the requested size
and alignment. We put the burden of this calculation on the client
because it simplifies things if we guarantee that allocation won't fail.

XLarge requests are easy: we just forward them to vmAllocate, which
already supported aligned requests.

* bmalloc/BoundaryTag.h:
* bmalloc/BoundaryTagInlines.h:
(bmalloc::BoundaryTag::mergeLeft):
(bmalloc::BoundaryTag::mergeRight):
(bmalloc::BoundaryTag::merge):
(bmalloc::BoundaryTag::deallocate):
(bmalloc::BoundaryTag::split):
(bmalloc::BoundaryTag::allocate): No behavior change here. I just
refactored the interface to remove some reference out parameters in
order to clarify what changes and what doesn't.

* bmalloc/Heap.cpp:
(bmalloc::Heap::allocateXLarge): Added an alignment API.

(bmalloc::Heap::allocateLarge):
* bmalloc/Heap.h: Added an alignment API. I split out allocateLarge into
a few variants, so aligned and unaligned allocation could share some code.

* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::take):
* bmalloc/SegregatedFreeList.h: Changed to use a separate, explicit API
for aligned allocation. It turns out that the aligned path is pretty
different, since it ends up searching for two potential ways to satisfy
an allocation: either large enough and aligned, or large enough to split
into something not aligned and something large enough and aligned.

* bmalloc/VMAllocate.h:
(bmalloc::vmAllocate): Switched alignment to come before size because
that's how the memalign API specifies it.

* bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateLargeRange): Added an alignment API.

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