WebKit-https.git
7 years agoUse references in public EventSender functions
mmaxfield@apple.com [Tue, 2 Sep 2014 22:47:37 +0000 (22:47 +0000)]
Use references in public EventSender functions
https://bugs.webkit.org/show_bug.cgi?id=136463

Reviewed by Dan Bates.

Passing nullptr to EventSender shouldn't be allowed.

No new tests because there is no behavior change.

* dom/EventSender.h:
(WebCore::EventSender::hasPendingEvents):
(WebCore::EventSender<T>::dispatchEventSoon):
(WebCore::EventSender<T>::cancelEvent):
(WebCore::EventSender<T>::dispatchPendingEvents):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::~HTMLLinkElement):
(WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::~HTMLStyleElement):
(WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::~ImageLoader):
(WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent):
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::notifyFinished):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):

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

7 years ago[iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
dbates@webkit.org [Tue, 2 Sep 2014 22:45:05 +0000 (22:45 +0000)]
[iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
and ENABLE_IOS_GESTURE_EVENTS, respectively
https://bugs.webkit.org/show_bug.cgi?id=136456

Reviewed by Andy Estes.

It's sufficient to exclude the touch and gesture files when building without
ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS, respectively. Currently we
exclude these files when building without the Apple Internal SDK, which is
heavy handed.

* Configurations/WebCore.xcconfig:

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

7 years agoOptimize own property GetByVals with rope string subscripts.
akling@apple.com [Tue, 2 Sep 2014 22:29:59 +0000 (22:29 +0000)]
Optimize own property GetByVals with rope string subscripts.
<https://webkit.org/b/136458>

For simple JSObjects that don't override getOwnPropertySlot to implement
custom properties, we have a fast path that grabs directly at the object
property storage.

Make this fast path even faster when the property name is an unresolved
rope string by using JSString::toExistingAtomicString(). This is faster
because it avoids allocating a new StringImpl if the string is already
a known Identifier, which is guaranteed to be the case if it's present
as an own property on the object.)

~10% speed-up on Dromaeo/dom-attr.html

Reviewed by Geoffrey Garen.

* dfg/DFGOperations.cpp:
* jit/JITOperations.cpp:
(JSC::getByVal):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::getByVal):

    When using the fastGetOwnProperty() optimization, get the String
    out of JSString by using toExistingAtomicString(). This avoids
    StringImpl allocation and lets us bypass the PropertyTable lookup
    entirely if no AtomicString is found.

* runtime/JSCell.h:
* runtime/JSCellInlines.h:
(JSC::JSCell::fastGetOwnProperty):

    Make fastGetOwnProperty() take a PropertyName instead of a String.
    This avoids churning the ref count, since we don't need to create
    a temporary wrapper around the AtomicStringImpl* found in GetByVal.

* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):

    Add constructor: PropertyName(AtomicStringImpl*)

* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::get):
(JSC::PropertyTable::findWithString): Deleted.
* runtime/Structure.h:
* runtime/StructureInlines.h:
(JSC::Structure::get):

    Remove code for querying a PropertyTable with an unhashed string key
    since the only client is now gone.

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

7 years agoMake sure WK1 prefs are initialized in MiniBrowser
simon.fraser@apple.com [Tue, 2 Sep 2014 21:33:41 +0000 (21:33 +0000)]
Make sure WK1 prefs are initialized in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=136465

Reviewed by Tim Horton.

Call -didChangeSettings from -awakeFromNib for WK1 windows just as we do
for WK2 windows, to make sure that WebPreferences are updated (to get
layer borders to work consistently).

* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController awakeFromNib]):

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

7 years agoFix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
simon.fraser@apple.com [Tue, 2 Sep 2014 21:25:33 +0000 (21:25 +0000)]
Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
https://bugs.webkit.org/show_bug.cgi?id=136464

Reviewed by Tim Horton.

Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
when layout might be stale; there's not point trying to update the backing store state
when detaching, only when attaching.

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

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

7 years agoAvoid backing store allocation with some combinations of replaced elements, masking...
simon.fraser@apple.com [Tue, 2 Sep 2014 20:20:25 +0000 (20:20 +0000)]
Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
https://bugs.webkit.org/show_bug.cgi?id=136400

Reviewed by Tim Horton.
Source/WebCore:

RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
with visibility:hidden, and for layers with a mask, and both would cause additional
backing store in some cases.

We can move the hasVisibleContent() to the top of the function, since visibility:hidden
will always hide any content of this layer. The hasMask() check can also be removed;
a mask can only mask content that is already visible; it never contributes additional
pixels.

Tests: compositing/backing/masked-child-no-backing.html
       compositing/backing/replaced-child-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

* compositing/backing/masked-child-no-backing-expected.txt: Added.
* compositing/backing/masked-child-no-backing.html: Added.
* compositing/backing/replaced-child-no-backing-expected.txt: Added.
* compositing/backing/replaced-child-no-backing.html: Added.

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

7 years agoUse jsNontrivialString for strings we know are more than a single character
commit-queue@webkit.org [Tue, 2 Sep 2014 20:14:31 +0000 (20:14 +0000)]
Use jsNontrivialString for strings we know are more than a single character
https://bugs.webkit.org/show_bug.cgi?id=136393

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

* bindings/js/JSCryptoKeySerializationJWK.cpp:
(WebCore::addUsagesToJSON):

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

7 years agoFix bindings tests after r173176.
achristensen@apple.com [Tue, 2 Sep 2014 19:07:42 +0000 (19:07 +0000)]
Fix bindings tests after r173176.
https://bugs.webkit.org/show_bug.cgi?id=136460

Reviewed by Simon Fraser.

* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.cpp:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.cpp:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.cpp:
* bindings/scripts/test/JS/JSreadonly.h:
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachableInternal.h:
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
* bindings/scripts/test/ObjC/DOMTestNondeterministicInternal.h:
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
* bindings/scripts/test/ObjC/DOMattributeInternal.h:
* bindings/scripts/test/ObjC/DOMreadonlyInternal.h:
Added new WEBCORE_EXPORT macros.

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

7 years agoNon-composited child RenderLayers cause allocation of unncessary backing store
simon.fraser@apple.com [Tue, 2 Sep 2014 18:30:06 +0000 (18:30 +0000)]
Non-composited child RenderLayers cause allocation of unncessary backing store
https://bugs.webkit.org/show_bug.cgi?id=136375

Reviewed by David Hyatt.

Source/WebCore:

A composited element that has non-composited descendant elements that fall into
RenderLayers was getting backing store when none was required. descendentLayerPaintsIntoAncestor()
was simply checking the "visibility:visible" bit on descendant non-composited layers,
instead of actually asking them if they have any visual content.

Added a couple of FIXME comments.

Test: compositing/backing/child-layer-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderLayerBacking.cpp:
(WebCore::descendentLayerPaintsIntoAncestor):

LayoutTests:

Test with a composited div with various configurations of non-composited child layers.

* compositing/backing/child-layer-no-backing-expected.txt: Added.
* compositing/backing/child-layer-no-backing.html: Added.

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

7 years agoWeb Inspector: Create a UI for displaying JavaScript type information
saambarati1@gmail.com [Tue, 2 Sep 2014 18:25:32 +0000 (18:25 +0000)]
Web Inspector: Create a UI for displaying JavaScript type information
https://bugs.webkit.org/show_bug.cgi?id=135142

Reviewed by Joseph Pecoraro.

JavaScriptCore now has a type profiler. This patch provides a frontend
user interface for displaying this type information in the Web Inspector.
The user interface works by placing inline "type tokens" next to important
JavaScript expressions: function arguments, function return types, and
variable declarations. Type information can also be seen for almost every
JavaScipt expression just by hovering over it while viewing a JavaScript file.

Currently, turning on the type profiler is expensive, so the inspector
ensures to never turn on type profiling until the user specifically asks
for type information to be turned on.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
Added a new type profiling mode.

* UserInterface/Controllers/FormatterSourceMap.js:
(WebInspector.FormatterSourceMap.prototype.originalToFormatted):
(WebInspector.FormatterSourceMap.prototype.originalPositionToFormatted):
(WebInspector.FormatterSourceMap.prototype.formattedToOriginal):
(WebInspector.FormatterSourceMap.prototype.formattedToOriginalOffset):
* UserInterface/Controllers/TypeTokenAnnotator.js: Added.
(WebInspector.TypeTokenAnnotator):
(WebInspector.TypeTokenAnnotator.prototype.get isActive):
(WebInspector.TypeTokenAnnotator.prototype.get sourceCodeTextEditor):
(WebInspector.TypeTokenAnnotator.prototype.pause):
(WebInspector.TypeTokenAnnotator.prototype.resume):
(WebInspector.TypeTokenAnnotator.prototype.refresh):
(WebInspector.TypeTokenAnnotator.prototype.reset):
(WebInspector.TypeTokenAnnotator.prototype.toggleTypeAnnotations):
(WebInspector.TypeTokenAnnotator.prototype._insertAnnotations.):
(WebInspector.TypeTokenAnnotator.prototype._insertTypeTokensForEachNode):
(WebInspector.TypeTokenAnnotator.prototype._insertToken):
(WebInspector.TypeTokenAnnotator.prototype.isLineTerminator):
(WebInspector.TypeTokenAnnotator.prototype._translateToOffsetAfterFunctionParameterList):
(WebInspector.TypeTokenAnnotator.prototype._clearTimeoutIfNeeded):
This class is responsible for producing the inline "type token" annotations.

* UserInterface/Images/NavigationItemTypes.svg: Added.
* UserInterface/Main.html:
* UserInterface/Models/Script.js:
(WebInspector.Script.prototype.get scriptSyntaxTree):
* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype.containsNonEmptyReturnStatement):
(WebInspector.ScriptSyntaxTree.prototype.):
(WebInspector.ScriptSyntaxTree.prototype.updateTypes):
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Views/ScriptContentView.js:
(WebInspector.ScriptContentView):
(WebInspector.ScriptContentView.prototype.get navigationItems):
(WebInspector.ScriptContentView.prototype._contentDidPopulate):
(WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
(WebInspector.ScriptContentView.prototype._showJavaScriptTypeInformationSettingChanged):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.shown):
(WebInspector.SourceCodeTextEditor.prototype.hidden):
(WebInspector.SourceCodeTextEditor.prototype.canShowTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
(WebInspector.SourceCodeTextEditor.prototype.showPopoverForTypes):
(WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
(WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation.handler):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedJavaScriptTypeInformation):
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._enableScrollEventsForTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._disableScrollEventsForTypeTokenAnnotator):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler.scrollHandler):
(WebInspector.SourceCodeTextEditor.prototype._makeTypeTokenScrollEventHandler):
* UserInterface/Views/TextContentView.js:
(WebInspector.TextContentView.prototype.get navigationItems):
* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype.set formatted):
(WebInspector.TextEditor.prototype.canShowTypeAnnotations):
(WebInspector.TextEditor.prototype.visibleRangeOffsets):
(WebInspector.TextEditor.prototype.originalOffsetToCurrentPosition):
(WebInspector.TextEditor.prototype.currentOffsetToCurrentPosition):
(WebInspector.TextEditor.prototype.currentPositionToOriginalOffset):
(WebInspector.TextEditor.prototype.currentPositionToCurrentOffset):
(WebInspector.TextEditor.prototype.setInlineWidget):
(WebInspector.TextEditor.prototype.addScrollHandler):
(WebInspector.TextEditor.prototype.removeScrollHandler):
(WebInspector.TextEditor.prototype._scrollIntoViewCentered):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView):
(WebInspector.TextResourceContentView.prototype.get navigationItems):
(WebInspector.TextResourceContentView.prototype._contentDidPopulate):
(WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
(WebInspector.TextResourceContentView.prototype._showJavaScriptTypeInformationSettingChanged):
* UserInterface/Views/TypePropertiesSection.js: Added.
(WebInspector.TypePropertiesSection):
(WebInspector.TypePropertiesSection.prototype.onpopulate):
(WebInspector.TypePropertiesSection.PropertyComparator):
(WebInspector.TypePropertyTreeElement):
(WebInspector.TypePropertyTreeElement.prototype.onpopulate):
* UserInterface/Views/TypeTokenView.css: Added.
(.type-token):
(.type-token-left-spacing):
(.type-token-right-spacing):
(.type-token-function, .type-token-boolean):
(.type-token-number):
(.type-token-string):
(.type-token-default):
(.type-token-empty):
(.type-token-many):
* UserInterface/Views/TypeTokenView.js: Added.
(WebInspector.TypeTokenView):
(WebInspector.TypeTokenView.titleForPopover):
(WebInspector.TypeTokenView.prototype.update):
(WebInspector.TypeTokenView.prototype._setUpMouseoverHandlers):
(WebInspector.TypeTokenView.prototype._shouldShowPopover):
The inline "type token" view.

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

7 years ago[ARM] MacroAssembler generating incorrect code on ARM32 Traditional
dbatyai.u-szeged@partner.samsung.com [Tue, 2 Sep 2014 17:01:35 +0000 (17:01 +0000)]
[ARM] MacroAssembler generating incorrect code on ARM32 Traditional
https://bugs.webkit.org/show_bug.cgi?id=136429

Reviewed by Csaba Osztrogonác.

Changed test32 to use tst to check if reg is zero, instead of cmp.

* assembler/MacroAssemblerARM.h:
(JSC::MacroAssemblerARM::test32):

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

7 years agoOut of bounds write in vmEntryToJavaScript / JSC::JITCode::execute
msaboff@apple.com [Tue, 2 Sep 2014 16:52:35 +0000 (16:52 +0000)]
Out of bounds write in vmEntryToJavaScript / JSC::JITCode::execute
https://bugs.webkit.org/show_bug.cgi?id=136305

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

While preparing the callee's CallFrame, ProtoCallFrame fixes any arity mismatch
and then JITCode::execute() calls the normal entrypoint.  This is incompatible
with the expectation of FTL generated functions.  Changed ProtoCallFrame to not
perform the arity fix, but just flag an arity mismatch.  now JITCode::execute()
uses that arity mismatch condition to select the normal or arity check
entrypoint.  The entrypoint selection is only done for functions, programs
and eval always have one parameter.

* interpreter/ProtoCallFrame.cpp:
(JSC::ProtoCallFrame::init): Changed to flag arity mismatch instead of fixing it.
* interpreter/ProtoCallFrame.h:
(JSC::ProtoCallFrame::needArityCheck): New boolean to signify what entrypoint
should be called.
* jit/JITCode.cpp:
(JSC::JITCode::execute): Select normal or arity check entrypoint as appropriate.

LayoutTests:

* js/arity-mismatch-at-vmentry-expected.txt: Added.
* js/arity-mismatch-at-vmentry.html: Added.

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

7 years agoUnreviewed, rolling out r173175.
commit-queue@webkit.org [Tue, 2 Sep 2014 16:47:11 +0000 (16:47 +0000)]
Unreviewed, rolling out r173175.
https://bugs.webkit.org/show_bug.cgi?id=136454

it broke debug builds (Requested by jessieberlin on #webkit).

Reverted changeset:

"Introduce CSS_BASIC_TYPE_CASTS, and use it"
https://bugs.webkit.org/show_bug.cgi?id=136403
http://trac.webkit.org/changeset/173175

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

7 years ago2014-09-02 Alex Christensen <achristensen@webkit.org>
darin@apple.com [Tue, 2 Sep 2014 16:28:49 +0000 (16:28 +0000)]
2014-09-02  Alex Christensen  <achristensen@webkit.org>

More use of WEBCORE_EXPORT.

Reviewed by Darin Adler.

These changes from a patch attached to https://bugs.webkit.org/show_bug.cgi?id=136172
contain more deployment of the WEBCORE_EXPORT macro. As of this writing, the macro is
defined to do nothing, so landing these is a harmless way to get closer to be the point
where we can throw the switch to use these instead of explicit export files on OS X,
iOS, and Windows.

* bindings/js/JSDOMBinding.h:
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowBase.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
* bridge/runtime_method.cpp:
* bridge/runtime_object.cpp:
* dom/Document.h:
* dom/Element.h:
* dom/Position.h:
* dom/Range.h:
* dom/StaticNodeList.h:
* dom/make_names.pl:
(printInit):
(printNamesCppFile):
* editing/Editor.h:
* editing/FrameSelection.h:
* editing/TextIterator.h:
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
* loader/DocumentLoader.h:
* loader/FrameLoader.h:
* loader/cache/MemoryCache.h:
* loader/cocoa/DiskCacheMonitorCocoa.h:
* loader/mac/LoaderNSURLExtras.h:
* page/Page.h:
* page/PageGroup.h:
* page/SecurityPolicy.h:
* page/Settings.h:
* page/make_settings.pl:
(printGetterAndSetter):
* page/scrolling/ScrollingStateScrollingNode.h:
* platform/CrossThreadCopier.h:
* platform/LocalizedStrings.h:
* platform/MemoryPressureHandler.cpp:
* platform/PlatformScreen.h:
* platform/PublicSuffix.h:
* platform/graphics/Gradient.h:
* platform/graphics/cocoa/WebActionDisablingCALayerDelegate.h:
* platform/graphics/filters/FilterOperation.h:
* platform/ios/WebVideoFullscreenControllerAVKit.h:
* platform/mac/PlatformEventFactoryMac.h:
* platform/mac/WebCoreFullScreenPlaceholderView.h:
* platform/mac/WebCoreFullScreenWindow.h:
* platform/mac/WebCoreNSStringExtras.h:
* platform/mac/WebCoreObjCExtras.h:
* platform/mac/WebFontCache.h:
* platform/mac/WebVideoFullscreenController.h:
* platform/mac/WebWindowAnimation.h:
* platform/network/BlobRegistryImpl.h:
* platform/network/CredentialStorage.h:
* platform/network/PlatformCookieJar.h:
* platform/network/ProxyServer.h:
* platform/sql/SQLiteStatement.h:
* platform/text/TextEncoding.h:
* rendering/HitTestResult.h:
* rendering/RenderTreeAsText.h:
* testing/Internals.h:
Add many more correct uses of WEBCORE_EXPORT; remove a few incorrect ones.

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

7 years agoIntroduce CSS_BASIC_TYPE_CASTS, and use it
gyuyoung.kim@samsung.com [Tue, 2 Sep 2014 16:06:23 +0000 (16:06 +0000)]
Introduce CSS_BASIC_TYPE_CASTS, and use it
https://bugs.webkit.org/show_bug.cgi?id=136403

Reviewed by Darin Adler.

toCSSBasicFoo() will help to detect wrong type casting. So this patch generates it, and use it
instead of static_cast<const CSSBasicFoo*>().

No new tests no behavior changes.

* css/BasicShapeFunctions.cpp:
(WebCore::basicShapeForValue):
* css/CSSBasicShapes.cpp:
(WebCore::CSSBasicShapeCircle::equals):
(WebCore::CSSBasicShapeEllipse::equals):
(WebCore::CSSBasicShapePolygon::equals):
(WebCore::CSSBasicShapeInset::equals):
* css/CSSBasicShapes.h:

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

7 years agocheck-webkit-style should complain about C++ comments in Platform.h
commit-queue@webkit.org [Tue, 2 Sep 2014 16:03:41 +0000 (16:03 +0000)]
check-webkit-style should complain about C++ comments in Platform.h
https://bugs.webkit.org/show_bug.cgi?id=133802

Patch by Renato Nagy <rnagy@inf.u-szeged.hu> on 2014-09-02
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_platformh_comments):
(_process_lines):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_platformh_comment):

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

7 years agoCachedResourceLoader should check redirections to reuse or not cached resources
commit-queue@webkit.org [Tue, 2 Sep 2014 16:00:14 +0000 (16:00 +0000)]
CachedResourceLoader should check redirections to reuse or not cached resources
https://bugs.webkit.org/show_bug.cgi?id=131757

Patch by Youenn Fablet <youenn.fablet@crf.canon.fr> on 2014-09-02
Reviewed by Antti Koivisto.

Source/WebCore:

Added cache-control redirection check to properly determine revalidation policy.
Tightened redirection cache-control header check by testing for no-cache and must-revalidate directives.
Added redirection freshness check.

Test: http/tests/cache/cache-redirections.html

* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::canReuse): Removed redirection check (now handled by CachedResource::redirectChainAllowsReuse).
* loader/cache/CachedResource.cpp:
(WebCore::currentAge): Moved from WebCore::CachedResource::currentAge method to static function. Added response and responseTimestamp as parameters.
(WebCore::CachedResource::CachedResource): Initialized redirection chain status (no redirection and expiracy date set to never).
(WebCore::CachedResource::isExpired): Updated according new currentAge/freshnessLifetime method parameters.
(WebCore::CachedResource::freshnessLifetime): Added response as parameter.
(WebCore::CachedResource::willSendRequest): Computes whether a redirection can be cached, and if cached for how long it will remain fresh.
(WebCore::CachedResource::redirectChainAllowsReuse): Return false if any of the redirection in the redirection chain cannot be cached or expired.
* loader/cache/CachedResource.h: Added cache chain member that stores whether the redirection chain can be cached and if so when it will be expired.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Added check of the redirection chain.

LayoutTests:

Added test checks that fresh redirections allow reuse of cached resoure and expired or not cacheable redirections trigger reloading of resources.

* http/tests/cache/cache-redirections-expected.txt: Added.
* http/tests/cache/cache-redirections.html: Added.
* http/tests/cache/resources/cache-control-redirect.php: Added.
* http/tests/cache/resources/cacheable-random-text.php: Added.

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

7 years agoPrevent decoded images from being destroyed when they're in use.
commit-queue@webkit.org [Tue, 2 Sep 2014 15:54:26 +0000 (15:54 +0000)]
Prevent decoded images from being destroyed when they're in use.
https://bugs.webkit.org/show_bug.cgi?id=136259.

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2014-09-02
Reviewed by Darin Adler.

Try to fix a regression introduced by r172790. Before the patch,
CachedImage does not release its Image object if it still has clients.
However this behavior was changed due to removal of CachedResource::isSafeToMakePurgeable(),
which implied a call to CachedResource::hasClients(). This patch restores
the behavior by adding a check to hasClients() in CachedImage::destroyDecodedData().

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::destroyDecodedData):

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

7 years ago[WinCairo] testapi.exe is not built.
commit-queue@webkit.org [Tue, 2 Sep 2014 15:51:33 +0000 (15:51 +0000)]
[WinCairo] testapi.exe is not built.
https://bugs.webkit.org/show_bug.cgi?id=136369

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-09-02
Reviewed by Alex Christensen.

The testapi project should be of type Application.

* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj: Change project type to Application.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj: Ditto.
* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Compile and link fix.
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj: Change project type to Application.

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

7 years ago[Gtk] Make install-dependencies work on Arch Linux
commit-queue@webkit.org [Tue, 2 Sep 2014 10:59:16 +0000 (10:59 +0000)]
[Gtk] Make install-dependencies work on Arch Linux
https://bugs.webkit.org/show_bug.cgi?id=136374

Patch by Brendan Long <self@brendanlong.com> on 2014-09-02
Reviewed by Philippe Normand.

* gtk/install-dependencies: Add dependencies for pacman (Arch Linux).

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

7 years ago[CSS Grid Layout] Test coverage for first-line pseudo-element
rego@igalia.com [Tue, 2 Sep 2014 08:36:14 +0000 (08:36 +0000)]
[CSS Grid Layout] Test coverage for first-line pseudo-element
https://bugs.webkit.org/show_bug.cgi?id=135770

Reviewed by Zoltan Horvath.

According to the spec the ::first-line pseudo-element do not apply to
grid containers.

This was already working as expected but we were missing some tests
checking it, so we are adding new tests to have coverage.

* fast/css-grid-layout/grid-container-ignore-first-line-expected.txt: Added.
* fast/css-grid-layout/grid-container-ignore-first-line.html: Added.
* fast/css-grid-layout/grid-item-first-line-valid-expected.txt: Added.
* fast/css-grid-layout/grid-item-first-line-valid.html: Added.

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

7 years agoUnreviewed, GTK build fix after r173163.
philn@webkit.org [Tue, 2 Sep 2014 08:06:17 +0000 (08:06 +0000)]
Unreviewed, GTK build fix after r173163.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::update):
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
(WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:

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

7 years agoFix the iOS build.
timothy_horton@apple.com [Tue, 2 Sep 2014 04:43:50 +0000 (04:43 +0000)]
Fix the iOS build.

* UIProcess/ios/WKContentView.mm:
(-[WKContentView _createDrawingAreaProxy]):
Whoops.

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

7 years agoBuild break on the EFL port since r173163
commit-queue@webkit.org [Tue, 2 Sep 2014 02:05:04 +0000 (02:05 +0000)]
Build break on the EFL port since r173163
https://bugs.webkit.org/show_bug.cgi?id=136443

Unreviewed build fix.

Patch by Ryuan Choi <ryuan.choi@gmail.com> on 2014-09-01

* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::BackingStore):
* UIProcess/BackingStore.h:
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
(WebKit::CoordinatedDrawingAreaProxy::updateViewport):
(WebKit::CoordinatedDrawingAreaProxy::contentsRect):
(WebKit::CoordinatedDrawingAreaProxy::update):
(WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
(WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
(WebKit::CoordinatedDrawingAreaProxy::page):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
(WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
(WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createDrawingAreaProxy):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):

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

7 years agoRemove two unused WebKit2 PDF-related preferences
timothy_horton@apple.com [Tue, 2 Sep 2014 00:12:06 +0000 (00:12 +0000)]
Remove two unused WebKit2 PDF-related preferences
https://bugs.webkit.org/show_bug.cgi?id=136441

Reviewed by Dan Bernstein.

* Shared/WebPreferencesDefinitions.h:
Move the macro arguments comment down near where the macros are being used.
No need to check both PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR); the second can't be true without the first.
These two PDF preferences are long-unused; if we bring back their functionality,
we'll bring back the preferences.

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

7 years ago[CMAKE] Add missing offlineasm dependencies
commit-queue@webkit.org [Mon, 1 Sep 2014 23:15:27 +0000 (23:15 +0000)]
[CMAKE] Add missing offlineasm dependencies
https://bugs.webkit.org/show_bug.cgi?id=136437

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-09-01
Reviewed by Csaba Osztrogonác.

Add the ARM64, MIPS and SH4 backends to the dependencies.

* CMakeLists.txt:

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

7 years agoDrawingAreaProxy and friends can hold on to WebPageProxy by reference
timothy_horton@apple.com [Mon, 1 Sep 2014 23:04:12 +0000 (23:04 +0000)]
DrawingAreaProxy and friends can hold on to WebPageProxy by reference
https://bugs.webkit.org/show_bug.cgi?id=136440

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKView.mm:
(-[WKView _createDrawingAreaProxy]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setExposedRect):
(WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):

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

7 years agoProvide column numbers to DTrace willExecute/didExecute probes
burg@cs.washington.edu [Mon, 1 Sep 2014 21:15:21 +0000 (21:15 +0000)]
Provide column numbers to DTrace willExecute/didExecute probes
https://bugs.webkit.org/show_bug.cgi?id=136434

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Provide the columnNumber and update stubs for !HAVE(DTRACE).

* profiler/ProfileGenerator.cpp:
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
* runtime/Tracing.d:
* runtime/Tracing.h:

Tools:

Create a directory for DTrace scripts. Add an example script that
shows how to use static probes provided by JavaScriptCore's profiler.

* Scripts/dtrace/jsc-trace-profiler-events.d: Added.

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

7 years agoRenderThemeMac::paintProgressBar creates a buffer without respecting the destination...
timothy_horton@apple.com [Mon, 1 Sep 2014 19:16:14 +0000 (19:16 +0000)]
RenderThemeMac::paintProgressBar creates a buffer without respecting the destination's acceleration setting
https://bugs.webkit.org/show_bug.cgi?id=136427

Reviewed by Dan Bernstein.

No new tests, just a performance improvement.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintProgressBar):

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

7 years agoRemove an unnecessary local in GraphicsLayerCA::ensureStructuralLayer
timothy_horton@apple.com [Mon, 1 Sep 2014 19:15:23 +0000 (19:15 +0000)]
Remove an unnecessary local in GraphicsLayerCA::ensureStructuralLayer
https://bugs.webkit.org/show_bug.cgi?id=136426

Reviewed by Dan Bernstein.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::ensureStructuralLayer):
This was here so that we could call PlatformCALayerClient::platformLayerChanged,
but that no longer exists!

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

7 years ago[GTK] [JHBuild] Cyclic dependency between cairo and librsvg.
clopez@igalia.com [Mon, 1 Sep 2014 18:10:32 +0000 (18:10 +0000)]
[GTK] [JHBuild] Cyclic dependency between cairo and librsvg.
https://bugs.webkit.org/show_bug.cgi?id=136431

Reviewed by Martin Robinson.

* gtk/jhbuild.modules: Disable cairo SVG testsuite.
Add missing dependencies for librsvg (glib and cairo).

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

7 years ago[GTK] install-dependencies don't installs dbus-launch that is needed for the API...
clopez@igalia.com [Mon, 1 Sep 2014 18:06:33 +0000 (18:06 +0000)]
[GTK] install-dependencies don't installs dbus-launch that is needed for the API tests.
https://bugs.webkit.org/show_bug.cgi?id=136425

Reviewed by Martin Robinson.

* gtk/install-dependencies: Add dbus-x11 to the list of packages needed for running the tests.

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

7 years agoUpdate my list of email addresses in contributors.json
ryuan.choi@samsung.com [Mon, 1 Sep 2014 10:33:52 +0000 (10:33 +0000)]
Update my list of email addresses in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=136424

Reviewed by Gyuyoung Kim.

* Scripts/webkitpy/common/config/contributors.json:

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

7 years ago[CSS Grid Layout] Resolved value of grid-template-* must include every track listed
svillar@igalia.com [Mon, 1 Sep 2014 09:33:07 +0000 (09:33 +0000)]
[CSS Grid Layout] Resolved value of grid-template-* must include every track listed
https://bugs.webkit.org/show_bug.cgi?id=136362

Reviewed by Darin Adler.

Source/WebCore:

Section 5.1.5 of the specs clearly states that the resolved value
for grid-template-* must include every listed track, whether
explicitly or implicitly created. We were only listing the
explicit grid tracks.

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

LayoutTests:

Added new test cases to verify that both explicit and implicit
tracks are listed in grid-template-* resolved values. Also
refactored a testing function to improve the readability of the test.

* fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-auto-columns-rows-get-set.html:
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(testGridAutoDefinitionsValues):

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

7 years ago[CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
gyuyoung.kim@samsung.com [Mon, 1 Sep 2014 09:28:47 +0000 (09:28 +0000)]
[CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
https://bugs.webkit.org/show_bug.cgi?id=136194

Reviewed by Csaba Osztrogonác.

Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.

* CMakeLists.txt:

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

7 years ago[SOUP] WebKitDownload cannot overwrite existing file
commit-queue@webkit.org [Mon, 1 Sep 2014 08:35:52 +0000 (08:35 +0000)]
[SOUP] WebKitDownload cannot overwrite existing file
https://bugs.webkit.org/show_bug.cgi?id=136322

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2014-09-01
Reviewed by Carlos Garcia Campos.

* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): pass a member variable
to Download::decideDestinationWithSuggestedFilename instead of a
temporary bool, so we can use the result in didFinishLoading.
(WebKit::DownloadClient::didFinishLoading): overwrite the destination
if Download::decideDestinationWithSuggestedFilename determined we
should do so.

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

7 years agoUnreviewed, fix build break on EFL and GTK since r173152.
gyuyoung.kim@samsung.com [Mon, 1 Sep 2014 05:10:17 +0000 (05:10 +0000)]
Unreviewed, fix build break on EFL and GTK since r173152.

* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::platformInit): Remove a bool parameter because it was removed from function's declaration.

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

7 years agoRemove GraphicsContext constructor that takes shouldUseContextColors
timothy_horton@apple.com [Mon, 1 Sep 2014 01:53:47 +0000 (01:53 +0000)]
Remove GraphicsContext constructor that takes shouldUseContextColors
https://bugs.webkit.org/show_bug.cgi?id=136421

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContextState::GraphicsContextState):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::platformInit):
(WebCore::GraphicsContext::drawLinesForText):
As far as I can tell, the last user of this constructor died with WebNSStringDrawing.
Adjust all code to assume shouldUseContextColors=true.

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

7 years agoRemove unused ARMv6-specific #if branches in WebCore::canHyphenate
timothy_horton@apple.com [Mon, 1 Sep 2014 01:11:20 +0000 (01:11 +0000)]
Remove unused ARMv6-specific #if branches in WebCore::canHyphenate
https://bugs.webkit.org/show_bug.cgi?id=136420

Reviewed by Dan Bernstein.

* platform/text/cf/HyphenationCF.cpp:
(WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef>>::createValueForNullKey):
Use kCFAllocatorDefault instead of 0.

(WebCore::canHyphenate):
Remove ARMv6-specific code.

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

7 years agoRemove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
timothy_horton@apple.com [Sun, 31 Aug 2014 22:06:29 +0000 (22:06 +0000)]
Remove unnecessary (and unnecessarily iOS-specific) setStrokeAndFillColor
https://bugs.webkit.org/show_bug.cgi?id=136416

Reviewed by Dan Bernstein.

* WebCore.exp.in:
* platform/graphics/GraphicsContext.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setStrokeAndFillColor): Deleted.
Remove.

* WebView/WebFrameView.mm:
(-[WebFrameView drawRect:]):
We only end up filling, so only set the fill color.

* WebView/WebPDFViewIOS.mm:
(-[WebPDFView drawPage:]):
(-[WebPDFView drawRect:]):
* WebView/WebPlainWhiteView.mm:
We only end up filling, so only set the fill color.

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

7 years agoRemove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
timothy_horton@apple.com [Sun, 31 Aug 2014 22:03:50 +0000 (22:03 +0000)]
Remove duplicate implementation of drawEllipse and some related PLATFORM(IOS) ifdefs
https://bugs.webkit.org/show_bug.cgi?id=136413

Reviewed by Dan Bernstein.

No new tests, just cleanup.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawRaisedEllipse):
There's nothing iOS specific about this function.

* platform/graphics/GraphicsContext.h:
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::drawEllipse):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::drawEllipse):
Un-ifdef drawRaisedEllipse; delete the reimplementation of drawEllipse that takes
a FloatRect and make the normal one take a FloatRect instead.

(WebCore::GraphicsContext::platformInit):
Make sure that the CGContext's line width starts out in sync with GraphicsContext's.
By default, CGContext has a line width of 1 and GraphicsContext 0, so they could previously
have been out of sync until someone set the width explicitly.

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

7 years agoFix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
timothy_horton@apple.com [Sun, 31 Aug 2014 22:02:47 +0000 (22:02 +0000)]
Fix a harmless mismerge in BitmapImage::destroyDecodedDataIfNecessary
https://bugs.webkit.org/show_bug.cgi?id=136412

Reviewed by Alexey Proskuryakov.

No new tests, just cleanup.

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedDataIfNecessary):
Drop the leading 'c' and the 'static' on the cutoff parameter.
Remove the duplicated early return (seems like it happened in the merge).
Remove reference to the exact size in the comment, since it's different on iOS.

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

7 years agoUse SinkDocument instead of PDFDocument; get rid of PDFDocument
timothy_horton@apple.com [Sun, 31 Aug 2014 22:01:34 +0000 (22:01 +0000)]
Use SinkDocument instead of PDFDocument; get rid of PDFDocument
https://bugs.webkit.org/show_bug.cgi?id=136414

Reviewed by Alexey Proskuryakov.

* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDocument):
* pdf/ios/PDFDocument.cpp: Removed.
* pdf/ios/PDFDocument.h: Removed.
Use the generic SinkDocument, which ignores all incoming data just like PDFDocument.
Delete the unnecessary and iOS-specific PDFDocument.cpp/h

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

7 years agoAdjust an antique comment in Image::drawPattern
timothy_horton@apple.com [Sun, 31 Aug 2014 08:06:29 +0000 (08:06 +0000)]
Adjust an antique comment in Image::drawPattern
https://bugs.webkit.org/show_bug.cgi?id=136411

Reviewed by Dan Bernstein.

* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):
Reword the comment.

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

7 years agoOccasional crashes (null deref) under ViewGestureController::endMagnificationGesture
timothy_horton@apple.com [Sun, 31 Aug 2014 08:04:25 +0000 (08:04 +0000)]
Occasional crashes (null deref) under ViewGestureController::endMagnificationGesture
https://bugs.webkit.org/show_bug.cgi?id=136409
<rdar://problem/18104748>

Reviewed by Dan Bernstein.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endMagnificationGesture):
Null-check DrawingArea.

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

7 years agoSVGImage::drawPatternForContainer creates a buffer without respecting the destination...
timothy_horton@apple.com [Sun, 31 Aug 2014 07:41:50 +0000 (07:41 +0000)]
SVGImage::drawPatternForContainer creates a buffer without respecting the destination's acceleration setting
https://bugs.webkit.org/show_bug.cgi?id=136408
<rdar://problem/12013317>

Reviewed by Dan Bernstein.

No new tests required, just a performance improvement.

* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::drawPatternForContainer):
Use ImageBuffer::createCompatibleBuffer, which passes the destination's
acceleration setting through to the ImageBuffer constructor.

I didn't use GraphicsContext::createCompatibleBuffer because adjusting
how this function applies the destination's CTM is outside the scope of this patch.

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

7 years agoConvert string literals to character literals in makeString usage
commit-queue@webkit.org [Sat, 30 Aug 2014 23:19:32 +0000 (23:19 +0000)]
Convert string literals to character literals in makeString usage
https://bugs.webkit.org/show_bug.cgi?id=136394

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-30
Reviewed by Sam Weinig.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::evaluateInOverlay):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setOriginalURLForDownloadRequest):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::logWarning):
* page/ContentSecurityPolicy.cpp:
(WebCore::CSPDirectiveList::checkMediaTypeAndReportViolation):
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
(WebCore::ContentSecurityPolicy::reportInvalidPathCharacter):
Also reorder some code to ensure single string creation.

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

7 years agoUse RetainPtr::autorelease in some places where it seems appropriate
mjs@apple.com [Sat, 30 Aug 2014 22:43:33 +0000 (22:43 +0000)]
Use RetainPtr::autorelease in some places where it seems appropriate
https://bugs.webkit.org/show_bug.cgi?id=136280

Reviewed by Darin Adler.

Source/JavaScriptCore:

* API/JSContext.mm:
(-[JSContext name]): Use RetainPtr::autorelease() in place of ObjC autorelease.
* API/JSValue.mm:
(valueToString): Make appropriate use of RetainPtr

Source/WebCore:

* platform/mac/URLMac.mm:
(WebCore::URL::operator NSURL *): Use autorelease() instead of
CFBridgingRelease(leakRef())

Source/WebKit/mac:

* WebView/WebHTMLView.mm:
(imageFromRect): Use RetainPtr in this function.
* WebView/WebPDFRepresentation.mm:
(-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Use RetainPtr
in this method.

Source/WebKit2:

* Shared/Cocoa/WKNSURLExtras.mm:
(urlWithWTFString): Use autorelease() instead of CFBridgingRelease(leakRef())

Source/WTF:

* wtf/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *): Use autorelease() instead of
CFBridgingRelease(leakRef())

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

7 years ago[RJST] eager-no-cjit should really mean eager
fpizlo@apple.com [Sat, 30 Aug 2014 18:22:11 +0000 (18:22 +0000)]
[RJST] eager-no-cjit should really mean eager
https://bugs.webkit.org/show_bug.cgi?id=136407

Reviewed by Mark Hahnenberg.

At some point we made NO_CJIT_OPTIONS force threshold settings to something reasonable
and well-known. But the way we appended options was such that NO_CJIT_OPTIONS came in
after EAGER_OPTIONS. The whole point of "eager" was to use eager tier-up thresholds. This
all meant that NO_CJIT_OPTIONS was overriding the eagerness of EAGER_OPTIONS, for the one
threshold setting that NO_CJIT_OPTIONS was currently setting
(thresholdForJITAfterWarmUp). The solution is to make sure that we always append
NO_CJIT_OPTIONS before we append EAGER_OPTIONS.

Luckily, no tests regressed during the time that we lost eager-no-cjit coverage.

* Scripts/run-jsc-stress-tests:

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

7 years agoUnreviewed EFL gardening. Mark some compositing tests as "failure" since r172999
gyuyoung.kim@samsung.com [Sat, 30 Aug 2014 16:20:46 +0000 (16:20 +0000)]
Unreviewed EFL gardening. Mark some compositing tests as "failure" since r172999

* platform/efl/TestExpectations:

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

7 years agoCSS: Refactor :visited handling in SelectorChecker
utatane.tea@gmail.com [Sat, 30 Aug 2014 13:42:51 +0000 (13:42 +0000)]
CSS: Refactor :visited handling in SelectorChecker
https://bugs.webkit.org/show_bug.cgi?id=135639

Reviewed by Benjamin Poulain.

Source/WebCore:

:visited is specially handled in the SelectorChecker and style resolution
because of security issues. That is nested links and adjacent combinators.
Since we propagate linkState from the ancestors,

    1. linkStates of ancestors from the target node are only used to calculate
    the linkState of the current node.
    This is why adjacent combinators disable :visited.

    2. linkState is overrides by the closest link element in the ancestors.
    This is why :visited is effective on the closest link element.

In this patch, we fix 3 things.

    1. Simplify SelectorChecker. Move m_mode to CheckingContext and it makes
    CheckingContext more similar to SelectorCompiler::CheckingContext in CSS JIT.
    And hide visitedMatchType parameter from the caller of SelectorChecker.

    2. Disable :visited inside :-webkit-any. Currently, :-webkit-any provides MatchAll
    link match type. So considering visited match type in the matching phase of :visited
    provides inconsistency. In this patch, :-webkit-any(:visited) never matches.
    And :-webkit-any(:link) acts like a :-webkit-any(:any-link). This behavior represents
    that visited match type is always considered as disabled inside :-webkit-any.
    This behavior may be changed when Selector Level4 is implemented.

    3. Fix the issue when traversing the descendant element,
    first encountered link check is missing.

Tests: fast/history/link-inside-any.html
       fast/history/link-inside-not.html
       fast/history/nested-visited-test-override.html
       fast/history/visited-inside-any.html
       fast/history/visited-inside-not.html

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::SelectorChecker):
(WebCore::SelectorChecker::match):
(WebCore::hasScrollbarPseudoElement):
(WebCore::checkingContextForParent):
(WebCore::SelectorChecker::matchRecursively):
(WebCore::SelectorChecker::checkOne):
* css/SelectorChecker.h:
(WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
* css/StyleResolver.h:
(WebCore::checkRegionSelector):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::selectorMatches):

LayoutTests:

* fast/history/link-inside-any-expected.txt: Added.
* fast/history/link-inside-any.html: Added.
* fast/history/link-inside-not-expected.txt: Added.
* fast/history/link-inside-not.html: Added.
* fast/history/nested-visited-test-override-expected.txt: Added.
* fast/history/nested-visited-test-override.html: Added.
* fast/history/visited-inside-any-expected.txt: Added.
* fast/history/visited-inside-any.html: Added.
* fast/history/visited-inside-not-expected.txt: Added.
* fast/history/visited-inside-not.html: Added.

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

7 years agoSubpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator.
zalan@apple.com [Sat, 30 Aug 2014 02:55:35 +0000 (02:55 +0000)]
Subpixel layout: Remove LayoutUnit's kEffectiveFixedPointDenominator.
https://bugs.webkit.org/show_bug.cgi?id=136383.

Reviewed by Simon Fraser.

There's only one subpixel denominator now.

No change in functionality.

* platform/LayoutUnit.h:
(WebCore::LayoutUnit::LayoutUnit):
(WebCore::LayoutUnit::fromFloatCeil):
(WebCore::LayoutUnit::fromFloatFloor):
(WebCore::LayoutUnit::toInt):
(WebCore::LayoutUnit::toFloat):
(WebCore::LayoutUnit::toDouble):
(WebCore::LayoutUnit::operator++):
(WebCore::LayoutUnit::ceil):
(WebCore::LayoutUnit::round):
(WebCore::LayoutUnit::floor):
(WebCore::LayoutUnit::ceilToFloat):
(WebCore::LayoutUnit::fraction):
(WebCore::LayoutUnit::epsilon):
(WebCore::LayoutUnit::nearlyMax):
(WebCore::LayoutUnit::nearlyMin):
(WebCore::LayoutUnit::isInBounds):
(WebCore::LayoutUnit::setValue):
(WebCore::boundedMultiply):
(WebCore::operator*):
(WebCore::operator/):
(WebCore::operator%):
(WebCore::roundToDevicePixel):
(WebCore::floorToDevicePixel):
(WebCore::ceilToDevicePixel):

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

7 years agoRename updatePreferredWidth to make it more explicit.
zalan@apple.com [Sat, 30 Aug 2014 02:55:02 +0000 (02:55 +0000)]
Rename updatePreferredWidth to make it more explicit.
https://bugs.webkit.org/show_bug.cgi?id=136389

Reviewed by Simon Fraser.

No change in functionality.

* rendering/RenderBlock.cpp:
(WebCore::preferredWidth):
(WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
(WebCore::updatePreferredWidth): Deleted.

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

7 years agoMake timerNestingLevel threadsafe
barraclough@apple.com [Sat, 30 Aug 2014 01:33:24 +0000 (01:33 +0000)]
Make timerNestingLevel threadsafe
https://bugs.webkit.org/show_bug.cgi?id=136401

Reviewed by Tim Horton.

timerNestingLevel, used by DOMTimer to determine whether a timer is 'nested'
(repeating, possible due to a timer rescheduling itself) is a global. Since
worker threads can set timers too this is not thread safe.

* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::ScriptExecutionContext):
    - added initialize m_timerNestingLevel
* dom/ScriptExecutionContext.h:
(WebCore::ScriptExecutionContext::timerNestingLevel):
(WebCore::ScriptExecutionContext::setTimerNestingLevel):
    - added accessors
* page/DOMTimer.cpp:
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::fired):
    - move timerNestingLevel to the context

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

7 years agoDOMTimer::m_nestingLevel is prone to overflow
barraclough@apple.com [Sat, 30 Aug 2014 01:11:23 +0000 (01:11 +0000)]
DOMTimer::m_nestingLevel is prone to overflow
https://bugs.webkit.org/show_bug.cgi?id=136399

Reviewed by Alexey Proskuryakov.

Since this would happen after the 2 billionth timer fire this is unlikely,
and consequences aren't severe (breaks throttling).

This change has the following consequences.

    - m_nestingLevel saturates to its max value.
    - unnested timers are indicated by a nesting level of 0.
    - repeat timers update m_nestingLevel on every fire,
      not just those that should have been throttled.

The last point is subtle, but ultimately should be inconsequential. Timers
whose requested timeout is less that the minimum interval will saturate quickly
anyway; timers with an original interval greater than the minimum previously
wouldn't have incremented m_nestingLevel, but doing so now doesn't hurt since
they won't be throttled when they hit the threshold. This simplifies things
conceptually a little & reduces the test performed on each timer fire.

* page/DOMTimer.cpp:
(WebCore::shouldForwardUserGesture):
    - unnested timers are indicated by a nesting level of 0
(WebCore::DOMTimer::DOMTimer):
    - don't increment nesting level on construction
(WebCore::DOMTimer::fired):
    - saturating increments
(WebCore::DOMTimer::adjustMinimumTimerInterval):
(WebCore::DOMTimer::intervalClampedToMinimum):
    - added ASSERTs

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

7 years agoEnsure that the call frame passed from doVMEntry to the called function always contai...
commit-queue@webkit.org [Sat, 30 Aug 2014 00:19:42 +0000 (00:19 +0000)]
Ensure that the call frame passed from doVMEntry to the called function always contains the valid scope chain.
https://bugs.webkit.org/show_bug.cgi?id=136391

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-08-29
Reviewed by Michael Saboff.

Do not rely on calling conventions to fill in the CallerFrame component
of the ExecState* parameter of the called function.

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

7 years ago[iOS] Configure Xcode to build a command line tool for the iOS Simulator
dbates@webkit.org [Fri, 29 Aug 2014 23:34:22 +0000 (23:34 +0000)]
[iOS] Configure Xcode to build a command line tool for the iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=136388

Reviewed by David Kilzer.

Add a script, called configure-xcode-for-ios-development, to configure Xcode to
support building a command line tool for the iOS Simulator. You must run this
script as root.

The script uses the xcspec files in the OS X SDK to create xcspec files in the
iOS Simulator SDK with the product- and package- type definitions to build a
command line tool, if applicable.

* Scripts/configure-xcode-for-ios-development: Added.

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

7 years agoRemove Windows WebKit2 code from TestWebKitAPI
timothy_horton@apple.com [Fri, 29 Aug 2014 22:55:27 +0000 (22:55 +0000)]
Remove Windows WebKit2 code from TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=136385

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/PlatformUtilities.h:
* TestWebKitAPI/PlatformWebView.h:
(TestWebKitAPI::PlatformWebView::setParentWindowMessageObserver): Deleted.
* TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp:
(TestWebKitAPI::TEST): Deleted.
* TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/win/AltKeyGeneratesWMSysCommand.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/HideFindIndicator.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/ResizeViewWhileHidden.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/TranslateMessageGeneratesWMChar.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/WMCloseCallsUIClientClose.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/win/WMPrint.cpp: Removed.

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

7 years agoemit op_profile_type for deconstruction assignments
saambarati1@gmail.com [Fri, 29 Aug 2014 22:52:51 +0000 (22:52 +0000)]
emit op_profile_type for deconstruction assignments
https://bugs.webkit.org/show_bug.cgi?id=136274

Reviewed by Filip Pizlo.

Enable type profiling for ES6 deconstruction expressions.

* bytecompiler/NodesCodegen.cpp:
(JSC::BindingNode::bindValue):

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

7 years agoMore occasional crashes in ServicesController::resfreshExistingServices
ap@apple.com [Fri, 29 Aug 2014 21:38:12 +0000 (21:38 +0000)]
More occasional crashes in ServicesController::resfreshExistingServices
https://bugs.webkit.org/show_bug.cgi?id=136387
<rdar://problem/18167200>

Patch by Tim Horton <timothy_horton@apple.com> on 2014-08-29
Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Speculative fix; if this block is called synchronously, we'll end up
calling back into ::shared() before the NeverDestroyed is initialized,
ending up with two ServicesControllers.

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

7 years agoJavaScriptCore: Use ASCIILiteral where possible
commit-queue@webkit.org [Fri, 29 Aug 2014 21:33:30 +0000 (21:33 +0000)]
JavaScriptCore: Use ASCIILiteral where possible
https://bugs.webkit.org/show_bug.cgi?id=136179

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-08-29
Reviewed by Michael Saboff.

Source/JavaScriptCore:

General string / character related changes. Use ASCIILiteral where
possible, jsNontrivialString where possible, and replace string
literals with character literals in some places.

No new tests, no changes to functionality.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister):
* bytecompiler/NodesCodegen.cpp:
(JSC::PostfixNode::emitBytecode):
(JSC::PrefixNode::emitBytecode):
(JSC::AssignErrorNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::ObjectPatternNode::toString):
* dfg/DFGFunctionWhitelist.cpp:
(JSC::DFG::FunctionWhitelist::contains):
* dfg/DFGOperations.cpp:
(JSC::DFG::newTypedArrayWithSize):
(JSC::DFG::newTypedArrayWithOneArgument):
* inspector/ConsoleMessage.cpp:
(Inspector::ConsoleMessage::addToFrontend):
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::InspectorBackendDispatcher::dispatch):
* inspector/ScriptCallStackFactory.cpp:
(Inspector::extractSourceInformationFromException):
* inspector/scripts/codegen/generator_templates.py:
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
* jit/JITOperations.cpp:
* jsc.cpp:
(functionDescribeArray):
(functionRun):
(functionLoad):
(functionReadFile):
(functionCheckSyntax):
(functionTransferArrayBuffer):
(runWithScripts):
(runInteractive):
* parser/Lexer.cpp:
(JSC::Lexer<T>::invalidCharacterMessage):
(JSC::Lexer<T>::parseString):
(JSC::Lexer<T>::parseStringSlowCase):
(JSC::Lexer<T>::lex):
* profiler/Profile.cpp:
(JSC::Profile::Profile):
* runtime/Arguments.cpp:
(JSC::argumentsFuncIterator):
* runtime/ArrayPrototype.cpp:
(JSC::performSlowSort):
(JSC::arrayProtoFuncSort):
* runtime/ExceptionHelpers.cpp:
(JSC::createError):
(JSC::createInvalidParameterError):
(JSC::createNotAConstructorError):
(JSC::createNotAFunctionError):
(JSC::createNotAnObjectError):
(JSC::createErrorForInvalidGlobalAssignment):
* runtime/FunctionPrototype.cpp:
(JSC::insertSemicolonIfNeeded):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::pop):
(JSC::JSArray::push):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::JSArrayBufferConstructor::finishCreation):
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
* runtime/JSDataView.cpp:
(JSC::JSDataView::create):
* runtime/JSDataViewPrototype.cpp:
(JSC::getData):
(JSC::setData):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSPromiseConstructor.cpp:
(JSC::JSPromiseConstructor::finishCreation):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
(JSC::LiteralParser<CharType>::Lexer::lexString):
(JSC::LiteralParser<CharType>::parse):
* runtime/LiteralParser.h:
(JSC::LiteralParser::getErrorMessage):
* runtime/TypeSet.cpp:
(JSC::TypeSet::seenTypes):
(JSC::TypeSet::displayName):
(JSC::TypeSet::allPrimitiveTypeNames):
(JSC::StructureShape::propertyHash):
(JSC::StructureShape::stringRepresentation):

Source/WTF:

* wtf/text/WTFString.cpp:
(asciiDebug):

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

7 years agoMore occasional crashes in ServicesController::resfreshExistingServices
timothy_horton@apple.com [Fri, 29 Aug 2014 21:32:40 +0000 (21:32 +0000)]
More occasional crashes in ServicesController::resfreshExistingServices
https://bugs.webkit.org/show_bug.cgi?id=136387
<rdar://problem/18167200>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Speculative fix; if this block is called synchronously, we'll end up
calling back into ::shared() before the NeverDestroyed is initialized,
ending up with two ServicesControllers.

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

7 years agoWebPageProxy::close() is a no-op for terminated processes
ap@apple.com [Fri, 29 Aug 2014 21:23:24 +0000 (21:23 +0000)]
WebPageProxy::close() is a no-op for terminated processes
https://bugs.webkit.org/show_bug.cgi?id=136378
Related to <rdar://problem/16991213> and to <rdar://problem/17095600>

Reviewed by Brady Eidson.

Also fixes issues that got uncovered after making close() work.

* UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
close the page, because it makes no sense, and causes an assertion now. Previosly,
this was OK because the page was invalid already, and close() was a no-op.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
issues earlier.
(WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
process always has a message receiver for it, until close() removes it.
(WebKit::WebPageProxy::close): Make this function work for all open pages, whether
they have a page or not.
(WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
agrees about its state.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
we now only do this in reattach or close.

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

7 years agoWeb Inspector: Fix how Popover animates
commit-queue@webkit.org [Fri, 29 Aug 2014 20:10:05 +0000 (20:10 +0000)]
Web Inspector: Fix how Popover animates
https://bugs.webkit.org/show_bug.cgi?id=136353

Patch by Saam Barati <sbarati@apple.com> on 2014-08-29
Reviewed by Timothy Hatcher.

Popovers currently don't animate properly because they use
window.requestAnimationFrame which won't fire its callback
while the inspector is paused in the debugger. This patches
switches the callback mechanism to setTimeout and also changes
how a Popover's anchor animates to prevent visual glitches.

Popover also has a new function that allows a new target
frame and new content to be set simultaneously and to
animate to show the new content while changing the
location of the popover frame.

SourceCodeTextEditor uses Popover's new API for animating
between popovers when paused in the debugger. SourceCodeTextEditor
also now ensures proper balancing of popover tracking event
listeners.

* UserInterface/Views/Popover.js:
(WebInspector.Popover.prototype.present):
(WebInspector.Popover.prototype.presentNewContentWithFrame):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype._update):
(WebInspector.Popover.prototype.drawBackground):
(WebInspector.Popover.prototype._animateFrame):
(WebInspector.Popover.prototype._drawFrame):
(WebInspector.Popover.prototype._addListenersIfNeeded):
(WebInspector.Popover.prototype._animateFrame.drawBackground): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):

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

7 years ago[JSC] Some JSC tests are dependent on the machine time zone.
clopez@igalia.com [Fri, 29 Aug 2014 18:15:19 +0000 (18:15 +0000)]
[JSC] Some JSC tests are dependent on the machine time zone.
https://bugs.webkit.org/show_bug.cgi?id=136363

Reviewed by Filip Pizlo.

* Scripts/run-javascriptcore-tests: Export TZ environment variable to US/Pacific.
Unskip the tests that were skipped on r99580.

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

7 years agoRemove NetworkResourceLoaderClient and subclasses.
antti@apple.com [Fri, 29 Aug 2014 18:15:04 +0000 (18:15 +0000)]
Remove NetworkResourceLoaderClient and subclasses.
https://bugs.webkit.org/show_bug.cgi?id=136370

Reviewed by Darin Adler.

This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader.

* NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::sendBuffer):
(WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
* NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/SynchronousNetworkLoaderClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:

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

7 years agoImprove showRenderTree() output.
zalan@apple.com [Fri, 29 Aug 2014 17:55:34 +0000 (17:55 +0000)]
Improve showRenderTree() output.
https://bugs.webkit.org/show_bug.cgi?id=136244

Reviewed by Darin Adler.

Add more debugging information to showRenderTree().

Not testable.

* rendering/InlineBox.cpp:
(WebCore::InlineBox::showLineTreeForThis):
(WebCore::InlineBox::showLineTreeAndMark):
(WebCore::InlineBox::showLineBox):
(showNodeTree):
(showLineTree):
(WebCore::InlineBox::showBox): Deleted.
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::showLineTreeAndMark):
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::showLineBox):
(WebCore::InlineTextBox::showBox): Deleted.
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::showLineTreeAndMark): Deleted.
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::showLineTreeAndMark):
* rendering/RenderBlockFlow.h:
* rendering/RenderObject.cpp:
(WebCore::showRenderTreeLegend):
(WebCore::RenderObject::showNodeTreeForThis):
(WebCore::RenderObject::showRenderTreeForThis):
(WebCore::RenderObject::showLineTreeForThis):
(WebCore::RenderObject::showRegionsInformation):
(WebCore::RenderObject::showRenderObject):
(WebCore::RenderObject::showRenderSubTreeAndMark):
(showNodeTree):
(showLineTree):
(showRenderTree):
(WebCore::RenderObject::showRenderTreeAndMark): Deleted.
* rendering/RenderObject.h:
* rendering/RootInlineBox.h:

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

7 years agoUnreviwed, remove empty directories.
ossy@webkit.org [Fri, 29 Aug 2014 15:55:54 +0000 (15:55 +0000)]
Unreviwed, remove empty directories.

Source/JavaScriptCore:

* qt: Removed.

Source/ThirdParty/ANGLE:

* src/compiler/depgraph: Removed.
* src/compiler/timing: Removed.
* src/libGLESv2/renderer/shaders: Removed.
* src/libGLESv2/renderer/shaders/compiled: Removed.

Source/WebCore:

* Modules/networkinfo: Removed.
* inspector/front-end: Removed.
* inspector/front-end/Images: Removed.
* inspector/front-end/UglifyJS: Removed.
* inspector/front-end/ace: Removed.
* inspector/front-end/cm: Removed.
* platform/audio/ffmpeg: Removed.
* platform/audio/ipp: Removed.
* platform/graphics/gpu/opencl: Removed.

Source/WebKit:

* efl: Removed.
* efl/DefaultTheme: Removed.
* efl/DefaultTheme/widget: Removed.
* efl/WebCoreSupport: Removed.
* efl/ewk: Removed.
* efl/tests: Removed.
* efl/tests/UnitTestUtils: Removed.
* efl/tests/resources: Removed.
* gtk: Removed.
* gtk/WebCoreSupport: Removed.
* gtk/docs: Removed.
* gtk/gdom: Removed.
* gtk/resources: Removed.
* gtk/webkit: Removed.

Source/WebKit/mac:

* ForwardingHeaders/wtf: Removed.

Source/WebKit2:

* PluginProcess/qt: Removed.
* Shared/API/c/qt: Removed.
* Shared/Downloads/qt: Removed.
* Shared/FileAPI: Removed.
* Shared/qt: Removed.
* UIProcess/API/C/qt: Removed.
* UIProcess/API/cpp/qt: Removed.
* UIProcess/API/qt: Removed.
* UIProcess/API/qt/raw: Removed.
* UIProcess/API/qt/tests: Removed.
* UIProcess/API/qt/tests/html: Removed.
* UIProcess/API/qt/tests/html/resources: Removed.
* UIProcess/API/qt/tests/inspectorserver: Removed.
* UIProcess/API/qt/tests/publicapi: Removed.
* UIProcess/API/qt/tests/qmltests: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed.
* UIProcess/API/qt/tests/qmltests/WebView: Removed.
* UIProcess/API/qt/tests/qmltests/common: Removed.
* UIProcess/API/qt/tests/qquickwebview: Removed.
* UIProcess/API/qt/tests/qrawwebview: Removed.
* UIProcess/InspectorServer/qt: Removed.
* UIProcess/Launcher/qt: Removed.
* UIProcess/Plugins/qt: Removed.
* UIProcess/SharedWorkers: Removed.
* UIProcess/qt: Removed.
* WebProcess/Cookies/qt: Removed.
* WebProcess/Downloads: Removed.
* WebProcess/IndexedDB: Removed.
* WebProcess/InjectedBundle/qt: Removed.
* WebProcess/NetworkInfo: Removed.
* WebProcess/Plugins/Netscape/qt: Removed.
* WebProcess/WebCoreSupport/qt: Removed.
* WebProcess/WebPage/qt: Removed.
* WebProcess/qt: Removed.
* qt: Removed.

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

7 years ago[EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
commit-queue@webkit.org [Fri, 29 Aug 2014 10:05:25 +0000 (10:05 +0000)]
[EFL] Remove non Coordinated Graphics code path from cmake build system after r142169
https://bugs.webkit.org/show_bug.cgi?id=135560

Patch by Eva Balazsfalvi <evab.u-szeged@partner.samsung.com> on 2014-08-29
Reviewed by Gyuyoung Kim.

.:

* Source/cmake/OptionsEfl.cmake: Removed TILED_BACKING_STORE guard.

Source/WebCore:

No new tests required, no new functionality.

* PlatformEfl.cmake: Removed TEXTURE_MAPPER and 3D_GRAPHICS guards.
* platform/graphics/efl/GraphicsContext3DEfl.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
(WebCore::GraphicsContext3D::platformLayer):
(WebCore::GraphicsContext3D::createGraphicsSurfaces):
* platform/graphics/efl/GraphicsContext3DPrivate.cpp: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
(WebCore::GraphicsContext3DPrivate::initialize):
(WebCore::GraphicsContext3DPrivate::releaseResources):
(WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
(WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
* platform/graphics/efl/GraphicsContext3DPrivate.h: Removed TEXTURE_MAPPER_GL and GRAPHICS_SURFACE guards.
* platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp: Removed GRAPHICS_SURFACE guard.

Tools:

* Scripts/webkitperl/FeatureList.pm: Removed TILED_BACKING_STORE guard.

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

7 years agoRenderThemeGtk depends on classes outside of platform
carlosgc@webkit.org [Fri, 29 Aug 2014 08:06:03 +0000 (08:06 +0000)]
RenderThemeGtk depends on classes outside of platform
https://bugs.webkit.org/show_bug.cgi?id=22176

Reviewed by Martin Robinson.

Move RenderThemeGtk.cpp from platform to rendering.

* PlatformGTK.cmake:
* rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.

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

7 years ago[GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
carlosgc@webkit.org [Fri, 29 Aug 2014 07:42:56 +0000 (07:42 +0000)]
[GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=136338

Reviewed by Philippe Normand.

Remove the dependency by creating the GtkStyleContext for the
scrollbars in ScrollbarThemeGtk.

* platform/gtk/RenderThemeGtk.cpp:
(WebCore::gtkStyleChangedCallback): Call ScrollbarThemeGtk::themeChanged().
(WebCore::getStyleContext): Remove the scrollbar style context support.
* platform/gtk/RenderThemeGtk.h: Remove gtkScrollbarStyle().
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarStyleContext::ScrollbarStyleContext): Helper
class to create the global GtkStyleContext for scrollbars.
(WebCore::ScrollbarStyleContext::~ScrollbarStyleContext):
(WebCore::ScrollbarStyleContext::context):
(WebCore::gtkScrollbarStyleContext):
(WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Remove m_context initialization.
(WebCore::ScrollbarThemeGtk::themeChanged): Invalidate the
GtkStylecontext and call updateThemeProperties().
(WebCore::ScrollbarThemeGtk::updateThemeProperties): Use the
global style context.
(WebCore::ScrollbarThemeGtk::paintTrackBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
(WebCore::ScrollbarThemeGtk::paintThumb): Ditto.
(WebCore::ScrollbarThemeGtk::paintButton): Ditto.
* platform/gtk/ScrollbarThemeGtk.h:

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

7 years ago[GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp...
carlosgc@webkit.org [Fri, 29 Aug 2014 07:39:13 +0000 (07:39 +0000)]
[GTK] Merge RenderThemeGtk3.cpp into RenderThemeGtk.cpp and ScrollbarThemeGtk3.cpp intoScrollbarThemeGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=136336

Reviewed by Philippe Normand.

There's no reason to have two files now that there's no GTK+2
support. Also fix coding style issues and compile warnings.

* PlatformGTK.cmake:
* platform/gtk/RenderThemeGtk.cpp:
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk3.cpp: Removed.
* platform/gtk/ScrollbarThemeGtk.cpp:
* platform/gtk/ScrollbarThemeGtk3.cpp: Removed.

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

7 years agoWeb Inspector: Write tests for ScriptSyntaxTree and fix bugs in the data structure
commit-queue@webkit.org [Fri, 29 Aug 2014 01:42:21 +0000 (01:42 +0000)]
Web Inspector: Write tests for ScriptSyntaxTree and fix bugs in the data structure
https://bugs.webkit.org/show_bug.cgi?id=136272

Patch by Saam Barati <sbarati@apple.com> on 2014-08-28
Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

Include the necessary files in Test.html to test ScriptSyntaxTree.
Also, ScriptSyntaxTree had a couple of errors for two of its nodes
where they simply ignored one of the properties on the node.
These errors were found while writing the tests and are fixed
in this patch.

* UserInterface/Models/ScriptSyntaxTree.js:
(WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
* UserInterface/Test.html:

LayoutTests:

This patch tests all nodes in the WebInspecor's Abstract Syntax Tree.
These tests don't test every aspect of the data structure, but focus
on having it parse all JavaScript expressions successfully and to also
make sure nodes in the tree are of the correct type.

* inspector/model: Added.
* inspector/model/parse-script-syntax-tree-expected.txt: Added.
* inspector/model/parse-script-syntax-tree.html: Added.

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

7 years ago[Win] update-webkit should update auxiliary libs by default
dbates@webkit.org [Fri, 29 Aug 2014 00:51:13 +0000 (00:51 +0000)]
[Win] update-webkit should update auxiliary libs by default

Reviewed by Dan Bernstein.

The change set <http://trac.webkit.org/changeset/172795> inadvertently prevented update-webkit
from updating the Windows auxiliary libs by default. We should make update-webkit update the
Windows auxiliary libs by default. This will make its behavior match its usage text.

* Scripts/update-webkit:

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

7 years agoDebuggerCallFrame::scope() should return a DebuggerScope.
mark.lam@apple.com [Fri, 29 Aug 2014 00:48:59 +0000 (00:48 +0000)]
DebuggerCallFrame::scope() should return a DebuggerScope.
<https://webkit.org/b/134420>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.

Previously, DebuggerCallFrame::scope() returns a JSActivation (and relevant
peers) which the WebInspector will use to introspect CallFrame variables.
Instead, we should be returning a DebuggerScope as an abstraction layer that
provides the introspection functionality that the WebInspector needs.  This
is the first step towards not forcing every frame to have a JSActivation
object just because the debugger is enabled.

1. Instantiate the debuggerScopeStructure as a member of the JSGlobalObject
   instead of the VM.  This allows JSObject::globalObject() to be able to
   return the global object for the DebuggerScope.

2. On the DebuggerScope's life-cycle management:

   The DebuggerCallFrame is designed to be "valid" only during a debugging session
   (while the debugger is broken) through the use of a DebuggerCallFrameScope in
   Debugger::pauseIfNeeded().  Once the debugger resumes from the break, the
   DebuggerCallFrameScope destructs, and the DebuggerCallFrame will be invalidated.
   We can't guarantee (from this code alone) that the Inspector code isn't still
   holding a ref to the DebuggerCallFrame (though they shouldn't), but by contract,
   the frame will be invalidated, and any attempt to query it will return null values.
   This is pre-existing behavior.

   Now, we're adding the DebuggerScope into the picture.  While a single debugger
   pause session is in progress, the Inspector may request the scope from the
   DebuggerCallFrame.  While the DebuggerCallFrame is still valid, we want
   DebuggerCallFrame::scope() to always return the same DebuggerScope object.
   This is why we hold on to the DebuggerScope with a strong ref.

   If we use a weak ref instead, the following cooky behavior can manifest:
   1. The Inspector calls Debugger::scope() to get the top scope.
   2. The Inspector iterates down the scope chain and is now only holding a
      reference to a parent scope.  It is no longer referencing the top scope.
   3. A GC occurs, and the DebuggerCallFrame's weak m_scope ref to the top scope
      gets cleared.
   4. The Inspector calls DebuggerCallFrame::scope() to get the top scope again but gets
      a different DebuggerScope instance.
   5. The Inspector iterates down the scope chain but never sees the parent scope
      instance that retained a ref to in step 2 above.  This is because when iterating
      this new DebuggerScope instance (which has no knowledge of the previous parent
      DebuggerScope instance), a new DebuggerScope instance will get created for the
      same parent scope.

   Since the DebuggerScope is a JSObject, its liveness is determined by its reachability.
   However, its "validity" is determined by the life-cycle of its owner DebuggerCallFrame.
   When the owner DebuggerCallFrame gets invalidated, its debugger scope chain (if
   instantiated) will also get invalidated.  This is why we need the
   DebuggerScope::invalidateChain() method.  The Inspector should not be using the
   DebuggerScope instance after its owner DebuggerCallFrame is invalidated.  If it does,
   those methods will do nothing or returned a failed status.

Fix for <https://webkit.org/b/135656>:
3. DebuggerScope::getOwnPropertySlot() and DebuggerScope::put() need to set
   m_thisValue in the returned slot to the wrapped scope object.  Previously,
   it was pointing to the DebuggerScope though the rest of the fields in the
   returned slot will be set to data pertaining the wrapped scope object.

4. DebuggerScope::getOwnPropertySlot() will invoke getPropertySlot() on its
   wrapped scope.  This is because JSObject::getPropertySlot() cannot be
   overridden, and when called on a DebuggerScope, will not know to look in
   the ptototype chain of the DebuggerScope's wrapped scope.  Hence, we'll
   treat all properties in the wrapped scope as own properties in the
   DebuggerScope.  This is fine because the WebInspector does not presently
   care about where in the prototype chain the scope property comes from.

   Note that the DebuggerScope and the JSActivation objects that it wraps do
   not have prototypes.  They are always jsNull().  This works perfectly with
   the above change to use getPropertySlot() instead of getOwnPropertySlot().
   To make this an explicit invariant, I also changed DebuggerScope::createStructure()
   and JSActivation::createStructure() to not take a prototype argument, and
   to always use jsNull() for their prototype value.

* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::evaluate):
(JSC::DebuggerCallFrame::invalidate):
* debugger/DebuggerCallFrame.h:
* debugger/DebuggerScope.cpp:
(JSC::DebuggerScope::DebuggerScope):
(JSC::DebuggerScope::finishCreation):
(JSC::DebuggerScope::visitChildren):
(JSC::DebuggerScope::className):
(JSC::DebuggerScope::getOwnPropertySlot):
(JSC::DebuggerScope::put):
(JSC::DebuggerScope::deleteProperty):
(JSC::DebuggerScope::getOwnPropertyNames):
(JSC::DebuggerScope::defineOwnProperty):
(JSC::DebuggerScope::next):
(JSC::DebuggerScope::invalidateChain):
(JSC::DebuggerScope::isWithScope):
(JSC::DebuggerScope::isGlobalScope):
(JSC::DebuggerScope::isFunctionOrEvalScope):
* debugger/DebuggerScope.h:
(JSC::DebuggerScope::create):
(JSC::DebuggerScope::createStructure):
(JSC::DebuggerScope::iterator::iterator):
(JSC::DebuggerScope::iterator::get):
(JSC::DebuggerScope::iterator::operator++):
(JSC::DebuggerScope::iterator::operator==):
(JSC::DebuggerScope::iterator::operator!=):
(JSC::DebuggerScope::isValid):
(JSC::DebuggerScope::jsScope):
(JSC::DebuggerScope::begin):
(JSC::DebuggerScope::end):
* inspector/JSJavaScriptCallFrame.cpp:
(Inspector::JSJavaScriptCallFrame::scopeType):
(Inspector::JSJavaScriptCallFrame::scopeChain):
* inspector/JavaScriptCallFrame.h:
(Inspector::JavaScriptCallFrame::scopeChain):
* inspector/ScriptDebugServer.cpp:
* runtime/JSActivation.h:
(JSC::JSActivation::createStructure):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::debuggerScopeStructure):
* runtime/JSObject.cpp:
* runtime/JSObject.h:
(JSC::JSObject::isWithScope):
* runtime/JSScope.h:
* runtime/PropertySlot.h:
(JSC::PropertySlot::setThisValue):
* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setThisValue):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

No new tests.

Rolling back in r170680 with the fix for <https://webkit.org/b/135656>.

* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::attachDebugger):
- We should acquire the JSLock before modifying a JS global object.

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

7 years agoCan't hit tab key more than 3 times continuously.
enrica@apple.com [Fri, 29 Aug 2014 00:17:17 +0000 (00:17 +0000)]
Can't hit tab key more than 3 times continuously.
https://bugs.webkit.org/show_bug.cgi?id=136357
rdar://problem/17927266

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/css/multiple-tabs.html

When computing the tabWidth disregard increments of less than half the size of the space character
for the given font.

* platform/graphics/Font.h:
(WebCore::Font::tabWidth):

LayoutTests:

* fast/css/multiple-tabs-expected.html: Added.
* fast/css/multiple-tabs.html: Added.

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

7 years ago_setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is...
timothy_horton@apple.com [Fri, 29 Aug 2014 00:01:39 +0000 (00:01 +0000)]
_setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
https://bugs.webkit.org/show_bug.cgi?id=136354
<rdar://problem/18167791>

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKViewPrivate.h:
Update the comment to note the new behavior.

* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Don't call the block until the snapshot is actually moving (if the snapshot
never moves because it's behind the live view, don't call the block at all).

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

7 years agoOccasional thread-safety-related crashes on the ServicesController queue
timothy_horton@apple.com [Thu, 28 Aug 2014 23:58:20 +0000 (23:58 +0000)]
Occasional thread-safety-related crashes on the ServicesController queue
https://bugs.webkit.org/show_bug.cgi?id=136356
<rdar://problem/18045685>

Reviewed by Dan Bernstein.

* UIProcess/mac/ServicesController.mm:
(WebKit::hasCompatibleServicesForItems):
Added. Check directly with NSSharingService if we have any services for the given items.
We should eventually check Viewer and Editor services separately so the Web process can
be smarter about when it shows the overlay, but for now this maintains the existing behavior.

(WebKit::ServicesController::refreshExistingServices):
Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.

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

7 years ago[iOS] Clients that include WebCoreThread.h fail to build after <http://trac.webkit...
dbates@webkit.org [Thu, 28 Aug 2014 22:18:36 +0000 (22:18 +0000)]
[iOS] Clients that include WebCoreThread.h fail to build after <trac.webkit.org/changeset/172814/>
(https://bugs.webkit.org/show_bug.cgi?id=136108)

Define WEBCORE_EXPORT (if its not already defined) in WebCoreThread.h so as to fix the
build for clients that include this header.

* platform/ios/wak/WebCoreThread.h:

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

7 years agoUse JSString::toIdentifier() in more places.
akling@apple.com [Thu, 28 Aug 2014 21:38:18 +0000 (21:38 +0000)]
Use JSString::toIdentifier() in more places.
<https://webkit.org/b/136348>

Call sites that grab the WTF::String from a JSString using value() can
use the more efficient toIdentifier() if the string is going to be used
to construct an Identifier.

If the JSString is a rope that resolves to something that is already
present in the VM's Identifier table, using toIdentifier() can avoid
allocating a new StringImpl.

Reviewed by Geoffrey Garen.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Stringifier):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorDefineProperty):
* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncPropertyIsEnumerable):

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

7 years agoWebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing...
psolanki@apple.com [Thu, 28 Aug 2014 21:08:26 +0000 (21:08 +0000)]
WebContent hangs under SharedBuffer::duplicateDataBufferIfNecessary() while browsing some websites
https://bugs.webkit.org/show_bug.cgi?id=136347
<rdar://problem/18073745>

Reviewed by Andreas Kling.

When passing data to ImageIO, we create a copy if we have to reallocate the buffer. We would
set the size of the new buffer to be the size of the SharedBuffer data. This causes memory
churn since we would create a new buffer for every data chunk we get. Fix this by at least
doubling the capacity of the buffer when we duplicate it.

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::duplicateDataBufferIfNecessary):

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

7 years agoiOS build fix.
mitz@apple.com [Thu, 28 Aug 2014 21:01:25 +0000 (21:01 +0000)]
iOS build fix.

* WebCore.exp.in: Updated symbol.

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

7 years agoWebKit2 doesn't support viewer services that accept image attachments
timothy_horton@apple.com [Thu, 28 Aug 2014 20:45:59 +0000 (20:45 +0000)]
WebKit2 doesn't support viewer services that accept image attachments
https://bugs.webkit.org/show_bug.cgi?id=136349
<rdar://problem/18164606>

Reviewed by Brady Eidson.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode the already-existing parameter.

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

7 years agoScrolling with spacebar on a page with fixed header breaks reading flow
benjamin@webkit.org [Thu, 28 Aug 2014 20:01:18 +0000 (20:01 +0000)]
Scrolling with spacebar on a page with fixed header breaks reading flow
https://bugs.webkit.org/show_bug.cgi?id=135506

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

Source/WebCore:

When scrolling by page, find the height of any bar that is obscuring the top or bottom of the page,
and substract that height from the step to scroll.

Tests: scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html
       scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html
       scrollbars/scrolling-by-page-on-keyboard-spacebar.html

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::adjustScrollStepForFixedContent):
* page/FrameView.h:
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::adjustScrollStepForFixedContent):
(WebCore::ScrollableArea::scroll):
* platform/ScrollableArea.h:

LayoutTests:

There was pretty much no test coverage for scrolling by page, add some tests.

* fast/events/scrollbar-double-click-expected.txt:
* platform/mac-wk1/TestExpectations:
* scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-backward-by-page-accounting-bottom-fixed-elements-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-backward-by-page-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-backward-by-page-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-accounting-oversized-fixed-elements-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-accounting-top-fixed-elements-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-accounting-top-fixed-elements-with-negative-top-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-ignoring-hidden-fixed-elements-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-ignoring-transparent-fixed-elements-on-keyboard-spacebar.html: Added.
* scrollbars/scrolling-by-page-on-keyboard-spacebar-expected.txt: Added.
* scrollbars/scrolling-by-page-on-keyboard-spacebar.html: Added.

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

7 years agoSubpixel layout: Remove unused pixel snapping functions.
zalan@apple.com [Thu, 28 Aug 2014 19:48:50 +0000 (19:48 +0000)]
Subpixel layout: Remove unused pixel snapping functions.
https://bugs.webkit.org/show_bug.cgi?id=136341

Reviewed by Simon Fraser.

Let's not encourage integral snapping by having these functions around.

No change in functionality.

Source/WebCore:

* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::pixelSnappedElementRect): Deleted.
(WebCore::AccessibilityObject::pixelSnappedSize): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::width):
(WebCore::HTMLImageElement::height):
* page/FrameView.cpp:
(WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
* platform/graphics/LayoutPoint.h:
(WebCore::snappedIntSize):
(WebCore::snapSizeToDevicePixel):
* platform/graphics/LayoutRect.h:
(WebCore::LayoutRect::pixelSnappedLocation): Deleted.
(WebCore::LayoutRect::pixelSnappedX): Deleted.
(WebCore::LayoutRect::pixelSnappedY): Deleted.
(WebCore::LayoutRect::pixelSnappedWidth): Deleted.
(WebCore::LayoutRect::pixelSnappedHeight): Deleted.
(WebCore::LayoutRect::pixelSnappedMaxX): Deleted.
(WebCore::LayoutRect::pixelSnappedMaxY): Deleted.
(WebCore::snappedIntRectFromEdges): Deleted.
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::pixelSnappedLogicalTopForFloat): Deleted.
(WebCore::RenderBlockFlow::pixelSnappedLogicalBottomForFloat): Deleted.
(WebCore::RenderBlockFlow::pixelSnappedLogicalLeftForFloat): Deleted.
(WebCore::RenderBlockFlow::pixelSnappedLogicalRightForFloat): Deleted.
* rendering/RenderBox.h:
(WebCore::RenderBox::pixelSnappedLogicalHeight):
(WebCore::RenderBox::pixelSnappedLogicalWidth):
(WebCore::RenderBox::pixelSnappedBorderBoxRect):
(WebCore::RenderBox::pixelSnappedWidth): Deleted.
(WebCore::RenderBox::pixelSnappedHeight): Deleted.
(WebCore::RenderBox::pixelSnappedFrameRect): Deleted.
* rendering/RenderFileUploadControl.cpp:
(WebCore::nodeWidth):
(WebCore::nodeHeight):
(WebCore::RenderFileUploadControl::maxFilenameWidth):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::isPointInResizeControl):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderMediaControls.cpp:
(WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::paintColumnRules):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::buttonRect):
* rendering/RenderView.h:

Source/WebKit2:

* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):

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

7 years agoDFG should compute immediate dominators using the O(n log n) form of Lengauer and...
fpizlo@apple.com [Thu, 28 Aug 2014 19:23:02 +0000 (19:23 +0000)]
DFG should compute immediate dominators using the O(n log n) form of Lengauer and Tarjan's "A Fast Algorithm for Finding Dominators in a Flowgraph"
https://bugs.webkit.org/show_bug.cgi?id=93361

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

This patch also adds some new utilities for reasoning about block-keyed maps, block sets,
and block worklists. It changes preexisting code to use these abstractions.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAnalysis.h:
(JSC::DFG::Analysis::computeIfNecessary):
(JSC::DFG::Analysis::computeDependencies):
* dfg/DFGBlockMap.h: Added.
(JSC::DFG::BlockMap::BlockMap):
(JSC::DFG::BlockMap::size):
(JSC::DFG::BlockMap::atIndex):
(JSC::DFG::BlockMap::operator[]):
* dfg/DFGBlockMapInlines.h: Added.
(JSC::DFG::BlockMap<T>::BlockMap):
* dfg/DFGBlockSet.h: Added.
(JSC::DFG::BlockSet::BlockSet):
(JSC::DFG::BlockSet::add):
(JSC::DFG::BlockSet::contains):
* dfg/DFGBlockWorklist.cpp: Added.
(JSC::DFG::BlockWorklist::BlockWorklist):
(JSC::DFG::BlockWorklist::~BlockWorklist):
(JSC::DFG::BlockWorklist::push):
(JSC::DFG::BlockWorklist::pop):
(JSC::DFG::PostOrderBlockWorklist::PostOrderBlockWorklist):
(JSC::DFG::PostOrderBlockWorklist::~PostOrderBlockWorklist):
(JSC::DFG::PostOrderBlockWorklist::pushPre):
(JSC::DFG::PostOrderBlockWorklist::pushPost):
(JSC::DFG::PostOrderBlockWorklist::pop):
* dfg/DFGBlockWorklist.h: Added.
(JSC::DFG::BlockWorklist::notEmpty):
(JSC::DFG::BlockWith::BlockWith):
(JSC::DFG::BlockWith::operator UnspecifiedBoolType*):
(JSC::DFG::ExtendedBlockWorklist::ExtendedBlockWorklist):
(JSC::DFG::ExtendedBlockWorklist::forcePush):
(JSC::DFG::ExtendedBlockWorklist::push):
(JSC::DFG::ExtendedBlockWorklist::notEmpty):
(JSC::DFG::ExtendedBlockWorklist::pop):
(JSC::DFG::BlockWithOrder::BlockWithOrder):
(JSC::DFG::BlockWithOrder::operator UnspecifiedBoolType*):
(JSC::DFG::PostOrderBlockWorklist::push):
(JSC::DFG::PostOrderBlockWorklist::notEmpty):
* dfg/DFGCSEPhase.cpp:
* dfg/DFGDominators.cpp:
(JSC::DFG::Dominators::compute):
(JSC::DFG::Dominators::naiveDominates):
(JSC::DFG::Dominators::dump):
(JSC::DFG::Dominators::pruneDominators): Deleted.
* dfg/DFGDominators.h:
(JSC::DFG::Dominators::strictlyDominates):
(JSC::DFG::Dominators::dominates):
(JSC::DFG::Dominators::BlockData::BlockData):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpBlockHeader):
(JSC::DFG::Graph::getBlocksInPreOrder):
(JSC::DFG::Graph::getBlocksInPostOrder):
* dfg/DFGInvalidationPointInjectionPhase.cpp:
(JSC::DFG::InvalidationPointInjectionPhase::run):
* dfg/DFGNaiveDominators.cpp: Added.
(JSC::DFG::NaiveDominators::NaiveDominators):
(JSC::DFG::NaiveDominators::~NaiveDominators):
(JSC::DFG::NaiveDominators::compute):
(JSC::DFG::NaiveDominators::pruneDominators):
(JSC::DFG::NaiveDominators::dump):
* dfg/DFGNaiveDominators.h: Added.
(JSC::DFG::NaiveDominators::dominates):
* dfg/DFGNaturalLoops.cpp:
(JSC::DFG::NaturalLoops::computeDependencies):
(JSC::DFG::NaturalLoops::compute):
* dfg/DFGNaturalLoops.h:

Source/WTF:

Make BitVector operations return the previous value of the bit you're changing. This is
useful for the kinds of set operations that are commonplace in compiler graph searches.

* wtf/BitVector.h:
(WTF::BitVector::quickSet):
(WTF::BitVector::quickClear):
(WTF::BitVector::set):
(WTF::BitVector::ensureSizeAndSet):
(WTF::BitVector::clear):

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

7 years agotextStylingAtPosition returns incorrect values after executing toggleBold, toggleItal...
enrica@apple.com [Thu, 28 Aug 2014 19:21:24 +0000 (19:21 +0000)]
textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
https://bugs.webkit.org/show_bug.cgi?id=136323
rdar://problem/18141964

Reviewed by Antti Koivisto.

For underline style we need to check typingStyle first and use that information to populate
the dictionary. If there is no typing style we can use the render style.
Source/WebCore:

* WebCore.exp.in:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::fontAttributesForSelectionStart):

Source/WebKit2:

We also need to update the editor state for the toggle commands to reflect the state in the UIProcess
even for commands that don't change the selection.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::executeEditCommandWithCallback):

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

7 years agobuild-webkit --inspector-frontend tries to copy files from old inspector path
burg@cs.washington.edu [Thu, 28 Aug 2014 19:19:33 +0000 (19:19 +0000)]
build-webkit --inspector-frontend tries to copy files from old inspector path
https://bugs.webkit.org/show_bug.cgi?id=136346

Reviewed by Timothy Hatcher.

Remove the old code path for copying inspector resources. It doesn't work.
Complain if this option is passed to CMake-based builds.

* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(copyInspectorFrontendFiles): Deleted.

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

7 years agoFTL should be able to do polymorphic call inlining
fpizlo@apple.com [Thu, 28 Aug 2014 19:09:48 +0000 (19:09 +0000)]
FTL should be able to do polymorphic call inlining
https://bugs.webkit.org/show_bug.cgi?id=135145

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:

Added a log-based high-fidelity call edge profiler that runs in DFG JIT (and optionally
baseline JIT) code. Used it to do precise polymorphic inlining in the FTL. Potential
inlining sites use the call edge profile if it is available, but they will still fall back
on the call inline cache and rare case counts if it's not. Polymorphic inlining means that
multiple possible callees can be inlined with a switch to guard them. The slow path may
either be an OSR exit or a virtual call.

The call edge profiling added in this patch is very precise - it will tell you about every
call that has ever happened. It took some effort to reduce the overhead of this profiling.
This mostly involved ensuring that we don't do it unnecessarily. For example, we avoid it
in the baseline JIT (you can conditionally enable it but it's off by default) and we only do
it in the DFG JIT if we know that the regular inline cache profiling wasn't precise enough.
I also experimented with reducing the precision of the profiling. This led to a significant
reduction in the speed-up, so I avoided this approach. I also explored making log processing
concurrent, but that didn't help. Also, I tested the overhead of the log processing and
found that most of the overhead of this profiling is actually in putting things into the log
rather than in processing the log - that part appears to be surprisingly cheap.

Polymorphic inlining could be enabled in the DFG if we enabled baseline call edge profiling,
and if we guarded such inlining sites with some profiling mechanism to detect
polyvariant monomorphisation opportunities (where the callsite being inlined reveals that
it's actually monomorphic).

This is a ~28% speed-up on deltablue and a ~7% speed-up on richards, with small speed-ups on
other programs as well. It's about a 2% speed-up on Octane version 2, and never a regression
on anything we care about. Some aggregates, like V8Spider, see a regression. This is
highlighting the increase in profiling overhead. But since this doesn't show up on any major
score (code-load or SunSpider), it's probably not relevant.

Relanding after fixing debug assertions in fast/storage/serialized-script-value.html.

* CMakeLists.txt:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CallEdge.cpp: Added.
(JSC::CallEdge::dump):
* bytecode/CallEdge.h: Added.
(JSC::CallEdge::operator!):
(JSC::CallEdge::callee):
(JSC::CallEdge::count):
(JSC::CallEdge::despecifiedClosure):
(JSC::CallEdge::CallEdge):
* bytecode/CallEdgeProfile.cpp: Added.
(JSC::CallEdgeProfile::callEdges):
(JSC::CallEdgeProfile::numCallsToKnownCells):
(JSC::worthDespecifying):
(JSC::CallEdgeProfile::worthDespecifying):
(JSC::CallEdgeProfile::visitWeak):
(JSC::CallEdgeProfile::addSlow):
(JSC::CallEdgeProfile::mergeBack):
(JSC::CallEdgeProfile::fadeByHalf):
(JSC::CallEdgeLog::CallEdgeLog):
(JSC::CallEdgeLog::~CallEdgeLog):
(JSC::CallEdgeLog::isEnabled):
(JSC::operationProcessCallEdgeLog):
(JSC::CallEdgeLog::emitLogCode):
(JSC::CallEdgeLog::processLog):
* bytecode/CallEdgeProfile.h: Added.
(JSC::CallEdgeProfile::numCallsToNotCell):
(JSC::CallEdgeProfile::numCallsToUnknownCell):
(JSC::CallEdgeProfile::totalCalls):
* bytecode/CallEdgeProfileInlines.h: Added.
(JSC::CallEdgeProfile::CallEdgeProfile):
(JSC::CallEdgeProfile::add):
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::visitWeak):
* bytecode/CallLinkInfo.h:
* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::computeFromLLInt):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::computeFromCallEdgeProfile):
(JSC::CallLinkStatus::computeDFGStatuses):
(JSC::CallLinkStatus::isClosureCall):
(JSC::CallLinkStatus::makeClosureCall):
(JSC::CallLinkStatus::dump):
(JSC::CallLinkStatus::function): Deleted.
(JSC::CallLinkStatus::internalFunction): Deleted.
(JSC::CallLinkStatus::intrinsicFor): Deleted.
* bytecode/CallLinkStatus.h:
(JSC::CallLinkStatus::CallLinkStatus):
(JSC::CallLinkStatus::isSet):
(JSC::CallLinkStatus::couldTakeSlowPath):
(JSC::CallLinkStatus::edges):
(JSC::CallLinkStatus::size):
(JSC::CallLinkStatus::at):
(JSC::CallLinkStatus::operator[]):
(JSC::CallLinkStatus::canOptimize):
(JSC::CallLinkStatus::canTrustCounts):
(JSC::CallLinkStatus::isClosureCall): Deleted.
(JSC::CallLinkStatus::callTarget): Deleted.
(JSC::CallLinkStatus::executable): Deleted.
(JSC::CallLinkStatus::makeClosureCall): Deleted.
* bytecode/CallVariant.cpp: Added.
(JSC::CallVariant::dump):
* bytecode/CallVariant.h: Added.
(JSC::CallVariant::CallVariant):
(JSC::CallVariant::operator!):
(JSC::CallVariant::despecifiedClosure):
(JSC::CallVariant::rawCalleeCell):
(JSC::CallVariant::internalFunction):
(JSC::CallVariant::function):
(JSC::CallVariant::isClosureCall):
(JSC::CallVariant::executable):
(JSC::CallVariant::nonExecutableCallee):
(JSC::CallVariant::intrinsicFor):
(JSC::CallVariant::functionExecutable):
(JSC::CallVariant::isHashTableDeletedValue):
(JSC::CallVariant::operator==):
(JSC::CallVariant::operator!=):
(JSC::CallVariant::operator<):
(JSC::CallVariant::operator>):
(JSC::CallVariant::operator<=):
(JSC::CallVariant::operator>=):
(JSC::CallVariant::hash):
(JSC::CallVariant::deletedToken):
(JSC::CallVariantHash::hash):
(JSC::CallVariantHash::equal):
* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::isNormalCall):
* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
* bytecode/ExitKind.h:
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeForStubInfo):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeForStubInfo):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::~BasicBlock):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::takeLast):
(JSC::DFG::BasicBlock::didLink):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::processSetLocalQueue):
(JSC::DFG::ByteCodeParser::removeLastNodeFromGraph):
(JSC::DFG::ByteCodeParser::addCallWithoutSettingResult):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::emitFunctionChecks):
(JSC::DFG::ByteCodeParser::undoFunctionChecks):
(JSC::DFG::ByteCodeParser::inliningCost):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::cancelLinkingForBlock):
(JSC::DFG::ByteCodeParser::attemptToInlineCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::prepareToParseBlock):
(JSC::DFG::ByteCodeParser::clearCaches):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::linkBlock):
(JSC::DFG::ByteCodeParser::linkBlocks):
(JSC::DFG::ByteCodeParser::parseCodeBlock):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::freeUnnecessaryNodes):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGCommon.h:
* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::getBlocksInPreOrder):
(JSC::DFG::Graph::visitChildren):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::switchLookupValue):
* dfg/DFGLazyJSValue.h:
(JSC::DFG::LazyJSValue::switchLookupValue): Deleted.
* dfg/DFGNode.cpp:
(WTF::printInternal):
* dfg/DFGNode.h:
(JSC::DFG::OpInfo::OpInfo):
(JSC::DFG::Node::hasHeapPrediction):
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::cellOperand):
(JSC::DFG::Node::setCellOperand):
(JSC::DFG::Node::canBeKnownFunction): Deleted.
(JSC::DFG::Node::hasKnownFunction): Deleted.
(JSC::DFG::Node::knownFunction): Deleted.
(JSC::DFG::Node::giveKnownFunction): Deleted.
(JSC::DFG::Node::hasFunction): Deleted.
(JSC::DFG::Node::function): Deleted.
(JSC::DFG::Node::hasExecutable): Deleted.
(JSC::DFG::Node::executable): Deleted.
* dfg/DFGNodeType.h:
* dfg/DFGPhantomCanonicalizationPhase.cpp:
(JSC::DFG::PhantomCanonicalizationPhase::run):
* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::emitSwitch):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):
* dfg/DFGTierUpCheckInjectionPhase.cpp:
(JSC::DFG::TierUpCheckInjectionPhase::run):
(JSC::DFG::TierUpCheckInjectionPhase::removeFTLProfiling):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* dfg/DFGWatchpointCollectionPhase.cpp:
(JSC::DFG::WatchpointCollectionPhase::handle):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::ftlUnreachable):
(JSC::FTL::LowerDFGToLLVM::lower):
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileCheckCell):
(JSC::FTL::LowerDFGToLLVM::compileCheckBadCell):
(JSC::FTL::LowerDFGToLLVM::compileGetExecutable):
(JSC::FTL::LowerDFGToLLVM::compileNativeCallOrConstruct):
(JSC::FTL::LowerDFGToLLVM::compileSwitch):
(JSC::FTL::LowerDFGToLLVM::buildSwitch):
(JSC::FTL::LowerDFGToLLVM::compileCheckFunction): Deleted.
(JSC::FTL::LowerDFGToLLVM::compileCheckExecutable): Deleted.
* heap/Heap.cpp:
(JSC::Heap::collect):
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::storeValue):
(JSC::AssemblyHelpers::loadValue):
* jit/CCallHelpers.h:
(JSC::CCallHelpers::setupArguments):
* jit/GPRInfo.h:
(JSC::JSValueRegs::uses):
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
* jit/JITCall32_64.cpp:
(JSC::JIT::compileOpCall):
* runtime/Options.h:
* runtime/VM.cpp:
(JSC::VM::ensureCallEdgeLog):
* runtime/VM.h:
* tests/stress/fold-profiled-call-to-call.js: Added. This test pinpoints the problem we saw in fast/storage/serialized-script-value.html.
* tests/stress/new-array-then-exit.js: Added.
* tests/stress/poly-call-exit-this.js: Added.
* tests/stress/poly-call-exit.js: Added.

Source/WTF:

Add some power that I need for call edge profiling.

* wtf/OwnPtr.h:
(WTF::OwnPtr<T>::createTransactionally):
* wtf/Spectrum.h:
(WTF::Spectrum::add):
(WTF::Spectrum::addAll):
(WTF::Spectrum::get):
(WTF::Spectrum::size):
(WTF::Spectrum::KeyAndCount::KeyAndCount):
(WTF::Spectrum::clear):
(WTF::Spectrum::removeIf):

LayoutTests:

* js/regress/script-tests/simple-poly-call-nested.js: Added.
* js/regress/script-tests/simple-poly-call.js: Added.
* js/regress/simple-poly-call-expected.txt: Added.
* js/regress/simple-poly-call-nested-expected.txt: Added.
* js/regress/simple-poly-call-nested.html: Added.
* js/regress/simple-poly-call.html: Added.

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

7 years ago[GTK] Add WaylandEventSource
zandobersek@gmail.com [Thu, 28 Aug 2014 19:03:07 +0000 (19:03 +0000)]
[GTK] Add WaylandEventSource
https://bugs.webkit.org/show_bug.cgi?id=136213

Reviewed by Martin Robinson.

Add the WaylandEventSource class. Its static method, createEventSource(),
creates a new GSource object that is attached to the main context and
enables handling Wayland display events through the GLib's main loop.

The method will be called by the nested Wayland compositor during its
initialization, which will also take the control over the ownership and
will be tasked with properly removing the GSource from the main context.

GLibSource is a GSource-based struct that additionally holds a GPollFD object
and the pointer to the wl_display object whose event loop we'll be
dispatching during the GSource dispatch. This is the type that g_source_new
uses when allocating the new GSource object.

The GSource is assigned the default priorty, can recurse, and is attached
to the main context.

* PlatformGTK.cmake:
* platform/graphics/wayland/WaylandEventSource.cpp: Added.
(WebCore::GLibSource::initialize):
(WebCore::GLibSource::check):
(WebCore::GLibSource::dispatch):
(WebCore::prepareCallback):
(WebCore::checkCallback):
(WebCore::dispatchCallback):
(WebCore::WaylandEventSource::createDisplayEventSource):
* platform/graphics/wayland/WaylandEventSource.h: Added.

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

7 years agoAX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
cfleizach@apple.com [Thu, 28 Aug 2014 18:00:33 +0000 (18:00 +0000)]
AX: Safari at com.apple.WebCore: WebCore::AXObjectCache::clearTextMarkerNodesInUse
https://bugs.webkit.org/show_bug.cgi?id=136333

Reviewed by David Kilzer.

If a Node is asked for it's Document when it's not actually in a document, it can lead to an assert/crash.
We can avoid this by checking that the node is in a document before asking for its document.

I was not able to make a test case.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::clearTextMarkerNodesInUse):

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

7 years agoASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resou...
akling@apple.com [Thu, 28 Aug 2014 17:54:31 +0000 (17:54 +0000)]
ASSERTION FAILED: !m_renderView.document().inPageCache() in compositing/iframes/resources/page-cache-helper.html
<https://webkit.org/b/136329>

Cancel any pending compositing layer updates when moving a document
into the page cache.

Reviewed by Zalan Bujtas.

* dom/Document.cpp:
(WebCore::Document::documentWillSuspendForPageCache):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::cancelCompositingLayerUpdate):
* rendering/RenderLayerCompositor.h:

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

7 years agoDashboard metrics page could show longest stretch of red
ap@apple.com [Thu, 28 Aug 2014 17:26:08 +0000 (17:26 +0000)]
Dashboard metrics page could show longest stretch of red
https://bugs.webkit.org/show_bug.cgi?id=136334

Reviewed by Sam Weinig.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._updateStretchOfRedCounters):
(Analyzer.prototype._countPercentageOfGreen):
When counting percentage of green, also keep track of how long the page was red.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js:
(MetricsView.prototype._update.addDivider):
(MetricsView.prototype._update.appendQueueResults):
Show it in aggregate queues (can't think of a reason to have it in individual ones).

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css:
Changed to use an explicit divider element between green time and performance groups,
as there are too many combinations to easily express in CSS.

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

7 years agoWebInspectorUI.framework is not built for the "All Source" Xcode scheme
burg@cs.washington.edu [Thu, 28 Aug 2014 17:22:59 +0000 (17:22 +0000)]
WebInspectorUI.framework is not built for the "All Source" Xcode scheme
https://bugs.webkit.org/show_bug.cgi?id=136343

Reviewed by David Kilzer.

The "build" and "run" actions in Xcode should copy over the latest Inspector resources.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
* WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

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

7 years ago[Win] Adjust build order to reduce flakiness.
bfulgham@apple.com [Thu, 28 Aug 2014 16:00:53 +0000 (16:00 +0000)]
[Win] Adjust build order to reduce flakiness.

* WebKit.vcxproj/WebKit.sln: Make sure WebCoreGenerated doesn't
  start until the last JSC tool has finished building.

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

7 years agoCorrect GC length unit and prevent division by 0 in showObjectStatistics.
julien.brianceau@gmail.com [Thu, 28 Aug 2014 14:22:25 +0000 (14:22 +0000)]
Correct GC length unit and prevent division by 0 in showObjectStatistics.
https://bugs.webkit.org/show_bug.cgi?id=136340

Reviewed by Mark Hahnenberg.

* heap/HeapStatistics.cpp:
(JSC::HeapStatistics::showObjectStatistics):

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

7 years ago[CSSSRegions] Incorrect selection clearing on a document without regions
mihnea@adobe.com [Thu, 28 Aug 2014 13:25:02 +0000 (13:25 +0000)]
[CSSSRegions] Incorrect selection clearing on a document without regions
https://bugs.webkit.org/show_bug.cgi?id=134901

Reviewed by David Hyatt.

Source/WebCore:

When we select all the content of document with named flows but without regions,
the start and end points of selection is cached in RenderView. However, since
the document has named flows, the selection is split between the subtrees. During the split,
it is possible that the cached end-points of the original selection are not included
in any of the resulting subtree selection and they are not marked accordingly.
In order to process the selection clearing correctly, we have to take the original
selection end-points into account.

Test: fast/regions/selection/select-all-without-regions.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::isSelectionBorder):

LayoutTests:

* fast/regions/selection/select-all-without-regions-expected.txt: Added.
* fast/regions/selection/select-all-without-regions.html: Added.

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

7 years ago[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
carlosgc@webkit.org [Thu, 28 Aug 2014 13:11:21 +0000 (13:11 +0000)]
[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=136248

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Move the code to update the SoupMessageHeaders to a new public
method.

* platform/network/soup/ResourceResponse.h:
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateSoupMessageHeaders):
(WebCore::ResourceResponse::toSoupMessage):

Source/WebKit2:

Add webkit_uri_response_get_http_headers() that returns the HTTP
headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().

* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkitURIResponseGetProperty): Add http-headers property getter.
(webkit_uri_response_class_init): Add http-headers property.
(webkit_uri_response_get_http_headers): Return the HTTP headers as
a SoupMessageHeaders* or NULL for non HTTP responses.
* UIProcess/API/gtk/WebKitURIResponse.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.

Tools:

Add new test case for webkit_uri_response_get_http_headers().

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testURIResponseHTTPHeaders):
(serverCallback):
(beforeAll):

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

7 years ago[GTK] Remove support for GTK+2 theme rendering
carlosgc@webkit.org [Thu, 28 Aug 2014 09:13:58 +0000 (09:13 +0000)]
[GTK] Remove support for GTK+2 theme rendering
https://bugs.webkit.org/show_bug.cgi?id=136285

Reviewed by Philippe Normand.

GTK+2 is only used by the plugin process that doesn't need to
render html controls themed. Since the theme files are still
built for WebCorePlatformGTK2, we need to provide dummy
implementations for the pure virtual methods when
GTK_API_VERSION_2 is defined.

* PlatformGTK.cmake: Remove deleted files from compilation.
* platform/gtk/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::create):
(WebCore::RenderTheme::themeForPage):
(WebCore::getScreenDPI):
(WebCore::RenderThemeGtk::systemFont):
(WebCore::RenderThemeGtk::sliderTickSize):
(WebCore::RenderThemeGtk::sliderTickOffsetFromTrackCenter):
(WebCore::RenderThemeGtk::getScreenDPI): Deleted.
* platform/gtk/RenderThemeGtk.h:
* platform/gtk/RenderThemeGtk2.cpp: Removed.
* platform/gtk/RenderThemeGtk3.cpp:
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::hasThumb):
(WebCore::ScrollbarThemeGtk::backButtonRect):
(WebCore::ScrollbarThemeGtk::forwardButtonRect):
(WebCore::ScrollbarThemeGtk::trackRect):
(WebCore::ScrollbarThemeGtk::registerScrollbar):
(WebCore::ScrollbarThemeGtk::unregisterScrollbar):
(WebCore::ScrollbarThemeGtk::updateScrollbarsFrameThickness):
* platform/gtk/ScrollbarThemeGtk.h:
* platform/gtk/ScrollbarThemeGtk2.cpp: Removed.
* platform/gtk/WidgetRenderingContext.cpp: Removed.
* platform/gtk/WidgetRenderingContext.h: Removed.

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

7 years agoList Iago Toral <itoral@igalia.com> as the co-author of r172856 anr r173052 in the...
zandobersek@gmail.com [Thu, 28 Aug 2014 08:02:46 +0000 (08:02 +0000)]
List Iago Toral <itoral@igalia.com> as the co-author of r172856 anr r173052 in the ChangeLog entries.

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