WebKit-https.git
5 years agoRenderBlock shouldn't need a pre-destructor hook.
akling@apple.com [Wed, 5 Nov 2014 21:22:53 +0000 (21:22 +0000)]
RenderBlock shouldn't need a pre-destructor hook.
<https://webkit.org/b/138430>

Reviewed by Antti Koivisto.

All that was interesting in RenderBlock::willBeDestroyed() has migrated
to RenderBlockFlow. removeFromUpdateScrollInfoAfterLayoutTransaction()
can be called from the plain destructor, so just move it there.

We don't have to worry about destroyLeftoverChildren(), since RenderElement
will take care of that for us.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::willBeDestroyed): Deleted.
* rendering/RenderBlock.h:

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

5 years agoRemove 2 unnecessary virtual functions on InputType
cdumez@apple.com [Wed, 5 Nov 2014 21:21:58 +0000 (21:21 +0000)]
Remove 2 unnecessary virtual functions on InputType
https://bugs.webkit.org/show_bug.cgi?id=138433

Reviewed by Andreas Kling.

Remove 2 unused virtual functions on InputType:
- valueAttributeChanged()
- updateClearButtonVisibility()

No new tests, no behavior change.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::updateClearButtonVisibility): Deleted.
* html/HTMLInputElement.h:
* html/InputType.cpp:
(WebCore::InputType::valueAttributeChanged): Deleted.
(WebCore::InputType::updateClearButtonVisibility): Deleted.
* html/InputType.h:

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

5 years agofast/dom/remove-body-during-body-replacement2.html fails on WK2
ap@apple.com [Wed, 5 Nov 2014 21:21:45 +0000 (21:21 +0000)]
fast/dom/remove-body-during-body-replacement2.html fails on WK2
https://bugs.webkit.org/show_bug.cgi?id=138334

Reviewed by Anders Carlsson.

Source/WebKit2:

Added an SPI to focus a frame.

* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameFocus):
* WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setViewState):

Tools:

Reset focus to main frame between tests. DumpRenderTree does this via -makeFirstResponder
calls, which works because each frame is an NSView in WK1. WK2 makes equivalent
-makeFirstResponder calls, which may or may not be needed for other reasons, but
it also needs to reset internal focus explicitly.

It's not clear if this is the right long-term fix or a workaround for a WebKit bug.
WebKit behavior appears wrong, but it matches Firefox.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::resetAfterTest):

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

5 years agoSelect Data Detectors results instead of just highlighting them
timothy_horton@apple.com [Wed, 5 Nov 2014 21:13:29 +0000 (21:13 +0000)]
Select Data Detectors results instead of just highlighting them
https://bugs.webkit.org/show_bug.cgi?id=138435
<rdar://problem/18877675>

Reviewed by Beth Dakin.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::selectLastActionMenuRange):
(WebKit::WebPageProxy::selectLookupTextAtLocation): Deleted.
Rename selectLookupTextAtLocation to selectLastActionMenuRange.

* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController willOpenMenu:withEvent:]):
Do a real selection for single-item Data Detector menus; show the yellow highlight otherwise.
Adopt selectLastActionMenuRange for non-detected text.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::selectLastActionMenuRange):
(WebKit::WebPage::selectLookupTextAtLocation): Deleted.
Store the last (detected data or Lookup-derived) action menu range.
Select it upon selectLastActionMenuRange.

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

5 years agoWebContent crash in WebPage::selectWithGesture()
jhoneycutt@apple.com [Wed, 5 Nov 2014 20:55:23 +0000 (20:55 +0000)]
WebContent crash in WebPage::selectWithGesture()

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

This crash occurs when the web process receives a "TapAndAHalf" gesture
with the "Changed" state without having received a "TapAndAHalf"
gesture with the "Began" state.

No test possible.

Reviewed by Simon Fraser.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
Null check m_currentWordRange before dereferencing it.

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

5 years agoDisable action menus on page previews
commit-queue@webkit.org [Wed, 5 Nov 2014 20:48:37 +0000 (20:48 +0000)]
Disable action menus on page previews
https://bugs.webkit.org/show_bug.cgi?id=138431

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-05
Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView _shouldIgnoreMouseEvents]):
Renamed from -shouldIgnoreMouseEvents since this isn't actually public.
(-[WKView swipeWithEvent:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
Updated to reflect method rename.
(-[WKView shouldIgnoreMouseEvents]): Deleted.

* UIProcess/API/mac/WKViewInternal.h:
Expose -_shouldIgnoreMouseEvents.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
Cancel the menu if the presenting WKView should ignore mouse events.

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

5 years ago[CSS Shapes] Positioned polygon reftests failing again
bjonesbe@adobe.com [Wed, 5 Nov 2014 20:28:03 +0000 (20:28 +0000)]
[CSS Shapes] Positioned polygon reftests failing again
https://bugs.webkit.org/show_bug.cgi?id=138058

Reviewed by Anders Carlsson.

Remove these tests from TestExpectations since they do pass.

* TestExpectations:

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

5 years agoAction menu URL preview should "peek," i.e. appear when the menu item is
bdakin@apple.com [Wed, 5 Nov 2014 20:15:13 +0000 (20:15 +0000)]
Action menu URL preview should "peek," i.e. appear when the menu item is
highlighted
https://bugs.webkit.org/show_bug.cgi?id=138432
-and corresponding-
rdar://problem/18774264

Reviewed by Anders Carlsson.

New ivars. Keep a reference to the popover, and a BOOL that indicates whether we
should close the popover when the menu goes away.
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:

Re-set the preview bool to NO whenever we are about to pop up a new menu.
(-[WKActionMenuController prepareForMenu:withEvent:]):

Close the popover when the menu closes unless _shouldKeepPreviewPopoverOpen has
been set.
(-[WKActionMenuController didCloseMenu:withEvent:]):

Set _shouldKeepPreviewPopoverOpen.
(-[WKActionMenuController _keepPreviewOpen:]):

Re-factored to use ivar.
(-[WKActionMenuController _previewURLFromActionMenu:]):
(-[WKActionMenuController _createPreviewPopoverForURL:]):

Now call _previewURLFromActionMenu on menu item highlight.
(-[WKActionMenuController menu:willHighlightItem:]):

NSPopover delegate method so that we can keep our BOOL and ivar accurate in the
case where the popover is closed by some other mechanism than the action menu
going away.
(-[WKActionMenuController popoverWillClose:]):

New selector for the preview. Now when this item is actually selected, we just
want to set the BOOL _shouldKeepPreviewPopoverOpen to YES so that we keep the
preview open.
(-[WKActionMenuController _createActionMenuItemForTag:]):

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

5 years ago[CSS Shapes] shape-image-threshold parsing tests have a few failures
bjonesbe@adobe.com [Wed, 5 Nov 2014 20:10:56 +0000 (20:10 +0000)]
[CSS Shapes] shape-image-threshold parsing tests have a few failures
https://bugs.webkit.org/show_bug.cgi?id=138060

Reviewed by Dirk Schulze.

Remove testing for inline style from the CSSWG test because it isn't
specified and isn't consistent across browsers. This has been updated
upstream as well.

Add inline style tests to the WebKit test suite to make sure that
WebKIt doesn't lose coverage with this change.

* TestExpectations:
* css3/shapes/shape-outside/values/shape-image-threshold-001-expected.txt:
* css3/shapes/shape-outside/values/shape-image-threshold-001.html:
* fast/shapes/parsing/parsing-shape-image-threshold-expected.txt:
* fast/shapes/parsing/parsing-shape-image-threshold.html:

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

5 years agoDisable interaction with action menu page previews
commit-queue@webkit.org [Wed, 5 Nov 2014 20:09:26 +0000 (20:09 +0000)]
Disable interaction with action menu page previews
https://bugs.webkit.org/show_bug.cgi?id=138400

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-05
Reviewed by Tim Horton.

Expand on the existing -[WKView shouldIgnoreMouseEvents] by adding facilities to suppress handling
of all non-wheel events, effectively creating a scroll-only web view. Deploy this in
WKPagePreviewViewController.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare the OS X-only ignoresNonWheelMouseEvents SPI.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _ignoresNonWheelMouseEvents]):
(-[WKWebView _setIgnoresNonWheelMouseEvents:]):
Wrap the underlying WKView methods.

* UIProcess/API/Cocoa/WKWebViewInternal.h:
Declare the OS X-only ignoresNonWheelMouseEvents property.

* UIProcess/API/mac/WKView.mm:
Add _ignoresNonWheelMouseEvents to WKViewData.
(-[WKView shouldIgnoreMouseEvents]):
Include a check for _ignoresNonWheelMouseEvents.
(-[WKView _setIgnoresNonWheelMouseEvents:]):
Set the ivar in WKViewData.
(-[WKView _ignoresNonWheelMouseEvents]):
Fetch the ivar in WKViewData.
(-[WKView _shouldIgnoreWheelEvents]):
Implement the old -shouldIgnoreMouseEvents behavior.
(-[WKView scrollWheel:]):
-shouldIgnoreMouseEvents -> -_shouldIgnoreWheelEvents.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKPagePreviewViewController loadView]):
Configure the WKWebView to ignore non-wheel mouse events; use RetainPtr for the WKWebView.

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

5 years agoIncorrect sandbox_check in RemoteInspector.mm
ap@apple.com [Wed, 5 Nov 2014 19:57:27 +0000 (19:57 +0000)]
Incorrect sandbox_check in RemoteInspector.mm
https://bugs.webkit.org/show_bug.cgi?id=138408

Reviewed by Joseph Pecoraro.

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

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

5 years agoWeb Inspector: Add infrastructure for eslint based static analyzer
jonowells@apple.com [Wed, 5 Nov 2014 18:43:30 +0000 (18:43 +0000)]
Web Inspector: Add infrastructure for eslint based static analyzer
https://bugs.webkit.org/show_bug.cgi?id=137890

Reviewed by Timothy Hatcher.

Adding a manager to analyze source code, return warnings (AnalyzerMessages), and cache warnings.

* UserInterface/Base/Main.js: Create analyzerManager singleton.
* UserInterface/Controllers/AnalyzerManager.js: Added.
(WebInspector.AnalyzerManager):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode.):
(set WebInspector.AnalyzerManager.prototype.getAnalyzerMessagesForSourceCode):
(set WebInspector.AnalyzerManager.prototype.set get sourceCodeCanBeAnalyzed):
(set WebInspector.AnalyzerManager.prototype._handleSourceCodeContentDidChange):
* UserInterface/Main.html: Add new files.
* UserInterface/Models/AnalyzerMessage.js: Added.
(WebInspector.AnalyzerMessage):
(WebInspector.AnalyzerMessage.prototype.get sourceCodeLocation):
(WebInspector.AnalyzerMessage.prototype.get sourceCode):
(WebInspector.AnalyzerMessage.prototype.get text):
(WebInspector.AnalyzerMessage.prototype.get ruleIdentifier):
* UserInterface/Models/SourceCode.js: Added call to WebInspector.Object.addConstructorFunctions().

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

5 years agoRe-evaluate if a repetitive timer should be throttled upon firing
cdumez@apple.com [Wed, 5 Nov 2014 18:43:19 +0000 (18:43 +0000)]
Re-evaluate if a repetitive timer should be throttled upon firing
https://bugs.webkit.org/show_bug.cgi?id=138339

Reviewed by Gavin Barraclough.

Re-evaluate if a repetitive timer should be throttled upon firing in
case the plugin observability state has changed:
- It used to be visible but now isn't and thus the timer can be throttled
- It used to play audio but now doesn't and thus the timer can be throttled

We already stopped throttling if the plugin became observable. However,
we didn't start throttling if the plugin became non-observable.

* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateThrottlingStateIfNecessary):

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

5 years agoAdd ENABLE_FILTERS_LEVEL_2 feature guard.
dino@apple.com [Wed, 5 Nov 2014 18:27:12 +0000 (18:27 +0000)]
Add ENABLE_FILTERS_LEVEL_2 feature guard.
https://bugs.webkit.org/show_bug.cgi?id=138362

Reviewed by Tim Horton.

Add a new feature define for Level 2 of CSS Filters.
http://dev.w3.org/fxtf/filters-2/

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsMac.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

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

5 years agoMove text-align CSS property to the new StyleBuilder
cdumez@apple.com [Wed, 5 Nov 2014 18:24:57 +0000 (18:24 +0000)]
Move text-align CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138398

Reviewed by Antti Koivisto.

Move text-align CSS property from DeprecatedStyleBuilder to the new
StyleBuilder so that it is now generated from CSSPropertyNames.in.
This patch adds a TextAlign Converter to support this.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyTextAlign::applyValue): Deleted.
(WebCore::ApplyPropertyTextAlign::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertTextAlign):

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

5 years agoEnable ARMv7 disassembler for all platforms
ossy@webkit.org [Wed, 5 Nov 2014 17:45:38 +0000 (17:45 +0000)]
Enable ARMv7 disassembler for all platforms
https://bugs.webkit.org/show_bug.cgi?id=138415

Reviewed by Darin Adler.

* wtf/Platform.h:

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

5 years agoFix build warning in SVGMarkerElement.cpp
commit-queue@webkit.org [Wed, 5 Nov 2014 17:42:38 +0000 (17:42 +0000)]
Fix build warning in SVGMarkerElement.cpp
https://bugs.webkit.org/show_bug.cgi?id=138407

Patch by Sanghyup Lee <sh53.lee@samsung.com> on 2014-11-05
Reviewed by Darin Adler.

Build warning in debug cause 'comparison of unsigned expression >= 0 is always true [-Wtype-limits]'

* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType): Removed useless condition in ASSERT.

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

5 years agoStop special-casing the empty string in HTMLInputElement.type setter
cdumez@apple.com [Wed, 5 Nov 2014 17:41:08 +0000 (17:41 +0000)]
Stop special-casing the empty string in HTMLInputElement.type setter
https://bugs.webkit.org/show_bug.cgi?id=138403

Reviewed by Ryosuke Niwa.

Source/WebCore:

Stop special-casing the empty string in HTMLInputElement.type setter.
Previously, if input.type is set to "", we would remove the type
attribute. This is inconsistent with the specification and the behavior
of other browsers (tested Firefox 33 and Chrome 38). Instead, we should
set the attribute to the empty string.

Also stop treating null as a null string to align with the
specification and other browsers (tested Firefox 33 and Chrome 38).

Finally, update HTMLInputElement::setType() to take an AtomicString in
argument instead of a String as it ends up calling setAttribute(), and
thus needing an AtomicString.

Test: fast/dom/HTMLInputElement/input-type-attribute.html

* html/FileInputType.cpp:
(WebCore::UploadButtonElement::UploadButtonElement):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setType):
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl:

LayoutTests:

Add layout test to check the functionality of the HTMLInputElement.type
getter and setter.

* fast/dom/HTMLInputElement/input-type-attribute-expected.txt: Added.
* fast/dom/HTMLInputElement/input-type-attribute.html: Added.

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

5 years ago[WinCairo] Compile error, missing guard.
commit-queue@webkit.org [Wed, 5 Nov 2014 17:35:17 +0000 (17:35 +0000)]
[WinCairo] Compile error, missing guard.
https://bugs.webkit.org/show_bug.cgi?id=138421

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-11-05
Reviewed by Brent Fulgham.

There is missing a guard for CSS_SELECTORS_LEVEL4 in CSSParserValues.cpp.

* css/CSSParserValues.cpp:

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

5 years agoREGRESSION(r175601): Assertion failures in SimpleLineLayout
antti@apple.com [Wed, 5 Nov 2014 15:07:24 +0000 (15:07 +0000)]
REGRESSION(r175601): Assertion failures in SimpleLineLayout
https://bugs.webkit.org/show_bug.cgi?id=138422

Check for end.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):

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

5 years agoNetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
berto@igalia.com [Wed, 5 Nov 2014 13:29:21 +0000 (13:29 +0000)]
NetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
https://bugs.webkit.org/show_bug.cgi?id=138418

Reviewed by Carlos Garcia Campos.

Replace bool with NPBool, which is actually an unsigned char.

* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):

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

5 years ago[GTK] Add WebKitWebResource::failed-with-tls-errors signal
carlosgc@webkit.org [Wed, 5 Nov 2014 10:54:05 +0000 (10:54 +0000)]
[GTK] Add WebKitWebResource::failed-with-tls-errors signal
https://bugs.webkit.org/show_bug.cgi?id=137862

Reviewed by Gustavo Noronha Silva.

Source/WebKit2:

When a resource load fails due to TLS errors emit WebKitWebResource::failed-with-tls-errors
signal instead of WebKitWebResource::failed so that TLS errors information and certificate
are provided.

* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
(didReceiveWebViewMessageFromInjectedBundle): Check if the error
is a TLS failure to emit failed-with-tls-errors instead of failed.
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_class_init): Add WebKitWebResource::failed-with-tls-errors signal.
(webkitWebResourceFailedWithTLSErrors): Emit failed-with-tls-errors and finish signals.
* UIProcess/API/gtk/WebKitWebResourcePrivate.h:

Tools:

Add a test case to check that WebKitWebResource::failed-with-tls-errors
is emitted when a subresource load fails due to TLS errors.

* TestWebKitAPI/Tests/WebKit2Gtk/TestSSL.cpp:
(TLSSubresourceTest::resourceLoadStartedCallback):
(TLSSubresourceTest::TLSSubresourceTest):
(TLSSubresourceTest::subresourceFailedCallback):
(TLSSubresourceTest::subresourceFailedWithTLSErrorsCallback):
(TLSSubresourceTest::subresourceLoadStarted):
(TLSSubresourceTest::subresourceFailedWithTLSErrors):
(TLSSubresourceTest::waitUntilSubresourceLoadFail):
(testSubresourceLoadFailedWithTLSErrors):
(httpsServerCallback):
(httpServerCallback):
(beforeAll):

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

5 years agoSimple line layout: support text-transform: lowercase|uppercase|capitalize
akling@apple.com [Wed, 5 Nov 2014 10:12:42 +0000 (10:12 +0000)]
Simple line layout: support text-transform: lowercase|uppercase|capitalize
<https://webkit.org/b/138406>

Reviewed by Antti Koivisto.

Source/WebCore:

Expand the simple line layout coverage to include all text-transform values.
Since the property works on the text string level, it's really only a matter
of removing the short-circuit.

Test: fast/text/simple-lines-text-transform.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):

LayoutTests:

Add ref test for simple line layout with all text-transform values.

* fast/text/simple-lines-text-transform-expected.html: Added.
* fast/text/simple-lines-text-transform.html: Added.

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

5 years agoFix build warning in WebKit2/WebProcess module.
commit-queue@webkit.org [Wed, 5 Nov 2014 10:01:24 +0000 (10:01 +0000)]
Fix build warning in WebKit2/WebProcess module.
https://bugs.webkit.org/show_bug.cgi?id=138410

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-05
Reviewed by Alexey Proskuryakov.

Fix build warning by removing parameter name

* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):

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

5 years ago[EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type...
jer.noble@apple.com [Wed, 5 Nov 2014 09:56:37 +0000 (09:56 +0000)]
[EME][Mac] Allow the client to specify FPS protocol versions in the keySystem type field.
https://bugs.webkit.org/show_bug.cgi?id=138380

Reviewed by Eric Carlson.

Parse out the requested FPS protocol version of the keySystem type string and pass it to
AVStreamDataParser as an options dictionary.

* platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
(WebCore::validKeySystemRE): Added, match comma-separated version suffixes.
(WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Call above.
(WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Parse out the version numbers
    and pass into the session as a vector.
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
* platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
(WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Take a vector of
    protocol version numbers.
(WebCore::CDMSessionMediaSourceAVFObjC::update): Create an NSArray and pass into
    the key request creation method in an options dictionary.

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

5 years agoMove HTTPHeaderMap encoding to the class
antti@apple.com [Wed, 5 Nov 2014 09:26:51 +0000 (09:26 +0000)]
Move HTTPHeaderMap encoding to the class
https://bugs.webkit.org/show_bug.cgi?id=138412

Reviewed by Andreas Kling.

Source/WebCore:

* platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::encode):
(WebCore::HTTPHeaderMap::decode):

    Use generic encoding for the uncommon header map. Common headers still require custom code due to the enum class.

Source/WebKit2:

* PluginProcess/PluginControllerProxy.cpp:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode): Deleted.
(IPC::ArgumentCoder<HTTPHeaderMap>::decode): Deleted.

    Make these HTTPHeaderMap members instead so they can access internals and can be used elsewhere.

* Shared/WebCoreArgumentCoders.h:

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

5 years agoBuild fix for some compiler versions.
ap@apple.com [Wed, 5 Nov 2014 08:17:42 +0000 (08:17 +0000)]
Build fix for some compiler versions.

* TestWebKitAPI/Tests/mac/TypingStyleCrash.mm: (TestWebKitAPI::TEST): Compiler was
unhappy because this is a getter, and these shouldn't have side effects.

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

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

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

5 years agoSpeculative build fix.
bdakin@apple.com [Wed, 5 Nov 2014 05:52:05 +0000 (05:52 +0000)]
Speculative build fix.

* UIProcess/API/mac/WKView.mm:
(-[WKView _dismissActionMenuDataDetectorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:

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

5 years agoUn-anchor data detector popovers on scroll
bdakin@apple.com [Wed, 5 Nov 2014 05:42:29 +0000 (05:42 +0000)]
Un-anchor data detector popovers on scroll
https://bugs.webkit.org/show_bug.cgi?id=138385
-and corresponding-
rdar://problem/18869345

Reviewed by Tim Horton.

Source/WebCore:

* platform/spi/mac/DataDetectorsSPI.h:

Source/WebKit2:

Whenever we dismiss the dictionary popover, and on scroll, we should try to
dismiss the data detector popovers. Right now we don’t have the ability to know if
a dismiss succeeded, so we will settle for un-anchoring the popover.

* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]):
(-[WKView _dismissActionMenuDataDetetcorPopovers]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::dismissActionMenuDataDetetcorPopovers):
* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController dismissActionMenuDataDetetcorPopovers]):

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

5 years ago[iOS] WKPDFView should scroll to a fragment when loading a PDF
aestes@apple.com [Wed, 5 Nov 2014 05:36:08 +0000 (05:36 +0000)]
[iOS] WKPDFView should scroll to a fragment when loading a PDF
https://bugs.webkit.org/show_bug.cgi?id=138404

Reviewed by Tim Horton.

WKPDFView already knew how to scroll to a page number fragment during a same-document navigation, but it didn't
know to do so when loading a PDF whose URL already contained a page number fragment. This could happen if the
user long-presses a page number link and taps 'Open in New Tab'.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]): Called _scrollToFragment:.
(-[WKPDFView _scrollToFragment:]): Moved fragment scrolling code to here from web_didSameDocumentNavigation:.
(-[WKPDFView web_didSameDocumentNavigation:]): Called _scrollToFragment.

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

5 years ago[iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
aestes@apple.com [Wed, 5 Nov 2014 04:56:27 +0000 (04:56 +0000)]
[iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357

Rubber-stamped by Dan Bernstein.

During patch review for r175595 I changed from using +URLWithString:relativeToURL: to using
+_web_URLWithWTFString:relativeToURL: to append a page number fragment to the document URL.
If the base URL already contains a fragment, +_web_URLWithWTFString:relativeToURL: appends to the existing
fragment whereas +URLWithString:relativeToURL: replaces the existing fragment. I want the latter behavior.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _URLForLinkAnnotation:]):

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

5 years agoAdd a method for performing cherrypick-merges.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:52 +0000 (04:49 +0000)]
Add a method for performing cherrypick-merges.
https://bugs.webkit.org/show_bug.cgi?id=138375

Adds support for cherrypick-merges.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.cherrypick_merge): Added.

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

5 years agoAdd a way to ascertain the SVN URL associated with a Git branch.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:49 +0000 (04:49 +0000)]
Add a way to ascertain the SVN URL associated with a Git branch.
https://bugs.webkit.org/show_bug.cgi?id=138374

The svn_url method returns the SVN URL associated with the current Git branch.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.svn_url): Added.

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

5 years agoAdd the ability to search for modifications that are staged for commit.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:46 +0000 (04:49 +0000)]
Add the ability to search for modifications that are staged for commit.
https://bugs.webkit.org/show_bug.cgi?id=138373

This makes is easy to do identify files that require merge post-processing,
in addition to stand-alone utility.

Reviewed by NOBODY (OOPS!).

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.modifications_staged_for_commit): Added.

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

5 years agoAdd a branch keyword argument to _run_git_svn_find_rev.
matthew_hanson@apple.com [Wed, 5 Nov 2014 04:49:42 +0000 (04:49 +0000)]
Add a branch keyword argument to _run_git_svn_find_rev.
https://bugs.webkit.org/show_bug.cgi?id=138372

Reviewed by NOBODY (OOPS!).

The addition of this keyword argument allows clients to determine the Git hash
of commits made on an SVN branch, provided that branch has been fetched locally.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git._run_git_svn_find_rev):
Add a branch keyword argument that is added to the end of the command, if present.

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

5 years agoAvoid double hash table lookup in SpaceSplitStringData::create()
cdumez@apple.com [Wed, 5 Nov 2014 03:58:19 +0000 (03:58 +0000)]
Avoid double hash table lookup in SpaceSplitStringData::create()
https://bugs.webkit.org/show_bug.cgi?id=138396

Reviewed by Ryosuke Niwa.

Avoid double hash table lookup in SpaceSplitStringData::create() by
calling HashMap::add() and using the AddResult, instead of calling
HashMap::get() then HashMap::add().

No new tests, no behavior change.

* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):

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

5 years agoSimple line layout: Abstract out content iteration and text handling in general.
zalan@apple.com [Wed, 5 Nov 2014 03:47:45 +0000 (03:47 +0000)]
Simple line layout: Abstract out content iteration and text handling in general.
https://bugs.webkit.org/show_bug.cgi?id=138346

Reviewed by Antti Koivisto.

Add a class that can act as the primary iterator/fragment handling interface to the line parser.
This helps adding support multiple renderer elements without changing the parser logic.
Currently it operates strictly on the first child of the RenderBlockFlow.

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::FlowContentIterator::FlowContentIterator):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextBreakablePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::findNextNonWhitespacePosition):
(WebCore::SimpleLineLayout::FlowContentIterator::textWidth):
(WebCore::SimpleLineLayout::FlowContentIterator::isNewlineCharacter):
(WebCore::SimpleLineLayout::FlowContentIterator::isEndOfContent):
(WebCore::SimpleLineLayout::FlowContentIterator::style):
(WebCore::SimpleLineLayout::computeLineLeft):
(WebCore::SimpleLineLayout::TextFragment::TextFragment):
(WebCore::SimpleLineLayout::removeTrailingWhitespace):
(WebCore::SimpleLineLayout::initializeNewLine):
(WebCore::SimpleLineLayout::splitFragmentToFitLine):
(WebCore::SimpleLineLayout::nextFragment):
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::skipWhitespace): Deleted.
(WebCore::SimpleLineLayout::textWidth): Deleted.
* rendering/SimpleLineLayout.h:

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

5 years agoFix build after r138351
jeremyj-wk@apple.com [Wed, 5 Nov 2014 03:32:52 +0000 (03:32 +0000)]
Fix build after r138351
https://bugs.webkit.org/show_bug.cgi?id=138401

Ureviewed. Make return type match.

* platform/ios/WebCoreSystemInterfaceIOS.mm:

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

5 years agoWeb Inspector: Too much whitespace in resource details sidebar in groups
commit-queue@webkit.org [Wed, 5 Nov 2014 03:18:13 +0000 (03:18 +0000)]
Web Inspector: Too much whitespace in resource details sidebar in groups
https://bugs.webkit.org/show_bug.cgi?id=138386

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

* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group:first-child > .row.simple:first-child > *):
(body.mac-platform.legacy .details-section > .content > .group:first-child > .row.simple:first-child > *):
(body.mac-platform.legacy .details-section > .content > .group > .row.text):
(.details-section > .content > .group > .row.properties:not(.empty)):
(body.mac-platform.legacy .details-section > .content > .group > .row.properties:not(.empty)):
Adjust top and bottom padding.

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

5 years agoWeb Inspector: Lots of TimelineDataGridNode asserts on reloads
commit-queue@webkit.org [Wed, 5 Nov 2014 02:31:57 +0000 (02:31 +0000)]
Web Inspector: Lots of TimelineDataGridNode asserts on reloads
https://bugs.webkit.org/show_bug.cgi?id=138387

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-04
Reviewed by Brian Burg.

The TimelineRuler.secondsPerPixel in the TimelineOverview is initialized
with a non-0 value and saved in a setting. However the TimelineRuler in
the OverviewTimelineView is not initialized with this value, and instead
initialized to 0. This patch initializes them to the same non-0 value.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.set secondsPerPixel):
* UserInterface/Views/TimelineContentView.js:

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

5 years agoAdd bundle SPI allowing PageOverlay to customize the action menu
timothy_horton@apple.com [Wed, 5 Nov 2014 01:39:47 +0000 (01:39 +0000)]
Add bundle SPI allowing PageOverlay to customize the action menu
https://bugs.webkit.org/show_bug.cgi?id=138388
<rdar://problem/18875579>

Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
Bump the BundlePageOverlay client version.

(WKBundlePageOverlayCreate):
(WKBundlePageOverlaySetAccessibilityClient):
Don't return if we have a version; the version check happens later anyway,
and now it is valid to have a version >0.

* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
Bump the BundlePageOverlay client version.
Add prepareForActionMenu callback.

* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::prepareForActionMenu):
* WebProcess/WebPage/WebPageOverlay.cpp:
(WebKit::overlayMap):
(WebKit::WebPageOverlay::WebPageOverlay):
(WebKit::WebPageOverlay::~WebPageOverlay):
(WebKit::WebPageOverlay::fromCoreOverlay):
(WebKit::WebPageOverlay::pageOverlayDestroyed):
Keep track of a map of PageOverlay to WebPageOverlay.

(WebKit::WebPageOverlay::prepareForActionMenu):
Forward prepareForActionMenu to the client.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
Iterate through the overlays and let them prepareForActionMenu;
the first overlay that returns true wins. If no overlays want to
do anything, hand preparation along to the context menu client.

* page/PageOverlayController.h:
Expose the list of all overlays.

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

5 years agoAdd button and enable optimized fullscreen.
jeremyj-wk@apple.com [Wed, 5 Nov 2014 01:36:42 +0000 (01:36 +0000)]
Add button and enable optimized fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=138351

Reviewed by Eric Carlson.

Added optimizedFullscreenButton to js media element controls. Remove #if conditional
and use optimizedFullscreenSupported to enable feature at runtime

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::enterFullscreenOptimized): enable
(WebCore::MediaControlsHost::optimizedFullscreenSupported): added
* Modules/mediacontrols/MediaControlsHost.h: add optimizedFullscreenSupported
* Modules/mediacontrols/MediaControlsHost.idl: ditto
* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.createControls): add button
(Controller.prototype.handleReadyStateChange): update button
(Controller.prototype.updateOptimizedFullscreenButton): added
* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button): added
(video::-webkit-media-controls-optimized-fullscreen-button:active): added
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.createControls): listen for events from optimizedFullscreenButton
(ControllerIOS.prototype.configureInlineControls): add button for non-audio when supported.
(ControllerIOS.prototype.handleBaseGestureChange): 2-finger double-tap gesture for optimized fullscreen
(ControllerIOS.prototype.handleWrapperTouchStart): ditto
(ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): added
(ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): added
(ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): fix typo
(ControllerIOS.prototype.handleStartPlaybackButtonTouchCancel): fix typo
* WebCore.exp.in:
* platform/ios/WebCoreSystemInterfaceIOS.h: added wkIsOptimizedFullscreenSupported
* platform/ios/WebCoreSystemInterfaceIOS.mm: added wkIsOptimizedFullscreenSupported
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::enterFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::exitFullscreen): enable feature
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen): only request exit when entered and not requested exit
(WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): ditto
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface): added
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): add IsOptimizedFullscreenSupported

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

5 years ago[iOS] Add long press support for links in WKPDFView
aestes@apple.com [Wed, 5 Nov 2014 01:24:20 +0000 (01:24 +0000)]
[iOS] Add long press support for links in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=138357

Reviewed by Dan Bernstein.

Use WKActionSheetAssistant to show a link action sheet in response to long-pressing on a link. Have WKPDFView
conform to WKActionSheetAssistantDelegate in order to respond to the open and copy actions as well as to
provide the link's URL and position information to WKActionSheetAssistant. The long-pressed link is highlighted
for .75 seconds before the sheet is displayed in order to match UIWebPDFView.

* UIProcess/ios/WKActionSheetAssistant.h: Made protocol methods that WKPDFView doesn't implement optional.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant updatePositionInformation]): Checked if delegate responds to
updatePositionInformationForActionSheetAssistant: before calling.
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Checked if delegate responds to
actionSheetAssistant:willStartInteractionWithElement: before calling.
(-[WKActionSheetAssistant cleanupSheet]): Checked if delegate responds to actionSheetAssistantDidStopInteraction:
before calling.
* UIProcess/ios/WKPDFView.h: Conformed to WKActionSheetAssistantDelegate.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]): Instantiated a WKActionSheetAssistant and set self as its delegate.
(-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]): Moved highlight drawing to here from
annotation:wasTouchedAtPoint:controller: in order to be reused for long-press.
(-[WKPDFView _URLForLinkAnnotation:]): Moved URL creation to here from annotation:wasTouchedAtPoint:controller:
in order to be reused for long-press. Generated an absolute URL since this URL might go into the pasteboard.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Changed to call
_highlightLinkAnnotation:forDuration:completionHandler: and _URLForLinkAnnotation:.
(-[WKPDFView annotation:isBeingPressedAtPoint:controller:]): Set values on _positionInformation and called
-[WKActionSheetAssistant showLinkSheet] after showing a highlight for .75 seconds.
(-[WKPDFView positionInformation]): Returned _positionInformation.
(-[WKPDFView performAction:]): Added a UTF-8 text and URL representation of the pressed URL to the pasteboard.
(-[WKPDFView openElementAtLocation:]): Called WebPage::navigateToURLWithSimulatedClick().
(-[WKPDFView actionsForElement:defaultActions:]): Returned actions from UIClient::actionsForElement().
(-[WKPDFView _createHighlightViewWithFrame:]): Deleted.

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

5 years agoRename checkMarkByte() to jumpIfIsRememberedOrInEden().
mark.lam@apple.com [Wed, 5 Nov 2014 01:19:37 +0000 (01:19 +0000)]
Rename checkMarkByte() to jumpIfIsRememberedOrInEden().
<https://webkit.org/b/138369>

Reviewed by Geoffrey Garen.

Write barriers are needed for GC Eden collections so that we can scan pointers
pointing from old generation objects to eden generation objects.  The barrier
currently checks the mark byte in a cell to see if we should skip adding the
cell to the GC remembered set.  The addition should be skipped if:

1. The cell is in the young generation.  It has no old to eden pointers by
   definition.
2. The cell is already in the remembered set.  While it is ok to add the cell
   to the GC remembered set more than once, it would be redundant.  Hence,
   we skip this as an optimization to avoid doing unnecessary work.

The barrier currently names this check as checkMarkByte().  We should rename it
to jumpIfIsRememberedOrInEden() to be clearer about its intent.

Similarly, Jump results of this check are currently named
ownerNotMarkedOrAlreadyRemembered.  This can be misinterpreted as the owner is
not marked or not already remembered.  We should rename it to
ownerIsRememberedOrInEden which is clearer about the intent of the
check.  What we are really checking for is that the cell is in the eden gen,
which is implied by it being "not marked".

* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::osrWriteBarrier):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::jumpIfIsRememberedOrInEden):
(JSC::AssemblyHelpers::checkMarkByte): Deleted.
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitWriteBarrier):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSCell.h:

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

5 years agoTry to fix the 32-bit build.
andersca@apple.com [Wed, 5 Nov 2014 01:07:45 +0000 (01:07 +0000)]
Try to fix the 32-bit build.

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForLink]):
(-[WKActionMenuController _createActionMenuItemForTag:]):

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

5 years agoDisable failing v8-deltablue.js for ARM
msaboff@apple.com [Wed, 5 Nov 2014 00:53:55 +0000 (00:53 +0000)]
Disable failing v8-deltablue.js for ARM
https://bugs.webkit.org/show_bug.cgi?id=138382

Reviewed by Geoffrey Garen.

This test is failing on ARM 32 bit.

* tests/v8-v6/v8-deltablue.js:

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

5 years agoUse a web view for Quick Look in action menus
commit-queue@webkit.org [Wed, 5 Nov 2014 00:35:29 +0000 (00:35 +0000)]
Use a web view for Quick Look in action menus
https://bugs.webkit.org/show_bug.cgi?id=138370

Patch by Conrad Shultz <conrad_shultz@apple.com> on 2014-11-04
Reviewed by Anders Carlsson.

Instead of using the QLPreviewBubble SPI, show a popover containing a web view. This currently
does not inherit any configuration from the presenting WKView and does not expose any
customization options.

* UIProcess/mac/WKActionMenuController.mm:
Declare new internal NSViewController subclass, WKPagePreviewViewController.
(-[WKPagePreviewViewController initWithPageURL:]):
Store the passed-in URL and set a somewhat arbitrary (iPhone 5 screen size) default preferred size.
(-[WKPagePreviewViewController loadView]):
Create a WKWebView and load the URL passed into the initializer.
(-[WKActionMenuController _previewURLFromActionMenu:]):
Renamed from -_quickLookURLFromActionMenu:; present the popover returned by -_createPreviewPopoverForURL:.
(-[WKActionMenuController _createPreviewPopoverForURL:]):
New helper method; return a popover that owns a _WKPagePreviewViewController configured to show a scaled-down web page.
(-[WKActionMenuController _createActionMenuItemForTag:]):
Update to reflect method rename.
(-[WKActionMenuController _quickLookURLFromActionMenu:]): Deleted.

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

5 years agoWeb Inspector: Pause on exceptions should show the actual exception
joepeck@webkit.org [Wed, 5 Nov 2014 00:31:37 +0000 (00:31 +0000)]
Web Inspector: Pause on exceptions should show the actual exception
https://bugs.webkit.org/show_bug.cgi?id=63096

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* debugger/Debugger.h:
Expose accessor for the pause reason to subclasses.

* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::type):
New "error" subtype for error objects.

* inspector/InjectedScriptSource.js:
When an object is an error object, use toString to provide a richer description.

* inspector/protocol/Runtime.json:
Expose a new "error" subtype for Error types (TypeError, ReferenceError, EvalError, etc).

* inspector/protocol/Debugger.json:
Provide type checked objects for different Debugger.pause pause reasons.
An exception provides the thrown object, but assert / CSP pauses provide
a richer typed object as the auxiliary data.

* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchDidPause):
When paused because of an exception, pass the exception on.

* inspector/agents/InspectorDebuggerAgent.h:
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
(Inspector::InspectorDebuggerAgent::scriptExecutionBlockedByCSP):
Provide richer data in pause events.

* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.generate_domain.is_anonymous_enum_param):
(BackendCommandsGenerator.generate_domain):
* inspector/scripts/tests/expected/enum-values.json-result:
Generate frontend enums for anonymous enum event parameters.

Source/WebCore:

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
Pass assertion message on.

Source/WebInspectorUI:

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

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get pauseReason):
(WebInspector.DebuggerManager.prototype.get pauseData):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype._pauseReasonFromPayload):
Maintain the current pause reason and auxiliary data in the manager.

* UserInterface/Protocol/DebuggerObserver.js:
(WebInspector.DebuggerObserver.prototype.paused):
Pass previously unused event parameters on to the manager.

* UserInterface/Views/ConsoleMessageImpl.js:
(WebInspector.ConsoleMessageImpl):
Style error objects in the console like Objects. The new description
string provides a richer message if you console.log(exception).

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
(WebInspector.DebuggerSidebarPanel.prototype._updatePauseReason):
Update the UI when we pause / resume to show / hide a pause reason section.

* UserInterface/Views/DetailsSectionRow.js:
(WebInspector.DetailsSectionRow.prototype.set emptyMessage):
Fix a latent bug that would have thrown an exception if the setter was ever used.

* UserInterface/Views/DetailsSectionTextRow.js: Added.
(WebInspector.DetailsSectionTextRow):
(WebInspector.DetailsSectionTextRow.prototype.get text):
(WebInspector.DetailsSectionTextRow.prototype.set text):
* UserInterface/Views/DetailsSection.css:
(.details-section > .content > .group > .row.simple.data > .value):
(.details-section > .content > .group > .row.text):
Simple class for a section of centered text. This is modelled after
the empty message text style in other sections.

* UserInterface/Views/LogContentView.css:
(.console-formatted-object, .console-formatted-node, .console-formatted-error):
(.console-formatted-object .section, .console-formatted-node .section, .console-formatted-error .section):
(.console-formatted-object .properties, .console-formatted-node .properties, .console-formatted-error .properties):
Style "error" objects like regular objects. We may wish to treat differently later.

* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
Regenerate legacy backend commands to get the new enum.

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

5 years agoDisable flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests...
msaboff@apple.com [Wed, 5 Nov 2014 00:29:21 +0000 (00:29 +0000)]
Disable flakey float32-repeat-out-of-bounds.js and int8-repeat-out-of-bounds.js tests for ARM64
https://bugs.webkit.org/show_bug.cgi?id=138381

Reviewed by Mark Lam.

Disabled these test for ARM64.  Will address the failures and then re-enable.

* tests/stress/float32-repeat-out-of-bounds.js:
* tests/stress/int8-repeat-out-of-bounds.js:

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

5 years agoDisable flakey dfg-int8array.js and dfg-int16array.js tests for ARM64
msaboff@apple.com [Wed, 5 Nov 2014 00:26:08 +0000 (00:26 +0000)]
Disable flakey dfg-int8array.js and dfg-int16array.js tests for ARM64
https://bugs.webkit.org/show_bug.cgi?id=138379

Reviewed by Mark Lam.

Disabled these test for ARM64.  Will address the failures and then re-enable.

* js/script-tests/dfg-int16array.js:
* js/script-tests/dfg-int8array.js:

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

5 years ago[iOS] Fix incorrect interface orientation that can be caused by fullscreen video...
commit-queue@webkit.org [Wed, 5 Nov 2014 00:22:46 +0000 (00:22 +0000)]
[iOS] Fix incorrect interface orientation that can be caused by fullscreen video dismissal.
https://bugs.webkit.org/show_bug.cgi?id=137930.

Patch by Reza Abbasian <rabbasian@apple.com> on 2014-11-04
Reviewed by Jer Noble.

When a fullscreen video gets dismissed programmatically, for instance for removing
a webview from the view hierarchy, it can put the device in an incorrect orientation.
Make sure we retain the window of parentView when we attempt to go to fullscreen and use
the retained window for putting the device in correct orientation after dismissal.

* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::setupFullscreen):
(WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
(WebVideoFullscreenInterfaceAVKit::invalidate):

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

5 years agoRemove two unused ScrollingCoordinator methods.
akling@apple.com [Tue, 4 Nov 2014 23:14:32 +0000 (23:14 +0000)]
Remove two unused ScrollingCoordinator methods.
<https://webkit.org/b/138377>

Reviewed by Chris Dumez.

These appear to be leftovers from the now-defunct chromium port.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea): Deleted.
(WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Deleted.
* page/scrolling/ScrollingCoordinator.h:

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

5 years agoAdd ptr() method to Ref class
cdumez@apple.com [Tue, 4 Nov 2014 23:00:48 +0000 (23:00 +0000)]
Add ptr() method to Ref class
https://bugs.webkit.org/show_bug.cgi?id=138361

Reviewed by Darin Adler.

Source/WebCore:

Use the new Ref::ptr() method.

No new tests, no behavior change.

* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption):
* bindings/js/JSHTMLAllCollectionCustom.cpp:
(WebCore::getNamedItems):
* bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
(WebCore::getNamedItems):
* css/CSSStyleRule.h:
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::insertRule):
* css/CSSValueList.h:
(WebCore::CSSValueList::item):
(WebCore::CSSValueList::itemWithoutBoundsCheck):
* css/InspectorCSSOMWrappers.cpp:
(WebCore::InspectorCSSOMWrappers::collect):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator):
(WebCore::ChildListMutationAccumulator::childAdded):
* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::namedItem):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeChild):
* dom/CurrentScriptIncrementer.h:
(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):
(WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer):
* dom/MutationRecord.cpp:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::ensureChildNodeList):
(WebCore::NodeListsNodeData::ensureEmptyChildNodeList):
(WebCore::NodeListsNodeData::addCacheWithQualifiedName):
* dom/Range.cpp:
(WebCore::Range::setDocument):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestScript):
(WebCore::ScriptElement::executeScript):
* dom/StaticNodeList.cpp:
(WebCore::StaticNodeList::item):
(WebCore::StaticElementList::item):
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveRemainingSiblingsToNewParent):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertText):
* editing/DictationCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::insertTextWithoutSendingTextEvent):
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren):
* editing/SimplifyMarkupCommand.cpp:
(WebCore::SimplifyMarkupCommand::doApply):
* editing/markup.cpp:
(WebCore::hasOneChild):
(WebCore::hasOneTextChild):
(WebCore::replaceChildrenWithFragment):
(WebCore::replaceChildrenWithText):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::checkValidity):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::shouldLoadLink):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
(WebCore::InspectorStyleSheet::revalidateStyle):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
* page/FocusController.cpp:
(WebCore::FocusController::setFocusedElement):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForRule):
* page/PageSerializer.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::updateAnimations):
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::platformCALayerPaintContents):
* rendering/ClipPathOperation.h:
* rendering/RenderBlock.cpp:
(WebCore::styleForFirstLetter):
(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
* rendering/RenderBlockFlow.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::styleDidChange):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::setStyle):
(WebCore::RenderElement::styleDidChange):
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::adjustInnerTextStyle):
* rendering/RenderTextControl.h:
* rendering/RenderTextControlMultiLine.cpp:
(WebCore::RenderTextControlMultiLine::createInnerTextStyle):
* rendering/RenderTextControlSingleLine.cpp:
(WebCore::RenderTextControlSingleLine::createInnerTextStyle):
* rendering/style/DataRef.h:
(WebCore::DataRef::get):
(WebCore::DataRef::access):
(WebCore::DataRef::operator==):
(WebCore::DataRef::operator!=):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresPositionedLayoutOnly):
(WebCore::RenderStyle::changeRequiresLayerRepaint):
(WebCore::RenderStyle::changeRequiresRepaint):
(WebCore::RenderStyle::changeRequiresRepaintIfTextOrBorderOrOutline):
(WebCore::RenderStyle::changeRequiresRecompositeLayer):
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::diffRequiresLayerRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::cssValue):
* rendering/style/StyleGeneratedImage.h:
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange):
(WebCore::Style::resolveLocal):
(WebCore::Style::resolveTree):
* style/StyleResolveTree.h:

Source/WebKit/mac:

Use the new Ref::ptr() method.

* WebView/WebFrame.mm:
(-[WebFrame _setTypingStyle:withUndoAction:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
(-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
* WebView/WebView.mm:
(-[WebView applyStyle:]):

Source/WebKit2:

Use the new Ref::ptr() method.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setPreferences):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didNavigateWithNavigationData):
(WebKit::WebProcessProxy::didPerformClientRedirect):
(WebKit::WebProcessProxy::didPerformServerRedirect):
(WebKit::WebProcessProxy::didUpdateHistoryTitle):

Source/WTF:

It is a very common pattern in our code base to get a pointer from a
Ref object. Previously, we have to call Ref.get() and take its address
which is not very nice. This patch adds a ptr() method to Ref class
to simplify the code a bit.

* wtf/PassRef.h:
(WTF::PassRef<T>::ptr):
* wtf/Ref.h:
(WTF::Ref::ptr):
(WTF::GetPtrHelper<Ref<T>>::getPtr):

Tools:

Use the new Ref::ptr() method.

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

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

5 years agoMove -webkit-text-emphasis-position to the new StyleBuilder
cdumez@apple.com [Tue, 4 Nov 2014 22:32:15 +0000 (22:32 +0000)]
Move -webkit-text-emphasis-position to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138359

Reviewed by Andreas Kling.

Move -webkit-text-emphasis-position from DeprecatedStyleBilder to the
new StyleBuilder so that it is now generated from CSSPropertyNames.in.
A new TextEmphasisPosition Converter was added to support this.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::valueToEmphasisPosition): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::applyValue): Deleted.
(WebCore::ApplyPropertyTextEmphasisPosition::createHandler): Deleted.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::valueToEmphasisPosition):
(WebCore::StyleBuilderConverter::convertTextEmphasisPosition):

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

5 years agoRenderBox shouldn't need a pre-destructor hook.
akling@apple.com [Tue, 4 Nov 2014 22:16:52 +0000 (22:16 +0000)]
RenderBox shouldn't need a pre-destructor hook.
<https://webkit.org/b/138367>

Reviewed by Antti Koivisto.

Move teardown logic from willBeDestroyed() to the regular ~RenderBox()
destructor since none of it depends on being in-tree or having a fully
constructed vtable.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::willBeDestroyed): Deleted.
* rendering/RenderBox.h:

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

5 years ago[OSX] CJK characters styled with font-family: cursive are italicized
mmaxfield@apple.com [Tue, 4 Nov 2014 22:04:23 +0000 (22:04 +0000)]
[OSX] CJK characters styled with font-family: cursive are italicized
https://bugs.webkit.org/show_bug.cgi?id=138328
rdar://problem/18801907

Reviewed by Simon Fraser.

Source/WebCore:

FontCache::createFontPlatformData doesn’t set the oblique flag if
the requested font isn’t oblique, but
FontCache::systemFallbackForCharacters() does. This patch simply
adopts this behavior in both places.

Test: fast/text/font-cursive-italic-cjk.html

* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters):

LayoutTests:

Make sure that the text matches the output of a different codepath.

* platform/mac/fast/text/font-cursive-italic-cjk-expected.html: Added.
* platform/mac/fast/text/font-cursive-italic-cjk.html: Added.
* platform/mac/TestExpectations: Skipped test on non-Yosemite platforms.

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

5 years ago[iOS] Include a WKActionSheetAssistant parameter in WKActionSheetAssistantDelegate...
aestes@apple.com [Tue, 4 Nov 2014 21:44:11 +0000 (21:44 +0000)]
[iOS] Include a WKActionSheetAssistant parameter in WKActionSheetAssistantDelegate methods
https://bugs.webkit.org/show_bug.cgi?id=137792

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithTitle:actionHandler:]):
(+[_WKElementAction elementActionWithType:customTitle:]):
(-[_WKElementAction _runActionWithElementInfo:forActionSheetAssistant:]):
* UIProcess/API/Cocoa/_WKElementActionInternal.h:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant updatePositionInformation]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView positionInformationForActionSheetAssistant:]):
(-[WKContentView updatePositionInformationForActionSheetAssistant:]):
(-[WKContentView actionSheetAssistant:performAction:]):
(-[WKContentView actionSheetAssistant:openElementAtLocation:]):
(-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
(-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
(-[WKContentView actionSheetAssistantDidStopInteraction:]):

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

5 years agoWhen computing the specificity of selectors, use saturated arithmetic per component
benjamin@webkit.org [Tue, 4 Nov 2014 21:02:27 +0000 (21:02 +0000)]
When computing the specificity of selectors, use saturated arithmetic per component
https://bugs.webkit.org/show_bug.cgi?id=138336

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-04
Reviewed by Andreas Kling.

Source/WebCore:

The code handling overflow in CSSSelector::specificity() was assuming that the value
returned by specificityForOneSelector() can only overflow one field at a time.

That assumption is no longer correct with the extended :not(). It is now possible to have
a complex selector saturating multiple fields inside a single :not().

This patch solves the problem by considering each field independently.

Test: fast/selectors/specificity-overflow-2.html

* css/CSSSelector.cpp:
(WebCore::CSSSelector::specificity):

LayoutTests:

* fast/selectors/specificity-overflow-2-expected.txt: Added.
* fast/selectors/specificity-overflow-2.html: Added.

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

5 years agoWindows build fix after r175565.
zalan@apple.com [Tue, 4 Nov 2014 20:51:18 +0000 (20:51 +0000)]
Windows build fix after r175565.

MSVC requires default c'tor even if it's never called. -0 length array.

* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run):

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

5 years agoBuilding WebInspectorUI should not run the clang static analyzer by default
abucur@adobe.com [Tue, 4 Nov 2014 20:30:52 +0000 (20:30 +0000)]
Building WebInspectorUI should not run the clang static analyzer by default
https://bugs.webkit.org/show_bug.cgi?id=137652

Reviewed by Timothy Hatcher.

There's no need to have the static analyzer enabled at compile time by default for the WebInspectorUI project.
It also breaks the ASAN build because the static analyzing step runs using the default compiler not the
ASAN clang.

* Configurations/DebugRelease.xcconfig: Remove the RUN_CLANG_STATIC_ANALYZER variable.

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

5 years ago URTBF after r175564 for !PLATFORM(COCOA).
ossy@webkit.org [Tue, 4 Nov 2014 20:29:30 +0000 (20:29 +0000)]
 URTBF after r175564 for !PLATFORM(COCOA).

* Shared/TextIndicator.cpp:

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

5 years agoSimple line layout: Cleanup line initialization and line closing.
zalan@apple.com [Tue, 4 Nov 2014 20:08:13 +0000 (20:08 +0000)]
Simple line layout: Cleanup line initialization and line closing.
https://bugs.webkit.org/show_bug.cgi?id=138273

Reviewed by Antti Koivisto.

This is in preparation to support multiple render elements.

Move line start and line end activities to dedicated functions.

Covered by existing tests.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::LineState::LineState): Add lineStartRunIndex to be more explicit
about whether a line advanced with new runs. Rename a few members. Introduce LineState::oveflowedFragment
so that line closing can handled separately.
(WebCore::SimpleLineLayout::LineState::commitAndCreateRun):
(WebCore::SimpleLineLayout::LineState::addUncommitted):
(WebCore::SimpleLineLayout::LineState::jumpTo):
(WebCore::SimpleLineLayout::LineState::addUncommittedWhitespace): Deleted. : Remove redundant function.
(WebCore::SimpleLineLayout::LineState::removeCommittedTrailingWhitespace):
(WebCore::SimpleLineLayout::LineState::resetTrailingWhitespace):
(WebCore::SimpleLineLayout::removeTrailingWhitespace): Add resetTrailingWhitespace()
so that all trailing whitespace handling is in one function.
(WebCore::SimpleLineLayout::initializeNewLine): Separate line start and line end initialization/reset.
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns): This function manages all line ending activities.
(WebCore::SimpleLineLayout::createTextRuns):
(WebCore::SimpleLineLayout::create):
(WebCore::SimpleLineLayout::initializeLine): Deleted.
* rendering/SimpleLineLayout.h:
(WebCore::SimpleLineLayout::Run::Run): Deleted.

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

5 years agoImplement yellow highlight over data detected items
timothy_horton@apple.com [Tue, 4 Nov 2014 19:42:37 +0000 (19:42 +0000)]
Implement yellow highlight over data detected items
https://bugs.webkit.org/show_bug.cgi?id=138340
<rdar://problem/18840102>

Reviewed by Anders Carlsson.

* Shared/TextIndicator.cpp: Renamed from Source/WebKit2/UIProcess/TextIndicator.cpp.
* Shared/TextIndicator.h: Renamed from Source/WebKit2/UIProcess/TextIndicator.h.
Move TextIndicator to Shared.
Move all of the members to a Data struct.
Implement encode/decode for TextIndicator::Data, so it can be passed as
the argument to SetTextIndicator, and also as a field on ActionMenuHitTestResult.
Add 'createWithSelectionInFrame', which builds a TextIndicator
from the selection in the given frame.

* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):
Rename actionBoundingBox to detectedDataBoundingBox.
Store/encode/decode detectedDataTextIndicator.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setTextIndicator):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Create a TextIndicator from the TextIndicator::Data.
Add an explicit ClearTextIndicator message instead of sending empty Data.

* UIProcess/mac/WKActionMenuController.h:
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController prepareForMenu:withEvent:]):
If the text indicator is up when preparing for a new menu invocation, hide it.

(-[WKActionMenuController willOpenMenu:withEvent:]):
Show the text indicator when the menu opens, for data detected items.

(-[WKActionMenuController didCloseMenu:withEvent:]):
Hide the text indicator when the menu closes, unless we only had one item.
Then, we'll hide it in the DDActionContext completionHandler block.

(-[WKActionMenuController _showTextIndicator]):
(-[WKActionMenuController _hideTextIndicator]):
Added. Show and hide the text indicator based on the TextIndicator
data included in the action menu hit test result.

(-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
Hide the text indicator when the data detector popover completes.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getImageForFindMatch):
Make use of the newly-moved createSelectionSnapshot.

(WebKit::FindController::updateFindIndicator):
Make use of TextIndicator::createWithSelectionInFrame, which allows
us to share this code for building a TextIndicator with other callers.

(WebKit::FindController::hideFindIndicator):

(WebKit::getFindIndicatorBitmap): Deleted.
Move getFindIndicatorBitmap to WebFrame::createSelectionSnapshot.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createSelectionSnapshot):
Moved from FindController's getFindIndicatorBitmap.
Now returns a ShareableBitmap instead of going ahead and making a Handle.

* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::scanForDataDetectedItems):
(WebKit::textIndicatorForRange):
Temporarily change the selection to the given range, then use
TextIndicator::indicatorWithSelectionInFrame to acquire a TextIndicator,
then reset the selection.

(WebKit::WebPage::performActionMenuHitTestAtLocation):
Create a TextIndicator from the data detected range.

* platform/spi/mac/DataDetectorsSPI.h:
Add completionHandler SPI.

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

5 years agoWeb Inspector: Uncaught Exceptions when paused and hovering JavaScript without CallFrames
commit-queue@webkit.org [Tue, 4 Nov 2014 19:39:17 +0000 (19:39 +0000)]
Web Inspector: Uncaught Exceptions when paused and hovering JavaScript without CallFrames
https://bugs.webkit.org/show_bug.cgi?id=138338

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-04
Reviewed by Geoffrey Garen.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptExpression):
Fallback to using the main page's context if there is no active call frame we can use.

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

5 years ago[jhbuild] Make it possible to build GTK/EFL in same repository
commit-queue@webkit.org [Tue, 4 Nov 2014 19:05:42 +0000 (19:05 +0000)]
[jhbuild] Make it possible to build GTK/EFL in same repository
https://bugs.webkit.org/show_bug.cgi?id=137448

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-11-04
Reviewed by Martin Robinson.

* Scripts/webkitdirs.pm:
(getJhbuildPath):
* WebKitTestRunner/InjectedBundle/efl/FontManagement.cpp:
(getPlatformFontsPath):
* WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
(WTR::getFontsPath):
* jhbuild/jhbuild-wrapper:
(determine_platform):
(install_jhbuild):
* jhbuild/jhbuildrc_common.py:
(init):

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

5 years agoFix the iOS build after r175549.
aestes@apple.com [Tue, 4 Nov 2014 18:38:24 +0000 (18:38 +0000)]
Fix the iOS build after r175549.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):

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

5 years ago * TestExpectations: Turn off http/tests/multipart/stop-crash.html.
darin@apple.com [Tue, 4 Nov 2014 16:58:40 +0000 (16:58 +0000)]
    * TestExpectations: Turn off http/tests/multipart/stop-crash.html.
        Will turn it back on soon.

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

5 years agoEliminate ResourceBuffer and use SharedBuffer directly instead
darin@apple.com [Tue, 4 Nov 2014 16:47:53 +0000 (16:47 +0000)]
Eliminate ResourceBuffer and use SharedBuffer directly instead
https://bugs.webkit.org/show_bug.cgi?id=138174

Reviewed by Antti Koivisto.

Source/WebCore:

Refactoring, with test coverage across many existing tests.

* CMakeLists.txt: Deleted ResourceBuffer.cpp.

* WebCore.exp.in: Removed ResourceBuffer-related symbols, and updated symbol
for one function that used to take a PassRefPtr but now takes a reference instead.

* WebCore.vcxproj/WebCore.vcxproj: Deleted ResourceBuffer.cpp/.h.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Deleted ResourceBuffer.mm/.cpp/.h.

* bindings/objc/DOMUIKitExtensions.mm:
(-[DOMHTMLImageElement dataRepresentation:]): Use SharedBuffer directly.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::writeImageToPasteboard): Ditto.

* html/ImageDocument.cpp:
(WebCore::ImageDocument::updateDuringParsing): Use SharedBuffer directly, and
also pass a reference only if non-null rather than passing a pointer.
(WebCore::ImageDocument::finishedParsing): Ditto. Added a missing null check.

* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::cachedResourceContent): Use SharedBuffer directly.
(WebCore::InspectorPageAgent::mainResourceContent): Ditto.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didFinishLoading): Ditto.
(WebCore::InspectorResourceAgent::didFailLoading): Ditto.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData): Use SharedBuffer directly,
and use the copy function rather than a hand-written alternative.
(WebCore::DocumentLoader::maybeCreateArchive): Ditto.
(WebCore::DocumentLoader::mainResource): Ditto.
(WebCore::DocumentLoader::subresource): Ditto.
(WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): Ditto.

* loader/DocumentLoader.h: Changed mainResourceData to return a
PassRefPtr<SharedBuffer>. Would be better if it returned a SharedBuffer&,
but it currently returns a newly created buffer when there is substitute
data and can also return null, even though many callers assume it will not!

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::dataReceived): Removed call to unused client
function bufferReceived.
(WebCore::MediaResourceLoader::notifyFinished): Removed unused buffer
argument to client function loadFinished.

* loader/ResourceBuffer.cpp: Removed.
* loader/ResourceBuffer.h: Removed.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Use SharedBuffer directly.

* loader/ResourceLoader.h:
(WebCore::ResourceLoader::resourceData): Use SharedBuffer.

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse): Use SharedBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Ditto.

* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::processNewCueData): Use SharedBuffer.
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource): Ditto.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Ditto.

* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::finishLoading): Use SharedBuffer.
* loader/cache/CachedCSSStyleSheet.h: Ditto.
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::finishLoading): Ditto.
(WebCore::CachedFont::ensureCustomFontData): Ditto.
* loader/cache/CachedFont.h: Ditto.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient): Use SharedBuffer.
(WebCore::CachedImage::didRemoveClient): Ditto.
(WebCore::CachedImage::addIncrementalDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedImage::addDataBuffer): Ditto. Also added call through
to base class and changed to take a reference rather than a pointer.
(WebCore::CachedImage::addData): Ditto. Also added call through to base class.
(WebCore::CachedImage::finishLoading): Ditto.
* loader/cache/CachedImage.h: Ditto. Also changed the type of some bit fields
to be unsigned instead of unsigend char.

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::calculateIncrementalDataChunk): Use SharedBuffer.
(WebCore::CachedRawResource::addDataBuffer): Ditto. Changed to take
a reference rather than a pointer.
(WebCore::CachedRawResource::addData): Ditto.
(WebCore::CachedRawResource::finishLoading): Ditto.
(WebCore::CachedRawResource::canReuse): Ditto.
* loader/cache/CachedRawResource.h: Ditto.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::CachedResource): Reordered data members due to change
in header.
(WebCore::CachedResource::addDataBuffer): Changed argument type.
(WebCore::CachedResource::finishLoading): Ditto.
(WebCore::CachedResource::didAddClient): Refactored to eliminate one extra hash
table lookup by using the return value from the remove function.
(WebCore::CachedResource::addClientToSet): Use std::make_unique directly instead
of using a function named "schedule" to allocate the callback object.
(WebCore::CachedResource::Callback::Callback): Changed function and data member
name.
(WebCore::CachedResource::Callback::cancel): Ditto.
(WebCore::CachedResource::Callback::timerFired): Ditto.
(WebCore::CachedResource::tryReplaceEncodedData): Changed to take a SharedBuffer&.

* loader/cache/CachedResource.h: Changed types to use SharedBuffer. Also made most
data members and one function member private instead of protected. Also renamed the
CachedResource::CachedResourceCallback function CachedResource::Callback and moved
its definition out of the CachedResource class definition.

* loader/cache/CachedResourceClient.h: Removed unneeded include.

* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::finishLoading): Use SharedBuffer.

* loader/cache/CachedSVGDocument.h: Ditto. Made data members private.

* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::finishLoading): Use SharedBuffer.
* loader/cache/CachedScript.h: Ditto. Also fixed indenting and removed unneeded
forward declaration.

* loader/cache/CachedTextTrack.cpp:
(WebCore::CachedTextTrack::updateData): Added, so that finishLoading does not
call addDataBuffer.
(WebCore::CachedTextTrack::addDataBuffer): Take SharedBuffer, call updateData.
(WebCore::CachedTextTrack::finishLoading): Ditto.
* loader/cache/CachedTextTrack.h: Take out unneeded explicit override of the
destructor. Updated for above changes.

* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::finishLoading): Updated to use SharedBuffer.
* loader/cache/CachedXSLStyleSheet.h: Took out unneeded includes, made everything
private rather than protected. Added an explicit virtual constructor so we can
compile without knowing how to ref/deref TextResourceDecoder.

* loader/cf/SubresourceLoaderCF.cpp:
(WebCore::SubresourceLoader::didReceiveDataArray): Updated to use SharedBuffer
and to call addDataBuffer only if there is a new data buffer.

* loader/cocoa/DiskCacheMonitorCocoa.h: Use SharedBuffer& instead of PassRefPtr.
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::DiskCacheMonitor): Ditto.
(WebCore::DiskCacheMonitor::resourceBecameFileBacked): Ditto.

* loader/icon/IconLoader.cpp:
(WebCore::IconLoader::notifyFinished): Use SharedBuffer* instead of
RefPtr<ResourceBuffer>.

* loader/mac/ResourceBuffer.mm: Removed.

* loader/mac/ResourceLoaderMac.mm:
(WebCore::ResourceLoader::didReceiveDataArray): Use SharedBuffer.

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::clear): Use a modern for loop.
(WebCore::SharedBuffer::copy): Return a PassRef instead of a PassRefPtr, since
this never returns null. Use modern for loops.
(WebCore::SharedBuffer::copyBufferAndClear): Use a modern for loop.

* platform/SharedBuffer.h: Changed copy to return PassRef instead of PassRefPtr.
Changed tryReplaceContentsWithPlatformBuffer to take a reference rather than
a pointer.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer): Take a reference
instead of a pointer.

* platform/graphics/PlatformMediaResourceLoader.h: Removed unused function
bufferReceived and unneeded buffer argument from loadFinished. Also marked the
constructor explicit.

* platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
Removed include of ResourceBuffer.h.
* platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Use
SharedBuffer directly.

* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
(CachedResourceStreamingClient::loadFinished): Updated for change to
PlatformMediaResourceLoaderClient.

* platform/mac/PasteboardMac.mm: Removed include of ResourceBuffer.h.

* platform/soup/SharedBufferSoup.cpp: Removed unused, unneeded
tryReplaceContentsWithPlatformBuffer function.

Source/WebKit/mac:

* WebView/WebDataSource.mm:
(-[WebDataSource data]): Use SharedBuffer directly.
* WebView/WebHTMLView.mm:
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.

Source/WebKit/win:

* WebDataSource.cpp:
(WebDataSource::data): Use SharedBuffer directly.
(WebDataSource::subresourceForURL): Ditto.

Source/WebKit2:

* CMakeLists.txt: Removed WebResourceBuffer.cpp.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
* NetworkProcess/NetworkResourceLoader.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.

* Shared/WebResourceBuffer.cpp: Removed.
* Shared/WebResourceBuffer.h: Removed.

* WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.

* WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
(WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
of a pointer.

* WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
* WebProcess/Network/WebResourceLoader.cpp: Ditto.
* WebProcess/Network/WebResourceLoader.h: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
(WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::source): Ditto.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
between the buffer and the DataReference clearer and to avoid having a long-lived
DataReference pointing to an underlying buffer with unclear lifetime.
(WebKit::WebPage::getContentsAsString): Ditto.
(WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
(WebKit::WebPage::getResourceDataFromFrame): Ditto.
(WebKit::WebPage::getWebArchiveOfFrame): Ditto.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::containingLinkElement): Use elementLineage.
(WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
ALso did a bit of other cleanup in here.
(WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
the caller has.
(WebKit::nextAssistableElement): Changed name to match what the function does.
Added an obviously-missing check on the startNode argument. Updated for change
to isAssistableElement above. Take a Page& instead of a Page*.
(WebKit::hasAssistableElement): Changed name to match what the function does.
Updated for change to nextAssistableElement above. Took out incorrect comparison
of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
(WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
(WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.

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

5 years agoUse SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
cdumez@apple.com [Tue, 4 Nov 2014 16:17:50 +0000 (16:17 +0000)]
Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
https://bugs.webkit.org/show_bug.cgi?id=138345

Reviewed by Andreas Kling.

Use SPECIALIZE_TYPE_TRAITS_*() macro for StyleRuleGroup subclasses
instead of old-fashion toXXX() functions.

No new tests, no behavior change.

* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::mediaQueries):
* css/CSSSupportsRule.cpp:
(WebCore::CSSSupportsRule::conditionText):
* css/StyleRule.h:
(isType):
(WebCore::toStyleRuleMedia): Deleted.
(WebCore::toStyleRuleSupports): Deleted.
(WebCore::toStyleRuleRegion): Deleted.
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::cssText):

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

5 years ago[EFL] Skip websocket tests
commit-queue@webkit.org [Tue, 4 Nov 2014 16:11:08 +0000 (16:11 +0000)]
[EFL] Skip websocket tests
https://bugs.webkit.org/show_bug.cgi?id=138355

Patch by Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> on 2014-11-04
Reviewed by Csaba Osztrogonác.

* platform/efl/TestExpectations:

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

5 years agoWeb Inspector: Enum value collisions between different generators
commit-queue@webkit.org [Tue, 4 Nov 2014 15:36:13 +0000 (15:36 +0000)]
Web Inspector: Enum value collisions between different generators
https://bugs.webkit.org/show_bug.cgi?id=138343

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-11-04
Reviewed by Brian Burg.

Each generator was using its own filtered list of domains_to_generate
to build the shared unique list of enum value encodings. This list
was slightly different across different generators. Instead always
use the list of all non-supplemental domains to generate the shared
list of enum values.

* inspector/scripts/codegen/generator.py:
(Generator.non_supplemental_domains):
(Generator.domains_to_generate):
(Generator._traverse_and_assign_enum_values):
* inspector/scripts/tests/enum-values.json: Added.
* inspector/scripts/tests/expected/enum-values.json-result: Added.

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

5 years ago[EFL] Bump LLVM to version 3.5.0
dbatyai.u-szeged@partner.samsung.com [Tue, 4 Nov 2014 14:37:48 +0000 (14:37 +0000)]
[EFL] Bump LLVM to version 3.5.0
https://bugs.webkit.org/show_bug.cgi?id=138312

Reviewed by Csaba Osztrogonác.

* efl/jhbuild.modules:
* efl/patches/llvm-elf-add-stackmaps.patch: Added.
* efl/patches/llvm-elf-fix-x86_64-fdecfiencoding.patch: Added.

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

5 years agoATTR_USED incorrectly applying to Clang
dbatyai.u-szeged@partner.samsung.com [Tue, 4 Nov 2014 14:32:03 +0000 (14:32 +0000)]
ATTR_USED incorrectly applying to Clang
https://bugs.webkit.org/show_bug.cgi?id=138313

Reviewed by Csaba Osztrogonác.

ATTR_USED was only intended for GCC. Also limit it to ENABLE(FTL_NATIVE_CALL_INLINING)
since that's the only thing it's needed for.

* wtf/Platform.h:

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

5 years agoRenderQuote shouldn't need a pre-destructor hook.
akling@apple.com [Tue, 4 Nov 2014 10:05:41 +0000 (10:05 +0000)]
RenderQuote shouldn't need a pre-destructor hook.
<https://webkit.org/b/138352>

Reviewed by Antti Koivisto.

The willBeDestroyed() hook in RenderQuote came from the time when it was
potential unsafe to access the RenderView from a renderer destructor.

Move the code to the plain ol' destructor instead.

* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::~RenderQuote):
(WebCore::RenderQuote::willBeDestroyed): Deleted.
* rendering/RenderQuote.h:

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

5 years agoFix the !ENABLE(VIDEO) build after r175380
ossy@webkit.org [Tue, 4 Nov 2014 09:49:07 +0000 (09:49 +0000)]
Fix the !ENABLE(VIDEO) build after r175380
https://bugs.webkit.org/show_bug.cgi?id=138322

Reviewed by Benjamin Poulain.

* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):

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

5 years ago[LEAK] [GStreamer] Removing video element will not free assigned memory
philn@webkit.org [Tue, 4 Nov 2014 09:29:13 +0000 (09:29 +0000)]
[LEAK] [GStreamer] Removing video element will not free assigned memory
https://bugs.webkit.org/show_bug.cgi?id=46560

Reviewed by Eric Carlson.

Moved the ::extraMemoryCost() implementation to the
MediaPlayerPivateInterface base class. This default implementation
is now shared between the various MediaPlayerPrivate backends,
excepted the AVF MediaSource player which still reports no extra
memory cost.

* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::totalBytes): Make
totalBytes() part of the MediaPlayerPrivate interface.
(WebCore::MediaPlayerPrivateInterface::extraMemoryCost): Default
implementation.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost): Deleted.
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

5 years agoFix animation of orient attribute on marker element
commit-queue@webkit.org [Tue, 4 Nov 2014 09:20:52 +0000 (09:20 +0000)]
Fix animation of orient attribute on marker element
https://bugs.webkit.org/show_bug.cgi?id=137942

Source/WebCore:

Patch by Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2014-11-04
Reviewed by Dirk Schulze.

Fixed implementation of SVG animated angles and the SVG
marker element orient attribute.
SVG animated angle was missing the logic to support animation
from auto to a numeric angle value - this is now added.
The SVG marker element getter for orientType was not returning
the animated value for orientType so in some cases (i.e. when
the initial value and the animated values were of different types)
the animation was not being rendered - although it was running.

Tests: svg/animations/animate-marker-orienttype-1.html
       svg/animations/animate-marker-orienttype-2.html
       svg/animations/animate-marker-orienttype-3.html

* svg/SVGAnimatedAngle.cpp:
(WebCore::SVGAnimatedAngleAnimator::calculateAnimatedValue):
Added logic to support auto to angle animation.
* svg/SVGMarkerElement.cpp:
(WebCore::SVGMarkerElement::orientType):
This method now returns the animated value if an animation is
running.
* svg/SVGMarkerElement.h:

LayoutTests:

Patch by Nikos Andrkos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> on 2014-11-04
Reviewed by Dirk Schulze.

Test the rendered result of the animation of the orient attribute.
Existing tests were only testing the animated value in the DOM.

* svg/animations/animate-marker-orienttype-1-expected.txt: Added.
* svg/animations/animate-marker-orienttype-1.html: Added.
* svg/animations/animate-marker-orienttype-2-expected.txt: Added.
* svg/animations/animate-marker-orienttype-2.html: Added.
* svg/animations/animate-marker-orienttype-3-expected.txt: Added.
* svg/animations/animate-marker-orienttype-3.html: Added.

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

5 years agoDictionary lookup panel pops up at random when clicking on selected text
timothy_horton@apple.com [Tue, 4 Nov 2014 08:20:46 +0000 (08:20 +0000)]
Dictionary lookup panel pops up at random when clicking on selected text
https://bugs.webkit.org/show_bug.cgi?id=138353
<rdar://problem/18861406>

* WebProcess/WebPage/WebPage.h:
Fix the build; this needs to be public.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupAtHitTestResult):
Use the right selection (the one we just tested) in the change from r175517.

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

5 years agoDictionary lookup panel pops up at random when clicking on selected text
timothy_horton@apple.com [Tue, 4 Nov 2014 08:05:28 +0000 (08:05 +0000)]
Dictionary lookup panel pops up at random when clicking on selected text
https://bugs.webkit.org/show_bug.cgi?id=138353
<rdar://problem/18861406>

Reviewed by Andreas Kling.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::rangeForDictionaryLookupForSelection):
(WebKit::rangeForDictionaryLookupAtHitTestResult):
Factor rangeForDictionaryLookupForSelection out of performDictionaryLookupForSelection.

Make use of rangeForDictionaryLookupForSelection in rangeForDictionaryLookupAtHitTestResult,
returning the selection-based range if the hit test intersects the selected text.
Previously, we were just going forward with performDictionaryLookupForSelection,
which would actually *do* the lookup, even if we just wanted to retrieve the range.

Make rangeForDictionaryLookup* static.

(WebKit::WebPage::performDictionaryLookupForSelection):
Make use of rangeForDictionaryLookupForSelection.

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

5 years agoWorkaround for Cortex-A53 erratum 835769
commit-queue@webkit.org [Tue, 4 Nov 2014 07:36:15 +0000 (07:36 +0000)]
Workaround for Cortex-A53 erratum 835769
https://bugs.webkit.org/show_bug.cgi?id=138315

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-03
Reviewed by Filip Pizlo.

This patch introduces CMake variable and preprocessor macro
WTF_CPU_ARM64_CORTEXA53 with the aim of enabling Cortex-A53-specific
.:

code paths, if set true.

* Source/cmake/OptionsCommon.cmake:
Add -mfix-cortex-a53-835769 to the compiler flags if compiler supports
it.
* Source/cmakeconfig.h.cmake:
#cmakedefine01 for WTF_CPU_ARM64_CORTEXA53

Source/JavaScriptCore:

code paths, if set true. The patch also implements one case where such
code paths are needed: the workaround for Cortex-A53 erratum 835769. If
WTF_CPU_ARM64_CORTEXA53 is set then:
- CMake checks whether the compiler already has support for a workaround
  and adds -mfix-cortex-a53-835769 to the compiler flags if so,
- the ARM64 backend of offlineasm inserts a nop between memory and
  multiply-accumulate instructions, and
- the ARM64 assembler also inserts a nop between memory and (64-bit)
  multiply-accumulate instructions.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::madd):
Call nopCortexA53Fix835769() to insert a nop if CPU(ARM64_CORTEXA53) and
if necessary.
(JSC::ARM64Assembler::msub): Likewise.
(JSC::ARM64Assembler::smaddl): Likewise.
(JSC::ARM64Assembler::smsubl): Likewise.
(JSC::ARM64Assembler::umaddl): Likewise.
(JSC::ARM64Assembler::umsubl): Likewise.
(JSC::ARM64Assembler::nopCortexA53Fix835769):
Added. Insert a nop if the previously emitted instruction was a load, a
store, or a prefetch, and if the current instruction is 64-bit.
* offlineasm/arm64.rb:
Add the arm64CortexA53Fix835769 phase and call it from
getModifiedListARM64 to insert nopCortexA53Fix835769 between appropriate
macro instructions. Also, lower nopCortexA53Fix835769 to nop if
CPU(ARM64_CORTEXA53), to nothing otherwise.
* offlineasm/instructions.rb:
Define macro instruction nopFixCortexA53Err835769.

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

5 years agoAllow implicit conversion from Ref<T> to T&
cdumez@apple.com [Tue, 4 Nov 2014 07:22:18 +0000 (07:22 +0000)]
Allow implicit conversion from Ref<T> to T&
https://bugs.webkit.org/show_bug.cgi?id=138331

Reviewed by Andreas Kling.

Source/WebCore:

Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
converted implicitly to a T&.

No new tests, no behavior change.

Source/WebKit2:

Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
converted implicitly to a T&.

Source/WTF:

Allow implicit conversion from Ref<T> to T& to reduce the amount of
Ref<>::get() calls in the code and increase readability. Unlike for
RefPtr, doing this for Ref should not be error prone.

* wtf/Ref.h:
(WTF::Ref::operator T&):
(WTF::Ref::operator const T&):
* wtf/RunLoop.cpp:
(WTF::RunLoop::Holder::runLoop):

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

5 years agoUnreviewed, rolling out r175509.
commit-queue@webkit.org [Tue, 4 Nov 2014 04:59:19 +0000 (04:59 +0000)]
Unreviewed, rolling out r175509.
https://bugs.webkit.org/show_bug.cgi?id=138349

broke some builds (Requested by msaboff on #webkit).

Reverted changeset:

"Update scope related slow path code to use scope register
added to opcodes"
https://bugs.webkit.org/show_bug.cgi?id=138254
http://trac.webkit.org/changeset/175509

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

5 years agoAdding test for array buffer and data view POST in XMLHttpRequest async send.
commit-queue@webkit.org [Tue, 4 Nov 2014 04:57:10 +0000 (04:57 +0000)]
Adding test for array buffer and data view POST in XMLHttpRequest async send.
https://bugs.webkit.org/show_bug.cgi?id=138304

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-03
Reviewed by Alexey Proskuryakov.

Adding test for array buffer and data view

* http/tests/xmlhttprequest/send-data-view-async-expected.txt: Added.
* http/tests/xmlhttprequest/send-data-view-async.html: Added.

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

5 years agoUpdate scope related slow path code to use scope register added to opcodes
msaboff@apple.com [Tue, 4 Nov 2014 03:53:18 +0000 (03:53 +0000)]
Update scope related slow path code to use scope register added to opcodes
https://bugs.webkit.org/show_bug.cgi?id=138254

Reviewed by Mark Lam.

Updated slow paths for op_pop_scope, op_push_name_scope and op_push_with_scope.
Added scope register index parameter to the front of the relevant argument lists of the
slow functions.  In the case of op_push_name_scope for x86 (32 bit), there aren't enough
registers to accomodate all the parameters.  Therefore, added two new JSVALUE32_64 slow
paths called operationPushCatchScope() and operationPushFunctionNameScope() to eliminate
the last "type" argument.

* assembler/MacroAssemblerCodeRef.h:
(JSC::FunctionPtr::FunctionPtr): Added a new template to take 6 arguments.

* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArgumentsWithExecState):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
New variants of setupArgumentsWithExecState() and callOperation() to handle the new
combinations of argument types and counts.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_push_with_scope):
(JSC::JIT::emit_op_pop_scope):
(JSC::JIT::emit_op_push_name_scope):
Use the new slow paths.

* jit/JITOperations.cpp:
* jit/JITOperations.h:
Updates to set the scope result using the scope register index.  Added operationPushCatchScope()
and operationPushFunctionNameScope().

* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
Updated the scope slow paths to use the scope register index in the instruction to read and
write the register instead of using CallFrame::scope() and CallFrame::setScope().

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

5 years agoAdd "get scope" byte code
msaboff@apple.com [Tue, 4 Nov 2014 03:36:28 +0000 (03:36 +0000)]
Add "get scope" byte code
https://bugs.webkit.org/show_bug.cgi?id=138326

Reviewed by Mark Lam.

Added op_get_scope.  Added implementations for the LLInt and baseline JIT.
Provided nop implementation for DFG and FTL.  The new byte code is emitted
after op_enter for any function, program or eval.  It is expected that the
DFG will be implemented such that unneeded op_get_scope would be eliminated
during DFG compilation.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
Added new op_get_scope bytecode.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitGetScope):
* bytecompiler/BytecodeGenerator.h:
Emit new op_get_scope bytecode.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
Added framework for new op_get_scope bytecode.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_get_scope):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_get_scope):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
Implementation of op_get_scope bytecode.

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

5 years agoNon-fast scrollable region overlay offsets the overlay by topContentInset
simon.fraser@apple.com [Tue, 4 Nov 2014 02:43:44 +0000 (02:43 +0000)]
Non-fast scrollable region overlay offsets the overlay by topContentInset
https://bugs.webkit.org/show_bug.cgi?id=138344

Reviewed Tim Horton.

Offset the region by topContentInset, and make it not green.

* page/DebugPageOverlays.cpp:
(WebCore::NonFastScrollableRegionOverlay::updateRegion):

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

5 years agoClarify RenderListMarker ownership model.
akling@apple.com [Tue, 4 Nov 2014 02:35:45 +0000 (02:35 +0000)]
Clarify RenderListMarker ownership model.
<https://webkit.org/b/138329>

Reviewed by Antti Koivisto.

A RenderListMarker is either in-tree and owned by the tree, or out-of-tree
and owned by a RenderListItem.

This patch changes RenderListItem::m_marker to be a raw pointer, and removes
the special handling of list markers in RenderElement child teardown.

We also remove the willBeDestroyed() hook. It was used to clear out the
m_marker pointer, but this is now done in the regular ~RenderListItem()
destructor with an assertion for marker sanity. m_marker is automatically
nulled out by a didDestroyListMarker() callback on RenderListItem.

* rendering/RenderElement.cpp:
(WebCore::RenderElement::destroyLeftoverChildren):

    Removed special handling of list marker renderers when deleting a
    RenderElement's children.

* rendering/RenderListItem.cpp:
(WebCore::RenderListItem::RenderListItem):
(WebCore::RenderListItem::~RenderListItem):
(WebCore::RenderListItem::styleDidChange):
(WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
(WebCore::RenderListItem::positionListMarker):

    Made m_marker a raw pointer instead of a RenderPtr since the ownership
    really switches between weak and strong reference.

(WebCore::RenderListItem::willBeDestroyed):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::~RenderListMarker):

    Added a regular destructor to replace the willBeDestroyed() hook.

* rendering/RenderListItem.h:
(WebCore::RenderListItem::didDestroyListMarker):

    Added. Called by ~RenderListMarker to null out RenderListItem::m_marker.

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

5 years agoFix jquery/manipulation.html flakiness on debug builds
cdumez@apple.com [Tue, 4 Nov 2014 02:23:50 +0000 (02:23 +0000)]
Fix jquery/manipulation.html flakiness on debug builds
https://bugs.webkit.org/show_bug.cgi?id=138335

Reviewed by Alexey Proskuryakov.

Update jquery's qunit config to not refresh the test results
regularly as this is not useful as part of layout testing.

This was causing qunit to set a timer every 13ms to check if
results should be updated and this timer would sometimes get
throttled after r175441.

* TestExpectations:
* jquery/resources/test/qunit/qunit/qunit.js:
(.):

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

5 years agoExpose visibleDebugOverlayRegions pref via the WK2 C SPI
simon.fraser@apple.com [Tue, 4 Nov 2014 02:08:27 +0000 (02:08 +0000)]
Expose visibleDebugOverlayRegions pref via the WK2 C SPI
https://bugs.webkit.org/show_bug.cgi?id=138342

Reviewed by Dan Bernstein.

Expose WKDebugOverlayRegions via the C SPI.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetVisibleDebugOverlayRegions):
(WKPreferencesGetVisibleDebugOverlayRegions):
* UIProcess/API/C/WKPreferencesRef.h:

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

5 years agoImplement action menus for editable text with spelling suggestions
bdakin@apple.com [Tue, 4 Nov 2014 01:05:51 +0000 (01:05 +0000)]
Implement action menus for editable text with spelling suggestions
https://bugs.webkit.org/show_bug.cgi?id=138333
-and corresponding-
rdar://problem/18742371

Reviewed by Tim Horton.

New types.
* Shared/API/c/WKActionMenuItemTypes.h:
* Shared/API/c/WKActionMenuTypes.h:

ActionMenuHitTestResult now stores the String result of the lookup.
* Shared/mac/ActionMenuHitTestResult.h:
* Shared/mac/ActionMenuHitTestResult.mm:
(WebKit::ActionMenuHitTestResult::encode):
(WebKit::ActionMenuHitTestResult::decode):

Make getGuessesForWord() public so we can call it from WKActionMenuController.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WKActionMenuController.mm:

Select the text for all types of text menus.
(-[WKActionMenuController isMenuForTextContent]):
(-[WKActionMenuController willOpenMenu:withEvent:]):

Spelling suggestions are presented in a sub-menu and will replace the selection
when chosen.
(-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions:]):
(-[WKActionMenuController _changeSelectionToSuggestion:]):
(-[WKActionMenuController _createActionMenuItemForTag:]):
(-[WKActionMenuController _defaultMenuItems:]):

New function to store the lookupText as a String on the ActionMenuHitTestResult.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation):
(WebKit::WebPage::lookupTextAtLocation):

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

5 years agoWeb Inspector: TextEditor search doesn't work after editing contents
commit-queue@webkit.org [Tue, 4 Nov 2014 01:03:42 +0000 (01:03 +0000)]
Web Inspector: TextEditor search doesn't work after editing contents
https://bugs.webkit.org/show_bug.cgi?id=138198

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

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
Fallback to pure TextEditor content searching (CodeMirror) if the editor has edits.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.hasEdits):
Check the CodeMirror clean state to known if we have edits or not.

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

5 years agoMove WebCore/bridge to std::unique_ptr
gyuyoung.kim@samsung.com [Tue, 4 Nov 2014 00:56:49 +0000 (00:56 +0000)]
Move WebCore/bridge to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=138280

Reviewed by Anders Carlsson.

Clean up OwnPtr in WebCore/bridge.

No new tests, no behavior changes.

* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_class.h: Use std::unique_ptr instead of OwnPtr.
* bridge/objc/objc_class.h: ditto.
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::methodNamed):
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::callObjCFallbackObject):
* bridge/runtime_method.h:

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

5 years agoClient certificate credentials with session persistence don’t work
mitz@apple.com [Tue, 4 Nov 2014 00:17:25 +0000 (00:17 +0000)]
Client certificate credentials with session persistence don’t work
https://bugs.webkit.org/show_bug.cgi?id=138330

Reviewed by Alexey Proskuryakov.

I think this is not testable with our test HTTP server.

* platform/network/CredentialStorage.cpp:
(WebCore::CredentialStorage::set): Don’t require a valid URL for client certificate
credentials, since they don’t apply to a specific path. Don’t save such credentials to
CFNetwork’s persistent storage (we only do that as a workaround for sharing credentials
with the media framework, and we don’t want to expand the scope of the workaround).
* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::receivedCredential): Changed to use the Credential consturctor
that takes a Credential and a new persistence, so that this code works not only with
user+password credentials.

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

5 years agoAdd page overlays that show regions with mouseWheel event handlers, and the non-fast...
simon.fraser@apple.com [Tue, 4 Nov 2014 00:12:48 +0000 (00:12 +0000)]
Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
https://bugs.webkit.org/show_bug.cgi?id=138257

Reviewed by Tim Horton.
Source/WebCore:

Add code for debugging page overlays that show the non-fast scrollable region,
and the region with wheel event handlers. The list of region types is intended
to be easily extensible.

A singleton DebugPageOverlays maintains a map of Frame -> vector of overlays.
A purely inline code path is provided so that DebugPageOverlays::didLayout() is
fast.

For each region type, a PageOverlay::Client subclass knows how to generate
the region, which is painted into a document-level page overlay.

Add a set of bitflags to Settings to control region visibility.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/DebugPageOverlays.cpp: Added.
(WebCore::RegionOverlay::overlay):
(WebCore::MouseWheelRegionOverlay::updateRegion):
(WebCore::NonFastScrollableRegionOverlay::updateRegion):
(WebCore::RegionOverlay::create):
(WebCore::RegionOverlay::RegionOverlay):
(WebCore::RegionOverlay::~RegionOverlay):
(WebCore::RegionOverlay::pageOverlayDestroyed):
(WebCore::RegionOverlay::willMoveToPage):
(WebCore::RegionOverlay::didMoveToPage):
(WebCore::RegionOverlay::drawRect):
(WebCore::RegionOverlay::mouseEvent):
(WebCore::RegionOverlay::didScrollFrame):
(WebCore::RegionOverlay::recomputeRegion):
(WebCore::DebugPageOverlays::shared):
(WebCore::indexOf):
(WebCore::DebugPageOverlays::ensureRegionOverlayForFrame):
(WebCore::DebugPageOverlays::showRegionOverlay):
(WebCore::DebugPageOverlays::hideRegionOverlay):
(WebCore::DebugPageOverlays::regionChanged):
(WebCore::DebugPageOverlays::regionOverlayForFrame):
(WebCore::DebugPageOverlays::updateOverlayRegionVisibility):
(WebCore::DebugPageOverlays::settingsChanged):
* page/DebugPageOverlays.h: Added.
(WebCore::DebugPageOverlays::hasOverlaysForFrame):
(WebCore::DebugPageOverlays::hasOverlays):
(WebCore::DebugPageOverlays::didLayout):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* page/Settings.h:
* page/Settings.in:

Source/WebKit2:

Add private prefs to control visibility of debug-related page region overlays.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _visibleDebugOverlayRegions]):
(-[WKPreferences _setVisibleDebugOverlayRegions:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::setDebugUInt32ValueIfInUserDefaults):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences): Update the overlays.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Update the overlays.

Tools:

Add a "Debug Overlays" submenu item under "WebKit2-only Settings" which allows
the user to toggle region page overlays on and off. Two overlays are available,
for the non-fast scrollable region, and the region of element with wheel
event handlers.

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController nonFastScrollableRegionOverlayVisible]):
(-[SettingsController wheelEventHandlerRegionOverlayVisible]):
(-[SettingsController preferenceKeyForRegionOverlayTag:]):
(-[SettingsController toggleDebugOverlay:]):
(-[SettingsController debugOverlayVisible:]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):

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

5 years agoWeb Inspector: Fix RWIProtocol 64-to-32 bit conversion warnings
commit-queue@webkit.org [Mon, 3 Nov 2014 23:02:27 +0000 (23:02 +0000)]
Web Inspector: Fix RWIProtocol 64-to-32 bit conversion warnings
https://bugs.webkit.org/show_bug.cgi?id=138325

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

* inspector/InspectorValues.h:
Vector's length really is an unsigned, so a static_cast here is fine.

* inspector/scripts/codegen/generate_objective_c.py:
(ObjCGenerator.objc_type_for_raw_name):
Use int instead of NSInteger for APIs that eventually map to
InspectorObject's setInteger, which takes an int.

* 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/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
Rebaselined results with the type change.

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

5 years agoVideo controls have lots of compositing layers
simon.fraser@apple.com [Mon, 3 Nov 2014 22:54:36 +0000 (22:54 +0000)]
Video controls have lots of compositing layers
https://bugs.webkit.org/show_bug.cgi?id=138294

Reviewed by Eric Carlson.

After r175268 we get lots of separate small layers in the video
controls (but they pop into a single layer when opacity animates).

Fix this by putting an explicit z-index on -webkit-media-controls-panel
which is the element that animates opacity.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-panel):

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

5 years agoUnreviewed, rolling out r175406, r175413, and r175423.
commit-queue@webkit.org [Mon, 3 Nov 2014 22:27:59 +0000 (22:27 +0000)]
Unreviewed, rolling out r175406, r175413, and r175423.
https://bugs.webkit.org/show_bug.cgi?id=138327

Multipart tests are still broken (Requested by ap on #webkit).

Reverted changesets:

"Eliminate ResourceBuffer and use SharedBuffer directly
instead"
https://bugs.webkit.org/show_bug.cgi?id=138174
http://trac.webkit.org/changeset/175406

"Unreviewed, iOS build fix since 175406."
http://trac.webkit.org/changeset/175413

"Fix assertion in CachedResource::addDataBuffer"
http://trac.webkit.org/changeset/175423

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

5 years agoUnreviewed, fix bad assertion in r175487.
cdumez@apple.com [Mon, 3 Nov 2014 22:22:34 +0000 (22:22 +0000)]
Unreviewed, fix bad assertion in r175487.

I mistakenly used it != values.end() instead of it == values.end()
so the debug bots are crashing.

* css/StyleResolver.cpp:
(WebCore::createGridPosition):

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

5 years agoFix the !ENABLE(VIDEO) build after r175279
ossy@webkit.org [Mon, 3 Nov 2014 22:14:30 +0000 (22:14 +0000)]
Fix the !ENABLE(VIDEO) build after r175279
https://bugs.webkit.org/show_bug.cgi?id=138320

Reviewed by Jer Noble.

* page/ChromeClient.h:

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