WebKit-https.git
5 years agoSimple line layout: Add performance test case to measure line layout speed of monolit...
zalan@apple.com [Thu, 13 Nov 2014 18:52:55 +0000 (18:52 +0000)]
Simple line layout: Add performance test case to measure line layout speed of monolithic text content.
https://bugs.webkit.org/show_bug.cgi?id=138699

Reviewed by Antti Koivisto.

* Layout/line-layout-long-long-text.html: Added.

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

5 years agoAX: [ATK] Accessible focus events are emitted when the selection is changed in non...
jdiggs@igalia.com [Thu, 13 Nov 2014 18:20:42 +0000 (18:20 +0000)]
AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
https://bugs.webkit.org/show_bug.cgi?id=137866

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Check that the AccessibilityMenuList is really focused before notifying
the platform that it is focused. Likewise, only notify the platform of
an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
containing that option is expanded.

Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::notifyChildrenSelectionChange):
(WebCore::AXObjectCache::postPlatformNotification):

LayoutTests:

* platform/gtk/accessibility/menu-list-unfocused-notifications-expected.txt: Added.
* platform/gtk/accessibility/menu-list-unfocused-notifications.html: Added.

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

5 years agoSimplify expectations for fullscreen/full-screen-iframe-legacy.html, as the more
ap@apple.com [Thu, 13 Nov 2014 17:33:42 +0000 (17:33 +0000)]
Simplify expectations for fullscreen/full-screen-iframe-legacy.html, as the more
specific variant doesn't work due to <https://bugs.webkit.org/show_bug.cgi?id=138698>.

* platform/mac/TestExpectations:

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

5 years agofast/events/overflow-scroll-fake-mouse-move.html is flaky
ap@apple.com [Thu, 13 Nov 2014 17:26:15 +0000 (17:26 +0000)]
fast/events/overflow-scroll-fake-mouse-move.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=138697

* platform/mac-wk1/TestExpectations: Mark it as such.

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

5 years agoUnreviewed WK2 subpixel gardening.
zalan@apple.com [Thu, 13 Nov 2014 17:21:03 +0000 (17:21 +0000)]
Unreviewed WK2 subpixel gardening.

* platform/mac-wk2/TestExpectations:

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

5 years agoCreate canonical lists of registers used by both the Assemblers and the JIT probes.
mark.lam@apple.com [Thu, 13 Nov 2014 16:43:05 +0000 (16:43 +0000)]
Create canonical lists of registers used by both the Assemblers and the JIT probes.
<https://webkit.org/b/138681>

Reviewed by Filip Pizlo.

* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/X86Assembler.h:
- The FP register storage type is still defined as __m128 because the JIT
  probe code still expects that amount of storage to be available.  Will
  change this to double when the JIT probe code is updated accordingly in a
  later patch.

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

5 years ago[SOUP] Missing ResourceRequest members encoded/decoded
carlosgc@webkit.org [Thu, 13 Nov 2014 12:50:05 +0000 (12:50 +0000)]
[SOUP] Missing ResourceRequest members encoded/decoded
https://bugs.webkit.org/show_bug.cgi?id=138694

Reviewed by Sergio Villar Senin.

At least timeoutInterval and priority should also be
encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
tests when using the network process, since the timeout is always
0 for all requests that we send to the network process.

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

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

5 years ago[EFL] Unexpected crashes in layout test after r175953
gyuyoung.kim@samsung.com [Thu, 13 Nov 2014 08:53:03 +0000 (08:53 +0000)]
[EFL] Unexpected crashes in layout test after r175953
https://bugs.webkit.org/show_bug.cgi?id=138652

Reviewed by Csaba Osztrogonác.

In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
out of bound index crash because the reusableNodeIndex is Vector object.

No new test. This patch is to fix broken tests related to widgets on EFL port.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".

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

5 years agoLazily create HTMLInputElement's inputType and shadow subtree
cdumez@apple.com [Thu, 13 Nov 2014 08:21:54 +0000 (08:21 +0000)]
Lazily create HTMLInputElement's inputType and shadow subtree
https://bugs.webkit.org/show_bug.cgi?id=138524

Reviewed by Ryosuke Niwa.

Source/WebCore:

When an HTMLInputElement was created by the parser, we would first call
HTMLInputElement::create(), then call Element::parserSetAttributes() on
the constructed input. With the previous implementation, this was a bit
inefficient because HTMLInputElement::create() would construct a
TextInputType inputType (as this is the default) as well as its
corresponding shadow subtree. Then, parserSetAttributes() would often
set the |type| attribute and would need to destroy this input type as
well as its subtree if the new |type| is not 'text', to create a new
inputType / shadow subtree of the right type. The profiler showed that
this was fairly expensive.

To improve this, this patch delays the inputType / shadow subtree
creation when the HTMLInputElement is constructed by the parser, until
the attributes are actually set by the parser. This way, we directly
create an inputType / shadow subtree of the right type.

I see a 1.4% speed up on speedometer (73.95 -> 75.0).

Test: fast/dom/HTMLInputElement/border-attribute-crash.html

* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::parserDidSetAttributes):
* dom/Element.h:
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::create):
(WebCore::HTMLInputElement::updateType):
(WebCore::HTMLInputElement::runPostTypeUpdateTasks):
(WebCore::HTMLInputElement::initializeInputType):
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::parserDidSetAttributes):
(WebCore::HTMLInputElement::finishParsingChildren):
* html/HTMLInputElement.h:

LayoutTests:

Add a test case to make sure we don't crash when parsing an <input>
Element that has a |border| attribute as first attribute. This is what
was happening with the first version of this patch that landed in
r175852. When attributeChanged() was called for the |border| attribute
HTMLInputElement::isPresentationAttribute() would get called before
m_inputType is initialized, and "name == borderAttr && isImageButton()"
would crash because isImageButton() dereferences m_inputType.

* fast/dom/HTMLInputElement/border-attribute-crash-expected.txt: Added.
* fast/dom/HTMLInputElement/border-attribute-crash.html: Added.

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

5 years agoUnreviewed GTK gardening. Skip more test failing after r175776.
carlosgc@webkit.org [Thu, 13 Nov 2014 07:59:17 +0000 (07:59 +0000)]
Unreviewed GTK gardening. Skip more test failing after r175776.

* platform/gtk/TestExpectations:

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

5 years ago[EFL] Fix the build with EFL 1.12
ryuan.choi@navercorp.com [Thu, 13 Nov 2014 07:07:16 +0000 (07:07 +0000)]
[EFL] Fix the build with EFL 1.12
https://bugs.webkit.org/show_bug.cgi?id=138245

Reviewed by Gyuyoung Kim.

Source/WebKit2:

* UIProcess/API/efl/EwkView.cpp:
First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
Evas_GL.h can't be included in UniquePtrEfl.h
It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
Second, provided the version of GLES in Evas_GL_Config not to break build with
EFL 1.12
(EwkView::EwkView):
(EwkView::~EwkView):
(EwkView::displayTimerFired):
(EwkView::createGLSurface):
* UIProcess/API/efl/EwkView.h:

Source/WTF:

* wtf/efl/UniquePtrEfl.h:
Removed Evas_GL.h from UniquePtrEfl.h, which is commonly included, because
it should not be included with official GL headers.

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

5 years agoHave DOMTimer deal with more ScriptExecutionContext references
cdumez@apple.com [Thu, 13 Nov 2014 03:28:32 +0000 (03:28 +0000)]
Have DOMTimer deal with more ScriptExecutionContext references
https://bugs.webkit.org/show_bug.cgi?id=138679

Reviewed by Andreas Kling.

Source/WebCore:

Have DOMTimer deal with more ScriptExecutionContext references instead
of pointers, to make it clear the script execution context cannot be
null.

No new tests, no behavior change.

* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScheduledAction.h:
* dom/DocumentEventQueue.cpp:
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::DOMTimerFireState):
(WebCore::NestedTimersMap::instanceForContext):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::removeById):
(WebCore::DOMTimer::fired):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::clearInterval):
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer):
* page/SuspendableTimer.h:
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):

Source/WebKit/win:

Update WindowCloseTimer to deal with ScriptExecutionContext references
instead of pointers as it subclasses SuspendableTimer and its
constructor takes a ScriptExecutionContext& in argument.

* WebView.cpp:
(WindowCloseTimer::create):
(WindowCloseTimer::WindowCloseTimer):

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

5 years agoSupport unprefixed animation property names
dino@apple.com [Thu, 13 Nov 2014 01:23:15 +0000 (01:23 +0000)]
Support unprefixed animation property names
https://bugs.webkit.org/show_bug.cgi?id=138678
<rdar://problem/18943059>

Reviewed by Simon Fraser.

Source/WebCore:

Step 1 of 3 in unprefixing CSS animations: handling the
property names and values.

Unlike other unprefixing, where we use an alias that
effectively removes the prefixed values from the code,
for animations we need to keep the old values around so that
existing content will not break (e.g. computed style).

During testing I noticed that we didn't handle the
(relatively) new animation-direction values of
"reverse" and "alternate-reverse" when querying
computed style.

Tests: animations/unprefixed-properties.html
       animations/unprefixed-shorthand.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
values, but also get animation direction to produce the correct
results when "reverse" and "alternate-reverse" is specified.

* css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
around indicating whether it is prefixed or unprefixed.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
which of the forms we're going to check.
(WebCore::CSSParser::parseAnimationProperty):
* css/CSSParser.h:

* css/CSSProperty.h:
(WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
all the animation values, and clean up the code a bit.

* css/CSSPropertyNames.in: Add new properties.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
unprefixed forms. This should move to the new StyleBuilder soon.

* css/StyleProperties.cpp: Handle new values.
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):

* css/StylePropertyShorthand.cpp:
(WebCore::animationShorthand):
(WebCore::animationShorthandForParsing): Decide which list of properties to use.
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::webkitAnimationShorthandForParsing): Deleted.
* css/StylePropertyShorthand.h:

* css/StyleResolver.cpp: Since the new properties come before "background" in
alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
we need to update the call sites that think CSSPropertyBackground is the first
property.
(WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
(WebCore::StyleResolver::styleForPage):
(WebCore::StyleResolver::applyMatchedProperties):
(WebCore::StyleResolver::applyProperty):

LayoutTests:

Tests for unprefixed parsing and calculation of animation
properties. Fun fact, this is the first test we have
for the computed style of all animation-direction values.

* animations/unprefixed-properties-expected.txt: Added.
* animations/unprefixed-properties.html: Added.
* animations/unprefixed-shorthand-expected.txt: Added.
* animations/unprefixed-shorthand.html: Added.

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

5 years agoWeb Inspector: Reduce work when activating multiple agents sequentially
commit-queue@webkit.org [Thu, 13 Nov 2014 00:27:17 +0000 (00:27 +0000)]
Web Inspector: Reduce work when activating multiple agents sequentially
https://bugs.webkit.org/show_bug.cgi?id=138677

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

* UserInterface/Base/Main.js:
(WebInspector.activateExtraDomains):
* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype._extraDomainsActivated):
* UserInterface/Controllers/StorageManager.js:
(WebInspector.StorageManager.prototype._extraDomainsActivated):

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

5 years ago<rdar://problem/15864185> Syrah: platform/mac/editing/attributed-string tests are...
ap@apple.com [Wed, 12 Nov 2014 23:51:23 +0000 (23:51 +0000)]
<rdar://problem/15864185> Syrah: platform/mac/editing/attributed-string tests are failing

Land Yosemite results, and remove the tests from TestExpectations.

* platform/mac-mavericks/platform/mac/editing/attributed-string: Added.
* platform/mac-mavericks/platform/mac/editing/attributed-string/anchor-element-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/anchor-element-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/basic-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/basic-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/font-size-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/font-size-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/font-weight-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/font-weight-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/letter-spacing-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/letter-spacing-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/text-decorations-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/text-decorations-expected.txt.
* platform/mac-mavericks/platform/mac/editing/attributed-string/vertical-align-expected.txt: Copied from LayoutTests/platform/mac/editing/attributed-string/vertical-align-expected.txt.
* platform/mac/editing/attributed-string/anchor-element-expected.txt:
* platform/mac/editing/attributed-string/basic-expected.txt:
* platform/mac/editing/attributed-string/font-size-expected.txt:
* platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt:
* platform/mac/editing/attributed-string/font-weight-expected.txt:
* platform/mac/editing/attributed-string/letter-spacing-expected.txt:
* platform/mac/editing/attributed-string/text-decorations-expected.txt:
* platform/mac/editing/attributed-string/vertical-align-expected.txt:
* platform/mac/TestExpectations:

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

5 years agoSpeculative build fix.
bdakin@apple.com [Wed, 12 Nov 2014 23:46:00 +0000 (23:46 +0000)]
Speculative build fix.

* WebCore.exp.in:

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

5 years agoMake Mac media-source test expectations future compatible
ap@apple.com [Wed, 12 Nov 2014 23:33:53 +0000 (23:33 +0000)]
Make Mac media-source test expectations future compatible
https://bugs.webkit.org/show_bug.cgi?id=138674

Roll it out, it somehow broke Mountain Liona and Mavericks.

* platform/mac/TestExpectations:

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

5 years agoFix the iOS build.
adachan@apple.com [Wed, 12 Nov 2014 23:25:47 +0000 (23:25 +0000)]
Fix the iOS build.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pageMutedStateDidChange):

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

5 years agoFix the iOS build.
timothy_horton@apple.com [Wed, 12 Nov 2014 23:24:55 +0000 (23:24 +0000)]
Fix the iOS build.

* platform/spi/mac/DataDetectorsSPI.h:
It's likely that more of this file should be compiled out on iOS,
but this is all we need to build.

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

5 years agomedia/video-play-pause-exception.html is flakey.
jer.noble@apple.com [Wed, 12 Nov 2014 23:22:36 +0000 (23:22 +0000)]
media/video-play-pause-exception.html is flakey.
https://bugs.webkit.org/show_bug.cgi?id=138670

Reviewed by Alexey Proskuryakov.

Work around race-condition behavior in HTMLMediaElement's resource selection algorithm.

* media/video-play-pause-exception.html:

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

5 years agoMake Mac media-source test expectations future compatible
ap@apple.com [Wed, 12 Nov 2014 22:55:37 +0000 (22:55 +0000)]
Make Mac media-source test expectations future compatible
https://bugs.webkit.org/show_bug.cgi?id=138674

Reviewed by Eric Carlson.

* platform/mac/TestExpectations:

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

5 years agoWK1: Support default actions for images
bdakin@apple.com [Wed, 12 Nov 2014 22:52:15 +0000 (22:52 +0000)]
WK1: Support default actions for images
https://bugs.webkit.org/show_bug.cgi?id=138668
-and corresponding-
rdar://problem/18785434

Reviewed by Tim Horton.

Source/WebCore:

Symbol needed for copying image.
* WebCore.exp.in:

Source/WebKit/mac:

* WebView/WebActionMenuController.h:
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController didCloseMenu:withEvent:]):
(-[WebActionMenuController _defaultMenuItemsForImage:]):
(-[WebActionMenuController _copyImage:]):
(temporaryPhotosDirectoryPath):
(pathToPhotoOnDisk):
(-[WebActionMenuController _canAddMediaToPhotos]):
(-[WebActionMenuController _addImageToPhotos:]):
(-[WebActionMenuController _saveImageToDownloads:]):
(-[WebActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
(-[WebActionMenuController sharingServicePicker:delegateForSharingService:]):
(-[WebActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
(-[WebActionMenuController _defaultMenuItemsForHitTestResult:]):
* WebView/WebUIDelegatePrivate.h:

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

5 years agoFlaky Test: media/video-ended-event-slow-motion-playback.html
ap@apple.com [Wed, 12 Nov 2014 22:39:30 +0000 (22:39 +0000)]
Flaky Test: media/video-ended-event-slow-motion-playback.html
https://bugs.webkit.org/show_bug.cgi?id=136755

Reviewed by Jer Noble.

* media/video-ended-event-slow-motion-playback.html: The test verifies that playback
rate doesn't get rounded down to 0, and that is very easy to detect, no need for
flaky timeouts.

* platform/mac/TestExpectations: Remove the flakiness expectation. Also while at it,
updated media/video-playbackrate.html to match what the bots actually see.

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

5 years agoImplement new plug-in API for muting plug-ins
adachan@apple.com [Wed, 12 Nov 2014 22:12:33 +0000 (22:12 +0000)]
Implement new plug-in API for muting plug-ins
https://bugs.webkit.org/show_bug.cgi?id=138105

Reviewed by Anders Carlsson.

Source/WebCore:

Add the new NPNVmuteAudioBool NPNVariable.

Test: platform/mac-wk2/plugins/muted-state.html

* plugins/npapi.h:

Source/WebKit2:

Handle the setting of NPNVmuteAudioBool on the plug-in.

* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
Initialize m_isMuted.
(WebKit::PluginControllerProxy::mutedStateChanged):
Tell the plugin about the new muted state.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
Add the MutedStateChanged message.
* PluginProcess/PluginCreationParameters.cpp:
(WebKit::PluginCreationParameters::PluginCreationParameters):
Initialize isMuted.
(WebKit::PluginCreationParameters::encode):
Handle isMuted.
(WebKit::PluginCreationParameters::decode):
Ditto.
* PluginProcess/PluginCreationParameters.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Get the plug-in's muted state.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::isMuted):
Get the muted state from PluginControllerProxy.
(WebKit::NetscapePlugin::mutedStateChanged):
Call NPP_SetValue with NPNVmuteAudioBool and the updated muted state.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
(WebKit::Plugin::mutedStateChanged):
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
Set m_pendingPluginCreationParameters->isMuted.
(WebKit::PluginProxy::mutedStateChanged):
Send the MutedStateChanged message to the plugin process.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pageMutedStateDidChange):
Call Plugin::mutedStateChanged() with the page's muted state.
(WebKit::PluginView::isMuted):
Get the page's current muted state.
* WebProcess/Plugins/PluginView.h:

Tools:

Add a new plug-in test for the mute API.

* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestNetscapePlugIn/Tests/mac/SetMuted.cpp: Added.
(SetMuted::SetMuted):
(SetMuted::isMuted):
(SetMuted::cachedIsMuted):
(SetMuted::ScriptableObject::hasProperty):
(SetMuted::ScriptableObject::getProperty):
(SetMuted::ScriptableObject::pluginTest):
(SetMuted::NPP_New):
(SetMuted::NPP_GetValue):
(SetMuted::NPP_SetValue):

LayoutTests:

* platform/mac-wk2/plugins/muted-state-expected.txt: Added.
* platform/mac-wk2/plugins/muted-state.html: Added.

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

5 years agoTwo action menu item titles are swapped
timothy_horton@apple.com [Wed, 12 Nov 2014 21:55:18 +0000 (21:55 +0000)]
Two action menu item titles are swapped
https://bugs.webkit.org/show_bug.cgi?id=138667
<rdar://problem/18960409>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
Swap them back.

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

5 years agoNeed to show the text indicator when Data Detectors shows a popover
timothy_horton@apple.com [Wed, 12 Nov 2014 21:50:16 +0000 (21:50 +0000)]
Need to show the text indicator when Data Detectors shows a popover
https://bugs.webkit.org/show_bug.cgi?id=138664
<rdar://problem/18869900>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(hasDataDetectorsCompletionAPI):
Determine if we have the new API.

(-[WKActionMenuController willDestroyView:]):
(-[WKActionMenuController willOpenMenu:withEvent:]):
Make use of the new API.
If we wanted to show a Data Detectors menu but have no items (or they're all
disabled), cancel the menu.
If we don't have it, manually manipulate the highlight.

(-[WKActionMenuController didCloseMenu:withEvent:]):
Make use of the new API.
If we don't have it, manually manipulate the highlight.

(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Set up completion handlers if we have the new API; when DataDetectors
presents UI, show the text indicator, when it dismisses, hide it.
If we don't have the API, manually manipulate the highlight.

* platform/spi/mac/DataDetectorsSPI.h:
Add new DataDetectors SPI.

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

5 years agoUnreviewed, rolling out r175806.
commit-queue@webkit.org [Wed, 12 Nov 2014 21:48:51 +0000 (21:48 +0000)]
Unreviewed, rolling out r175806.
https://bugs.webkit.org/show_bug.cgi?id=138666

Capturing CString is not thread safe (Requested by anttik on
#webkit).

Reverted changeset:

"[WK2] Use C++ lambdas in IPC::Connection"
https://bugs.webkit.org/show_bug.cgi?id=138018
http://trac.webkit.org/changeset/175806

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

5 years agoGenerate get_by_id for bracket access with constant string subscript.
akling@apple.com [Wed, 12 Nov 2014 21:13:13 +0000 (21:13 +0000)]
Generate get_by_id for bracket access with constant string subscript.
<https://webkit.org/b/138663>

Reviewed by Michael Saboff.

Transform o["f"] into o.f when generating bytecode. This allows our JIT
to inline-cache those accesses instead of always dropping out to C++.

This is surprisingly common in real-web content, less so in benchmarks.
Interestingly, Speedometer does hit the optimization quite a bit.

* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):

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

5 years agoSome platform/mac text expectation cleanup.
ap@apple.com [Wed, 12 Nov 2014 21:09:36 +0000 (21:09 +0000)]
Some platform/mac text expectation cleanup.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:

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

5 years agoMac-WK2 test expectations cleanup, part 1.
ap@apple.com [Wed, 12 Nov 2014 20:22:48 +0000 (20:22 +0000)]
Mac-WK2 test expectations cleanup, part 1.

Put WK1 specific expectations into mac-wk1 (they used to be put in mac, and then
being overridden for wk2).
Remove expectations for tests that are no longer flaky.
Add more specific expectations to encient entries that were added in old format,
and just skipped indiscriminately.

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

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

5 years agoMinor improvements to RenderListItem
cdumez@apple.com [Wed, 12 Nov 2014 20:16:47 +0000 (20:16 +0000)]
Minor improvements to RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=138601

Reviewed by Darin Adler.

Make several minor improvements to RenderListItem and clean up the
code a bit.

No new tests, no behavior change.

* rendering/RenderListItem.cpp:
(WebCore::isHTMLListElement):
- Rename isList to isHTMLListElement() for clarity as it checks
  for HTMLOListElement and HTMLUListElement types
- Inline the function as it is short.
- Use is<HTML*Element>() for type checking
- Update the argument to take a Node& instead of an Element*. This
  is because the argument is expected to the non-null. Also using
  looser typing here allows us to use this utility function is one
  more place, without impacting performance as
  hasTagName(HTMLQualifiedName) is defined on Node.

(WebCore::enclosingList):
- Pass the argument as a reference instead of a pointer as it is
  expected to be non-null.
- Initialize firstNode before the loop to avoid the if (!firstNode)
  check for every iteration.

(WebCore::nextListItem):
- Take an Element as second argument instead of a RenderListItem*
  and provide convenience overloads so that we don't need to do
  null checks just because some calls sites call this function
  with 2 arguments and others with 1 argument. This way, we avoid
  unnecessary null checks as most call sites already do such
  checks (or have references).
- Transform the while loop into a for loop for clarity.
- Don't traverse an Element's subtree if the Element does not have
  a renderer as it is impossible of any of its descendant to have
  a renderer (and we are looking for a specific type of renderer).

(WebCore::previousListItem):
- Pass the item argument as a reference instead of a pointer as it
  is expected to be non-null.
- Reduce the scope of the |current| so that it is now declared
  inside the loop.

(WebCore::RenderListItem::updateItemValuesForOrderedList):
(WebCore::RenderListItem::itemCountForOrderedList):
- Pass argument as a reference instead of a pointer as it was expected
  to be non-null (There was an assertion in place to make sure of it).

(WebCore::RenderListItem::calcValue):
- Use is<HTMLOListElement>() instead of hasTagName().

(WebCore::getParentOfFirstLineBox):
- Rename variables to stop using abbreviations.
- Pass arguments as references instead of pointers as they are expected
  to be non-null.
- Remove the firstChild null check before the loop as it does not
  change behavior. The loop will abort early if firstChild is null
  and we will end up returning nullptr as well.
- Use is<>() more for type checking.
- Reuse the isHTMLListElement() utility function instead of duplicating
  its code inside this function.

(WebCore::firstNonMarkerChild):
- Pass argument as a reference as it is expected to be non-null.
- Rename variable from result to child for clarity, as we are traversing
  the children.

(WebCore::RenderListItem::markerTextWithSuffix):
- Use String appending instead of StringBuilder as it simplifies the
  code a lot and should not impact performance in this case.

(WebCore::RenderListItem::explicitValueChanged):
- Restructure the code a bit to do the |listNode| null check before the
  loop, now that nextListItem() takes a reference in argument. This is
  the only call site where we didn't already know that listNode is
  non-null.

(WebCore::previousOrNextItem):
- Mark this function as inline as it is short and called repeatedly.

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

5 years agoRename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
mark.lam@apple.com [Wed, 12 Nov 2014 20:09:42 +0000 (20:09 +0000)]
Rename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
<https://webkit.org/b/138661>

Reviewed by Michael Saboff.

Also move the switch for enabling the use of MASM_PROBE from JavaScriptCore's
config.h to WTF's Platform.h.  This ensures that the setting is consistently
applied even when building WebCore parts as well.

Source/JavaScriptCore:

* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/MacroAssemblerARM.cpp:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.cpp:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86Common.cpp:
* assembler/MacroAssemblerX86Common.h:
* assembler/MacroAssemblerX86_64.h:
* assembler/X86Assembler.h:
* config.h:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARMv7.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86Common.h:
* jit/JITStubsX86_64.h:

Source/WTF:

* wtf/Platform.h:

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

5 years agoSpeed up HTMLTextFormControlElement::setInnerTextValue() a bit
cdumez@apple.com [Wed, 12 Nov 2014 20:07:54 +0000 (20:07 +0000)]
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
https://bugs.webkit.org/show_bug.cgi?id=138619

Reviewed by Darin Adler.

Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
- Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
  not returning null is sufficient.
- Caching the result of innerTextElement() instead of repeatedly calling that
  virtual function.
- De-virtualizing setFormControlValueMatchesRenderer() /
  formControlValueMatchesRenderer() as these are never overridden.
- Moving the code constructing the innerTextValue from a
  TextControlInnerTextElement from innerTextValue() to a new
  innerTextValueFrom(TextControlInnerTextElement&) function and call this new
  function from setInnerTextValue() to avoid calling innerTextElement() again
  and making sure it is non-null
- Do the tree traversal from innerTextElement's firstChild instead of from
  innerTextElement. The innerTextElement is a TextControlInnerTextElement.
  Therefore, it cannot be an HTMLBRElement or a Text node.

No new tests, no behavior change.

* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
(WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
* html/HTMLTextFormControlElement.cpp:
(WebCore::stripTrailingNewline):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
(WebCore::finishText): Deleted.

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

5 years agoRemove expectations for a couple tests that were marked as flaky on WK1 only,
ap@apple.com [Wed, 12 Nov 2014 19:34:45 +0000 (19:34 +0000)]
Remove expectations for a couple tests that were marked as flaky on WK1 only,
as they don't appear to be flaky any more.

* platform/mac-wk1/TestExpectations:

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

5 years agoSome WebKit1-only Yosemite-only failures don't appear to exist any more.
ap@apple.com [Wed, 12 Nov 2014 19:08:02 +0000 (19:08 +0000)]
Some WebKit1-only Yosemite-only failures don't appear to exist any more.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:
Unmark the tests.

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

5 years agoMake action menus much more reliable
timothy_horton@apple.com [Wed, 12 Nov 2014 19:06:15 +0000 (19:06 +0000)]
Make action menus much more reliable
https://bugs.webkit.org/show_bug.cgi?id=138654
<rdar://problem/18909111>

Reviewed by Anders Carlsson.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Remove MenuUpdateStage; nothing actually uses this value, we just pass it around.

(-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
Update the menu as soon as we have a reply from the Web process.

(-[WKActionMenuController menuNeedsUpdate:]):
If our sync-wait for the Web process' reply times out, we should still update
the menu to remove the placeholder separator item.

(-[WKActionMenuController _updateActionMenuItems]):
(-[WKActionMenuController _updateActionMenuItemsForStage:]): Deleted.
If we have our final answer for this menu (_state == Ready), and the final answer
has no items in the menu, cancel tracking on the menu.

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

5 years agoA number of hidpi tests don't appear to fail on Yosemite now, let's try unmarking...
ap@apple.com [Wed, 12 Nov 2014 18:59:12 +0000 (18:59 +0000)]
A number of hidpi tests don't appear to fail on Yosemite now, let's try unmarking them.

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

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

5 years agoInstead of blacklisting tests for OS X versions that use PPT for testing,
ap@apple.com [Wed, 12 Nov 2014 18:41:15 +0000 (18:41 +0000)]
Instead of blacklisting tests for OS X versions that use PPT for testing,
whitelist MountainLion that doesn't. That's more future compatible.

* platform/mac-wk2/TestExpectations:

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

5 years ago[Mac] media/track/audio-track.html is flakey
jer.noble@apple.com [Wed, 12 Nov 2014 18:40:45 +0000 (18:40 +0000)]
[Mac] media/track/audio-track.html is flakey
https://bugs.webkit.org/show_bug.cgi?id=138394

Reviewed by Alexey Proskuryakov.

Source/WebCore:

The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
"addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
empties when that individual queue's timer fires. So events can be enqueued in the following order:
1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.

Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
which they are enqueued, regardless of which object owns the queue. Use a static queue of
GenericEventQueues to manage which GenericEventQueue fires and in what order.

GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.

* dom/GenericEventQueue.cpp:
(WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
(WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
(WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
(WebCore::GenericEventQueue::sharedTimerFired):  Ask each queue to dispatch one event.
(WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
(WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
(WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
(WebCore::GenericEventQueue::cancelAllEvents): Ditto.
(WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
(WebCore::GenericEventQueue::timerFired): Deleted.
* dom/GenericEventQueue.h:

LayoutTests:

* platform/mac/TestExpectations:

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

5 years agoFix a typo in the previous commit - a test should be skipped, not its expectation.
ap@apple.com [Wed, 12 Nov 2014 18:18:07 +0000 (18:18 +0000)]
Fix a typo in the previous commit - a test should be skipped, not its expectation.

* platform/mac/TestExpectations:

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

5 years agocompositing/video/video-border-radius.html frequently times out on Mountain Lion...
ap@apple.com [Wed, 12 Nov 2014 17:46:35 +0000 (17:46 +0000)]
compositing/video/video-border-radius.html frequently times out on Mountain Lion only
https://bugs.webkit.org/show_bug.cgi?id=138662

Make the test a reftest again, and skip it, as nothing helps.

Also, updated all compositing/video expectations to match what bots see now.

* compositing/video/video-border-radius-expected.html: Copied from LayoutTests/compositing/video/video-border-radius-expected.html-disabled.
* compositing/video/video-border-radius-expected.html-disabled: Removed.
* compositing/video/video-border-radius-expected.png: Removed.
* compositing/video/video-border-radius-expected.txt: Removed.
* platform/mac/TestExpectations:

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

5 years ago[WinCairo] Incorrect names for test executables in debug mode.
commit-queue@webkit.org [Wed, 12 Nov 2014 17:16:18 +0000 (17:16 +0000)]
[WinCairo] Incorrect names for test executables in debug mode.
https://bugs.webkit.org/show_bug.cgi?id=138659

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-12
Reviewed by Alex Christensen.

In debug mode, jsc.exe, and testapi.exe are not created, causing JSC test failures.

* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj:
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj:

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

5 years agoUnreviewed, GTK gardening.
philn@webkit.org [Wed, 12 Nov 2014 16:37:10 +0000 (16:37 +0000)]
Unreviewed, GTK gardening.

* Scripts/run-gtk-tests:
(TestRunner): Skip the UserMediaBasic test because it depends on
constraints validation which is going to be fixed in bug #136449.

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

5 years agoUnreviewed GTK gardening. Skip shared worker tests after r175776.
carlosgc@webkit.org [Wed, 12 Nov 2014 14:23:09 +0000 (14:23 +0000)]
Unreviewed GTK gardening. Skip shared worker tests after r175776.

Shared workers are disabled with the Network Process.

* platform/gtk/TestExpectations:

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

5 years ago[GTK] Expose user script messages to GObject DOM bindings
carlosgc@webkit.org [Wed, 12 Nov 2014 12:30:38 +0000 (12:30 +0000)]
[GTK] Expose user script messages to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138411

Reviewed by Philippe Normand.

Source/WebCore:

* PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
installed headers and make a symlink for it in the DerivedSources dir.
* bindings/gobject/WebKitDOMCustomUnstable.h: Added.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_dom_window_get_webkit_namespace):
(webkit_dom_user_message_handlers_namespace_get_handler):
* bindings/scripts/CodeGeneratorGObject.pm:
(HasUnstableCustomAPI): Helper function to check if the given
class has custom unstable API.
(WriteData): Include WebKitDOMCustomUnstable.h header if the class
has API defined there.

Tools:

Add a test case to check that user script messages sent using the
DOM bindings API are also received in the UI process.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitUserContentManager.cpp:
(UserScriptMessageTest::waitUntilMessageReceived):
(UserScriptMessageTest::postMessageAndWaitUntilReceived):
(testUserContentManagerScriptMessageFromDOMBindings):
(beforeAll):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(documentLoadedCallback):

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

5 years ago[GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
carlosgc@webkit.org [Wed, 12 Nov 2014 12:26:26 +0000 (12:26 +0000)]
[GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=138409

Reviewed by Philippe Normand.

It's currently exposed as a WebKitDOMSerializedScriptValue class
that doesn't really exist. It should be handled as a string, that
is used to create a SerializedScriptValue when coming from the
API, and converted to a string again when returned to the API.

* bindings/scripts/CodeGeneratorGObject.pm:
(GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
(IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
(GenerateFunction): Handle SerializedScriptValue parameters and
return values specially.
* bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
(webkit_dom_test_callback_callback_with_serialized_script_value_param):
* bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_serialized_value):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
(webkit_dom_test_serialized_script_value_interface_class_init):
(webkit_dom_test_serialized_script_value_interface_get_value):
(webkit_dom_test_serialized_script_value_interface_set_value):
(webkit_dom_test_serialized_script_value_interface_get_readonly_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_value):
(webkit_dom_test_serialized_script_value_interface_set_cached_value):
(webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
* bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
(webkit_dom_test_typedefs_class_init):
(webkit_dom_test_typedefs_get_immutable_serialized_script_value):
(webkit_dom_test_typedefs_set_immutable_serialized_script_value):
* bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:

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

5 years ago[GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
carlosgc@webkit.org [Wed, 12 Nov 2014 12:13:10 +0000 (12:13 +0000)]
[GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
https://bugs.webkit.org/show_bug.cgi?id=138093

Reviewed by Martin Robinson.

Source/WebCore:

Remove RedirectedXCompositeWindow.

* PlatformGTK.cmake:

Source/WebKit2:

It's only used by WebKitWebViewBase. While moving the code the
following cleanups have been made:

  - Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
  - Use a helper class XDamageNotifier to handle the XDamage
    events filtering and notification.
  - Use std::function instead of pointer to function for the
    damage callback.
  - Pass the X display to the RedirectedXCompositeWindow constructor
    and keep it as a member to use it everywhere, instead of using
    the default display in some places and the widget display in others.
  - Pass the damage notify function as a contructor parameter of
    RedirectedXCompositeWindow instead of setting the callback
    right after creating the object.
  - Remove GLContextNeeded and all the dead code related to the
    CreateGLContext mode that is no longer used.
  - Rename cairoSurfaceForWidget() as surface().
  - windowId() has been renamed as windowID() and made const.
  - Use std::unique_ptr instead of PassOwnPtr.
  - Fix coding style issues.

* PlatformGTK.cmake:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewRenderAcceleratedCompositingResults):
(webkitWebViewBaseCreateWebPage):
(redirectedWindowDamagedCallback): Deleted.
* UIProcess/gtk/RedirectedXCompositeWindow.cpp: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp.
(WebKit::XDamageNotifier::XDamageNotifier):
(WebKit::XDamageNotifier::add):
(WebKit::XDamageNotifier::remove):
(WebKit::XDamageNotifier::filterXDamageEvent):
(WebKit::XDamageNotifier::filterXEvent):
(WebKit::xDamageNotifier):
(WebKit::supportsXDamageAndXComposite):
(WebKit::RedirectedXCompositeWindow::create):
(WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
(WebKit::RedirectedXCompositeWindow::resize):
(WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
(WebKit::RedirectedXCompositeWindow::surface):
* UIProcess/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h.
(WebKit::RedirectedXCompositeWindow::windowID):

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

5 years agoUnreviewed. Fix GTK+ clean build after r175930.
carlosgc@webkit.org [Wed, 12 Nov 2014 11:25:16 +0000 (11:25 +0000)]
Unreviewed. Fix GTK+ clean build after r175930.

Partial rollout of r175930 to not build the new unit test that
broke clean builds in GTK+ port.

* TestWebKitAPI/PlatformGTK.cmake:

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

5 years agoPatch
philn@webkit.org [Wed, 12 Nov 2014 08:25:05 +0000 (08:25 +0000)]
Patch

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

5 years ago[EFL] Clean up OwnPtr in RenderThemeEfl
gyuyoung.kim@samsung.com [Wed, 12 Nov 2014 07:59:21 +0000 (07:59 +0000)]
[EFL] Clean up OwnPtr in RenderThemeEfl
https://bugs.webkit.org/show_bug.cgi?id=138642

Reviewed by Zoltan Herczeg.

No new tests, no behavior change.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr.

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

5 years agoMove Modules/websockets to std::unique_ptr
gyuyoung.kim@samsung.com [Wed, 12 Nov 2014 07:33:13 +0000 (07:33 +0000)]
Move Modules/websockets to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138649

Reviewed by Chris Dumez.

Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
instead of OwnPtr, PassOwnPtr.
However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
with std::unique_ptr<>

No new tests, no behavior.

* Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
* Modules/websockets/WebSocket.cpp:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::connect):
(WebCore::WebSocketChannel::didFail):
(WebCore::WebSocketChannel::processFrame):
(WebCore::WebSocketChannel::enqueueTextFrame):
(WebCore::WebSocketChannel::enqueueRawFrame):
(WebCore::WebSocketChannel::enqueueBlobFrame):
(WebCore::WebSocketChannel::processOutgoingFrameQueue):
(WebCore::WebSocketChannel::sendFrame):
* Modules/websockets/WebSocketChannel.h:
* Modules/websockets/WebSocketDeflateFramer.cpp:
(WebCore::WebSocketDeflateFramer::createExtensionProcessor):
(WebCore::WebSocketDeflateFramer::enableDeflate):
(WebCore::WebSocketDeflateFramer::deflate):
(WebCore::WebSocketDeflateFramer::inflate):
(WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
* Modules/websockets/WebSocketDeflateFramer.h:
(WebCore::DeflateResultHolder::create): Deleted.
(WebCore::InflateResultHolder::create): Deleted.
* Modules/websockets/WebSocketDeflater.cpp:
(WebCore::WebSocketDeflater::WebSocketDeflater):
(WebCore::WebSocketInflater::WebSocketInflater):
(WebCore::WebSocketDeflater::create): Deleted.
(WebCore::WebSocketInflater::create): Deleted.
* Modules/websockets/WebSocketDeflater.h:
* Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::addProcessor):
* Modules/websockets/WebSocketExtensionDispatcher.h:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::addExtensionProcessor):
* Modules/websockets/WebSocketHandshake.h:

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

5 years agoVersioning.
bshafiei@apple.com [Wed, 12 Nov 2014 06:17:39 +0000 (06:17 +0000)]
Versioning.

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

5 years agoUnreviewed iOS build fix after r176001.
cdumez@apple.com [Wed, 12 Nov 2014 06:13:46 +0000 (06:13 +0000)]
Unreviewed iOS build fix after r176001.

Export an additional symbol.

* WebCore.exp.in:

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

5 years agoChange DFG to use scope operand for op_resolve_scope
msaboff@apple.com [Wed, 12 Nov 2014 06:00:42 +0000 (06:00 +0000)]
Change DFG to use scope operand for op_resolve_scope
https://bugs.webkit.org/show_bug.cgi?id=138651

Reviewed by Geoffrey Garen.

Changed to use the provided scope VirtualRegister.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getScope): Changed to use an argument scope register.
(JSC::DFG::ByteCodeParser::parseBlock): Created VirtualRegister from scope operand.

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

5 years ago[EFL] Unreviewed EFL gardening. Rebaseline after r174535.
jinwoo7.song@samsung.com [Wed, 12 Nov 2014 05:23:03 +0000 (05:23 +0000)]
[EFL] Unreviewed EFL gardening. Rebaseline after r174535.

* platform/efl/css3/selectors3/html/css3-modsel-61-expected.txt:
* platform/efl/css3/selectors3/html/css3-modsel-83-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-61-expected.txt:
* platform/efl/css3/selectors3/xhtml/css3-modsel-83-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-61-expected.txt:
* platform/efl/css3/selectors3/xml/css3-modsel-83-expected.txt:
* platform/efl/fast/selectors/061-expected.txt:
* platform/efl/fast/selectors/083-expected.txt:

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

5 years ago[Mac] Add diagnostic logging for per-media-engine load failures
jer.noble@apple.com [Wed, 12 Nov 2014 04:29:54 +0000 (04:29 +0000)]
[Mac] Add diagnostic logging for per-media-engine load failures
https://bugs.webkit.org/show_bug.cgi?id=138647

Reviewed by Eric Carlson.

Add diagnostic logging fired whenever a media engine fails to load media,
even if another engine subsequentially succeeds. Add a mechanism for retrieving
the platform-specific error code from a given engine.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
* html/HTMLMediaElement.h:
* page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
* page/DiagnosticLoggingKeys.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::networkStateChanged):
(WebCore::MediaPlayer::platformErrorCode):
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::platformErrorCode):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
(WebCore::MediaPlayerPrivateQTKit::platformErrorCode):

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

5 years agoMark more virtual functions in HTMLInputElement as final
cdumez@apple.com [Wed, 12 Nov 2014 04:17:18 +0000 (04:17 +0000)]
Mark more virtual functions in HTMLInputElement as final
https://bugs.webkit.org/show_bug.cgi?id=138644

Reviewed by Andreas Kling.

Source/WebCore:

Mark more virtual functions in HTMLInputElement as final to help the
compiler optimize better.

No new tests, no behavior change.

* html/HTMLInputElement.h:

Source/WebKit:

Export an additional symbol to fix Windows build.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

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

5 years agoRemove IncrementalSweeper::create()
gyuyoung.kim@samsung.com [Wed, 12 Nov 2014 03:13:47 +0000 (03:13 +0000)]
Remove IncrementalSweeper::create()
https://bugs.webkit.org/show_bug.cgi?id=138243

Reviewed by Filip Pizlo.

As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
Now we begins to use std::make_unique<> to create IncrementalSweeper instance.

Source/JavaScriptCore:

* heap/Heap.cpp:
(JSC::Heap::Heap):
(JSC::Heap::setIncrementalSweeper):
* heap/Heap.h:
* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::create): Deleted.
* heap/IncrementalSweeper.h:

Source/WebCore:

No new tests, no behavior changes.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):
* platform/ios/WebSafeIncrementalSweeperIOS.h:

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

5 years agoWeb Inspector: Handle activating extra agents properly after inspector has connected
commit-queue@webkit.org [Wed, 12 Nov 2014 03:07:12 +0000 (03:07 +0000)]
Web Inspector: Handle activating extra agents properly after inspector has connected
https://bugs.webkit.org/show_bug.cgi?id=138639

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

Source/JavaScriptCore:

Instead of having the protocol configuration directly add the extra agent
to the inspector registry, isntead go through the augmentable controller.
The controller will initialize as required if we are already connected or not,
and will add to the registry.

The functional change here is that the frontend can be notified to activate
extra agents multiple times as agents eventually become available.

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::appendExtraAgent):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::activateExtraDomain):
* inspector/agents/InspectorAgent.h:
* inspector/augmentable/AugmentableInspectorController.h:
* inspector/scripts/codegen/generator_templates.py:
* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/enum-values.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
Rebased results.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WebInspector.activateExtraDomains):

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

5 years agoUse scope register when processing op_resolve_scope in LLInt and Baseline JIT
msaboff@apple.com [Wed, 12 Nov 2014 02:33:43 +0000 (02:33 +0000)]
Use scope register when processing op_resolve_scope in LLInt and Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=138637

Reviewed by Mark Lam.

Filled out op_resolve_scope processing to use the scope operand to access the current
scope chain.

* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
Added scope virtual register parameter to emitResolveClosure().  Added new callOperation() to
support the additional argument.

* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitResolveClosure):
(JSC::JIT::emit_op_resolve_scope):
(JSC::JIT::emitSlow_op_resolve_scope):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Added "scope" parameter to emitResolveClosure().  Passed scope register index to slow path.
Used scope virtual register instead of JSStack::ScopeChain.

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

5 years agoMove 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
cdumez@apple.com [Wed, 12 Nov 2014 01:51:39 +0000 (01:51 +0000)]
Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138594

Reviewed by Antti Koivisto.

Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
DeprecatedStyleBuilder to the new StyleBuilder using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
(WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
(WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):

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

5 years agoAction menu hit testing is not working properly with all WK1 apps
bdakin@apple.com [Wed, 12 Nov 2014 01:29:43 +0000 (01:29 +0000)]
Action menu hit testing is not working properly with all WK1 apps
https://bugs.webkit.org/show_bug.cgi?id=138643
-and corresponding-
rdar://problem/18949376

Reviewed by Tim Horton.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController prepareForMenu:withEvent:]):
(-[WebActionMenuController _lookupText:]):

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

5 years agoModernize $buildingForIPhone in CodeGeneratorObjC.pm
ddkilzer@apple.com [Wed, 12 Nov 2014 01:20:30 +0000 (01:20 +0000)]
Modernize $buildingForIPhone in CodeGeneratorObjC.pm
<http://webkit.org/b/138640>

Reviewed by Daniel Bates.

Mac OS X is the only platform that supports NSColor, so rename
$buildingForIPhone to $shouldUseCGColor (which is actually what
the variable represents) and define it in terms of the "macosx"
platform name.

* bindings/scripts/CodeGeneratorObjC.pm:
($buildingForIPhone): Rename to $shouldUseCGColor.
($shouldUseCGColor): False if PLATFORM_NAME is not defined,
which is the case on older Xcodes when building for Mac OS X, or
if PLATFORM_NAME is equal to "macosx".  True otherwise.
(GetClassName): Switch to use new variable name.
(AddIncludesForType): Ditto.
(GenerateHeader): Remove dead code.  The
$buildingForTigerOrEarlier variable was accidentally
re-introduced in r161638, but was originally removed in r127032!
(GenerateImplementation): Switch to use new variable name.

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

5 years agoTemporarlity turn video/video-border-radius-expected.html into a non-reftest,
ap@apple.com [Wed, 12 Nov 2014 01:06:18 +0000 (01:06 +0000)]
Temporarlity turn video/video-border-radius-expected.html into a non-reftest,
hoping to get some error output from it.

* compositing/video/video-border-radius-expected.html: Removed.
* compositing/video/video-border-radius-expected.html-disabled: Copied from LayoutTests/compositing/video/video-border-radius-expected.html.
* compositing/video/video-border-radius-expected.png: Added.
* compositing/video/video-border-radius-expected.txt: Added.

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

5 years agoWeb Inspector: Don't require a debugger be attached for inspector auto attach
commit-queue@webkit.org [Wed, 12 Nov 2014 01:05:58 +0000 (01:05 +0000)]
Web Inspector: Don't require a debugger be attached for inspector auto attach
https://bugs.webkit.org/show_bug.cgi?id=138638

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

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::updateDebuggableAutomaticInspectCandidate):

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

5 years agoAdd support for mailto: link action menus
timothy_horton@apple.com [Wed, 12 Nov 2014 00:59:54 +0000 (00:59 +0000)]
Add support for mailto: link action menus
https://bugs.webkit.org/show_bug.cgi?id=138641
<rdar://problem/18741567>

Reviewed by Beth Dakin.

* Shared/API/c/WKActionMenuTypes.h:
Add a new type for mailto links.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
Build a DDActionContext and grab menu items for our mailto link.

(-[WKActionMenuController _defaultMenuItems]):
Get menu items from _defaultMenuItemsForMailtoLink if needed.

* WebCore.exp.in:
Add an export.

* platform/spi/mac/DataDetectorsSPI.h:
Add some DataDetectors SPI.

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

5 years agowebkit-patch --suggest-reviewers is broken with newer versions of git
ddkilzer@apple.com [Wed, 12 Nov 2014 00:46:41 +0000 (00:46 +0000)]
webkit-patch --suggest-reviewers is broken with newer versions of git
<http://webkit.org/b/138627>

Reviewed by Michael Saboff with feedback from Daniel Bates.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._changes_files_for_commit): Strip blank lines instead of
assuming there is always a blank line at the beginning of the
list.

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

5 years agofast/text/international/hindi-spacing.html and transforms/2d/hindi-rotated.html are
ap@apple.com [Wed, 12 Nov 2014 00:23:18 +0000 (00:23 +0000)]
fast/text/international/hindi-spacing.html and transforms/2d/hindi-rotated.html are
flaky on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=138075

* platform/mac/TestExpectations: Mark them as such.

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

5 years agoinspector/css/matched-style-properties.html and inspector/css/selector-specificity...
ap@apple.com [Wed, 12 Nov 2014 00:15:26 +0000 (00:15 +0000)]
inspector/css/matched-style-properties.html and inspector/css/selector-specificity.html
are very flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=138636

Bring back Crash expectattion, as this is how it's reported on WK1. Also added one more test.

* platform/mac/TestExpectations:

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

5 years agocompositing/video/video-border-radius.html frequently times out on 10.8
ap@apple.com [Wed, 12 Nov 2014 00:09:51 +0000 (00:09 +0000)]
compositing/video/video-border-radius.html frequently times out on 10.8

Add an error even listener, to at hopefully get a proper failure when this happens.

* compositing/video/video-border-radius.html:

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

5 years agoClients should be notified when a page preview finishes
conrad_shultz@apple.com [Tue, 11 Nov 2014 23:59:41 +0000 (23:59 +0000)]
Clients should be notified when a page preview finishes
https://bugs.webkit.org/show_bug.cgi?id=138635

Reviewed by Tim Horton.

Add SPI to WKView to allow clients to do any cleanup that might be necessary when the preview closes.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare new SPI.

* UIProcess/API/mac/WKView.mm:
(-[WKView _finishPreviewingURL:withPreviewView:]):
Stub SPI implementation.

* UIProcess/mac/WKActionMenuController.h:
Add an ivar for the preview view controller.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
Update to use the ivar.
(-[WKActionMenuController _clearPreviewPopover]):
Send -_finishPreviewingURL:withPreviewView: and nil out the view controller ivar.

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

5 years agoinspector/css/matched-style-properties.html and inspector/css/selector-specificity...
ap@apple.com [Tue, 11 Nov 2014 23:56:47 +0000 (23:56 +0000)]
inspector/css/matched-style-properties.html and inspector/css/selector-specificity.html
are very flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=138636

Updated the results and comments for tests that don't work in production builds,
those are not quite relevant here.

* platform/mac/TestExpectations:

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

5 years agoUpdate artwork for some action menu items
timothy_horton@apple.com [Tue, 11 Nov 2014 23:23:22 +0000 (23:23 +0000)]
Update artwork for some action menu items
https://bugs.webkit.org/show_bug.cgi?id=138634
<rdar://problem/18871984>

Reviewed by Anders Carlsson.

* Resources/OpenInNewWindowTemplate.pdf: Removed.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _createActionMenuItemForTag:]):
(webKitBundleImageNamed): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
Get rid of our custom art, and use system art for two more items.

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

5 years agoDRT and WKTR touch disk cache
ap@apple.com [Tue, 11 Nov 2014 23:13:05 +0000 (23:13 +0000)]
DRT and WKTR touch disk cache
https://bugs.webkit.org/show_bug.cgi?id=138622

Reviewed by Geoffrey Garen.

Source/WebKit2:

Setting a cache model has a very strange behavior in WebKit2, where it ignores
sizes that were explicitly passed from UI process, and uses different ones. As
setCacheModel() is always called on launch, it always creates a non-empty disk cache.

The design needs to be improved one day, but for now, just make sure that we never
create a disk cache during testing.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
(WebKit::NetworkProcess::platformSetCacheModel):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
(WebKit::WebProcess::platformInitializeWebProcess):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm: (prepareConsistentTestingEnvironment):
Set a shared cache before calling -_switchNetworkLoaderToNewTestingSession, not after,
because this function uses the shared cache.

* WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformInitializeContext):
Create an empty shared cache to prevent a default one from being created on disk.

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

5 years ago[iOS] video is sometimes allowed to play from the background
eric.carlson@apple.com [Tue, 11 Nov 2014 23:11:28 +0000 (23:11 +0000)]
[iOS] video is sometimes allowed to play from the background
https://bugs.webkit.org/show_bug.cgi?id=138522

Rubber-stamped by Jer Noble.

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.

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

5 years ago[iOS] a page with video in optimized fullscreen is visible
eric.carlson@apple.com [Tue, 11 Nov 2014 22:59:28 +0000 (22:59 +0000)]
[iOS] a page with video in optimized fullscreen is visible
https://bugs.webkit.org/show_bug.cgi?id=138632

Reviewed by Anders Carlsson.

Source/WebCore:

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
(WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isPlayingFullscreenOptimizedVideo]): New.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible): Return true if displaying optimized fullscreen
    video.

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

5 years agocompositing/video/video-border-radius.html frequently times out on 10.8
ap@apple.com [Tue, 11 Nov 2014 22:58:28 +0000 (22:58 +0000)]
compositing/video/video-border-radius.html frequently times out on 10.8

Add an event listener before setting source, not after. This should not affect
anything, but seems worth a try.

* compositing/video/video-border-radius.html:

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

5 years agoMountain Lion build fix
mmaxfield@apple.com [Tue, 11 Nov 2014 22:42:23 +0000 (22:42 +0000)]
Mountain Lion build fix
https://bugs.webkit.org/show_bug.cgi?id=138631

Reviewed by Simon Fraser.

* platform/spi/cocoa/CoreTextSPI.h:

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

5 years agoWeb Inspector: Main.js missing many trailing semicolons
jonowells@apple.com [Tue, 11 Nov 2014 22:20:31 +0000 (22:20 +0000)]
Web Inspector: Main.js missing many trailing semicolons
https://bugs.webkit.org/show_bug.cgi?id=138624

Add semicolons to function variable assignments.

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js: Added semicolons.

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

5 years ago[iOS] cleanup wireless route monitoring
eric.carlson@apple.com [Tue, 11 Nov 2014 22:03:15 +0000 (22:03 +0000)]
[iOS] cleanup wireless route monitoring
https://bugs.webkit.org/show_bug.cgi?id=138614

Reviewed by Jer Noble.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
(WebCore::HTMLMediaElement::removeEventListener): Ditto.
(WebCore::HTMLMediaElement::createMediaPlayer): Ditto.

* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
(WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
(-[WebMediaSessionHelper initWithCallback:]): Ditto.
(-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
    on the main thread.
(-[WebMediaSessionHelper clearCallback]): Add logging.
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
    the main thread.
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
(-[WebMediaSessionHelper interruption:]): Add logging.
(-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
(-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
(-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.

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

5 years agoUnreviewd iOS build fix
mmaxfield@apple.com [Tue, 11 Nov 2014 22:02:16 +0000 (22:02 +0000)]
Unreviewd iOS build fix

* platform/spi/cocoa/CoreTextSPI.h:

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

5 years agoProtect Document in ProcessingInstruction::setXSLStyleSheet()
ddkilzer@apple.com [Tue, 11 Nov 2014 21:56:21 +0000 (21:56 +0000)]
Protect Document in ProcessingInstruction::setXSLStyleSheet()
<http://webkit.org/b/138621>

Reviewed by Andreas Kling.

The patch is inspired by the following Blink revision by
<tasak@google.com>:
<https://src.chromium.org/viewvc/blink?view=rev&revision=182309>

* dom/ProcessingInstruction.cpp:
(WebCore::ProcessingInstruction::setXSLStyleSheet):

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

5 years agoOccasional assertion failure under recommendedScrollbarStyleDidChange()
timothy_horton@apple.com [Tue, 11 Nov 2014 21:39:46 +0000 (21:39 +0000)]
Occasional assertion failure under recommendedScrollbarStyleDidChange()
https://bugs.webkit.org/show_bug.cgi?id=138604
<rdar://problem/18855914>

Reviewed by Beth Dakin.

It is possible for AppKit to install tracking areas into our view
behind our back, but we have code that depends on knowing exactly
the set of tracking areas installed on WKView.

Make this more robust by keeping a reference to the tracking area we
use for many things and manipulating that instead of making assumptions
about the total set of tracking areas on WKView.

* UIProcess/API/mac/WKView.mm:
(-[WKView _primaryTrackingArea]):
(-[WKView _replacePrimaryTrackingArea:]):
Provide a 'primary' tracking area setter/getter.

(-[WKView initWithFrame:context:configuration:webView:]):
Keep a reference to the original tracking area installed at initialization time.

* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
Instead of walking the set of tracking areas, make use of the fact that
we know exactly which tracking area we installed, and uninstall just that
one, and replace it with our newly-built one.

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

5 years agoFinish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvide...
mmaxfield@apple.com [Tue, 11 Nov 2014 21:37:03 +0000 (21:37 +0000)]
Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138623

Reviewed by Geoff Garen.

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.exp.in:
* WebCore.order:
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::GlyphPage::fill):
* platform/graphics/mac/SimpleFontDataMac.mm:
(WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebKit.order:

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:

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

5 years agoUnreviewed Mountain Lion build fix
mmaxfield@apple.com [Tue, 11 Nov 2014 21:21:45 +0000 (21:21 +0000)]
Unreviewed Mountain Lion build fix

* platform/spi/cocoa/CoreTextSPI.h:

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

5 years agoUnreviewed, rolling out r175852.
commit-queue@webkit.org [Tue, 11 Nov 2014 21:13:59 +0000 (21:13 +0000)]
Unreviewed, rolling out r175852.
https://bugs.webkit.org/show_bug.cgi?id=138626

Broke PLT by introducing a crash. (Requested by rniwa on
#webkit).

Reverted changeset:

"Lazily create HTMLInputElement's inputType and shadow
subtree"
https://bugs.webkit.org/show_bug.cgi?id=138524
http://trac.webkit.org/changeset/175852

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

5 years agoAdd a respondsToSelector check to dismissActionMenuPopovers
timothy_horton@apple.com [Tue, 11 Nov 2014 20:56:20 +0000 (20:56 +0000)]
Add a respondsToSelector check to dismissActionMenuPopovers
​https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>

Reviewed by Beth Dakin.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuPopovers]):
Avoid calling this wherever it doesn't exist.

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

5 years agoRegression(r175947): Caused assertions in debug builds
cdumez@apple.com [Tue, 11 Nov 2014 20:41:50 +0000 (20:41 +0000)]
Regression(r175947): Caused assertions in debug builds
https://bugs.webkit.org/show_bug.cgi?id=138620

Reviewed by Benjamin Poulain.

In HTMLCollection::traverseForward(), traversedCount was incremented 1
time too many when hitting the end of the collection (i.e. element
becomes null). Doing a partial revert.

No new tests, already covered by existing tests.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::traverseForward):

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

5 years agoHandle cases in StackVisitor::Frame::existingArguments() when lexicalEnvironment...
commit-queue@webkit.org [Tue, 11 Nov 2014 20:36:11 +0000 (20:36 +0000)]
Handle cases in StackVisitor::Frame::existingArguments() when lexicalEnvironment and/or unmodifiedArgumentsRegister is not set up yet
https://bugs.webkit.org/show_bug.cgi?id=138543

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-11
Reviewed by Geoffrey Garen.

Exception fuzzing may may raise exceptions in places where they would be
otherwise impossible. Therefore, a callFrame may lack activation even if
the codeBlock signals need of activation. Also, even if codeBlock
signals the use of arguments, the unmodifiedArgumentsRegister may not be
initialized yet (neither locally nor in lexicalEnvironment).

If codeBlock()->needsActivation() is false, unmodifiedArgumentsRegister
is already checked for Undefined. This patch applies the same check when
the condition is true (and also checks whether
callFrame()->hasActivation()).

* interpreter/CallFrame.h:
(JSC::ExecState::hasActivation):
Moved to interpreter/CallFrameInlines.h.
* interpreter/CallFrameInlines.h:
(JSC::CallFrame::hasActivation):
Fixed to verify that the JSValue returned by uncheckedActivation() is a
cell.
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::existingArguments):

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

5 years agoDataDetectors' menu items aren't presented in the telephone number menu
timothy_horton@apple.com [Tue, 11 Nov 2014 20:12:02 +0000 (20:12 +0000)]
DataDetectors' menu items aren't presented in the telephone number menu
https://bugs.webkit.org/show_bug.cgi?id=138602
<rdar://problem/18866308>

Reviewed by Beth Dakin.

We currently round-trip the DataDetectors telephone number NSMenuItems
through the very-lossy WebContextMenuItemData, for no real reason.
We should avoid this so that DataDetectors' actual NSMenuItems are
presented in the final menu, so that they can adjust their items after
providing them to us.

* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumber): Deleted.
Stop adjusting the menu item titles, as they come correct now.

(WebKit::menuItemsForTelephoneNumber): Deleted.
(WebKit::menuForTelephoneNumber):
Return a fully-formed menu for the single telephone number case.

* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu):
Present the fully-formed menu, without round-tripping through
WebContextMenuItemData, because we do not need to hand the items to
the context menu client (and indeed, were not), and because this
allows us to use the exact items returned by DataDetectors, so they
can keep ahold of the items that we actually present.

* UIProcess/PageClient.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::showPlatformContextMenu):
Add a Mac-only PageClient function for presenting a NSMenu at a
WKView-relative point.

* English.lproj/Localizable.strings:
Remove a now-unused localized string.

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

5 years ago[Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeF...
dbates@webkit.org [Tue, 11 Nov 2014 19:38:37 +0000 (19:38 +0000)]
[Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
https://bugs.webkit.org/show_bug.cgi?id=138615
<rdar://problem/18928487>

Reviewed by David Hyatt.

Source/WebCore:

Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
expectation is only true when frame flattening is disabled.

Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):

LayoutTests:

Add a test that causes an assertion failure in affected builds.

* fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update-expected.txt: Added.
* fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html: Added.

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

5 years agoAdopt DDActionContext menu type SPI
timothy_horton@apple.com [Tue, 11 Nov 2014 19:18:58 +0000 (19:18 +0000)]
Adopt DDActionContext menu type SPI
https://bugs.webkit.org/show_bug.cgi?id=138603
<rdar://problem/18867627>

Reviewed by Anders Carlsson.

* platform/spi/mac/DataDetectorsSPI.h:
Add the new SPI.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Use the new SPI instead of WKSI.

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

5 years agoData Detectors popovers should be dismissed upon scrolling
timothy_horton@apple.com [Tue, 11 Nov 2014 19:17:11 +0000 (19:17 +0000)]
Data Detectors popovers should be dismissed upon scrolling
https://bugs.webkit.org/show_bug.cgi?id=138600
<rdar://problem/18932770>

Reviewed by Beth Dakin.

* platform/spi/mac/DataDetectorsSPI.h:
Adjust the SPI header.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Dismiss popovers when we start preparing another menu.

(-[WKActionMenuController dismissActionMenuPopovers]):
Use the new DataDetectors SPI.

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

5 years agoLocalize strings for action menus
timothy_horton@apple.com [Tue, 11 Nov 2014 19:14:07 +0000 (19:14 +0000)]
Localize strings for action menus
https://bugs.webkit.org/show_bug.cgi?id=138591
<rdar://problem/18815343>

Reviewed by Dan Bates.

* English.lproj/Localizable.strings:
Add a bunch of localizable strings.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
Make use of the new strings.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _showTextIndicator]):
(-[WKActionMenuController _hideTextIndicator]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
Make use of the new strings.

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

5 years agoCleanup from r175379
mmaxfield@apple.com [Tue, 11 Nov 2014 19:13:06 +0000 (19:13 +0000)]
Cleanup from r175379
https://bugs.webkit.org/show_bug.cgi?id=138616

Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebKit.order:

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:

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

5 years agoMove CTFontTransformGlyphs out from WKSI
mmaxfield@apple.com [Tue, 11 Nov 2014 18:59:53 +0000 (18:59 +0000)]
Move CTFontTransformGlyphs out from WKSI
https://bugs.webkit.org/show_bug.cgi?id=138599

Reviewed by Simon Fraser.

Source/WebCore:

No new tests because there is no behavior change.

* WebCore.exp.in:
* WebCore.order:
* platform/graphics/SimpleFontData.cpp:
(WebCore::SimpleFontData::applyTransforms):
* platform/graphics/SimpleFontData.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/mac/WebCoreSystemInterface.h:
* platform/mac/WebCoreSystemInterface.mm:
* platform/spi/cocoa/CoreTextSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebKit.order:

Source/WebKit2:

* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:

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

5 years agoMore iOS build fix.
mitz@apple.com [Tue, 11 Nov 2014 18:17:38 +0000 (18:17 +0000)]
More iOS build fix.

* WebView/WebHTMLViewInternal.h:

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

5 years agoiOS build fix.
mitz@apple.com [Tue, 11 Nov 2014 17:59:03 +0000 (17:59 +0000)]
iOS build fix.

* WebView/WebHTMLView.mm:

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

5 years agoUse std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry...
gyuyoung.kim@samsung.com [Tue, 11 Nov 2014 17:53:32 +0000 (17:53 +0000)]
Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
https://bugs.webkit.org/show_bug.cgi?id=138558

Reviewed by Anders Carlsson.

This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
It would be good if we also remove create() factory function though, in this case, it is
a little hard to remove it since the create() factory function does many works to create
a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().

Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
cache algorithm based on Vector class.

No new tests, no behavior changes.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
(WebCore::RenderThemeEfl::getThemePartFromCache):
* platform/efl/RenderThemeEfl.h:

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

5 years agoMinor tweaks to HTMLCollection
darin@apple.com [Tue, 11 Nov 2014 17:35:29 +0000 (17:35 +0000)]
Minor tweaks to HTMLCollection
https://bugs.webkit.org/show_bug.cgi?id=138556

Reviewed by Chris Dumez.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
Update for namedElements function that now returns a Vector; also use
a new style for loop to iterate it.

* bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::callHTMLAllCollection): Updated for namedItems name change.
Also removed explicit Node* type from result of namedItemWithIndex, since that
function now returns a more specific type.
(WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLAllCollection::item): Ditto.
(WebCore::JSHTMLAllCollection::namedItem): Ditto.

* bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
(WebCore::namedItems): Updated name to match WebKit coding style, and also
updated to use the return value from namedItems, which now returns a Vector.
(WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
(WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.

* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
namedItems, which now returns a Vector.

* html/HTMLAllCollection.cpp:
(WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
since it's only used in one place, the create function.
(WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
explicit destructor since there's nothing special to implement, and includers of
the header file have everything they ened to compile the compiler-generated one.
(WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.

* html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
Chagned return type of namedItemWithIndex to Element.

* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
changed this to be a static member function so it can use the RootType enum, which
is now private to the class.
(WebCore::isMatchingHTMLElement): Marked this function static so it will get
internal linkage.
(WebCore::isMatchingElement): Ditto.
(WebCore::previousElement): Marked this function inline since it's called in only
one place. Changed argument type to a reference since it can never be null.
(WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
also updated for above changes.
(WebCore::firstMatchingElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::item): Changed return type to Element.
(WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
Element. This streamlines the code below that calls it so it fits on one line.
(WebCore::firstMatchingChildElement): Marked this function static so it will get
internal linkage.
(WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
since it can never be null.
(WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
header since, although it's marked inline, it's only used inside this file.
(WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
to make the function smaller and possibly easier to read. This does add one
redundant null check, but it seems OK to do that.
(WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
(WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
instead of an && since it makes the code a little easier to read.
(WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
using shorter variable names, and using references instead of pointers. Also removed
the call to didPopulate, since setNamedItemCache now takes care of that.
(WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
for better performance. Added a FIXME, because there seems to be something wrong
here about this being non-virtual. Made other small tweaks to streamline the code.
(WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
There is no reason to need to inline this.

* html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
of the class definitions so the class definitions are easier to read. Made some
functions that were formerly public or protected be private instead. Added a call
to didPopulate to setNamedItemCache so the callers don't have to do it.

* html/HTMLFormControlsCollection.cpp:
(WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
Tweaked coding style a little bit.
(WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
simplify a bit. Don't build the foundInputElements set when the owner is not a
form element, since we don't use the set in that case. Use shorter variable names,
and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
now takes care of that.

* html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
Updated return type for namedItem, and also made the override private.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
function name accordingly.
* html/HTMLFormElement.h: Ditto.

* html/HTMLNameCollection.h: Removed a stray blank line.

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
(WebCore::HTMLSelectElement::item): Ditto.
* html/HTMLSelectElement.h: Ditto.

* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
loop. Removed unwanted use of children()->collectionBegin() to get the first element
child of an HTMLElement. This function uses a mix of DOM and rendering functions that
is probably incorrect, but I did not tackle fixing that at this time.

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