WebKit-https.git
7 years agoWeb Inspector: hook up probe samples to TimelineAgent's records
burg@cs.washington.edu [Sat, 5 Apr 2014 05:53:51 +0000 (05:53 +0000)]
Web Inspector: hook up probe samples to TimelineAgent's records
https://bugs.webkit.org/show_bug.cgi?id=131127

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/ScriptDebugListener.h: Add a proper forward declaration for ScriptBreakpointAction.

Source/WebCore:

Hook up probe callbacks from ScriptDebugListener so that timeline records are
created for probe samples. The record includes the probe identifier and hit count.
The actual probe evaluation result is sent separately by DebuggerAgent, and
can be looked up in frontend models using the identifier and hit count.

* inspector/InspectorTimelineAgent.cpp: Only listen to the debug server when recording.
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::stop):
(WebCore::InspectorTimelineAgent::breakpointActionProbe):
(WebCore::toProtocol):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createProbeSampleData):
* inspector/TimelineRecordFactory.h:
* inspector/protocol/Timeline.json: Add new enum value.

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js: Stub out a case for the ProbeSample record type.
(WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
(WebInspector.TimelineManager.prototype.eventRecorded):

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

7 years agoUnreviewed build fix.
bfulgham@apple.com [Sat, 5 Apr 2014 04:52:41 +0000 (04:52 +0000)]
Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add missing
symbol export.

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

7 years agoWeb Inspector: JSContext inspection Resource search throws exception
commit-queue@webkit.org [Sat, 5 Apr 2014 03:54:05 +0000 (03:54 +0000)]
Web Inspector: JSContext inspection Resource search throws exception
https://bugs.webkit.org/show_bug.cgi?id=131253

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

Fail gracefully when none of the supported search backends are available.
In JSContext inspection the DOM and Page agents are unavailable.

* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.performSearch):

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

7 years agoWeb Inspector: JSContext inspection - TypeError: null is not an object (evaluating...
commit-queue@webkit.org [Sat, 5 Apr 2014 03:52:05 +0000 (03:52 +0000)]
Web Inspector: JSContext inspection - TypeError: null is not an object (evaluating 'contentView.showSourceCode')
https://bugs.webkit.org/show_bug.cgi?id=129857

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

When inspecting a JSContext, there is no main frame resource, so
attempting to show it was resulting in a runtime error.
Instead, check to see if there is a main frame resource, fallback
to selecting the first tree element.

* UserInterface/Base/Main.js:
(WebInspector.toggleConsoleView):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):

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

7 years agoStreamline cached wrapper lookup for Nodes in the normal world.
akling@apple.com [Sat, 5 Apr 2014 03:17:09 +0000 (03:17 +0000)]
Streamline cached wrapper lookup for Nodes in the normal world.
<https://webkit.org/b/131249>

Inline the hot path for toJS(..., Node*) for cached wrapper lookups
in the normal world. (Or really, out-of-line the cold path, since
that was preventing the compiler from inlining this function.)

Also have JSDOMGlobalObject cache the "is normal world" flag from
the DOMWrapperWorld so we can avoid the extra load.

Reviewed by Benjamin Poulain.

* WebCore.exp.in:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::JSDOMGlobalObject::worldIsNormal):
* bindings/js/JSNodeCustom.cpp:
(WebCore::getOutOfLineCachedWrapper):
* bindings/js/JSNodeCustom.h:
(WebCore::toJS):

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

7 years agoUnreviewed, rolling out r166820.
commit-queue@webkit.org [Sat, 5 Apr 2014 03:15:24 +0000 (03:15 +0000)]
Unreviewed, rolling out r166820.
https://bugs.webkit.org/show_bug.cgi?id=131256

Broke builds. (Requested by bdash on #webkit).

Reverted changeset:

"WIP for inlining C++.  Added a build target to produce llvm
ir."
https://bugs.webkit.org/show_bug.cgi?id=130523
http://trac.webkit.org/changeset/166820

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

7 years agoUnreviewed. iOS Build fix after r166818.
joepeck@webkit.org [Sat, 5 Apr 2014 03:03:37 +0000 (03:03 +0000)]
Unreviewed. iOS Build fix after r166818.

These member variables / declarations are accessed by iOS
in shared code in TelephoneNumberOverlayControllerMac.

* WebProcess/WebPage/TelephoneNumberOverlayController.h:

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

7 years agoWIP for inlining C++. Added a build target to produce llvm ir.
commit-queue@webkit.org [Sat, 5 Apr 2014 02:47:29 +0000 (02:47 +0000)]
WIP for inlining C++.  Added a build target to produce llvm ir.
https://bugs.webkit.org/show_bug.cgi?id=130523

Patch by Matthew Mirman <mmirman@apple.com> on 2014-04-04
Reviewed by Filip Pizlo.

The llvm ir gets placed JavaScriptCoreRuntimeToLLVMir.build with the extension .o

* JavaScriptCore.xcodeproj/project.pbxproj:
* build_index.py: Added.
* Configurations/CompileRuntimeToLLVMir.xcconfig: Added.

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

7 years agoUnreviewed. Rollout r166812, breaks 32-bit Mavericks build.
joepeck@webkit.org [Sat, 5 Apr 2014 01:24:30 +0000 (01:24 +0000)]
Unreviewed. Rollout r166812, breaks 32-bit Mavericks build.

* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):

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

7 years agoShow DataDetector UI on scanned phone numbers.
beidson@apple.com [Sat, 5 Apr 2014 01:10:11 +0000 (01:10 +0000)]
Show DataDetector UI on scanned phone numbers.
<rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247

Reviewed by Tim Horton.

Source/WebCore:

Gather the ranges of the scanned telephone numbers and send them up to WK2:
* editing/Editor.cpp:
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::scanSelectionForTelephoneNumbers):
(WebCore::Editor::scanRangeForTelephoneNumbers):
* editing/Editor.h:

Add client method to receive scanned telephone number ranges:
* page/EditorClient.h:
(WebCore::EditorClient::selectedTelephoneNumberRangesChanged):

Remove unneeded placeholder UI:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paintDocumentMarkers):
(WebCore::InlineTextBox::computeRectForReplacementMarker): Deleted.
(WebCore::InlineTextBox::paintCompositionUnderline): Deleted.
* rendering/InlineTextBox.h:
(WebCore::InlineTextBox::expansionBehavior): Deleted.

Source/WebKit2:

Add a new PageOverlay for telephone number UI, handle drawing the UI, and
handle mouse clicks on the button in that UI.

Even though clicks are detected, they aren’t acted upon yet.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Pass ranges to
  the TelephoneNumberController.
* WebProcess/WebCoreSupport/WebEditorClient.h:

This controller handles installing/removing the PageOverlay, drawing the UI elements,
and handling mouse events while any of the UI elements are shown.
There’s also a clumsy attempt to keep platform-specific parts separated out.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Added.
(WebKit::TelephoneNumberOverlayController::TelephoneNumberOverlayController):
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
(WebKit::TelephoneNumberOverlayController::destroyOverlay):
(WebKit::TelephoneNumberOverlayController::pageOverlayDestroyed):
(WebKit::TelephoneNumberOverlayController::willMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::didMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::rectsForDrawing):
(WebKit::TelephoneNumberOverlayController::selectedTelephoneNumberRangesChanged):

* WebProcess/WebPage/TelephoneNumberOverlayController.h: Added.
(WebKit::TelephoneNumberOverlayController::create):

* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Added.
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::handleTelephoneClick):
(WebKit::TelephoneNumberOverlayController::mouseEvent):
(WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
(WebKit::TelephoneNumberOverlayController::clearHighlights):

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::telephoneNumberOverlayController):
* WebProcess/WebPage/WebPage.h:

* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoAX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
commit-queue@webkit.org [Sat, 5 Apr 2014 00:37:55 +0000 (00:37 +0000)]
AX: supportsARIAExpanded should always return true for a few roles: combobox, disclosure.
https://bugs.webkit.org/show_bug.cgi?id=129787

Patch by James Craig <jcraig@apple.com> on 2014-04-04
Reviewed by Chris Fleizach.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsARIAExpanded):

LayoutTests:

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:

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

7 years agoWeb Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputConsoleMess...
commit-queue@webkit.org [Fri, 4 Apr 2014 23:54:59 +0000 (23:54 +0000)]
Web Inspector: Log JS Exceptions to System Console if JavaScriptCoreOutputConsoleMessagesToSystemConsole enabled
https://bugs.webkit.org/show_bug.cgi?id=131241

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

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
Log the exception to the system console if system console output is enabled.

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

7 years agoInclude Session ID in WebPageCreationParameters.
mhock@apple.com [Fri, 4 Apr 2014 23:53:36 +0000 (23:53 +0000)]
Include Session ID in WebPageCreationParameters.
https://bugs.webkit.org/show_bug.cgi?id=131239

<rdar://problem/16175483>

Reviewed by Sam Weinig.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

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

7 years agoJSGenerateToNativeObject should use fast JSNode/JSElement casts.
akling@apple.com [Fri, 4 Apr 2014 23:30:50 +0000 (23:30 +0000)]
JSGenerateToNativeObject should use fast JSNode/JSElement casts.
<https://webkit.org/b/131245>

Make JSGenerateToNativeObject spit out code using the fast new wrapper
casts for JSNode and JSElement.

This avoids walking the ClassInfo chain in many core functions, e.g:

    - Node.insertBefore()
    - Node.replaceChild()
    - Node.removeChild()
    - Node.appendChild()
    - window.getComputedStyle()

Reviewed by Geoff Garen.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):

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

7 years ago[CSS Shapes] polygon y-value calc() args serialize incorrectly
zoltan@webkit.org [Fri, 4 Apr 2014 23:25:41 +0000 (23:25 +0000)]
[CSS Shapes] polygon y-value calc() args serialize incorrectly
https://bugs.webkit.org/show_bug.cgi?id=129842

Reviewed by Bem Jones-Bey.

Source/WebCore:

The code hit ASSERT(isCalculation(value)) in CSSParser::createPrimitiveNumbericValue, because
CSSParser::validUnit had been called on both coordinates, which set the value for m_parsedCalculation,
but only one of the coordinates was calculation value. I reordered calling valudUnit and
createPrimitiveNumbericValue to be called in the correct order on the coordinates.

I added the new test case to parsing-test-utils.js.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapePolygon):

LayoutTests:

* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:

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

7 years ago[Mac][WK2] Videos do not have access to session cookies
jer.noble@apple.com [Fri, 4 Apr 2014 23:15:10 +0000 (23:15 +0000)]
[Mac][WK2] Videos do not have access to session cookies
https://bugs.webkit.org/show_bug.cgi?id=129687

Reviewed by Eric Carlson.

Update the CookieStorageShim to track changes in underlying networking stack.

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

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

7 years agoWeb Replay: capture and replay wheel events and scroll commands
burg@cs.washington.edu [Fri, 4 Apr 2014 23:14:15 +0000 (23:14 +0000)]
Web Replay: capture and replay wheel events and scroll commands
https://bugs.webkit.org/show_bug.cgi?id=129402

.:

Reviewed by Timothy Hatcher.

* ManualTests/inspector/replay-wheel-events.html: Added.

Source/WebCore:

Reviewed by Timothy Hatcher and Simon Fraser.

To capture and replay scrolling, the scrolling coordinator will force synchronous
scrolling during capture and replay. If the page is capturing or replaying,
ForceOnMainThread will be added to the coordinator's SynchronousScrollingReasons.

A callback was added to signal that replay session state have changed,
and thus the synchronous scrolling reasons should be recomputed.

Automated replay reftests for scrolling are not included, because they will be
too flaky until more nondeterminism is handled. Specifically, resource loading,
initial focus/active state, and parsing are known blocking issues.

Test: ManualTests/inspector/replay-wheel-events.html

* page/scrolling/ScrollingCoordinator.cpp: Add a new callback for replay state
session changes. Add ForceOnMainThread if the page's active input cursor is
capturing or replaying.

(WebCore::ScrollingCoordinator::synchronousScrollingReasons):
(WebCore::ScrollingCoordinator::replaySessionStateDidChange): Added.
* page/scrolling/ScrollingCoordinator.h:

* platform/PlatformWheelEvent.h:
* platform/ScrollTypes.h: Add explicit enum storage types so these enums can
be forward-declared. This is necessary to generate enum encode/decode implementations.

* replay/ReplayController.cpp:
(WebCore::ReplayController::setForceDeterministicSettings): If async scrolling
support is available, tell the scrolling tree to behave deterministically.

* replay/ReplayInputDispatchMethods.cpp:
(WebCore::HandleWheelEvent::dispatch): Added.
(WebCore::LogicalScrollPage::dispatch): Added.
(WebCore::ScrollPage::dispatch): Added.
* replay/SerializationMethods.cpp: Introduce more specific macros for values
deserialized to arbitraray lvalues, scalars, RefPtr, and unique_ptr. Fix existing
uses of decode macros.

(JSC::EncodingTraits<NondeterministicInputBase>::encodeValue): Fix macro name.
(JSC::EncodingTraits<KeypressCommand>::encodeValue): Fix macro name.
(JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Fix macro name.
(JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Fix macro name.
(JSC::PlatformWheelEventCocoa::PlatformWheelEventCocoa): Added. Encapsulate
and initialize data members specific to PLATFORM(COCOA).

(JSC::EncodingTraits<PlatformWheelEvent>::encodeValue): Added.
(JSC::EncodingTraits<PlatformWheelEvent>::decodeValue): Added.
* replay/SerializationMethods.h:
* replay/UserInputBridge.cpp: Fill in bridge methods to capture inputs.
(WebCore::UserInputBridge::handleWheelEvent):
(WebCore::UserInputBridge::scrollRecursively):
(WebCore::UserInputBridge::logicalScrollRecursively):
* replay/WebInputs.json: Add inputs and new enum types.

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

7 years agoImprove error checking in WebPageProxy::didReceiveEvent
ap@apple.com [Fri, 4 Apr 2014 22:56:27 +0000 (22:56 +0000)]
Improve error checking in WebPageProxy::didReceiveEvent
https://bugs.webkit.org/show_bug.cgi?id=131243
<rdar://problem/16529207>

Reviewed by Anders Carlsson.

* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):

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

7 years agoUnreviewed gardening. Mark a flakey test that is failing intermittenly in pixel tests.
joepeck@webkit.org [Fri, 4 Apr 2014 22:46:44 +0000 (22:46 +0000)]
Unreviewed gardening. Mark a flakey test that is failing intermittenly in pixel tests.

* platform/mac/TestExpectations:
Mark svg/as-image/svg-as-image-canvas.html as flakey.

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

7 years agoUpgrade to SelectorFailsAllSiblings when Child selector is failed.
benjamin@webkit.org [Fri, 4 Apr 2014 22:30:44 +0000 (22:30 +0000)]
Upgrade to SelectorFailsAllSiblings when Child selector is failed.
https://bugs.webkit.org/show_bug.cgi?id=130961

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-04-04
Reviewed by Benjamin Poulain.

When Child selector fails, we should resume matching from the closest
Descendant selector.
So upgrading SelectorFailsLocally to SelectorFailsAllSibling at least
to prevent unnecessary direct/indirect adjacent selectors matching.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):

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

7 years agoKeep track of filtered active attribute/uniform indices per shader program.
roger_fong@apple.com [Fri, 4 Apr 2014 22:08:47 +0000 (22:08 +0000)]
Keep track of filtered active attribute/uniform indices per shader program.
https://bugs.webkit.org/show_bug.cgi?id=131235.

Reviewed by Dean Jackson.

Tests: Covered by existing Khronos Conformance tests.
Will create a test to use multiple shader programs in a follow-up patch.

* html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::cacheActiveAttribLocations): Use getActiveAttribImpl. We do not need to use the filtered list of attributes here.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getUniformLocation): Use filtered list of uniforms for uniform count.
* platform/graphics/GraphicsContext3D.h: Create a map of shader programs to ActiveShaderSymbolCounts.
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::attachShader):
When attaching or detaching a shader the shader program's active symbols list will change. Clear it so that it will be updated later.
(WebCore::GraphicsContext3D::detachShader): Ditto.
(WebCore::GraphicsContext3D::compileShader): No need to clear symbol counts here.
(WebCore::GraphicsContext3D::getActiveAttrib): getActiveAttrib should only be able to query for attributes in the filtered list.
(WebCore::GraphicsContext3D::getActiveUniform): getActiveUniform should only be able to query for uniforms in the filtered list.
(WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount): Return the filtered symbol count for a shader program.

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

7 years agoMore documentation
andersca@apple.com [Fri, 4 Apr 2014 22:03:22 +0000 (22:03 +0000)]
More documentation
https://bugs.webkit.org/show_bug.cgi?id=131238

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:

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

7 years ago[CSS Blending] Add compositing reason for isolation.
commit-queue@webkit.org [Fri, 4 Apr 2014 20:34:23 +0000 (20:34 +0000)]
[CSS Blending] Add compositing reason for isolation.
https://bugs.webkit.org/show_bug.cgi?id=131153

Patch by Ion Rosca <rosca@adobe.com> on 2014-04-04
Reviewed by Joseph Pecoraro.

Source/WebCore:

There are 2 reasons involving blend modes for a layer to be composited:
1) the layer has blend mode and has composited descendants: CompositingReasonBlendingWithCompositedDescendants.
2) the layer has to isolate composited blending descendants: CompositingReasonIsolatesCompositedBlendingDescendants

Test: inspector-protocol/layers/layers-blending-compositing-reasons.html

* inspector/InspectorLayerTreeAgent.cpp:
(WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
* inspector/protocol/LayerTree.json:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing):
(WebCore::RenderLayerCompositor::logReasonsForCompositing):
* rendering/RenderLayerCompositor.h: adding CompositingReasonIsolatesCompositedBlendingDescendants.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/LayerTreeSidebarPanel.js:
(WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):

LayoutTests:

* inspector-protocol/layers/layers-blending-compositing-reasons-expected.txt: Added.
* inspector-protocol/layers/layers-blending-compositing-reasons.html: Added.

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

7 years agoWeb Inspector: Provide a way for JSContext console to log to system console
commit-queue@webkit.org [Fri, 4 Apr 2014 19:57:47 +0000 (19:57 +0000)]
Web Inspector: Provide a way for JSContext console to log to system console
https://bugs.webkit.org/show_bug.cgi?id=131050

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

Applications often re-expose some log -> NSLog functionality.
We already have the capability ourselves, which includes extra
information such as sourceURL:line:column, all arguments instead
of just one argument, and backtrace information on console.trace.
Therefore it would be convenient if developers could just use
the built-in console.log and get rich output in both the inspector
and the console, without writing their own logger.

The logging will be enabled in debug builds by default, and can be enabled
otherwise by setting a user default before creating the first context.

For example, in the application itself:

    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"JavaScriptCoreOutputConsoleMessagesToSystemConsole"];

Or from outside the application:

    shell> defaults write <app-bundle-identifier> JavaScriptCoreOutputConsoleMessagesToSystemConsole -bool YES

* inspector/JSConsoleClient.h:
* inspector/JSConsoleClient.cpp:
(Inspector::JSConsoleClient::logToSystemConsole):
(Inspector::JSConsoleClient::setLogToSystemConsole):
(Inspector::JSConsoleClient::initializeLogToSystemConsole):
(Inspector::JSConsoleClient::JSConsoleClient):
Global setting for logging to system console. Enabled on
debug builds, and by a user default on supported platforms.

(Inspector::JSConsoleClient::messageWithTypeAndLevel):
Log to system console when the static setting is enabled.

* runtime/ConsoleClient.h:
* runtime/ConsoleClient.cpp:
(JSC::appendURLAndPosition):
(JSC::appendMessagePrefix):
(JSC::ConsoleClient::printConsoleMessage):
(JSC::ConsoleClient::printConsoleMessageWithArguments):
Clean up printing. Build strings and use WTFLogAlways instead of printf
for consistant logging.

* runtime/ConsoleClient.cpp:
(JSC::ConsoleClient::printConsoleMessageWithArguments):
Clean up printing. If there is no source URL, don't print a leading colon.

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

7 years ago[GTK] kill-old-processes should kill dbus-daemon processes
commit-queue@webkit.org [Fri, 4 Apr 2014 18:37:02 +0000 (18:37 +0000)]
[GTK] kill-old-processes should kill dbus-daemon processes
https://bugs.webkit.org/show_bug.cgi?id=127352

Patch by Carlos Alberto Lopez Perez <clopez@igalia.com> on 2014-04-04
Reviewed by Martin Robinson.

* BuildSlaveSupport/kill-old-processes:
(main):

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

7 years agoUse more const refs in ShapeOutsideInfo and some misc cleanup
bjonesbe@adobe.com [Fri, 4 Apr 2014 18:36:32 +0000 (18:36 +0000)]
Use more const refs in ShapeOutsideInfo and some misc cleanup
https://bugs.webkit.org/show_bug.cgi?id=131192

Reviewed by Dirk Schulze.

Use const refs for pretty much everything that can't be null. Also
cleanup some code that got a bit messy when ShapeInfo was merged into
ShapeOutsideInfo.

No new tests, no behavior change.

* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::shapeToRendererPoint):
(WebCore::ShapeOutsideInfo::shapeToRendererSize):
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::getShapeImageAndRect):
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::ShapeOutsideInfo::logicalTopOffset):
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
* rendering/shapes/ShapeOutsideInfo.h:

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

7 years agoAdd radar number.
mhock@apple.com [Fri, 4 Apr 2014 18:16:54 +0000 (18:16 +0000)]
Add radar number.

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

7 years agoREGRESSION (r166615): Pressing return doesnâ\80\99t submit search term at bing.com
ap@apple.com [Fri, 4 Apr 2014 18:07:44 +0000 (18:07 +0000)]
REGRESSION (r166615): Pressing return doesnâ\80\99t submit search term at bing.com
https://bugs.webkit.org/show_bug.cgi?id=131212
<rdar://problem/16521788>

Reviewed by Dan Bernstein.

Source/WebCore:

Test: fast/forms/submit-while-you-submit.html

Turns out that m_shouldSubmit can actually be modified in a code path where we can't
directly return the result. I'm not sure if the current behavior is entirely correct
(we have open bugs about submitting forms multiple times), but let's restore it to
pre-r166615 state.

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::HTMLFormElement):
(WebCore::HTMLFormElement::prepareForSubmission):
(WebCore::HTMLFormElement::submit):
* html/HTMLFormElement.h:

LayoutTests:

* fast/forms/submit-while-you-submit-expected.txt: Added.
* fast/forms/submit-while-you-submit.html: Added.

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

7 years agoUse JSCell::indexingType instead of Structure::indexingType wherever possible
mhahnenberg@apple.com [Fri, 4 Apr 2014 17:56:23 +0000 (17:56 +0000)]
Use JSCell::indexingType instead of Structure::indexingType wherever possible
https://bugs.webkit.org/show_bug.cgi?id=131230

Reviewed by Mark Lam.

Avoid the indirection through the Structure.

* bytecode/ArrayAllocationProfile.cpp:
(JSC::ArrayAllocationProfile::updateIndexingType):
* bytecode/ArrayAllocationProfile.h:
(JSC::ArrayAllocationProfile::selectIndexingType):
* heap/HeapStatistics.cpp:
(JSC::StorageStatistics::operator()):
* runtime/ArrayPrototype.cpp:
(JSC::attemptFastSort):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::objectPrototypeIsSane):
(JSC::JSGlobalObject::arrayPrototypeChainIsSane):
(JSC::JSGlobalObject::stringPrototypeChainIsSane):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):

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

7 years ago[Mac] Change operation queue width to NSOperationQueueDefaultMaxConcurrentOperationCount.
mhock@apple.com [Fri, 4 Apr 2014 17:48:02 +0000 (17:48 +0000)]
[Mac] Change operation queue width to NSOperationQueueDefaultMaxConcurrentOperationCount.
https://bugs.webkit.org/show_bug.cgi?id=131231

Reviewed by Brady Eidson.

No new tests, no behavior change.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::operationQueueForAsyncClients):

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

7 years ago[CSS Shapes] Simplify Polygon implementation
hmuller@adobe.com [Fri, 4 Apr 2014 17:35:21 +0000 (17:35 +0000)]
[CSS Shapes] Simplify Polygon implementation
https://bugs.webkit.org/show_bug.cgi?id=130975

Reviewed by Andreas Kling.

Only floats can specify shape-outside. For polygon shape-outside values, the problem
of finding the left and right exclusion edges reduces to finding the X axis
limits of the polygon edges that overlap a particular layout line. This is a much
simpler version of the problem that PolygonShape was originally designed for, and so
the implementation can also be simplified. There's more about the new algorithm in
http://hansmuller-webkit.blogspot.com/2014/03/a-simpler-algorithm-for-css-shapes.html.

No new tests, since functionality was only removed.

* platform/graphics/FloatRect.h:
(WebCore::FloatRect::overlapsYRange):
(WebCore::FloatRect::overlapsXRange):
* rendering/shapes/PolygonShape.cpp:
(WebCore::OffsetPolygonEdge::xIntercept):
(WebCore::circleXIntercept):
(WebCore::OffsetPolygonEdge::clippedEdgeXRange): X axis extent of the edge clipped to a vertical interval.
(WebCore::clippedCircleXRange): X axis extent of a circle clipped to a vertical interval.
(WebCore::PolygonShape::shapeMarginLogicalBoundingBox):
(WebCore::PolygonShape::getExcludedIntervals):
(WebCore::PolygonShape::buildDisplayPaths):
* rendering/shapes/PolygonShape.h:
(WebCore::OffsetPolygonEdge::OffsetPolygonEdge):
(WebCore::OffsetPolygonEdge::isWithinYRange):
(WebCore::OffsetPolygonEdge::overlapsYRange):
(WebCore::PolygonShape::PolygonShape):
* rendering/shapes/ShapeInterval.h:
(WebCore::ShapeInterval::isEmpty):
(WebCore::ShapeInterval::unite):

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

7 years agoUnreviewed test fix. Rebaseline Mountain Lion scrolling tests
bfulgham@apple.com [Fri, 4 Apr 2014 17:34:30 +0000 (17:34 +0000)]
Unreviewed test fix. Rebaseline Mountain Lion scrolling tests
after switching to high-resolution continuous scroll output.

* platform/mac-mountainlion/fast/scrolling: Added.
* platform/mac-mountainlion/fast/scrolling/scroll-div-latched-mainframe-expected.txt: Added.
* platform/mac-mountainlion/fast/scrolling/scroll-iframe-latched-mainframe-expected.txt: Added.
* platform/mac-mountainlion/fast/scrolling/scroll-select-latched-mainframe-expected.txt: Added.

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

7 years agoUse JSCell::type instead of TypeInfo::type wherever possible
mhahnenberg@apple.com [Fri, 4 Apr 2014 17:21:03 +0000 (17:21 +0000)]
Use JSCell::type instead of TypeInfo::type wherever possible
https://bugs.webkit.org/show_bug.cgi?id=131229

Reviewed by Michael Saboff.

Avoid going through the Structure and reifying the TypeInfo.

* runtime/Executable.h:
(JSC::ExecutableBase::isEvalExecutable):
(JSC::ExecutableBase::isProgramExecutable):

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

7 years ago[CSS Shapes] shape-margin in percentage units always computes to 0px
bjonesbe@adobe.com [Fri, 4 Apr 2014 17:14:26 +0000 (17:14 +0000)]
[CSS Shapes] shape-margin in percentage units always computes to 0px
https://bugs.webkit.org/show_bug.cgi?id=130369

Reviewed by Andreas Kling.

Source/WebCore:

Make shape-margin parsing accept percentages and properly compute the
length once the percentage is accepted.

Test: fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-percent.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape):
(WebCore::Shape::createRasterShape):
(WebCore::Shape::createBoxShape):
* rendering/shapes/Shape.h:
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape):

LayoutTests:

Fix parsing test to understand that percentages are allowed for
shape-margin. Also add the layout test from Rebecca Hauck.

* fast/shapes/parsing/parsing-shape-margin-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:
* fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-percent-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-shape-margin-percent.html: Added.

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

7 years ago[CSS Shapes] Remove outside-shape CSS value
zoltan@webkit.org [Fri, 4 Apr 2014 16:56:46 +0000 (16:56 +0000)]
[CSS Shapes] Remove outside-shape CSS value
https://bugs.webkit.org/show_bug.cgi?id=131201

Reviewed by Bem Jones-Bey.

Source/WebCore:

Outside-shape is not a valid CSS value anymore. This patch removes it.

No new tests, existing tests are removed.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::shapePropertyValue):
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyShape::applyValue):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::ShapeOutsideInfo::isEnabledFor):
* rendering/style/ShapeValue.h:
(WebCore::ShapeValue::createOutsideValue): Deleted.

LayoutTests:

* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-shape-outside.html:

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

7 years agoGradient offsets are off if compositing operator != source-over
krit@webkit.org [Fri, 4 Apr 2014 16:41:09 +0000 (16:41 +0000)]
Gradient offsets are off if compositing operator != source-over
https://bugs.webkit.org/show_bug.cgi?id=129791

Reviewed by Andreas Kling.

Source/WebCore:

Instead of transforming the path before drawing it on the context,
the whole context should be transformed. This will make the gradient
map correctly to the context space.

Test: fast/canvas/canvas-gradient-on-compositing.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):

LayoutTests:

Test that the gradient space maps correctly to context space after
applying compositing mode.

* fast/canvas/canvas-gradient-on-compositing-expected.txt: Added.
* fast/canvas/canvas-gradient-on-compositing.html: Added.
* fast/canvas/script-tests/canvas-gradient-on-compositing.js: Added.
(dataToArray):
(getPixel):
(pixelShouldBe):

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

7 years agoSubpixel rendering: Move background images to device pixel boundaries.
zalan@apple.com [Fri, 4 Apr 2014 16:30:18 +0000 (16:30 +0000)]
Subpixel rendering: Move background images to device pixel boundaries.
https://bugs.webkit.org/show_bug.cgi?id=131144

Reviewed by Simon Fraser.

Replace integral snapping with device pixel snapping.
Background image geometry calculation uses LayoutUnits and we snap to device pixels right before painting.

Source/WebCore:

Tests: fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html
       fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html
       fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html
       fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html

* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsTilePhase):
(WebCore::GraphicsLayer::contentsTilePhase):
(WebCore::GraphicsLayer::setContentsTileSize):
(WebCore::GraphicsLayer::contentsTileSize):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::setContentsTileSize):
(WebCore::TextureMapperLayer::setContentsTilePhase):
* platform/graphics/texmap/TextureMapperLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setContentsTileSize):
(WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::repaintLayerRectsForImage):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
(WebCore::resolveWidthForRatio):
(WebCore::resolveHeightForRatio):
(WebCore::resolveAgainstIntrinsicWidthOrHeightAndRatio):
(WebCore::resolveAgainstIntrinsicRatio):
(WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions):
(WebCore::RenderBoxModelObject::calculateFillTileSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::clip):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::relativePhase):
(WebCore::getSpace):
(WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
(WebCore::RenderBoxModelObject::paintNinePieceImage):
(WebCore::applySubPixelHeuristicForTileSize): Deleted.
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destOrigin):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestOrigin):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::destRect):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setDestRect):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::phase):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhase):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::tileSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setTileSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::spaceSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setSpaceSize):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseX):
(WebCore::RenderBoxModelObject::BackgroundImageGeometry::setPhaseY):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::getShapeImageAndRect):

LayoutTests:

* css3/background/background-repeat-round-auto1-expected.html:
* css3/background/background-repeat-round-auto1.html:
* css3/background/background-repeat-round-auto2-expected.html:
* css3/background/background-repeat-round-auto2.html:
* css3/background/background-repeat-round-border-expected.html:
* css3/background/background-repeat-round-border.html:
* css3/background/background-repeat-round-content-expected.html:
* css3/background/background-repeat-round-content.html:
* css3/background/background-repeat-space-content-expected.html:
* css3/background/background-repeat-space-content.html:
* css3/background/background-repeat-space-padding-expected.html:
* css3/background/background-repeat-space-padding.html:
* css3/masking/mask-repeat-round-auto1-expected.html:
* css3/masking/mask-repeat-round-auto1.html:
* css3/masking/mask-repeat-round-auto2-expected.html:
* css3/masking/mask-repeat-round-auto2.html:
* css3/masking/mask-repeat-round-border-expected.html:
* css3/masking/mask-repeat-round-border.html:
* css3/masking/mask-repeat-round-content-expected.html:
* css3/masking/mask-repeat-round-content.html:
* css3/masking/mask-repeat-space-content-expected.html:
* css3/masking/mask-repeat-space-content.html:
* css3/masking/mask-repeat-space-padding-expected.html:
* css3/masking/mask-repeat-space-padding.html:
* fast/backgrounds/hidpi-bitmap-background-on-subpixel-position-expected.html: Added.
* fast/backgrounds/hidpi-bitmap-background-on-subpixel-position.html: Added.
* fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position-expected.html: Added.
* fast/backgrounds/hidpi-bitmap-background-origin-on-subpixel-position.html: Added.
* fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position-expected.html: Added.
* fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position.html: Added.
* fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position-expected.html: Added.
* fast/backgrounds/hidpi-generated-gradient-background-on-subpixel-position.html: Added.
* fast/backgrounds/resources/black25x25.png: Added.

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

7 years ago[Win] Unreviewed test fix (crash in debug build).
bfulgham@apple.com [Fri, 4 Apr 2014 16:14:43 +0000 (16:14 +0000)]
[Win] Unreviewed test fix (crash in debug build).

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::legibleOutputCallback): Correct assertion. This
callback is scheduled for the caption queue, not the main queue.

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

7 years ago[Win] Load Media Controls js/css from bundle
bfulgham@apple.com [Fri, 4 Apr 2014 16:12:35 +0000 (16:12 +0000)]
[Win] Load Media Controls js/css from bundle
https://bugs.webkit.org/show_bug.cgi?id=131194

Reviewed by Dean Jackson.

* DerivedSources.cpp: Remove no-longer generated file.
* DerivedSources.make: Don't generate unneeded files.
* WebCore.vcxproj/WebCore.vcxproj: Don't compile unneeded files.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Copy css/js to resource
* rendering/RenderThemeSafari.cpp:
* rendering/RenderThemeSafari.h:
* rendering/RenderThemeWin.cpp:
* rendering/RenderThemeWin.h:

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

7 years ago[CSSRegions] Region's behaviour not updated when becoming valid from invalid
mihnea@adobe.com [Fri, 4 Apr 2014 15:05:43 +0000 (15:05 +0000)]
[CSSRegions] Region's behaviour not updated when becoming valid from invalid
https://bugs.webkit.org/show_bug.cgi?id=131211

Reviewed by Andrei Bucur.

Source/WebCore:

When a region becomes valid again from invalid, it was part of a dependency cycle and the dependency cycle was broken,
it needs to behave like a valid region again: if it has autoheight then it should compute its height based on the
named flow content, if it has region styling then it should apply the additional style to the flowed content.

Added a new method, updateRegionFlags, that is used to ensure that auto-height and region-styling flags
are properly set in several situations. Checking the behaviour, autoheight or styling, is done only
if the region is valid.

Tests: fast/regions/auto-size/autoheight-region-valid-from-invalid.html
       fast/regions/region-styling/region-withstyling-valid-from-invalid.html

* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::updateRegionFlags):
(WebCore::RenderNamedFlowFragment::styleDidChange):
(WebCore::RenderNamedFlowFragment::updateRegionHasAutoLogicalHeightFlag):
(WebCore::RenderNamedFlowFragment::checkRegionStyle):
(WebCore::RenderNamedFlowFragment::attachRegion):
(WebCore::RenderNamedFlowFragment::detachRegion):
* rendering/RenderNamedFlowFragment.h:
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::addFragmentToNamedFlowThread):

LayoutTests:

Add tests for auto-height and region styling behaviour.

* fast/regions/auto-size/autoheight-region-valid-from-invalid-expected.html: Added.
* fast/regions/auto-size/autoheight-region-valid-from-invalid.html: Added.
* fast/regions/region-styling/region-withstyling-valid-from-invalid-expected.html: Added.
* fast/regions/region-styling/region-withstyling-valid-from-invalid.html: Added.

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

7 years ago[GTK][CMake] Remove FindXt.cmake.
rakuco@webkit.org [Fri, 4 Apr 2014 14:03:20 +0000 (14:03 +0000)]
[GTK][CMake] Remove FindXt.cmake.
https://bugs.webkit.org/show_bug.cgi?id=131227

Reviewed by Anders Carlsson.

.:

Xt is already detected by CMake's own FindX11.cmake, so there is no need to keep a custom FindXt.cmake around.

* Source/cmake/FindXt.cmake: Removed.
* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

* PlatformGTK.cmake: Use FindX11.cmake's Xt variables instead of our own FindXt.cmake's ones.

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

7 years ago[GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
rakuco@webkit.org [Fri, 4 Apr 2014 12:35:47 +0000 (12:35 +0000)]
[GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
https://bugs.webkit.org/show_bug.cgi?id=131226

Reviewed by Carlos Garcia Campos.

#cmakedefine01 will define HAVE_GTK_UNIX_PRINTING to 0 instead of #undef'ining it. This
means that simple checks like #ifdef HAVE_GTK_UNIX_PRINTING will always be true -- we
actually need to check if the value is set to 1, which is precisely what the HAVE() macro
does, so start using it.

* UIProcess/API/gtk/WebKitPrintOperation.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print):
* WebProcess/WebPage/gtk/PrinterListGtk.cpp:
* WebProcess/WebPage/gtk/PrinterListGtk.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::create):

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

7 years agoUnreviewed GTK gardening.
svillar@igalia.com [Fri, 4 Apr 2014 10:53:21 +0000 (10:53 +0000)]
Unreviewed GTK gardening.

Updated expectations for tests crashing in Debug bots.

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

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

7 years ago[EFL] Build error due to changed path of generated js files.
tgergely.u-szeged@partner.samsung.com [Fri, 4 Apr 2014 10:24:59 +0000 (10:24 +0000)]
[EFL] Build error due to changed path of generated js files.
https://bugs.webkit.org/show_bug.cgi?id=131215

Reviewed by Gyuyoung Kim.

r166648 fixed the generation of some .js files on GTK. Due to some
changes in the paths it causes a build error on EFL.

* Source/PlatformEfl.cmake:
  Replaced path for two derived source files.

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

7 years ago[Win] Update obsolete packages in cygwin
agomez@igalia.com [Fri, 4 Apr 2014 08:11:34 +0000 (08:11 +0000)]
[Win] Update obsolete packages in cygwin
https://bugs.webkit.org/show_bug.cgi?id=126264

Reviewed by Brent Fulgham.

Removed "apache" and "minires" as the first has been replaced by
"lighttpd" and the second is now integrated into
"cygwin". Replaced the transitional and now obsolete "gcc" package
with "gcc-g++" and ensure that "python" stays at version "2.6.8"
since the newer version available is "2.7.3" which breaks the
build due to some funniness with environment variable handling.

* CygwinDownloader/cygwin-downloader.py:
* CygwinDownloader/cygwin-downloader.zip:

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

7 years agoAX: iOS does not need to spin the run loop on synchronous message calls
cfleizach@apple.com [Fri, 4 Apr 2014 06:52:22 +0000 (06:52 +0000)]
AX: iOS does not need to spin the run loop on synchronous message calls
https://bugs.webkit.org/show_bug.cgi?id=131195

Reviewed by Dan Bernstein.

On the Mac platform, we need to spin the run loop while making synchronous calls to avoid VoiceOver hanging.
On iOS, this not needed due to architectural differences.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::synchronousMessagesShouldSpinRunLoop):
* WebProcess/WebPage/WebPage.h:

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

7 years ago[EFL] Should flush and render layers after the root layer is changed.
commit-queue@webkit.org [Fri, 4 Apr 2014 06:26:54 +0000 (06:26 +0000)]
[EFL] Should flush and render layers after the root layer is changed.
https://bugs.webkit.org/show_bug.cgi?id=131108

Patch by Hyowon Kim <hw1008.kim@samsung.com> on 2014-04-03
Reviewed by Gyuyoung Kim.

If there is no update event after root layer is changed, old webview can be shown.
Because the syncTimer is not being triggered by root layer change.
We should flush and render layers by starting syncTimer when the root layer is changed.

* WebCoreSupport/AcceleratedCompositingContextEfl.cpp:
(WebCore::AcceleratedCompositingContext::setRootGraphicsLayer): Add m_syncTimer.startOneShot(0);
* WebCoreSupport/AcceleratedCompositingContextEfl.h:
(WebCore::AcceleratedCompositingContext::setRootGraphicsLayer): Move implementation from header to source.

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

7 years ago[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
aestes@apple.com [Fri, 4 Apr 2014 05:23:52 +0000 (05:23 +0000)]
[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
https://bugs.webkit.org/show_bug.cgi?id=131206

Reviewed by Dan Bernstein.

Add _dataForDisplayedPDF and _suggestedFilenameForDisplayedPDF to
support clients that wish to save a copy of the currently displayed PDF
to disk. Ultimately we should support this use case by exposing something
like WKWebViewContentProvider, but for now let's do something simple.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView documentData]):
(-[WKPDFView suggestedFilename]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):

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

7 years ago[EFL][WK2] Add API to get contents size of current web page.
eunmi15.lee@samsung.com [Fri, 4 Apr 2014 05:04:56 +0000 (05:04 +0000)]
[EFL][WK2] Add API to get contents size of current web page.
https://bugs.webkit.org/show_bug.cgi?id=131148

Reviewed by Gyuyoung Kim.

Application can want to get contents size of current web page without
monitoring "contents,size,changed" signal, so I add API to get contents
size directly.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewGetContentsSize): WK API to get contents size from WebView.
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_contents_size_get): new API to get contents size.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

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

7 years agoFast-path for casting JS wrappers to JSElement.
akling@apple.com [Fri, 4 Apr 2014 04:42:21 +0000 (04:42 +0000)]
Fast-path for casting JS wrappers to JSElement.
<https://webkit.org/b/131210>

Add an extended JSType for Element wrappers so we can avoid walking
the ClassInfo chain in those bindings as well.

Generalized the code to select a casting helper in the bindings
generator into a function (GetCastingHelperForThisObject.)
Updated all the jsDynamicCast call sites to go through this, in case
there's an optimized cast available for the desired type.

Reviewed by Benjamin Poulain.

* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMWrapper.h:
* bindings/js/JSElementCustom.h: Added.
(WebCore::jsElementCast):
* bindings/js/JSNodeCustom.h:
(WebCore::jsNodeCast):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GetCastingHelperForThisObject):
(GenerateImplementation):
* dom/Element.idl:

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

7 years agoUnreviewed build fix.
bfulgham@apple.com [Fri, 4 Apr 2014 04:23:11 +0000 (04:23 +0000)]
Unreviewed build fix.

* WebKit.vcxproj/WebKit.sln: Make sure we don't generate the
WebInspectorUI before the generated JS is ready.

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

7 years ago[WK2][EFL] Use template method in creating NativeWebMouseEvent
jinwoo7.song@samsung.com [Fri, 4 Apr 2014 04:11:56 +0000 (04:11 +0000)]
[WK2][EFL] Use template method in creating NativeWebMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=131152

Reviewed by Anders Carlsson.

There are three EFL mouse events, such as Evas_Event_Mouse_Down, Evas_Event_Mouse_Up,
and Evas_Event_Mouse_Move. They can be defined as a template method.

* PlatformEfl.cmake: Remove NativeWebMouseEventEfl.cpp
* Shared/NativeWebMouseEvent.h:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Add a template method.
* Shared/efl/NativeWebMouseEventEfl.cpp: Removed.

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

7 years agocompositing/tiling/rotated-tiled-* tests failing on bots
joepeck@webkit.org [Fri, 4 Apr 2014 04:08:02 +0000 (04:08 +0000)]
compositing/tiling/rotated-tiled-* tests failing on bots
https://bugs.webkit.org/show_bug.cgi?id=131207

Unreviewed rebaseline of tests after r166748.

* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:

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

7 years agoRebaseline a bindings test.
akling@apple.com [Fri, 4 Apr 2014 03:24:53 +0000 (03:24 +0000)]
Rebaseline a bindings test.

* bindings/scripts/test/JS/JSTestNode.h:
(WebCore::JSTestNode::createStructure):

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

7 years agoFast-path for casting JS wrappers to JSNode.
akling@apple.com [Fri, 4 Apr 2014 02:29:15 +0000 (02:29 +0000)]
Fast-path for casting JS wrappers to JSNode.
<https://webkit.org/b/131196>

Source/JavaScriptCore:

Allow code outside of JSC (well, WebCore) to extend the JSType spectrum
a little bit. We do this by exposing a LastJSCObjectType constant so
WebCore can encode its own wrapper types after that.

Reviewed by Mark Hahnenberg and Geoff Garen.

* runtime/JSType.h:

    Added LastJSCObjectType for use by WebCore.

* runtime/JSObject.h:
(JSC::JSObject::isVariableObject):

    Updated since this can no longer assume that types >= VariableObjectType
    are all variable objects.

Source/WebCore:

Add a way to quickly determine that a given JSObject is a JSNode.
This lets us avoid walking the ClassInfo chain in the DOM bindings
for WebCore::Node.

Reviewed by Mark Hahnenberg and Geoff Garen.

* bindings/js/JSDOMWrapper.h:

    Added a JSNodeType constant that extends beyond JSC::JSType.

* bindings/js/JSNodeCustom.h:
(WebCore::jsNodeCast):

    Added. Fast cast from JSValue to JSNode.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):

    Generate code that uses jsNodeCast in Node interfaces.

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

7 years agoAll Heap::writeBarriers should be inline
mhahnenberg@apple.com [Fri, 4 Apr 2014 02:24:28 +0000 (02:24 +0000)]
All Heap::writeBarriers should be inline
https://bugs.webkit.org/show_bug.cgi?id=131197

Reviewed by Mark Lam.

One is in a JSCellInlines.h, another is in Heap.cpp. These are all critical
enough and small enough to belong in HeapInlines.h. Also added the proper
ENABLE(GGC) ifdefs to minimize the cost of C++ barriers for !ENABLE(GGC) builds.

* heap/Heap.cpp:
(JSC::Heap::writeBarrier): Deleted.
* heap/Heap.h:
* heap/HeapInlines.h:
(JSC::Heap::writeBarrier):
* runtime/JSCellInlines.h:
(JSC::Heap::writeBarrier): Deleted.

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

7 years agocheck-webkit-style: Improve warnings on Objective-C @property syntax
commit-queue@webkit.org [Fri, 4 Apr 2014 01:56:47 +0000 (01:56 +0000)]
check-webkit-style: Improve warnings on Objective-C @property syntax
https://bugs.webkit.org/show_bug.cgi?id=131200

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-04-03
Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_in_objective_c_properties):

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

7 years agoRebaseline some tests after r166748. These tests now correctly
simon.fraser@apple.com [Fri, 4 Apr 2014 01:24:57 +0000 (01:24 +0000)]
Rebaseline some tests after r166748. These tests now correctly
report a contentsScale.

* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:

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

7 years agoWeb Inspector: JSContext inspection provide a way to opt-out of including Native...
commit-queue@webkit.org [Fri, 4 Apr 2014 00:50:49 +0000 (00:50 +0000)]
Web Inspector: JSContext inspection provide a way to opt-out of including Native Call Stacks in Exception traces reported to Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=131186

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

* API/JSContextPrivate.h:
* API/JSContext.mm:
(-[JSContext _includesNativeCallStackWhenReportingExceptions]):
(-[JSContext _setIncludesNativeCallStackWhenReportingExceptions:]):
JSContext ObjC SPI to opt-out of including native call stacks in exceptions.

* API/JSContextRefPrivate.h:
* API/JSContextRef.cpp:
(JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions):
(JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions):
JSContext C SPI to opt-out of including native call stacks in exceptions.

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::reportAPIException):
Only include the native call stack if the setting is enabled. It is enabled by default.

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

7 years agoAdd WKWebView documentation
andersca@apple.com [Thu, 3 Apr 2014 23:55:31 +0000 (23:55 +0000)]
Add WKWebView documentation
https://bugs.webkit.org/show_bug.cgi?id=131190

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKWebView.h:

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

7 years agoREGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
msaboff@apple.com [Thu, 3 Apr 2014 23:51:47 +0000 (23:51 +0000)]
REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
https://bugs.webkit.org/show_bug.cgi?id=131189

Reviewed by Geoffrey Garen.

Elevate the priority of all WebKit2 service processes on iOS, not just the network process.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):

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

7 years agoASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
simon.fraser@apple.com [Thu, 3 Apr 2014 23:28:42 +0000 (23:28 +0000)]
ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
https://bugs.webkit.org/show_bug.cgi?id=131187

Reviewed by Maciej Stachowiak.

After a call to PlatformCALayerRemote::adoptSublayers() when a layer
toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
that not all sublayers had been removed (there was one with a null superlayer).

Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
is called; they'll get added as we update children anyway.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::adoptSublayers):

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

7 years agoMerge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
bjonesbe@adobe.com [Thu, 3 Apr 2014 23:04:49 +0000 (23:04 +0000)]
Merge ShapeInfo & ShapeOutsideInfo now that ShapeInsideInfo is no more
https://bugs.webkit.org/show_bug.cgi?id=131180

Reviewed by Andreas Kling.

Now that ShapeInsideInfo is gone, having a class hiearachy and
templates doesn't make any sense. As a first step to cleaning up the
code, this remove ShapeInfo and puts all of its functionality into
ShapeOutsideInfo.

No new tests, no behavior change.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* rendering/shapes/ShapeInfo.cpp: Removed.
* rendering/shapes/ShapeInfo.h: Removed.
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computedShapePhysicalBoundingBox):
(WebCore::ShapeOutsideInfo::shapeToRendererPoint):
(WebCore::ShapeOutsideInfo::shapeToRendererSize):
(WebCore::referenceBox):
(WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
(WebCore::checkShapeImageOrigin):
(WebCore::getShapeImageAndRect):
(WebCore::getShapeImageMarginRect):
(WebCore::ShapeOutsideInfo::computedShape):
(WebCore::borderBeforeInWritingMode):
(WebCore::borderAndPaddingBeforeInWritingMode):
(WebCore::ShapeOutsideInfo::logicalTopOffset):
(WebCore::borderStartWithStyleForWritingMode):
(WebCore::borderAndPaddingStartWithStyleForWritingMode):
(WebCore::ShapeOutsideInfo::logicalLeftOffset):
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::updateDeltasForContainingBlockLine):
(WebCore::ShapeOutsideInfo::shapeValue): Deleted.
(WebCore::ShapeOutsideInfo::styleForWritingMode): Deleted.
* rendering/shapes/ShapeOutsideInfo.h:

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

7 years agoFix over-retain in SharedBufferCF's createCFData().
akling@apple.com [Thu, 3 Apr 2014 22:56:47 +0000 (22:56 +0000)]
Fix over-retain in SharedBufferCF's createCFData().
<https://webkit.org/b/131139>

Constructing the return type (RetainPtr<CFDataRef>) will also retain
the pointee, so this would end up leaking.

Reviewed by Anders Carlsson.

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):

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

7 years ago[iOS][WK2] Add SPI to handle animated resize
benjamin@webkit.org [Thu, 3 Apr 2014 22:55:39 +0000 (22:55 +0000)]
[iOS][WK2] Add SPI to handle animated resize
https://bugs.webkit.org/show_bug.cgi?id=131141

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-04-03
Reviewed by Simon Fraser.

Set up a basic API to handle animated resize. The code does not do much at the moment,
it is mostly to have an interface we can implement later.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setFrame:]):
(-[WKWebView setBounds:]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _frameOrBoundsChangedFrom:]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _frameOrBoundsChanged]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

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

7 years agoSource/WebCore: [Win] Turn on ENABLE_CSS_GRID_LAYOUT
bfulgham@apple.com [Thu, 3 Apr 2014 22:47:22 +0000 (22:47 +0000)]
Source/WebCore: [Win] Turn on ENABLE_CSS_GRID_LAYOUT
https://bugs.webkit.org/show_bug.cgi?id=131147

Reviewed by Simon Fraser.

Covered by existing fast/css/getComputedStyle tests.

* css/CSSAllInOne.cpp: Add CSSGridLineNamesValue.cpp when building
with ENABLE(CSS_GRID_LAYOUT)

WebKitLibraries: [Win] Enable the CSS_GRID_LAYOUT feature.
https://bugs.webkit.org/show_bug.cgi?id=131147

Reviewed by Simon Fraser.

Just like the CANVAS_PATH feature, this seems to have been
overlooked when it was turned on for other ports.

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

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

7 years agoSource/WebCore: Pixelated WebView when display is changed from hiDPI to regularDPI
simon.fraser@apple.com [Thu, 3 Apr 2014 22:44:58 +0000 (22:44 +0000)]
Source/WebCore: Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185

Reviewed by Tim Horton.

r166309 added a short circuit in GraphicsLayerCA::updateContentsScale()
when the scale didn't change. This broke layers which expected to
unconditionally receive a setContentsScale(), namely the WebTiledBackingLayer
which owns the TileController. WebTiledBackingLayer overrode -setContentsScale:
to pass the scale down to the TileController; however, it didn't override
-contentsScale, and it mucked with the scale passed in.

Fix by having setting and fetching contentsScale on a WebTiledBackingLayer
work as expected. Also rename the TileController functions to mirror the
CALayer functions better.

* WebCore.exp.in:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateContentsScale):
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::contentsScale):
(WebCore::TileController::setContentsScale):
(WebCore::TileController::scale): Deleted.
(WebCore::TileController::setScale): Deleted.
* platform/graphics/ca/mac/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer setContentsScale:]):
(-[WebTiledBackingLayer contentsScale]):

Source/WebKit2: Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185
<rdar://problem/16512184&16503714>

Reviewed by Tim Horton.

TileController function was renamed.

* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::setContentsScale):

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

7 years ago[CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
zoltan@webkit.org [Thu, 3 Apr 2014 22:34:34 +0000 (22:34 +0000)]
[CSS Shapes] LineSegment logicalLeft and logicalRight members should be floats
https://bugs.webkit.org/show_bug.cgi?id=116160

Reviewed by Andreas Kling.

LineSegment edges should not have been changed to LayoutUnit. These are
used only as floats. I modified them back to floats.

No new tests are needed, no behavior change.

* rendering/shapes/Shape.h:

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

7 years ago[CG] Canvas lineDashOffset does not handle negative numbers correctly
krit@webkit.org [Thu, 3 Apr 2014 21:44:54 +0000 (21:44 +0000)]
[CG] Canvas lineDashOffset does not handle negative numbers correctly
https://bugs.webkit.org/show_bug.cgi?id=80560

Reviewed by Dean Jackson.

Source/WebCore:

CG ignores negative dash array offsets. Check if we have a negative offset, if yes
then calculate the length of the dash array and modulo the dash array offset with
the dash array length.

Test: fast/canvas/canvas-negative-lineDashOffset.html

* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setLineDash):

LayoutTests:

Test correct rendering of negative offset for Canvas dash arrays.

* fast/canvas/canvas-negative-lineDashOffset-expected.txt: Added.
* fast/canvas/canvas-negative-lineDashOffset.html: Added.
* fast/canvas/script-tests/canvas-negative-lineDashOffset.js: Added.
(dataToArray):
(getPixel):
(pixelShouldBe):

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

7 years agoREGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple...
hyatt@apple.com [Thu, 3 Apr 2014 21:40:49 +0000 (21:40 +0000)]
REGRESSION: fast/css/relative-positioned-block-nested-with-inline-parent-multiple-descendant-blocks-dynamic.html broken
https://bugs.webkit.org/show_bug.cgi?id=131183

Reviewed by Simon Fraser.

Revert the loop to continue rather than breaking when an invalid block is encountered.
This is what it used to do if it encountered a non-continuation block.

* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):

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

7 years ago[WebKit2] Promote user script SPI to API
weinig@apple.com [Thu, 3 Apr 2014 21:36:32 +0000 (21:36 +0000)]
[WebKit2] Promote user script SPI to API
https://bugs.webkit.org/show_bug.cgi?id=131181

Reviewed by Anders Carlsson.

Source/WebKit/mac:

* MigrateHeaders.make:

Source/WebKit2:

* UIProcess/API/Cocoa/WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.h.
* UIProcess/API/Cocoa/WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.mm.
(-[WKScriptMessage scriptWorld]):
(-[_WKScriptMessage scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessageHandler.h.
* UIProcess/API/Cocoa/WKScriptWorld.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/WKScriptWorld.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.mm.
(+[WKScriptWorld defaultWorld]):
(+[_WKScriptWorld defaultWorld]): Deleted.
* UIProcess/API/Cocoa/WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.h.
* UIProcess/API/Cocoa/WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.mm.
(-[WKUserContentController addScriptMessageHandler:name:world:]):
(-[WKUserContentController removeScriptMessageHandlerForName:world:]):
(-[_WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
(-[_WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration userContentController]):
(-[WKWebViewConfiguration setUserContentController:]):
(-[WKWebViewConfiguration _userContentController]): Deleted.
(-[WKWebViewConfiguration _setUserContentController:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKScriptMessage.h: Removed.
* UIProcess/API/Cocoa/_WKScriptMessage.mm: Removed.
* UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.h: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years ago Unreviewed. Moving my name to committer section accidently
santoshbit2007@gmail.com [Thu, 3 Apr 2014 21:11:01 +0000 (21:11 +0000)]
  Unreviewed. Moving my name to committer section accidently
              added in reviewer section.
     * Scripts/webkitpy/common/config/contributors.json:

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

7 years agoMake download policy decisions SPI for now
andersca@apple.com [Thu, 3 Apr 2014 21:03:48 +0000 (21:03 +0000)]
Make download policy decisions SPI for now
https://bugs.webkit.org/show_bug.cgi?id=131179

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):

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

7 years agoHarden FilterOperation type casting
simon.fraser@apple.com [Thu, 3 Apr 2014 20:57:48 +0000 (20:57 +0000)]
Harden FilterOperation type casting
https://bugs.webkit.org/show_bug.cgi?id=131142

Reviewed by Sam Weinig.

DefaultFilterOperation had an error-prone behavior where it set the base class
OperationType to the type of some other filter class, but overrode isDefault().
This made it very easy to write incorrect code that casted incorrectly based on type().

Fix by making adding a DEFAULT filter operation type, and storing the represented
type on DefaultFilterOperation().

Also remove the OperationType argument for constructors of FilterOperations that
can only be of one type, to avoid possible mistakes.

Make the type cast macros a bit more normal, and use them in a few places.

Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.

Source/WebCore:

* WebCore.exp.in:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForFilter):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::createFilterOperations):
* platform/graphics/ca/PlatformCAFilters.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):
* platform/graphics/filters/FilterOperation.cpp:
(WebCore::DefaultFilterOperation::operator==):
(WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
(WebCore::ReferenceFilterOperation::operator==):
(WebCore::BlurFilterOperation::operator==):
(WebCore::BlurFilterOperation::blend):
(WebCore::DropShadowFilterOperation::operator==):
(WebCore::DropShadowFilterOperation::blend):
* platform/graphics/filters/FilterOperation.h:
(WebCore::FilterOperation::blend):
(WebCore::FilterOperation::type):
(WebCore::FilterOperation::isBasicColorMatrixFilterOperation):
(WebCore::FilterOperation::isBasicComponentTransferFilterOperation):
(WebCore::FilterOperation::isSameType):
(WebCore::DefaultFilterOperation::create):
(WebCore::DefaultFilterOperation::representedType):
(WebCore::DefaultFilterOperation::DefaultFilterOperation):
(WebCore::ReferenceFilterOperation::create):
(WebCore::BlurFilterOperation::create):
(WebCore::BlurFilterOperation::BlurFilterOperation):
(WebCore::DropShadowFilterOperation::create):
(WebCore::DropShadowFilterOperation::DropShadowFilterOperation):
(WebCore::FilterOperation::isDefault): Deleted.
* platform/graphics/filters/FilterOperations.cpp:
(WebCore::FilterOperations::outsets):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::build):
* rendering/RenderLayerFilterInfo.cpp:
(WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients):

Source/WebKit2:

* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeFilterOperation):
(IPC::decodeFilterOperation):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

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

7 years agoStop throwing away the Document's StyleResolver on a timer.
akling@apple.com [Thu, 3 Apr 2014 20:56:33 +0000 (20:56 +0000)]
Stop throwing away the Document's StyleResolver on a timer.
<https://webkit.org/b/131168>
<rdar://problem/15227045>

This was causing some unfortunate pauses when returning to idle pages
after a long-ish time. There's already a mechanism in place that will
throw these away if the system comes under memory pressure.

Reviewed by Sam Weinig.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::StyleResolver::styleForPage):
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::didAccessStyleResolver): Deleted.
(WebCore::Document::styleResolverThrowawayTimerFired): Deleted.
* dom/Document.h:

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

7 years agoAssertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
simon.fraser@apple.com [Thu, 3 Apr 2014 20:46:03 +0000 (20:46 +0000)]
Assertion under RenderLayerCompositor::updateScrollCoordinatedLayer on time.com on iOS
https://bugs.webkit.org/show_bug.cgi?id=131150

Reviewed by Beth Dakin.

When calling updateScrollCoordinatedLayer() under styleChanged, we haven't done
layout yet so our composting layers haven't been hooked together. Don't try
to add a zero nodeID to the map in this case.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):

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

7 years agogit-svn-id: https://svn.webkit.org/repository/webkit/trunk@166738 268f45cc-cd09-0410...
santoshbit2007@gmail.com [Thu, 3 Apr 2014 20:14:29 +0000 (20:14 +0000)]
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166738 268f45cc-cd09-0410-ab3c-d52691b4dbfc

7 years agoContinuations casting issue.
hyatt@apple.com [Thu, 3 Apr 2014 19:22:48 +0000 (19:22 +0000)]
Continuations casting issue.
https://bugs.webkit.org/show_bug.cgi?id=130057
<rdar://problem/16283406>

Reviewed by Simon Fraser.

Source/WebCore:

The code to update relative positioned anonymous block continuations should not
have assumed that all siblings were RenderBlocks. Make the code smarter and
make it bail when it hits something that isn't part of the block continuation
chain.

Added fast/block/continuation-crash.html

* rendering/RenderInline.cpp:
(WebCore::updateStyleOfAnonymousBlockContinuations):

LayoutTests:

* fast/block/continuation-crash-expected.txt: Added.
* fast/block/continuation-crash.html: Added.

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

7 years agoREGRESSION (Async text input): Controls become unresponsive to mouse events
ap@apple.com [Thu, 3 Apr 2014 19:01:28 +0000 (19:01 +0000)]
REGRESSION (Async text input): Controls become unresponsive to mouse events
https://bugs.webkit.org/show_bug.cgi?id=131176
<rdar://problem/16507932>

Reviewed by Tim Horton.

* UIProcess/API/mac/WKView.mm: (NATIVE_MOUSE_EVENT_HANDLER):
Don't confuse event handling machinery by sending events to WebProcess twice.

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

7 years agoWKWebView should always have a UIDelegate, even when closed
andersca@apple.com [Thu, 3 Apr 2014 18:34:18 +0000 (18:34 +0000)]
WKWebView should always have a UIDelegate, even when closed
https://bugs.webkit.org/show_bug.cgi?id=131174
<rdar://problem/16389248>

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView UIDelegate]):
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIDelegate):
(WebKit::UIDelegate::~UIDelegate):
(WebKit::UIDelegate::createUIClient):
(WebKit::UIDelegate::delegate):
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::UIClient):
(WebKit::UIDelegate::UIClient::~UIClient):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::actionsForElement):
(WebKit::UIClient::UIClient): Deleted.
(WebKit::UIClient::~UIClient): Deleted.
(WebKit::UIClient::delegate): Deleted.
(WebKit::UIClient::setDelegate): Deleted.
(WebKit::UIClient::createNewPage): Deleted.
(WebKit::UIClient::runJavaScriptAlert): Deleted.
(WebKit::UIClient::runJavaScriptConfirm): Deleted.
(WebKit::UIClient::runJavaScriptPrompt): Deleted.
(WebKit::UIClient::actionsForElement): Deleted.
* UIProcess/ios/WKActionSheetAssistant.mm:

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

7 years agoFix bit rot in ARMv7 JIT probe mechanism.
mark.lam@apple.com [Thu, 3 Apr 2014 18:25:26 +0000 (18:25 +0000)]
Fix bit rot in ARMv7 JIT probe mechanism.
<https://webkit.org/b/131167>

Reviewed by Geoffrey Garen.

1. The macro assembler does not support pushing the SP register.  Worked
   around this by pushing the LR register as a placeholder, and then
   writing the original SP value to that slot.
2. The CPUState field in the ProbeContext needs to be aligned on a 4
   byte boundary, not an 8 byte boundary.

* assembler/MacroAssemblerARMv7.cpp:
(JSC::MacroAssemblerARMv7::probe):
* jit/JITStubsARMv7.h:

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

7 years agoDocument WKNavigationAction and WKNavigationResponse
andersca@apple.com [Thu, 3 Apr 2014 18:06:50 +0000 (18:06 +0000)]
Document WKNavigationAction and WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=131138

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:

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

7 years agoMake actionsForElement a proper API::UIClient member function
andersca@apple.com [Thu, 3 Apr 2014 17:56:03 +0000 (17:56 +0000)]
Make actionsForElement a proper API::UIClient member function
https://bugs.webkit.org/show_bug.cgi?id=131171

Reviewed by Sam Weinig.

* UIProcess/API/APIUIClient.h:
(API::UIClient::actionsForElement):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIClient::actionsForElement):
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):

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

7 years agoconfig.json fix.
lforschler@apple.com [Thu, 3 Apr 2014 17:54:45 +0000 (17:54 +0000)]
config.json fix.

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

7 years ago[WK2] Fix !ENABLE(BLOB) build
commit-queue@webkit.org [Thu, 3 Apr 2014 16:55:46 +0000 (16:55 +0000)]
[WK2] Fix !ENABLE(BLOB) build
https://bugs.webkit.org/show_bug.cgi?id=131164

Patch by Martin Hodovan <mhodovan@inf.u-szeged.hu> on 2014-04-03
Reviewed by Alexey Proskuryakov.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:

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

7 years ago[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
zoltan@webkit.org [Thu, 3 Apr 2014 16:49:28 +0000 (16:49 +0000)]
[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
https://bugs.webkit.org/show_bug.cgi?id=131126

Reviewed by Timothy Hatcher.

I updated the test, so it works with the new testing framework. I included the shape path results in the test,
so we won't run into rounding problems, and we don't have that big test set, which would require an expected
result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.

* TestExpectations:
* inspector/dom/highlight-shape-outside-margin-expected.txt:
* inspector/dom/highlight-shape-outside-margin.html:

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

7 years ago[CSS Shapes] CRASH with calc() value args in inset round
bjonesbe@adobe.com [Thu, 3 Apr 2014 16:48:23 +0000 (16:48 +0000)]
[CSS Shapes] CRASH with calc() value args in inset round
https://bugs.webkit.org/show_bug.cgi?id=129816

Reviewed by Andreas Kling.

Source/WebCore:

The code to parse the inset rounded corners was adding the parser
value arguments to a temporary CSSParserValueList. Unfortunately,
CSSParserValueList expects to own the values it contains, and it frees
the values it contains when the list is destroyed. This was a problem
because the values are owned by the CSSParserValueList passed in to
parseInsetRoundedCorners, and thus the calc's argument list would get
double freed, resulting in a crash. This patch fixes this by using a
Vector to hold the pointers instead.

Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseInsetRoundedCorners):

LayoutTests:

Simple test to make sure that using calc in the round argument of an
inset doesn't cause a crash.

* fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html: Added.

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

7 years agoFix iOS build.
andersca@apple.com [Thu, 3 Apr 2014 16:47:48 +0000 (16:47 +0000)]
Fix iOS build.

* UIProcess/ios/WKActionSheetAssistant.mm:

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

7 years agoWebKitPerfMonitor: There should be a way to add all metrics of a suite without also...
rniwa@webkit.org [Thu, 3 Apr 2014 16:39:11 +0000 (16:39 +0000)]
WebKitPerfMonitor: There should be a way to add all metrics of a suite without also adding subtests
https://bugs.webkit.org/show_bug.cgi?id=131157

Reviewed by Andreas Kling.

Split "all metrics" into all metrics of a test suite and all subtests of the suite.
This allows, for example, adding all metrics such as Arithmetic and Geometric for
a given test suite without also adding its subtests.

* public/index.html:
(init.showCharts):
(init):

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

7 years agoWebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
rniwa@webkit.org [Thu, 3 Apr 2014 16:36:18 +0000 (16:36 +0000)]
WebKitPerfMonitor: Tooltips cannot be pinned after using browser's back button
https://bugs.webkit.org/show_bug.cgi?id=131155

Reviewed by Andreas Kling.

The bug was caused by Chart.attach binding event listeners on plot container on each call.
This resulted in the click event handler toggling the visiblity of the tooltip twice upon
click when attach() has been called even number of times, keeping the tooltip invisible.

Fixed the bug by extracting the code to bind event listeners outside of Chart.attach as
a separate function, bindPlotEventHandlers, and calling it exactly once when Chart.attach
is called for the first time.

* public/index.html:
(Chart.attach):
(Chart..bindPlotEventHandlers):

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

7 years agoLeaving a streaming movie by going "Back" keeps playing the audio
jer.noble@apple.com [Thu, 3 Apr 2014 16:29:32 +0000 (16:29 +0000)]
Leaving a streaming movie by going "Back" keeps playing the audio
https://bugs.webkit.org/show_bug.cgi?id=131149

Reviewed by Eric Carlson.

When stopping a HTMLMediaElement, call userCancelledLoad() (which clears the
MediaPlayer) only after calling setPausedInternal() (which pauses the MediaPlayer).
Previously, and in the reverse order, the MediaPlayer would never get a chance to pause
before being cleared. There is an underlying error with the QTKit media engine which
is causing it to continue playing even after its last reference is released, but this
does fix the symptom of playback continuing even after stopping.

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

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

7 years ago[EME] Crash when passing a NULL initData to MediaKeys.createSession()
jer.noble@apple.com [Thu, 3 Apr 2014 16:26:33 +0000 (16:26 +0000)]
[EME] Crash when passing a NULL initData to MediaKeys.createSession()
https://bugs.webkit.org/show_bug.cgi?id=131156

Reviewed by Eric Carlson.

Update the checks at the start of createSession() to match the current spec, notably
bailing early if the initData parameter is NULL or empty.

* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::createSession):

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

7 years agoRename UIClient.{h, mm} to UIDelegate.{h, mm}.
andersca@apple.com [Thu, 3 Apr 2014 16:03:46 +0000 (16:03 +0000)]
Rename UIClient.{h, mm} to UIDelegate.{h, mm}.

Rubber-stamped by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/UIDelegate.h: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.h.
* UIProcess/Cocoa/UIDelegate.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.mm.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years ago[iOS] add missing QuickTime plug-in replacement API
eric.carlson@apple.com [Thu, 3 Apr 2014 15:46:05 +0000 (15:46 +0000)]
[iOS] add missing QuickTime plug-in replacement API
https://bugs.webkit.org/show_bug.cgi?id=131042

Reviewed by Dean Jackson.

Rename QuickTimePluginReplacement.cpp to QuickTimePluginReplacement.mm to make it possible
to use the ObjC JSC API.
* Modules/plugins/QuickTimePluginReplacement.cpp:
* Modules/plugins/QuickTimePluginReplacement.h:
(WebCore::QuickTimePluginReplacement::parentElement):
* Modules/plugins/QuickTimePluginReplacement.idl:

* Modules/plugins/QuickTimePluginReplacement.js:
(Replacement.prototype.timedMetadataUpdates): Implement.
(Replacement.prototype.accessLog): Ditto.
(Replacement.prototype.errorLog): Ditto.

Use the JSC ObjC API to create a JavaScript object from an array of AVMetadataItems. The
JSC ObjC API supports basic NSTypes, but an AVMetadataItem can also contain NSData which
the existing plug-in returns as base-64 encoded data, so create wrappers for NSDictionary
and NSArray.
* Modules/plugins/QuickTimePluginReplacement.mm: Copied from Source/WebCore/Modules/plugins/QuickTimePluginReplacement.cpp.
(WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): Disambiguate with "JSC::"
(WebCore::QuickTimePluginReplacement::installReplacement): Ditto.
(WebCore::jsValueWithDataInContext): Create JSValue* from NSData.
(WebCore::jsValueWithArrayInContext): Create JSValue* from NSArray.
(WebCore::jsValueWithDictionaryInContext): Create JSValue* from NSDictionary.
(WebCore::jsValueWithValueInContext): Create JSValue* from basic NSTypes plus AVMetadataItem
    and NSData.
(WebCore::jsValueWithAVMetadataItemInContext): Create JSValue* from AVMetadataItem.
(WebCore::JSQuickTimePluginReplacement::timedMetaData): Script interface.
(WebCore::JSQuickTimePluginReplacement::accessLog): Ditto.
(WebCore::JSQuickTimePluginReplacement::errorLog): Ditto.

* WebCore.xcodeproj/project.pbxproj: QuickTimePluginReplacement.cpp -> QuickTimePluginReplacement.mm.

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::timedMetadata): iOS only accessor.
(WebCore::MediaPlayer::accessLog): Ditto.
(WebCore::MediaPlayer::errorLog): Ditto.
* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayerPrivate.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::timedMetadata):
(WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog):
(WebCore::MediaPlayerPrivateAVFoundationObjC::errorLog):
(WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
(WebCore::itemKVOProperties):
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):

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

7 years ago[EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
commit-queue@webkit.org [Thu, 3 Apr 2014 15:33:11 +0000 (15:33 +0000)]
[EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
https://bugs.webkit.org/show_bug.cgi?id=130391

Patch by Andrzej Badowski <a.badowski@samsung.com> on 2014-04-03
Reviewed by Gyuyoung Kim.

Source/WebKit2:

Change the implementation of the zoom functionality from ewk_view_scale_set
to ewk_view_page_zoom_set. Adding to the API functions: ewk_view_page_zoom_set and
ewk_view_page_zoom_get to call appropriate WK functions.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_zoom_set):
(ewk_view_page_zoom_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):

Tools:

Change the implementation of the zoom functionality from ewk_view_scale_set
to ewk_view_page_zoom_set.

* MiniBrowser/efl/main.c:

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

7 years ago[CSS Grid Layout] Make sure grid element's shrink-to-fit behavior is correct
commit-queue@webkit.org [Thu, 3 Apr 2014 14:50:55 +0000 (14:50 +0000)]
[CSS Grid Layout] Make sure grid element's shrink-to-fit behavior is correct
https://bugs.webkit.org/show_bug.cgi?id=103473

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-04-03
Reviewed by Sergio Villar Senin.

Added a new Layout Test to verify the shrink-to-fit behavior works as expected
for out-of-flow positioned grid elements.

* fast/css-grid-layout/grid-element-shrink-to-fit-expected.html: Added.
* fast/css-grid-layout/grid-element-shrink-to-fit.html: Added.

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

7 years agoARMv7 compare32() should not use TST to do CMP's job.
mark.lam@apple.com [Thu, 3 Apr 2014 14:37:32 +0000 (14:37 +0000)]
ARMv7 compare32() should not use TST to do CMP's job.
<https://webkit.org/b/131146>

Reviewed by Geoffrey Garen.

The ARMv7 implementation of "compare32(RegisterID left, TrustedImm32 right)"
was using "tst reg, reg" to implement "cmp reg, #0".  Unfortunately, the tst
instruction doesn't set the Overflow (V) flag and this results in random
results depending on whether there was a preceeding instruction that did set
the Overflow (V) flag.  This issue was causing emscripten-cube2hash to run
with a lot of OSR exits where not expected as well as producing wrong results.

The fix is to use "cmp reg, #0" to do the job properly.

* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::compare32):

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

7 years ago[CSS Regions] Include region range information when printing the render tree
abucur@adobe.com [Thu, 3 Apr 2014 13:27:53 +0000 (13:27 +0000)]
[CSS Regions] Include region range information when printing the render tree
https://bugs.webkit.org/show_bug.cgi?id=131159

Reviewed by Mihnea Ovidenie.

With this change showRenderObject() will print the region range for objects inside
a flow thread. The format is:
Rs: <startRegion> Re: <endRegion>

Because this can be called anytime during debugging, it's necessary to disable the
current flow thread caching to prevent using the wrong flow thread for an object.

Tests: No new tests, no functional change.

* rendering/RenderFlowThread.cpp:
(WebCore::CurrentRenderFlowThreadDisabler::CurrentRenderFlowThreadDisabler):
(WebCore::CurrentRenderFlowThreadDisabler::~CurrentRenderFlowThreadDisabler):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::showRegionsInformation): Added.
(WebCore::RenderObject::showRenderObject):
* rendering/RenderObject.h:

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

7 years agoRenderSnapshottedPlugIn::paint should use iterator for traversal.
antti@apple.com [Thu, 3 Apr 2014 10:46:51 +0000 (10:46 +0000)]
RenderSnapshottedPlugIn::paint should use iterator for traversal.
https://bugs.webkit.org/show_bug.cgi?id=131158

Reviewed by Dean Jackson.

* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paint):

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

7 years ago[EFL] Enable CSS JIT again, it works fine after r166666.
ossy@webkit.org [Thu, 3 Apr 2014 10:28:30 +0000 (10:28 +0000)]
[EFL] Enable CSS JIT again, it works fine after r166666.

Patch by Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com> on 2014-04-03
Reviewed by Csaba Osztrogonác.

* wtf/Platform.h:

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