WebKit-https.git
6 years agoLiveNodeLists should use ElementDescendantIterator
antti@apple.com [Sun, 30 Mar 2014 08:32:13 +0000 (08:32 +0000)]
LiveNodeLists should use ElementDescendantIterator
https://bugs.webkit.org/show_bug.cgi?id=130931

Reviewed by Andreas Kling.

Make LiveNodeList traversal use the common DOM tree iterator.

* dom/ChildNodeList.cpp:
(WebCore::ChildNodeList::ChildNodeList):
(WebCore::ChildNodeList::collectionBegin):
(WebCore::ChildNodeList::collectionTraverseForward):
(WebCore::ChildNodeList::collectionTraverseBackward):
(WebCore::ChildNodeList::invalidateCache):
(WebCore::ChildNodeList::collectionFirst): Deleted.

    Iterator for ChildNodeList is still just Node*.

* dom/ChildNodeList.h:
* dom/CollectionIndexCache.h:
(WebCore::CollectionIndexCache::hasValidCache):
(WebCore::Iterator>::CollectionIndexCache):
(WebCore::Iterator>::nodeCount):
(WebCore::Iterator>::computeNodeCountUpdatingListCache):
(WebCore::Iterator>::traverseBackwardTo):
(WebCore::Iterator>::traverseForwardTo):
(WebCore::Iterator>::nodeAt):
(WebCore::Iterator>::invalidate):

    Make CollectionIndexCache iterator based instead of using NodeType*. The iterator type may
    still be a Node* though.

(WebCore::NodeType>::CollectionIndexCache): Deleted.
(WebCore::NodeType>::nodeCount): Deleted.
(WebCore::NodeType>::computeNodeCountUpdatingListCache): Deleted.
(WebCore::NodeType>::nodeBeforeCached): Deleted.
(WebCore::NodeType>::nodeAfterCached): Deleted.
(WebCore::NodeType>::nodeAt): Deleted.
(WebCore::NodeType>::invalidate): Deleted.
* dom/ElementDescendantIterator.h:
(WebCore::ElementDescendantIterator::operator--):

    Add backward iteration support.

(WebCore::ElementDescendantIteratorAdapter::last):
(WebCore::ElementDescendantConstIteratorAdapter::last):

    Add a way to get the last item.
    Provide std::iterator_traits so we can extract the type.

* dom/LiveNodeList.h:
(WebCore::CachedLiveNodeList::collectionEnd):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
(WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
(WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
(WebCore::CachedLiveNodeList<NodeListType>::collectionFirst): Deleted.

    Make LiveNodeList traversal use ElementDescendantIterator.

(WebCore::nextMatchingElement): Deleted.
(WebCore::previousMatchingElement): Deleted.
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::HTMLCollection):
(WebCore::HTMLCollection::~HTMLCollection):
(WebCore::HTMLCollection::collectionBegin):
(WebCore::HTMLCollection::collectionTraverseForward):
(WebCore::HTMLCollection::collectionTraverseBackward):
(WebCore::HTMLCollection::invalidateCache):
(WebCore::HTMLCollection::collectionFirst): Deleted.
* html/HTMLCollection.h:
(WebCore::HTMLCollection::collectionEnd):

    HTMLCollection still uses Element* as iterator for now.

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

6 years agoUnreviewed, rolling out r166434.
commit-queue@webkit.org [Sun, 30 Mar 2014 06:01:08 +0000 (06:01 +0000)]
Unreviewed, rolling out r166434.
https://bugs.webkit.org/show_bug.cgi?id=130938

Caused crashes and other failures on cache tests (Requested by
ap on #webkit).

Reverted changeset:

Source/WebCore:

"Web Replay: add page-level setting to bypass the MemoryCache"
https://bugs.webkit.org/show_bug.cgi?id=130728
http://trac.webkit.org/changeset/166434

Source/WebKit2:

"Web Replay: add page-level setting to bypass the MemoryCache"
https://bugs.webkit.org/show_bug.cgi?id=130728
http://trac.webkit.org/changeset/166434

LayoutTests:

"Web Replay: add page-level setting to bypass the MemoryCache"
https://bugs.webkit.org/show_bug.cgi?id=130728
http://trac.webkit.org/changeset/166434

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

6 years agoUpdate WebKit1.StringTruncator for Mountain Lion.
ap@apple.com [Sun, 30 Mar 2014 05:57:40 +0000 (05:57 +0000)]
Update WebKit1.StringTruncator for Mountain Lion.

* TestWebKitAPI/Tests/mac/StringTruncator.mm: Looks like one subtest was failing
due to different font metrics on 10.8.

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

6 years agoPreserve selection end positions in directionOfSelection
ddkilzer@apple.com [Sat, 29 Mar 2014 23:18:31 +0000 (23:18 +0000)]
Preserve selection end positions in directionOfSelection
<http://webkit.org/b/104813>
<rdar://problem/13666417>

Reviewed by Brent Fulgham.

Merged from Blink (patch by kenrb@chromium.org):
https://src.chromium.org/viewvc/blink?revision=150621&view=revision
http://crbug.com/164263

    VisibleSelection::visibleStart() and VisibleSelection::visibleEnd()
    can both cause layouts, which has the potential to invalidate any
    rendertree-based objects. This was causing a problem in
    FrameSelection::directionOfSelection(), where a reference to a
    lineBox was being held across a call to visibleEnd().

    This patch ensures that the any layout is completed before linebox
    references are retrieved.

Source/WebCore:

Test: editing/selection/layout-during-move-selection-crash.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::directionOfSelection):

LayoutTests:

* editing/selection/layout-during-move-selection-crash-expected.txt: Added.
* editing/selection/layout-during-move-selection-crash.html: Added.

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

6 years agoSubpixel rendering: Simple line layout should not round to integral position while...
zalan@apple.com [Sat, 29 Mar 2014 22:36:46 +0000 (22:36 +0000)]
Subpixel rendering: Simple line layout should not round to integral position while painting.
https://bugs.webkit.org/show_bug.cgi?id=130934

Reviewed by Simon Fraser.

Remove rounding to integral position. When RenderLayer is injected and hides subpixel positions,
integral rounding produces different paint position.

Source/WebCore:

Test: fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition.html

* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintFlow):

LayoutTests:

* fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition-expected.html: Added.
* fast/flexbox/hidpi-simple-line-layout-with-flexbox-and-transition.html: Added.

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

6 years agoSubpixel rendering: Make GraphicsContext::drawImageBuffer* functions float based.
zalan@apple.com [Sat, 29 Mar 2014 21:53:51 +0000 (21:53 +0000)]
Subpixel rendering: Make GraphicsContext::drawImageBuffer* functions float based.
https://bugs.webkit.org/show_bug.cgi?id=130932

Reviewed by Simon Fraser.

This is in preparation to support device pixel based filter painting.
Filter calculation is still integral based.

No change in behavior.

* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawImageBuffer):
* platform/graphics/GraphicsContext.h:
* platform/graphics/filters/FilterEffect.cpp: This will eventually be fully float based.
Right now, this IntRect->FloatRect change is only to ensure that we can call
the float based drawImageBuffer().
(WebCore::FilterEffect::drawingRegionOfInputImage):
* platform/graphics/filters/FilterEffect.h:

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

6 years agoConvert yet more of HTMLConverter to C++
weinig@apple.com [Sat, 29 Mar 2014 20:03:15 +0000 (20:03 +0000)]
Convert yet more of HTMLConverter to C++
https://bugs.webkit.org/show_bug.cgi?id=130850

Reviewed by Anders Carlsson.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::isAncestorsOfStartToBeConverted):
(HTMLConverter::HTMLConverter):
(HTMLConverter::~HTMLConverter):
(HTMLConverter::convert):
(HTMLConverter::computedAttributesForElement):
(HTMLConverter::attributesForElement):
(HTMLConverter::_newParagraphForElement):
(HTMLConverter::_newLineForElement):
(HTMLConverter::_newTabForElement):
(HTMLConverter::_addAttachmentForElement):
(HTMLConverter::_addQuoteForElement):
(HTMLConverter::_addValue):
(HTMLConverter::_processHeadElement):
(HTMLConverter::_enterElement):
(HTMLConverter::_addTableCellForElement):
(HTMLConverter::_processElement):
(HTMLConverter::_addMarkersToList):
(HTMLConverter::_exitElement):
(HTMLConverter::_processText):
(HTMLConverter::_traverseNode):
(HTMLConverter::_traverseFooterNode):
(WebCore::attributedStringFromRange):
(_childrenForNode): Deleted.
(HTMLConverter::_computedAttributesForElement): Deleted.
(HTMLConverter::_attributesForElement): Deleted.
(HTMLConverter::_loadFromDOMRange): Deleted.

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

6 years agoTweak ChangeLog
andersca@apple.com [Sat, 29 Mar 2014 17:54:31 +0000 (17:54 +0000)]
Tweak ChangeLog

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

6 years agoUncatched NSExceptions should crash the web process
andersca@apple.com [Sat, 29 Mar 2014 16:14:44 +0000 (16:14 +0000)]
Uncatched NSExceptions should crash the web process
https://bugs.webkit.org/show_bug.cgi?id=130923
<rdar://problem/16463751>

Reviewed by Dan Bernstein.

* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

6 years agoUnreviewed buildfix after r166441 and r166443.
ossy@webkit.org [Sat, 29 Mar 2014 07:13:52 +0000 (07:13 +0000)]
Unreviewed buildfix after r166441 and r166443.

Source/WebCore:

* CMakeLists.txt: Add platform/audio/AudioHardwareListener.cpp.

Source/WebKit2:

Missing PLATFORM(COCOA) guards added.

* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginProxy.h:

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

6 years ago[CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
commit-queue@webkit.org [Sat, 29 Mar 2014 05:44:08 +0000 (05:44 +0000)]
[CSS Grid Layout] The 'auto' height must be adapted to the item's margin.
https://bugs.webkit.org/show_bug.cgi?id=130920

Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-03-28
Reviewed by Darin Adler.

Source/WebCore:

Adding the grid-item's marginLogicalHeight to the used breadth when computing
content based grid-track sizes.

Test: fast/css-grid-layout/grid-item-margin-auto-columns-rows.html

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

LayoutTests:

* fast/css-grid-layout/grid-item-margin-auto-columns-rows-expected.txt: Added.
* fast/css-grid-layout/grid-item-margin-auto-columns-rows.html: Added.

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

6 years agoWeb Inspector: AXI: support for live regions
commit-queue@webkit.org [Sat, 29 Mar 2014 05:33:33 +0000 (05:33 +0000)]
Web Inspector: AXI: support for live regions
https://bugs.webkit.org/show_bug.cgi?id=130725

Patch by James Craig <jcraig@apple.com> on 2014-03-28
Reviewed by Timothy Hatcher.

Source/WebCore:

Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
       inspector-protocol/dom/getAccessibilityPropertiesForNode_liveRegion.html

Initial support for @aria-live, @aria-atomic, and @aria-busy.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

Initial support for @aria-live, @aria-atomic, and @aria-busy.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
* UserInterface/Views/Main.css:

Websites/webkit.org:

Demo update to show off the new Inspector support for live regions.

* blog-files/aria1.0/combobox_with_live_region_status.html:

LayoutTests:

Initial support for @aria-live, @aria-atomic, and @aria-busy.

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

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

6 years agoSource/WebCore: Fix recently-introduced off-by-one error in centerTruncateToBuffer
darin@apple.com [Sat, 29 Mar 2014 03:18:27 +0000 (03:18 +0000)]
Source/WebCore: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889
<rdar://problem/16408694>

Reviewed by Alexey Proskuryakov.

* platform/graphics/StringTruncator.cpp:
(WebCore::centerTruncateToBuffer): Simplified expression that computes truncatedLength.
Removed incorrect "+ 1" from computation of where to write characters.

Source/WebKit/mac: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889

Reviewed by Alexey Proskuryakov.

* Misc/WebStringTruncator.mm:
(defaultMenuFont): Changed to use NeverDestroyed since I had to touch this file anyway.
(fontFromNSFont): Ditto. Also improved variable names a bit.
(+[WebStringTruncator initialize]): Added threading initialization, needed for main
thread assertions in string truncator code.

Tools: Fix recently-introduced off-by-one error in centerTruncateToBuffer
https://bugs.webkit.org/show_bug.cgi?id=130889

Reviewed by Alexey Proskuryakov.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added StringTruncator.mm.
* TestWebKitAPI/Tests/mac/StringTruncator.mm: Added. One test for each of the
WebStringTruncator methods; should be good for a start. These are dependent on the
metrics of Helvetica 12, but I am hoping that will be consistent across OS X machines.

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

6 years agoUpdate the code related to SelectorPseudoTypeMap to reflect its new purpose
benjamin@webkit.org [Sat, 29 Mar 2014 03:08:59 +0000 (03:08 +0000)]
Update the code related to SelectorPseudoTypeMap to reflect its new purpose
https://bugs.webkit.org/show_bug.cgi?id=130620

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

Since r166094, SelectorPseudoTypeMap only contains PseudoClass instances and the 4 compatibility PseudoElement.

This patch rename SelectorPseudoTypeMap to SelectorPseudoClassAndCompatibilityElementMap and update the parsing
to split PseudoClass and PseudoElement.

* CMakeLists.txt:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSGrammar.y.in:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector):
(WebCore::CSSParserSelector::setPseudoClassValue):
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
(WebCore::appendPseudoClassFunctionTail):
(WebCore::CSSSelector::selectorText):
* css/SelectorPseudoClassAndCompatibilityElementMap.in: Renamed from Source/WebCore/css/SelectorPseudoTypeMap.in.
* css/SelectorPseudoTypeMap.h:
* css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Renamed from Source/WebCore/css/makeSelectorPseudoTypeMap.py.
(enumerablePseudoType):
(expand_ifdef_condition):

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

6 years agoUnreviewed build fix.
slewis@apple.com [Sat, 29 Mar 2014 02:46:45 +0000 (02:46 +0000)]
Unreviewed build fix.

* platform/audio/AudioHardwareListener.cpp:
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListener::audioHardwareListenerIsSupported): Deleted.
* platform/audio/AudioHardwareListener.h:

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

6 years agoRefactor cut and copy functions as suggested in FIXME line
commit-queue@webkit.org [Sat, 29 Mar 2014 02:26:53 +0000 (02:26 +0000)]
Refactor cut and copy functions as suggested in FIXME line
https://bugs.webkit.org/show_bug.cgi?id=129867

Patch by Lukasz Bialek <l.bialek@samsung.com> on 2014-03-28
Reviewed by Darin Adler.

Cut and Copy functions in Editor.cpp use lots of common code.
Those functions are merged into one to share code, several
additional conditions are added to preserve Cut and Copy
functionality.

* editing/Editor.cpp:
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::performCutOrCopy):
* editing/Editor.h:

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

6 years agoDon't prevent AppSleep from sync messages.
slewis@apple.com [Sat, 29 Mar 2014 01:15:50 +0000 (01:15 +0000)]
Don't prevent AppSleep from sync messages.
https://bugs.webkit.org/show_bug.cgi?id=130747.

Reviewed by Anders Carlsson.

We think sync messages only need to happen full throttle when the plugin is visible,
the user is interacting with the plugin, or audio is playing.  Since we already
take assertions for all these cases the assertion in sync messages doesn’t provide
any value.  Since it can keep the PluginProcess awake in other instances remove it.

* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveSyncMessage):

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

6 years agoSource/WebCore: Rename pluginDidEvaluate to better represent when it’s called.
slewis@apple.com [Sat, 29 Mar 2014 01:15:49 +0000 (01:15 +0000)]
Source/WebCore: Rename pluginDidEvaluate to better represent when it’s called.
Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.

Reviewed by Anders Carlsson.

No new test because it’s just a name change.

* page/PageThrottler.h:
(WebCore::PageThrottler::pluginDidEvaluateWhileAudioIsPlaying):

Source/WebKit2: Stop waking up the web process in the background because of plugin activity.
Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.

Reviewed by Anders Carlsson.

Plugin activity in the background can constantly wake up web processes.  This is only
necessary when audio is playing to support web apps like Pandora and youtube playing
in the background.  Use a new api in CoreAudio to see if there is audio playing in
the PluginProcess.

* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess): Add a AudioHardwareListener
(WebKit::PluginProcess::createWebProcessConnection): tell web process current state
(WebKit::PluginProcess::audioHardwareDidBecomeActive): respond to audio hardware notifications
(WebKit::PluginProcess::audioHardwareDidBecomeInactive):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp: tell WebProcess when audio state in PluginProcess
     changes.
(WebKit::WebProcessConnection::audioHardwareDidBecomeActive):
(WebKit::WebProcessConnection::audioHardwareDidBecomeInactive):
* PluginProcess/WebProcessConnection.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
     Only invoke pageThrottler activity when playing audio
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/Plugin.h: add function to get audio state
(WebKit::Plugin::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginProcessConnection.cpp: store audio state
(WebKit::PluginProcessConnection::PluginProcessConnection):
(WebKit::PluginProcessConnection::didReceiveMessage):
(WebKit::PluginProcessConnection::audioHardwareDidBecomeActive):
(WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::audioIsPlaying):
* WebProcess/Plugins/PluginProcessConnection.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginView.h:

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

6 years agoNotification handler for telling if audio hardware is active.
slewis@apple.com [Sat, 29 Mar 2014 01:15:47 +0000 (01:15 +0000)]
Notification handler for telling if audio hardware is active.
https://bugs.webkit.org/show_bug.cgi?id=130743

Reviewed by Jer Noble.

Not web-exposed so no easy way to test.

Listen to CoreAudio to see if audio hardware is active in the current process.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/audio/AudioHardwareListener.cpp: Added.
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListener::AudioHardwareListener):
* platform/audio/AudioHardwareListener.h: Added.
(WebCore::AudioHardwareListener::Client::~Client):
(WebCore::AudioHardwareListener::~AudioHardwareListener):
(WebCore::AudioHardwareListener::isHardwareActive):
* platform/audio/mac/AudioHardwareListenerMac.cpp: Added.
(WebCore::isAudioHardwareProcessRunning):
(WebCore::AudioHardwareListener::create):
(WebCore::AudioHardwareListenerMac::create):
(WebCore::AudioHardwareListenerMac::AudioHardwareListenerMac):
(WebCore::AudioHardwareListenerMac::~AudioHardwareListenerMac):
(WebCore::AudioHardwareListenerMac::setHardwareActive):
* platform/audio/mac/AudioHardwareListenerMac.h: Added.

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

6 years agoHave the plugin process track visibility of it’s plugin and sleep when none
slewis@apple.com [Sat, 29 Mar 2014 01:15:44 +0000 (01:15 +0000)]
Have the plugin process track visibility of it’s plugin and sleep when none
are visible.
Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
https://bugs.webkit.org/show_bug.cgi?id=130694

Reviewed by Anders Carlsson.

Currently AppSleep is enabled on the PluginProcess based on web page visibility.
Add visibility tracking to plugins and move the decision to AppSleep into the the
PluginProcess

* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess): Add a new activity for visible plugins
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): take an activity
     assertion if any web processes have a visible plugin.
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::removePluginControllerProxy): remove plugin from
    visible plugins when destroying it
(WebKit::WebProcessConnection::pluginDidBecomeVisible):
(WebKit::WebProcessConnection::pluginDidBecomeHidden): track which plugins are
    visible for each web process
* PluginProcess/WebProcessConnection.h:
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::windowVisibilityChanged): notify WebProcessConnection
    when visibility changed.
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:  instead of tracking plugin app sleep state on the web pref.
    and visibility state, just use the web pref.
(WebKit::WebContext::updateProcessSuppressionState):
(WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts):

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

6 years agomandreel throws a checksum error on 32-bit x86.
mark.lam@apple.com [Sat, 29 Mar 2014 00:37:10 +0000 (00:37 +0000)]
mandreel throws a checksum error on 32-bit x86.
<https://webkit.org/b/125706>

Reviewed by Filip Pizlo.

The 32-bit DFG can emit code that loads double constants from its
CodeBlock's m_constantRegisters vector.  The emitted instruction will
embed the address of the constant from the vector's backing store.
Subsequently, while inserting new constants, the DFG may resize the
vector, thereby reallocating the backing store.  This renders the
previously embedded constant addresses stale.

The fix is to use a dedicated doubles constant pool stored in the DFG
CommonData instead.  This constant pool won't be reallocated, and
hence will not manifest this issue.

* dfg/DFGCommonData.h:
* dfg/DFGGraph.h:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
(JSC::DFG::JITCompiler::addressOfDoubleConstant):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::addressOfDoubleConstant): Deleted.

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

6 years agoWeb Inspector: console.warn is showing as error instead of warning
commit-queue@webkit.org [Sat, 29 Mar 2014 00:30:39 +0000 (00:30 +0000)]
Web Inspector: console.warn is showing as error instead of warning
https://bugs.webkit.org/show_bug.cgi?id=130921

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

Source/JavaScriptCore:

* runtime/ConsolePrototype.cpp:
(JSC::consoleProtoFuncWarn):
console.warn should be MessageLevel Warning, not Error.

Source/WebInspectorUI:

* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._incrementConsoleMessageType):
Use our enums instead of hardcoded strings.

LayoutTests:

Add a test for console.log, warn, error, etc to make sure they get
to the frontend with the expected source and level.

* inspector-protocol/console/console-message-expected.txt: Added.
* inspector-protocol/console/console-message.html: Added.

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

6 years agoWeb Inspector: AXI: expose what elements get generic "clickable" status
commit-queue@webkit.org [Sat, 29 Mar 2014 00:17:02 +0000 (00:17 +0000)]
Web Inspector: AXI: expose what elements get generic "clickable" status
https://bugs.webkit.org/show_bug.cgi?id=130721

Patch by James Craig <jcraig@apple.com> on 2014-03-28
Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
Test: inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html

Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.

Update AccessibilityNodeObject::mouseButtonListener() to optionally return body element if
    requested so that Web Inspector can display body event delegate handlers.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::mouseButtonListener):
* accessibility/AccessibilityNodeObject.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.

* Localizations/en.lproj/localizedStrings.js: New "Mouse Event" string.
* UserInterface/Models/DOMNode.js: Added nodeId and mouseEventNodeId.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js: UI for new detail row.

LayoutTests:

Expose ancestor element link to "Click Listener" or generic "Clickable: Yes" if current node has mouse handler.

* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html: Simple coverage of mouseEventNodeId.
* inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId-expected.txt: Added.
* inspector-protocol/dom/getAccessibilityPropertiesForNode_mouseEventNodeId.html: Added. Full coverage.

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

6 years agoUnreviewed. Add myself as a committer.
mhock@apple.com [Fri, 28 Mar 2014 23:40:45 +0000 (23:40 +0000)]
Unreviewed. Add myself as a committer.

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

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

6 years agoWeb Inspector: Really drop all locks in nested run loop on iOS if WebThread is enabled
commit-queue@webkit.org [Fri, 28 Mar 2014 23:31:39 +0000 (23:31 +0000)]
Web Inspector: Really drop all locks in nested run loop on iOS if WebThread is enabled
https://bugs.webkit.org/show_bug.cgi?id=130912

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

Previously we were calling DropAllLocks inside of a single line if statement,
so the JSLock was getting reaquired very quickly. We really want to DropAllLocks
for the duration of running the nested run loop on iOS if there is a WebThread.

* bindings/js/PageScriptDebugServer.h:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::runEventLoopWhilePaused):
(WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal):

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

6 years ago[Win] Enable Media Track testing features on Windows
bfulgham@apple.com [Fri, 28 Mar 2014 23:06:11 +0000 (23:06 +0000)]
[Win] Enable Media Track testing features on Windows
https://bugs.webkit.org/show_bug.cgi?id=130851

Reviewed by Eric Carlson.

* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState): Execute code on Windows as well.
(WebCore::Internals::Internals): Ditto.
(WebCore::Internals::captionsStyleSheetOverride): Ditto.
(WebCore::Internals::setCaptionsStyleSheetOverride): Ditto.
(WebCore::Internals::setPrimaryAudioTrackLanguageOverride): Ditto.
(WebCore::Internals::setCaptionDisplayMode): Ditto.

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

6 years agoWeb Replay: add page-level setting to bypass the MemoryCache
bburg@apple.com [Fri, 28 Mar 2014 22:46:27 +0000 (22:46 +0000)]
Web Replay: add page-level setting to bypass the MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=130728

Reviewed by Timothy Hatcher.

Source/WebCore:

When replaying a specific Page we don't want to store its cached resources in the
MemoryCache. This patch adds a page setting to prevent the page's resources from
being saved in the MemoryCache.

If Settings::usesMemoryCache() is false, page resources are given the special
SessionID bypassCacheSessionID(). The cached resource loader and memory cache
act as if the memory cache is disabled if the resource has this special session id.

Hook up ReplayController to override the memory cache setting during capture/replay.

Test: http/tests/cache/bypass-memory-cache-after-reload.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::revalidateResource):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::add):
* page/Page.cpp:
(WebCore::Page::sessionID):
* page/SessionID.h:
(WebCore::SessionID::bypassCacheSessionID):
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setUsesMemoryCache):
(WebCore::Settings::usesMemoryCache):
* replay/ReplayController.cpp:
(WebCore::ReplayController::setForceDeterministicSettings):
* replay/ReplayController.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setUsesMemoryCache):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit2:

* UIProcess/APISession.cpp:
(API::generateID): update the base ID for generating unique sessions.

LayoutTests:

Mac WebKit2 needs different expectations because of resource load timing characteristics
introduced by the interaction of Settings::usesMemoryCache and NetworkProcess.

* http/tests/cache/bypass-memory-cache-after-reload-expected.txt: Added.
* http/tests/cache/bypass-memory-cache-after-reload.html: Added.
* platform/mac-wk2/http/tests/cache/bypass-memory-cache-after-reload-expected.txt: Added.

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

6 years agoAdd willSubmitForm callback support to WKWebProcessPlugInFormDelegatePrivate.
commit-queue@webkit.org [Fri, 28 Mar 2014 22:31:48 +0000 (22:31 +0000)]
Add willSubmitForm callback support to WKWebProcessPlugInFormDelegatePrivate.

https://bugs.webkit.org/show_bug.cgi?id=130875

Patch by Cody Krieger <cjk@apple.com> on 2014-03-28
Reviewed by Anders Carlsson.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
Add -_webProcessPlugInBrowserContextController:willSubmitForm:toFrame:fromFrame:withValues:
to the WKWebProcessPlugInFormDelegatePrivate protocol.

* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
Wire up the willSubmitForm() callback to the new
WKWebProcessPlugInFormDelegatePrivate method.

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

6 years ago[Mac] Enable async text input implementation
ap@apple.com [Fri, 28 Mar 2014 22:09:35 +0000 (22:09 +0000)]
[Mac] Enable async text input implementation
https://bugs.webkit.org/show_bug.cgi?id=130856

Reviewed by Sam Weinig.

Source/WebKit2:

* UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
Temporarily work around <rdar://16393434>.

Source/WTF:

* wtf/Platform.h: Added a USE macro definition.

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

6 years agoMove sync CancelComposition message under an ifdef
ap@apple.com [Fri, 28 Mar 2014 22:07:36 +0000 (22:07 +0000)]
Move sync CancelComposition message under an ifdef
https://bugs.webkit.org/show_bug.cgi?id=130908

Reviewed by Enrica Casucci.

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::cancelComposition): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:

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

6 years ago[iOS] Don't cancel composition on selection change
ap@apple.com [Fri, 28 Mar 2014 22:06:08 +0000 (22:06 +0000)]
[iOS] Don't cancel composition on selection change
https://bugs.webkit.org/show_bug.cgi?id=130909

Reviewed by Enrica Casucci.

Fixing a recent regression from bug 130727.

* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):

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

6 years ago[WK2] Removed unused method logChannelByName.
pmolnar.u-szeged@partner.samsung.com [Fri, 28 Mar 2014 21:58:24 +0000 (21:58 +0000)]
[WK2] Removed unused method logChannelByName.
https://bugs.webkit.org/show_bug.cgi?id=130897

Reviewed by Anders Carlsson.

* Platform/Logging.cpp:
(WebKit::logChannelByName): Deleted.
* Platform/Logging.h:

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

6 years agoIn some situations, partial layouts of floating elements produce incorrect results.
stavila@adobe.com [Fri, 28 Mar 2014 21:55:46 +0000 (21:55 +0000)]
In some situations, partial layouts of floating elements produce incorrect results.
https://bugs.webkit.org/show_bug.cgi?id=122668

Reviewed by David Hyatt.

Source/WebCore:

When performing partial layout of float elements and checking if other float
elements are encountered, incorrect results were obtained by not checking
the size of the existing floats vector.

Test: fast/block/float/floats-in-clean-line-crash.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::checkFloatsInCleanLine):

LayoutTests:

Added test to ensure an assertion is not reached when performing a partial
layout of float elements in certain situations.

* fast/block/float/floats-in-clean-line-crash-expected.txt: Added.
* fast/block/float/floats-in-clean-line-crash.html: Added.

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

6 years agoRemove WebKit1 GTK+ bots
mrobinson@webkit.org [Fri, 28 Mar 2014 21:38:25 +0000 (21:38 +0000)]
Remove WebKit1 GTK+ bots
https://bugs.webkit.org/show_bug.cgi?id=130904

Reviewed by Anders Carlsson.

* BuildSlaveSupport/build.webkit.org-config/config.json: Remove references to GTK+ WebKit1 test bot and ensure
all bots are testing WebKit2 only.
* Scripts/webkitpy/common/config/ews.json: Remove references to GTK+ WK1 EWS.
* Scripts/webkitpy/common/config/ports.py: Remove references to GTK+ WK1 bots.
* Scripts/webkitpy/common/config/ports_unittest.py: Ditto.
* Scripts/webkitpy/port/builders.py: Ditto.
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py: Ditto.
* TestResultServer/static-dashboards/builders.jsonp: Ditto.

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

6 years agoRemove Brian Burg's apple.com email address.
timothy@apple.com [Fri, 28 Mar 2014 21:20:34 +0000 (21:20 +0000)]
Remove Brian Burg's apple.com email address.

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

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

6 years agoUnreviewed gardening. Make WebVTT tests less flaky by ensuring captions are set to...
bfulgham@apple.com [Fri, 28 Mar 2014 21:19:45 +0000 (21:19 +0000)]
Unreviewed gardening. Make WebVTT tests less flaky by ensuring captions are set to display
in each test, rather than relying on earlier tests turning captions on. This caused tests to
fail if run out of order.

* media/track/regions-webvtt/vtt-region-display.html: Turn captions on.
* media/track/regions-webvtt/vtt-region-dom-layout.html: Ditto.

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

6 years agoBuild fix.
bdakin@apple.com [Fri, 28 Mar 2014 21:12:09 +0000 (21:12 +0000)]
Build fix.

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

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

6 years ago[MSE] Implement support for SourceBuffer.remove()
jer.noble@apple.com [Fri, 28 Mar 2014 20:08:51 +0000 (20:08 +0000)]
[MSE] Implement support for SourceBuffer.remove()
https://bugs.webkit.org/show_bug.cgi?id=121562

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-source/media-source-remove.html

Add support for SourceBuffer.remove().

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::SourceBuffer): Initialize new member variables.
(WebCore::SourceBuffer::setTimestampOffset): Update comments to match spec.
(WebCore::SourceBuffer::remove): Added; start removeTimer.
(WebCore::SourceBuffer::abortIfUpdating): Cancel removeTimer.
(WebCore::SourceBuffer::removedFromMediaSource): Call abortIfUpdating().
(WebCore::SourceBuffer::stop): Cancel removeTimer.
(WebCore::SourceBuffer::removeCodedFrames): Added.
(WebCore::SourceBuffer::removeTimerFired): Added.
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/SourceBuffer.idl:

LayoutTests:

* media/media-source/media-source-remove-expected.txt: Added.
* media/media-source/media-source-remove.html: Added.

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

6 years agoSupport form controls that may need incremental redraw
dino@apple.com [Fri, 28 Mar 2014 19:57:34 +0000 (19:57 +0000)]
Support form controls that may need incremental redraw
https://bugs.webkit.org/show_bug.cgi?id=130736

Reviewed by Beth Dakin.

There are some form controls that change appearance
over time. Expand the ControlStates so that it can
hold a little more information, including a reference
to the native form control. This way the Theme implementation
can repaint the existing native control if necessary. At
least ThemeMac was reusing a single control for painting
all instances before this change.

Since ControlStates is now a class, pass it around by
reference.

The other major change is keeping a timer to trigger a
repaint in RenderBox, which happens if Theme/RenderTheme
update the ControlState to request one.

* WebCore.xcodeproj/project.pbxproj: Add ControlStates.h.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* dom/Element.cpp:
(WebCore::Element::setActive): States now within ControlStates.
(WebCore::Element::setHovered): Ditto.
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::focusedOrActiveStateChanged): Ditto.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::disabledStateChanged): Ditto.
(WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setChecked): Ditto.
(WebCore::HTMLInputElement::setIndeterminate): Ditto.
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::parseAttribute): Ditto.
* platform/ControlStates.h: New file. Copied the old ControlStates enum,
and added accessors to hold whether or not the state is dirty, and
a reference to a platform control if necessary.
* platform/Theme.h:
(WebCore::Theme::selectionColor): Pass ControlStates pointer.
(WebCore::Theme::paint): Ditto.
(WebCore::Theme::inflateControlPaintRect): Ditto.
* platform/ThemeTypes.h: Remove ControlStates enum.
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::applyEdjeStateFromForm): Pass ControlStates pointer.
(WebCore::RenderThemeEfl::paintThemePart): Ditto.
* platform/efl/RenderThemeEfl.h: Ditto.
* platform/mac/ThemeMac.h: Ditto.
* platform/mac/ThemeMac.mm:
(-[WebCoreThemeView addSubview:]): New method to make sure we don't add CALayer backed
views to the NSView we're using for rendering.
(WebCore::updateStates): Use the private animated setters if necessary.
(WebCore::convertControlStatesToThemeDrawState): Namespacing.
(WebCore::configureCheckbox): Pass ControlStates pointer.
(WebCore::createCheckboxCell): New helper since we're creating non-static cells.
(WebCore::sharedCheckboxCell): The old static provider, renamed.
(WebCore::paintCheckbox): Check if this paint was triggered by a state change
or an animation. Update the ControlStates if we need to be repainted.
(WebCore::radio): Parameter is now ControlStates*.
(WebCore::paintRadio): Ditto.
(WebCore::setUpButtonCell): Ditto.
(WebCore::button): Ditto.
(WebCore::paintButton): Ditto.
(WebCore::paintStepper): Ditto.
(WebCore::ThemeMac::ensuredView): Ditto.
(WebCore::ThemeMac::inflateControlPaintRect): Ditto.
(WebCore::ThemeMac::paint): Ditto.
(WebCore::checkbox): Deleted.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::RenderBox): Initialize timer.
(WebCore::RenderBox::~RenderBox): Stop any pending timers and delete the ControlState if necessary.
(WebCore::RenderBox::paintBoxDecorations): Create a ControlStates if needed. Paint, and start the repaint
timer if the ControlStates say we should.
(WebCore::RenderBox::repaintTimerFired): Call repaint when the timer fires.
* rendering/RenderBox.h: Add a timer for repainting.
* rendering/RenderElement.cpp:
(WebCore::controlStatesRendererMap): A static HashMap that associates renderers with ControlStates.
(WebCore::RenderElement::hasControlStatesForRenderer):
(WebCore::RenderElement::controlStatesForRenderer):
(WebCore::RenderElement::removeControlStatesForRenderer):
(WebCore::RenderElement::addControlStatesForRenderer):
* rendering/RenderElement.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint): Use a pointer to ControlStates.
(WebCore::RenderTheme::adjustRepaintRect): Ditto.
(WebCore::RenderTheme::stateChanged): Ditto.
(WebCore::RenderTheme::updateControlStatesForRenderer): New method that just updates the states part of ControlStates.
(WebCore::RenderTheme::extractControlStatesForRenderer): New method that calculates the state.
(WebCore::RenderTheme::controlStatesForRenderer): Deleted.
* rendering/RenderTheme.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::documentViewFor): Use a ControlStates pointer.

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

6 years agoEliminate a sync cancelComposition call in WebPageProxy::editorStateChanged
ap@apple.com [Fri, 28 Mar 2014 19:11:18 +0000 (19:11 +0000)]
Eliminate a sync cancelComposition call in WebPageProxy::editorStateChanged
https://bugs.webkit.org/show_bug.cgi?id=130727

Reviewed by Enrica Casucci.

Added a separate CompositionWasCanceled IPC call, with which WebProcess can tell
UIProcess that it should notify an input method of canceled composition. There are
a lot of incorrect edge cases where we don't call it correctly, but this was true
in the old implementation too (for different edge cases).

This change only affects iOS and async NSTextInputClient code path on Mac. I don't
want to change sync NSTextInputClient code path unless absolutely necessary.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::compositionWasCanceled):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::executeKeypressCommands):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):

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

6 years agoClear SVGInlineTextBox fragments when the text changes.
mmaxfield@apple.com [Fri, 28 Mar 2014 18:25:26 +0000 (18:25 +0000)]
Clear SVGInlineTextBox fragments when the text changes.
https://bugs.webkit.org/show_bug.cgi?id=130879

Reviewed by Darin Adler.

Blink: https://src.chromium.org/viewvc/blink?revision=150456&view=revision
Source/WebCore:

This patch modifies SVGInlineTextBox::dirtyLineBoxes to clear all
following text boxes when invoked. Typically this method is called
when the underlying text string changes, and that change needs to
be propagated to all the boxes that use the text beyond the point
where the text is first modified.

Also cleans up final function keywords for SVGRootInlineBox.

Test: svg/custom/unicode-in-tspan-multi-svg-crash.html

* rendering/InlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
(WebCore::InlineTextBox::dirtyOwnLineBoxes): Calls dirtyLineBoxes()
* rendering/svg/SVGInlineTextBox.h: Added (non-recursive) dirtyOwnLineBoxes() function
(WebCore::SVGInlineTextBox::dirtyOwnLineBoxes):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::dirtyOwnLineBoxes): Non-recursive part of dirtyLineBoxes()
(WebCore::SVGInlineTextBox::dirtyLineBoxes): Calls dirtyOwnLineBoxes() in a loop
* rendering/svg/SVGRootInlineBox.h:

LayoutTests:

When failing, this test will render garbage characters or crash.

* svg/custom/unicode-in-tspan-multi-svg-crash-expected.txt: Added.
* svg/custom/unicode-in-tspan-multi-svg-crash.html: Added.

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

6 years agobisect-builds should print Trac 'changeset' URL if only one build is detected
ddkilzer@apple.com [Fri, 28 Mar 2014 18:24:53 +0000 (18:24 +0000)]
bisect-builds should print Trac 'changeset' URL if only one build is detected
<http://webkit.org/b/130903>

Reviewed by Dan Bernstein.

* Scripts/bisect-builds:
(printTracLink): Print a direct link to the Trac 'changeset'
URL if there is only one revision in the range.

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

6 years agoFix cloop build.
oliver@apple.com [Fri, 28 Mar 2014 18:20:02 +0000 (18:20 +0000)]
Fix cloop build.

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

6 years agoRebaseline bindings tests.
akling@apple.com [Fri, 28 Mar 2014 18:19:10 +0000 (18:19 +0000)]
Rebaseline bindings tests.

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

6 years ago[CSS Shapes] Add performance tests for Shapes with Regions
zoltan@webkit.org [Fri, 28 Mar 2014 18:18:09 +0000 (18:18 +0000)]
[CSS Shapes] Add performance tests for Shapes with Regions
https://bugs.webkit.org/show_bug.cgi?id=129624

Reviewed by Ryosuke Niwa.

This tests introduces a real-life like page, which contains different types of shapes within
shape-outsides. The content flows through regions, which use media queries. The performance test
loads the actual Shapes-Regions test case into iframes with different page sizes (thus the layout
triggers the media queries as well), and measures its load time.

* Layout/RegionsShapes.html: Added.
* Layout/Shapes/resources/RegionsShapesContent.html: Added.

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

6 years agoUnreviewed, rolling r166248 back in.
msaboff@apple.com [Fri, 28 Mar 2014 18:10:39 +0000 (18:10 +0000)]
Unreviewed, rolling r166248 back in.

Turns out r166070 didn't cause a 2% performance loss in page load times

Reverted changeset:

Unreviewed, rolling out r166126.
Rollout r166126 in prepartion to roll out prerequisite r166070

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

6 years agoNull pointer crash in String::append(UChar).
commit-queue@webkit.org [Fri, 28 Mar 2014 17:58:57 +0000 (17:58 +0000)]
Null pointer crash in String::append(UChar).
https://bugs.webkit.org/show_bug.cgi?id=130900

Patch by peavo@outlook.com <peavo@outlook.com> on 2014-03-28
Reviewed by Michael Saboff.

* wtf/text/WTFString.cpp:
(WTF::String::append): Check and initialize m_impl member first, to avoid null pointer crash.

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

6 years agoconstants are always typed to 'int' https://bugs.webkit.org/show_bug.cgi?id=130775
tonikitoo@webkit.org [Fri, 28 Mar 2014 17:51:51 +0000 (17:51 +0000)]
constants are always typed to 'int' https://bugs.webkit.org/show_bug.cgi?id=130775

Reviewed by Darin Adler.
Patch by Antonio Gomes <a1.gomes@sisa.samsung.com>

Patch fixes a bug where all constant getter generated
methods were returning 'integer' values due to static_cast.

Compilers should be smarth enough to properly infer which
jsNumber class construtor to call given a literal value.

Patch also fixes a bug where values whose representation
is bigger an integer maximum were overflowing. For instance,
NodeFilter.SHOW_ALL (0xFFFFFFFF).

Tests:
Binding tests updated.
Rebaselined fast/dom/constants.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT1):
(WebCore::jsTestInterfaceIMPLEMENTSCONSTANT2):
(WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT1):
(WebCore::jsTestInterfaceSUPPLEMENTALCONSTANT2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjCONDITIONAL_CONST):
(WebCore::jsTestObjCONST_VALUE_0):
(WebCore::jsTestObjCONST_VALUE_1):
(WebCore::jsTestObjCONST_VALUE_2):
(WebCore::jsTestObjCONST_VALUE_4):
(WebCore::jsTestObjCONST_VALUE_8):
(WebCore::jsTestObjCONST_VALUE_9):
(WebCore::jsTestObjCONST_VALUE_11):
(WebCore::jsTestObjCONST_VALUE_12):
(WebCore::jsTestObjCONST_VALUE_13):
(WebCore::jsTestObjCONST_VALUE_14):
(WebCore::jsTestObjCONST_JAVASCRIPT):
(WebCore::jsTestObjReadonly):

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

6 years agoA TrailingObject's endpoint might get decremented twice
mmaxfield@apple.com [Fri, 28 Mar 2014 17:32:01 +0000 (17:32 +0000)]
A TrailingObject's endpoint might get decremented twice
https://bugs.webkit.org/show_bug.cgi?id=130874

Reviewed by Darin Adler.

There are two places where we might shave off a trailing space from the end
of a line. We don't want to hit both codepaths for a single line.

Fixes fast/block/update-midpoints-for-trailing-boxes-crash.html after r166245.

* rendering/line/BreakingContextInlineHeaders.h:
(WebCore::checkMidpoints):
(WebCore::BreakingContext::handleEndOfLine):

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

6 years agoInline JSDOMWrapper subclasses' finishCreation().
akling@apple.com [Fri, 28 Mar 2014 17:02:40 +0000 (17:02 +0000)]
Inline JSDOMWrapper subclasses' finishCreation().
<https://webkit.org/b/130890>

finishCreation() is really a no-op for JSDOMWrapper subclasses in
release builds. None of the ancestor classes do anything but assert
in their implementations.

Generate the function inline, reducing binary size, and removing
an unnecessary call from the JSFoo::create() helpers.

Reviewed by Sam Weinig.

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

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

6 years ago[GTK] Running minibrowser with url crashes in debug build
mario.prada@samsung.com [Fri, 28 Mar 2014 16:42:02 +0000 (16:42 +0000)]
[GTK] Running minibrowser with url crashes in debug build
https://bugs.webkit.org/show_bug.cgi?id=130492

Reviewed by Martin Robinson.

Use the ResourceRequest(const URL& url) constructor, instead of the
one taking a String, to call WebPageProxy::loadRequest(), so we
ensure that the passed URI is correctly constructed.

* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri): Create an URL out of a SoupURI and
use that to create a ResourceRequest to pass to loadRequest().

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

6 years agoAdd support for AirPlay picker for iOS.
enrica@apple.com [Fri, 28 Mar 2014 16:18:01 +0000 (16:18 +0000)]
Add support for AirPlay picker for iOS.
https://bugs.webkit.org/show_bug.cgi?id=130876
<rdar://problem/15349859>

Reviewed by Benjamin Poulain.

Adds support for the AirPlay picker for WebKit.
The actual picker is implemented in UIKit.

* DefaultDelegates/WebDefaultUIKitDelegate.m:
(-[WebDefaultUIKitDelegate interactionLocation]):
(-[WebDefaultUIKitDelegate showPlaybackTargetPicker:fromRect:]):
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::showPlaybackTargetPicker):
* WebCoreSupport/WebFrameIOS.h:
* WebCoreSupport/WebFrameIOS.mm:
(-[WebFrame elementRectAtPoint:]):
* WebView/WebUIKitDelegate.h:

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

6 years ago[Mac] HLS streams will report an incorrect natural size.
jer.noble@apple.com [Fri, 28 Mar 2014 15:49:39 +0000 (15:49 +0000)]
[Mac] HLS streams will report an incorrect natural size.
https://bugs.webkit.org/show_bug.cgi?id=130859

Reviewed by Eric Carlson.

Some HLS streams will report incorrect naturalSizes due to the asset's preferredTransform
property not being  available at the same time as the track's natural size. Given that
AVFoundation only allows one video track to be selected at a time, simply use the asset's
presentation size, cached in m_cachedPresentation size in all cases.

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

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

6 years agoRemove NodeListRootType flag
antti@apple.com [Fri, 28 Mar 2014 15:36:40 +0000 (15:36 +0000)]
Remove NodeListRootType flag
https://bugs.webkit.org/show_bug.cgi?id=130896

Reviewed by Anders Carlsson.

This can be handled statically (except for the RadioNodeList case) removing
a branch from NodeList traversal.

* dom/ClassNodeList.h:
* dom/Document.cpp:
(WebCore::Document::registerNodeListForInvalidation):
(WebCore::Document::unregisterNodeListForInvalidation):
(WebCore::Document::registerNodeList): Deleted.
(WebCore::Document::unregisterNodeList): Deleted.

    Mark document invalidation registered lists with a bit.
    Renamed for clarity.

* dom/Document.h:
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::rootNode):

    Base class version that invokes virtual isRootedAtDocument. It is needed to support
    LiveNodeList::namedItem.

* dom/LiveNodeList.h:
(WebCore::LiveNodeList::isRegisteredForInvalidationAtDocument):
(WebCore::LiveNodeList::setRegisteredForInvalidationAtDocument):
(WebCore::LiveNodeList::document):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::rootNode):

    Call isRootedAtDocument on the final leaf type. Except for RadioNodeList this
    resolves statically.

(WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
(WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
(WebCore::LiveNodeList::isRootedAtDocument): Deleted.
(WebCore::LiveNodeList::rootType): Deleted.
(WebCore::LiveNodeList::rootNode): Deleted.
* dom/NameNodeList.h:
* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument):
* dom/TagNodeList.h:
* html/HTMLCollection.cpp:
(WebCore::rootTypeFromCollectionType):
* html/HTMLCollection.h:
(WebCore::HTMLCollection::isRootedAtDocument):
(WebCore::HTMLCollection::rootType):

    HTMLCollections still needs the flag.

* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:

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

6 years ago[GTK] Geoclue2 providers won't work after reloading
mario.prada@samsung.com [Fri, 28 Mar 2014 15:34:03 +0000 (15:34 +0000)]
[GTK] Geoclue2 providers won't work after reloading
https://bugs.webkit.org/show_bug.cgi?id=130898

Reviewed by Martin Robinson.

Don't reuse the Geoclue2 client proxy between different calls to
startPosition(), and create a new client proxy each time instead.

* platform/geoclue/GeolocationProviderGeoclue2.cpp:
(GeolocationProviderGeoclue::startUpdating): Don't reuse the
client proxy, by always calling geoclue_manager_call_get_client().
(GeolocationProviderGeoclue::stopUpdating): Disconnect from the
'location-updated' signal and dispose the client proxy.

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

6 years ago[GTK] Too many redirects visiting www.globalforestwatch.org
commit-queue@webkit.org [Fri, 28 Mar 2014 14:18:46 +0000 (14:18 +0000)]
[GTK] Too many redirects visiting globalforestwatch.org
https://bugs.webkit.org/show_bug.cgi?id=129681

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-03-28
Reviewed by Martin Robinson.

Source/WebCore:

* platform/gtk/UserAgentGtk.cpp:
(WebCore::standardUserAgent): Append Safari version to UserAgent
string.

Source/WebKit/gtk:

* webkit/webkitwebsettings.cpp:
(userAgentForURL): Change outdated comment.

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

6 years agoUnreviewed, rolling r166249 back in.
msaboff@apple.com [Fri, 28 Mar 2014 14:08:05 +0000 (14:08 +0000)]
Unreviewed, rolling r166249 back in.

Turns out r166070 didn't cause a 2% performance loss in page load times

Reverted changeset:

Unreviewed, rolling out r166070.
Rollout r166070 due to 2% performance loss in page load times

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

6 years ago[EFL] Bump glib version from 2.36 to 2.38
gyuyoung.kim@samsung.com [Fri, 28 Mar 2014 10:34:05 +0000 (10:34 +0000)]
[EFL] Bump glib version from 2.36 to 2.38
https://bugs.webkit.org/show_bug.cgi?id=130886

Reviewed by Csaba Osztrogonác.

.:

* Source/cmake/OptionsEfl.cmake: Required glib-2.38 version.

Tools:

There is a build break on EFL port when using glib 2.36 ver. To fix it,
we need to bump glib version up to 2.38 as gtk port.

* efl/jhbuild.modules:

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

6 years ago[EFL][GTK] Remove expectations after r166194
k.czech@samsung.com [Fri, 28 Mar 2014 08:52:24 +0000 (08:52 +0000)]
[EFL][GTK] Remove expectations after r166194
https://bugs.webkit.org/show_bug.cgi?id=130842

Reviewed by Mario Sanchez Prada.

r166194 introduces one common expectation for all ports.

* platform/efl-wk1/accessibility/table-with-aria-role-expected.txt: Removed.
* platform/efl-wk2/accessibility/table-with-aria-role-expected.txt: Removed.
* platform/gtk/accessibility/table-with-aria-role-expected.txt: Removed.

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

6 years agoWeb Inspector: Copy/paste error. EventListener block in DOM.json uses description...
commit-queue@webkit.org [Fri, 28 Mar 2014 08:20:27 +0000 (08:20 +0000)]
Web Inspector: Copy/paste error. EventListener block in DOM.json uses description from Node.
https://bugs.webkit.org/show_bug.cgi?id=130158

Patch by James Craig <jcraig@apple.com> on 2014-03-28
Reviewed by Timothy Hatcher.

* inspector/protocol/DOM.json: Fixed a copy/paste annoyance.

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

6 years ago[iOS WebKit2] Tweak cache sizes for iOS
psolanki@apple.com [Fri, 28 Mar 2014 06:24:14 +0000 (06:24 +0000)]
[iOS WebKit2] Tweak cache sizes for iOS
https://bugs.webkit.org/show_bug.cgi?id=130871

Reviewed by Sam Weinig.

Bring over the tweaks we had made to memory cache size for WebKit1 on iOS to WebKit2. These
were made per findings in <rdar://8611638>.

* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):

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

6 years ago[WK2][EFL] Fix wrong parameter name in ewk_view_user_agent_set()
jinwoo7.song@samsung.com [Fri, 28 Mar 2014 06:21:42 +0000 (06:21 +0000)]
[WK2][EFL] Fix wrong parameter name in ewk_view_user_agent_set()
https://bugs.webkit.org/show_bug.cgi?id=130888

Reviewed by Gyuyoung Kim.

* UIProcess/API/efl/ewk_view.h:

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

6 years agoWeb Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc...
commit-queue@webkit.org [Fri, 28 Mar 2014 06:00:39 +0000 (06:00 +0000)]
Web Inspector: AXI: expose selectedChildNodeIds of list boxes, tree controls, etc., and reconcile UI with childNodeIds
https://bugs.webkit.org/show_bug.cgi?id=130827

Patch by James Craig <jcraig@apple.com> on 2014-03-27
Reviewed by Timothy Hatcher.

Source/WebCore:

Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html

Support for selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

UI updates for "Selected Item(s)" and "Child(ren)" rows in accessibility node inspector.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

Websites/webkit.org:

Updated demo files with attr refresh to show off selected children changing.
Long term fix will be http://webkit.org/b/130883

* blog-files/aria1.0/combobox_with_live_region_status.html:

LayoutTests:

Tests selectedChildNodeIds in inspector-protocol: DOM.getAccessibilityPropertiesForNode.

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

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

6 years agoUnreviewed, rolling out r166376.
commit-queue@webkit.org [Fri, 28 Mar 2014 05:28:39 +0000 (05:28 +0000)]
Unreviewed, rolling out r166376.
https://bugs.webkit.org/show_bug.cgi?id=130887

This was a misguided optimization. (Requested by kling on
#webkit).

Reverted changeset:

"Avoid fetching JSObject::structure() repeatedly in
putDirectInternal."
https://bugs.webkit.org/show_bug.cgi?id=130857
http://trac.webkit.org/changeset/166376

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

6 years ago<https://webkit.org/b/42704> WebKitTestRunner needs to print history delegate information
mrowe@apple.com [Fri, 28 Mar 2014 04:06:58 +0000 (04:06 +0000)]
<https://webkit.org/b/42704> WebKitTestRunner needs to print history delegate information

Tools:

Provide an implementation of WKContextHistoryClient that logs when called for tests in
the globalhistory directory.

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2014-03-27
Reviewed by Sam Weinig.

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize): Set the history client.
(WTR::TestController::resetStateToConsistentValues): Disable logging of history client callbacks.
(WTR::TestController::didNavigateWithNavigationData): Log information about the navigation. Some portions
of the output are hard-coded to match WebKit1's results for now since they're fixed in our existing tests
and we don't yet have API to access the data in question.
(WTR::TestController::didPerformClientRedirect):
(WTR::TestController::didPerformServerRedirect):
(WTR::TestController::didUpdateHistoryTitle):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setShouldLogHistoryClientCallbacks):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::shouldLogHistoryClientCallbacks): Log history client callbacks for tests in a globalhistory directory.
(WTR::TestInvocation::invoke):

LayoutTests:

Reviewed by Sam Weinig.

* platform/wk2/TestExpectations: Enable the two layout tests that pass. One test remains disabled
due to lack of testRunner API, and another due to an apparent bug in WebKit2's handling of
client redirects.

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

6 years agoSpecify Shadow DOM Pseudo IDs in Media Element Constructors
bfulgham@apple.com [Fri, 28 Mar 2014 03:52:01 +0000 (03:52 +0000)]
Specify Shadow DOM Pseudo IDs in Media Element Constructors
https://bugs.webkit.org/show_bug.cgi?id=130882

Reviewed by Eric Carlson.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlPanelElement::MediaControlPanelElement): Call setPseudoId in constructor.
(WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement): Ditto.
(WebCore::MediaControlTimelineContainerElement::MediaControlTimelineContainerElement): Ditto.
(WebCore::MediaControlVolumeSliderContainerElement::MediaControlVolumeSliderContainerElement): Ditto.
(WebCore::MediaControlStatusDisplayElement::MediaControlStatusDisplayElement): Ditto.
(WebCore::MediaControlPanelMuteButtonElement::MediaControlPanelMuteButtonElement): Ditto.
(WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Ditto.
(WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Ditto.
(WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement): Ditto.
(WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Ditto.
(WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Ditto.
(WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Ditto.
(WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Ditto.
(WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Ditto.
(WebCore::MediaControlClosedCaptionsContainerElement::MediaControlClosedCaptionsContainerElement): Ditto.
(WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement): Ditto.
(WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Ditto.
(WebCore::MediaControlPanelVolumeSliderElement::MediaControlPanelVolumeSliderElement): Ditto.
(WebCore::MediaControlFullscreenVolumeSliderElement::MediaControlFullscreenVolumeSliderElement): Ditto.
(WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Ditto.
(WebCore::MediaControlFullscreenVolumeMinButtonElement::MediaControlFullscreenVolumeMinButtonElement): Ditto.
(WebCore::MediaControlFullscreenVolumeMaxButtonElement::MediaControlFullscreenVolumeMaxButtonElement): Ditto.
(WebCore::MediaControlTimeRemainingDisplayElement::MediaControlTimeRemainingDisplayElement): Ditto.
(WebCore::MediaControlCurrentTimeDisplayElement::MediaControlCurrentTimeDisplayElement): Ditto.
(WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Ditto.

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

6 years ago[iOS][WK2] Adjust the tile coverage on the scrollview's edges
benjamin@webkit.org [Fri, 28 Mar 2014 03:50:48 +0000 (03:50 +0000)]
[iOS][WK2] Adjust the tile coverage on the scrollview's edges
https://bugs.webkit.org/show_bug.cgi?id=130884

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-03-27
Reviewed by Dan Bernstein.

* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::computeCoverageRect):
Pull back the future rect inside the contentRect if it goes outside.
There is no point in retiling for rubberbanding and the extra tiles should be always be
on the opposite side to the edges.

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

6 years agoRemove unused LocaleMac::create method
commit-queue@webkit.org [Fri, 28 Mar 2014 02:46:06 +0000 (02:46 +0000)]
Remove unused LocaleMac::create method
https://bugs.webkit.org/show_bug.cgi?id=130870

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-27
Reviewed by Andreas Kling.

* platform/text/mac/LocaleMac.h:
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::create): Deleted.
(WebCore::LocaleMac::shortDateFormatter): Deleted.

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

6 years agoSupport spread operand in |new| expressions
oliver@apple.com [Fri, 28 Mar 2014 01:10:25 +0000 (01:10 +0000)]
Support spread operand in |new| expressions
https://bugs.webkit.org/show_bug.cgi?id=130877

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Add support for the spread operator being applied in
|new| expressions.  This required adding support for
a new opcode, op_construct_varargs.  This is a relatively
simple refactoring of the call_varargs implementation.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CallLinkInfo.cpp:
(JSC::CallLinkInfo::unlink):
* bytecode/CallLinkInfo.h:
(JSC::CallLinkInfo::callTypeFor):
(JSC::CallLinkInfo::specializationKind):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitCallVarargs):
(JSC::BytecodeGenerator::emitConstructVarargs):
(JSC::BytecodeGenerator::emitConstruct):
* bytecompiler/BytecodeGenerator.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
(JSC::JIT::privateCompileSlowCases):
* jit/JIT.h:
* jit/JITCall.cpp:
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::emitSlow_op_construct_varargs):
* jit/JITCall32_64.cpp:
(JSC::JIT::emitSlow_op_construct_varargs):
(JSC::JIT::emit_op_construct_varargs):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):

LayoutTests:

Correctness and performance tests for spread operands

* js/parser-syntax-check-expected.txt:
* js/regress/call-spread-expected.txt: Added.
* js/regress/call-spread.html: Added.
* js/regress/new-spread-expected.txt: Added.
* js/regress/new-spread.html: Added.
* js/regress/script-tests/call-spread.js: Added.
(testFunction):
(test2):
(test3):
* js/regress/script-tests/new-spread.js: Added.
(testFunction):
(test2):
(test3):
* js/script-tests/parser-syntax-check.js:

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

6 years agoClean up unneeded "mutable" keyword
gyuyoung.kim@samsung.com [Fri, 28 Mar 2014 01:00:35 +0000 (01:00 +0000)]
Clean up unneeded "mutable" keyword
https://bugs.webkit.org/show_bug.cgi?id=130832

Reviewed by Andreas Kling.

As r166350, this patch cleans up unneeded "mutable" keywords.
Additionally, m_validatedSelectionCache is removed because it is not used anywhere else.

* css/CSSFontFaceRule.h:
* css/CSSStyleRule.h:
* editing/FrameSelection.h:

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

6 years agoRevert http://trac.webkit.org/changeset/166386 because it broke builds.
fpizlo@apple.com [Fri, 28 Mar 2014 00:51:36 +0000 (00:51 +0000)]
Revert trac.webkit.org/changeset/166386 because it broke builds.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/LLVMForJSC.xcconfig:

Tools:

* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years agoUnreviewed, skip this test for now.
fpizlo@apple.com [Fri, 28 Mar 2014 00:48:04 +0000 (00:48 +0000)]
Unreviewed, skip this test for now.

* tests/stress/recurse-infinitely-on-getter.js:

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

6 years agoConfirm composition in resignFirstResponder, don't cancel it
ap@apple.com [Fri, 28 Mar 2014 00:36:15 +0000 (00:36 +0000)]
Confirm composition in resignFirstResponder, don't cancel it
https://bugs.webkit.org/show_bug.cgi?id=130852

Reviewed by Darin Adler.

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

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

6 years ago[iOS WebKit2] Don't pass disk cache directory path on iOS
psolanki@apple.com [Fri, 28 Mar 2014 00:27:27 +0000 (00:27 +0000)]
[iOS WebKit2] Don't pass disk cache directory path on iOS
https://bugs.webkit.org/show_bug.cgi?id=130862

Reviewed by Sam Weinig.

The diskPath passed to NSURLCache initializer is treated differently on Mac and iOS. Just
pass nil for now until we sort out the API.

* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

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

6 years agoSwitch the LLVMForJSC target to using the LLVM in /usr/local rather than /usr/local...
fpizlo@apple.com [Thu, 27 Mar 2014 23:52:23 +0000 (23:52 +0000)]
Switch the LLVMForJSC target to using the LLVM in /usr/local rather than /usr/local/LLVMForJavaScriptCore on iOS
https://bugs.webkit.org/show_bug.cgi?id=130867
<rdar://problem/16432456>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/LLVMForJSC.xcconfig:

Tools:

* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:

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

6 years ago[iOS WebKit2] Share network process code between iOS and Mac
psolanki@apple.com [Thu, 27 Mar 2014 23:46:32 +0000 (23:46 +0000)]
[iOS WebKit2] Share network process code between iOS and Mac
https://bugs.webkit.org/show_bug.cgi?id=130861

Reviewed by Sam Weinig.

Implement network process functions for iOS by moving common code from NetworkProcessMac.mm
to a new shared file NetworkProcessCocoa.mm and sharing between iOS and Mac.

* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Added.
(WebKit::NetworkProcess::platformLowMemoryHandler):
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
Common initialization code for iOS and Mac.
(WebKit::memorySize):
(WebKit::volumeFreeSize):
(WebKit::NetworkProcess::platformSetCacheModel):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::initializeProcess):
Remove unnecessary #if PLATFORM(IOS).
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* WebKit2.xcodeproj/project.pbxproj:

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

6 years agoAdd support for AirPlay picker in WK2 for iOS.
enrica@apple.com [Thu, 27 Mar 2014 23:41:46 +0000 (23:41 +0000)]
Add support for AirPlay picker in WK2 for iOS.
https://bugs.webkit.org/show_bug.cgi?id=130855
<rdar://problem/15349859>

Source/WebCore:

Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.

Adds support in HTMLMediaSession to display the airplay picker
and to monitor presence of available wireless targets.

* html/HTMLMediaSession.cpp:
(WebCore::HTMLMediaSession::showPlaybackTargetPicker):
(WebCore::HTMLMediaSession::hasWirelessPlaybackTargets):
(WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners):
* loader/EmptyClients.h:
* page/ChromeClient.h:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::wirelessRoutesAvailableChanged):
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManager::startMonitoringAirPlayRoutes):
(WebCore::MediaSessionManager::stopMonitoringAirPlayRoutes):
* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
(WebCore::MediaSessionManageriOS::startMonitoringAirPlayRoutes):
(WebCore::MediaSessionManageriOS::stopMonitoringAirPlayRoutes):
(-[WebMediaSessionHelper initWithCallback:]):
(-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
(-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
(-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled):
(WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled):

Source/WebKit/ios:

Reviewed by Eric Carlson, Joseph Pecoraro and Benjamin Poulain.

Adds stub for new WebKit chrome client method.

* WebCoreSupport/WebChromeClientIOS.h:
* WebCoreSupport/WebChromeClientIOS.mm:
(WebChromeClientIOS::showAirPlayRoutePicker):

Source/WebKit2:

Reviewed by Joseph Pecoraro and Benjamin Poulain.

Adds support to display the airplay picker for iPhone and iPad
in WK2.
The picker on iPad is displayed next to the airplay button.

* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showAirPlayRoutePicker):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showAirPlayRoutePicker:fromRect:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showAirPlayRoutePicker):
* UIProcess/ios/forms/WKAirPlayRoutePicker.h: Added.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Added.
(-[WKAirPlayRoutePicker initWithView:]):
(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]):
(-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]):
(-[WKAirPlayRoutePicker _windowWillRotate:]):
(-[WKAirPlayRoutePicker _windowDidRotate:]):
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
(-[WKAirPlayRoutePicker show:fromRect:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::showAirPlayRoutePicker):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::touchEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rectForElementAtInteractionLocation):
(WebKit::WebPage::handleTap):

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

6 years ago[CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
bjonesbe@adobe.com [Thu, 27 Mar 2014 23:40:04 +0000 (23:40 +0000)]
[CSS Shapes][css clip-path] rounded corner calculation for box shapes is wrong
https://bugs.webkit.org/show_bug.cgi?id=127982

Reviewed by Simon Fraser.

Source/WebCore:

Calculate rounded corners for box shapes as defined in the CSS Shapes
spec.

Tests: css3/masking/clip-path-border-radius-border-box-000.html
       css3/masking/clip-path-border-radius-content-box-000.html
       css3/masking/clip-path-border-radius-content-box-001.html
       css3/masking/clip-path-border-radius-padding-box-000.html
       css3/masking/clip-path-border-radius-padding-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html
       fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html

* platform/graphics/RoundedRect.h:
(WebCore::RoundedRect::Radii::transposedRadii): Transpose radii for
    vertical writing modes.
(WebCore::RoundedRect::moveBy): Add method for use with clip path.
(WebCore::RoundedRect::transposedRect): Transpose rect for vertical
    writing modes.
* rendering/RenderBox.h:
(WebCore::RenderBox::marginBoxRect): Return the margin box rect for
    the RenderBox.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupClipPath): Call the new function for the
    rounded corner calculation.
* rendering/shapes/ShapeInfo.cpp:
(WebCore::ShapeInfo<RenderType>::computedShape): Call the new function
    for the rounded corner calculation.
* rendering/shapes/BoxShape.cpp:
(WebCore::adjustRadiusForMarginBoxShape): Helper function for
    computeRoundedRectForLayoutBoxShape.
(WebCore::computeMarginBoxShapeRadius): Ditto.
(WebCore::computeMarginBoxShapeRadii): Ditto.
(WebCore::computeRoundedRectForBoxShape): Utility function to do the
    rounded corner calculation.
* rendering/shapes/BoxShape.h: Add new function.
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::getRoundedInnerBorderFor): Add default argument
    values.

LayoutTests:

* css3/masking/clip-path-border-radius-border-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-border-box-000.html: Added.
* css3/masking/clip-path-border-radius-content-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-content-box-000.html: Added.
* css3/masking/clip-path-border-radius-content-box-001-expected.html: Added.
* css3/masking/clip-path-border-radius-content-box-001.html: Added.
* css3/masking/clip-path-border-radius-padding-box-000-expected.html: Added.
* css3/masking/clip-path-border-radius-padding-box-000.html: Added.
* css3/masking/clip-path-border-radius-padding-box-001-expected.html: Added.
* css3/masking/clip-path-border-radius-padding-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-border-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-content-box-003.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-003.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-margin-box-004.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-000.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-001.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-002.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-border-radius-padding-box-003.html: Added.

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

6 years ago[WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before...
benjamin@webkit.org [Thu, 27 Mar 2014 23:37:37 +0000 (23:37 +0000)]
[WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before the page loads
https://bugs.webkit.org/show_bug.cgi?id=130873

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

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):

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

6 years agoUnreviewed, rolling out r166364.
commit-queue@webkit.org [Thu, 27 Mar 2014 23:23:37 +0000 (23:23 +0000)]
Unreviewed, rolling out r166364.
https://bugs.webkit.org/show_bug.cgi?id=130872

Caused a test assertion (Requested by smfr on #webkit).

Reverted changeset:

"Operator stretching: expose a math data API"
https://bugs.webkit.org/show_bug.cgi?id=130572
http://trac.webkit.org/changeset/166364

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

6 years ago[iOS][WK2] Compute a good exposed rect when scaling WKContentView
benjamin@webkit.org [Thu, 27 Mar 2014 23:22:55 +0000 (23:22 +0000)]
[iOS][WK2] Compute a good exposed rect when scaling WKContentView
https://bugs.webkit.org/show_bug.cgi?id=130761

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

Source/WebCore:

* WebCore.exp.in:
* platform/ScrollView.h:
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::setScrollVelocity):
(WebCore::ScrollView::computeCoverageRect):
While scaling in, do not add margins tiles. When scaling out, add 1 margin tile size
all around.

Source/WebKit2:

Add a simple heuristic to improve tiling while zooming. In theory we could take the zoom
center and scaleRate to split the speed between scrolling and pinching. In practice,
zoom is transitory and is not as predictable as scrolling, so this patch just does a very
simple heuristic:
-When zooming in, do not expand coverage.
-When zooming out, add half a tile size on every side.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):
(WebKit::VisibleContentRectUpdateInfo::horizontalVelocity):
(WebKit::VisibleContentRectUpdateInfo::verticalVelocity):
(WebKit::VisibleContentRectUpdateInfo::scaleChangeRate):
* UIProcess/ios/WKContentView.mm:
(WebKit::HistoricalVelocityData::VelocityData::VelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::adjustExposedRectForBoundedScale):
When zooming past the maximum size, adjust the exposed rect to continue tiling the area
at maximum size. Otherwise, we tile a tiny area, and have to retile larger when the animation
pull back the view to maximum scale.

(WebKit::adjustVelocityDataForBoundedScale):
Since we do not split the velocity from scrolling from the scaling, just clear the velocity when zooming.
Also clear the scaleChangeRate when the scale is out of bounds. There is no reason to add tiles for
temporary state.

(WebKit::WebPage::updateVisibleContentRects):

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

6 years agoAdd _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
andersca@apple.com [Thu, 27 Mar 2014 22:59:07 +0000 (22:59 +0000)]
Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=130868

Reviewed by Sam Weinig.

* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
* Shared/API/Cocoa/WKRemoteObject.h:
* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject _initWithObjectRegistry:interface:]):
* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
* Shared/API/Cocoa/WKRemoteObjectInterface.h:
* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(isContainerClass): Deleted.
(propertyListClasses): Deleted.
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
(-[WKRemoteObjectInterface description]): Deleted.
(classesForSelectorArgument): Deleted.
(-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
(-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
(methodArgumentTypeEncodingForSelector): Deleted.
(-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
(-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
* Shared/API/Cocoa/WKRemoteObjectRegistry.h:
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
(-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
(-[WKRemoteObjectRegistry _invalidate]): Deleted.
(-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
(-[WKRemoteObjectRegistry WebKit::]): Deleted.
(-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
(isContainerClass):
(propertyListClasses):
(allowedArgumentClassesForMethod):
(initializeAllowedArgumentClasses):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
(-[_WKRemoteObjectInterface description]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(methodArgumentTypeEncodingForSelector):
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
(-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
(-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
(-[_WKRemoteObjectRegistry _invalidate]):
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry WebKit::]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
(-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
* UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _remoteObjectRegistry]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:

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

6 years agoUnreviewed, rolling out r166360.
commit-queue@webkit.org [Thu, 27 Mar 2014 22:49:16 +0000 (22:49 +0000)]
Unreviewed, rolling out r166360.
https://bugs.webkit.org/show_bug.cgi?id=130869

Seems to have broken PLT (Requested by ap on #webkit).

Reverted changeset:

Source/WebCore:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WebKit/mac:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WebKit2:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

Source/WTF:

"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360

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

6 years agoRemove LiveNodeList::Type
antti@apple.com [Thu, 27 Mar 2014 22:47:15 +0000 (22:47 +0000)]
Remove LiveNodeList::Type
https://bugs.webkit.org/show_bug.cgi?id=130866

Reviewed by Andreas Kling.

We don't need dynamic type information anymore.

* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::getElementsByTagName):
(WebCore::ContainerNode::getElementsByName):
(WebCore::ContainerNode::getElementsByClassName):
(WebCore::ContainerNode::radioNodeList):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::LiveNodeList):
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::invalidationType):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):
(WebCore::LiveNodeList::type): Deleted.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
(WebCore::NameNodeList::nodeMatches): Deleted.
* dom/NameNodeList.h:
(WebCore::NameNodeList::nodeMatches):
* dom/NodeRareData.h:
(WebCore::NodeListTypeIdentifier<ClassNodeList>::value):
(WebCore::NodeListTypeIdentifier<NameNodeList>::value):
(WebCore::NodeListTypeIdentifier<TagNodeList>::value):
(WebCore::NodeListTypeIdentifier<HTMLTagNodeList>::value):
(WebCore::NodeListTypeIdentifier<RadioNodeList>::value):
(WebCore::NodeListTypeIdentifier<LabelsNodeList>::value):

    Get unique id from type for key generation purposes only.

(WebCore::NodeListsNodeData::addCacheWithAtomicName):
(WebCore::NodeListsNodeData::addCacheWithName):
(WebCore::NodeListsNodeData::removeCacheWithAtomicName):
(WebCore::NodeListsNodeData::removeCacheWithName):
(WebCore::NodeListsNodeData::namedNodeListKey):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
* dom/TagNodeList.h:
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:

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

6 years agoAvoid fetching JSObject::structure() repeatedly in putDirectInternal.
akling@apple.com [Thu, 27 Mar 2014 22:39:00 +0000 (22:39 +0000)]
Avoid fetching JSObject::structure() repeatedly in putDirectInternal.
<https://webkit.org/b/130857>

Use the cached Structure* instead of re-fetching it over and over since
that's a non-trivial operation these days.

Reviewed by Mark Hahnenberg.

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

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

6 years agoCheck the remembered set bit faster
mhahnenberg@apple.com [Thu, 27 Mar 2014 22:34:23 +0000 (22:34 +0000)]
Check the remembered set bit faster
https://bugs.webkit.org/show_bug.cgi?id=130860

Reviewed by Oliver Hunt.

Currently we look up the remembered set bit in the MarkedBlock in C++ code, but
that bit is also stored in the object. We should look it up there whenever possible.

* heap/CopiedBlockInlines.h:
(JSC::CopiedBlock::shouldReportLiveBytes):
* heap/Heap.cpp:
(JSC::Heap::addToRememberedSet):
* heap/Heap.h:
* heap/HeapInlines.h: Removed.
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::reportExtraMemoryUsage):

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

6 years agoSupport dynamic layer hosting context changes
weinig@apple.com [Thu, 27 Mar 2014 22:30:53 +0000 (22:30 +0000)]
Support dynamic layer hosting context changes
<rdar://problem/16278019>
https://bugs.webkit.org/show_bug.cgi?id=130863

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeLayerHosting:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::layerHostingModeDidChange):
* UIProcess/WebPageProxy.h:

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

6 years agoDon't leak the WKBrowsingContextController
simon.fraser@apple.com [Thu, 27 Mar 2014 22:28:04 +0000 (22:28 +0000)]
Don't leak the WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=130815

Reviewed by Tim Horton.

Use adoptNS to avoid leaking the WKBrowsingContextController.

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

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

6 years agoFix crash when RenderView is cleared inside of frame flattening layout
simon.fraser@apple.com [Thu, 27 Mar 2014 22:28:02 +0000 (22:28 +0000)]
Fix crash when RenderView is cleared inside of frame flattening layout
https://bugs.webkit.org/show_bug.cgi?id=130864

Reviewed by Dan Bernstein.

Navigating on http://wallstcheatsheet.com pages on iOS in WebKit1 would
sometimes crash when, inside the inChildFrameLayoutWithFrameFlattening clause,
our frame's RenderView would be null after doing a layout from the root frame,
possibly also when WebCore was being re-entered from another thread.

Add a null check to fix this.

Crash was timing-dependent and hard to test.

* page/FrameView.cpp:
(WebCore::FrameView::layout):

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

6 years agoWeb Inspector: Give WebProcess a proxy application entitlement
joepeck@webkit.org [Thu, 27 Mar 2014 22:00:46 +0000 (22:00 +0000)]
Web Inspector: Give WebProcess a proxy application entitlement
https://bugs.webkit.org/show_bug.cgi?id=130806

Reviewed by Timothy Hatcher.

* Configurations/WebContent-iOS.entitlements:

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

6 years agoAdd reload and reloadFromOrigin as API
andersca@apple.com [Thu, 27 Mar 2014 21:21:14 +0000 (21:21 +0000)]
Add reload and reloadFromOrigin as API
https://bugs.webkit.org/show_bug.cgi?id=130858

Reviewed by Simon Fraser.

* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView reload:]):
(-[WKWebView reloadFromOrigin:]):

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

6 years agoRemove some unnecessary branches from LiveNodeList traversal
antti@apple.com [Thu, 27 Mar 2014 20:49:27 +0000 (20:49 +0000)]
Remove some unnecessary branches from LiveNodeList traversal
https://bugs.webkit.org/show_bug.cgi?id=130854

Reviewed by Andreas Kling.

Compile different traversal code paths for all NodeList subclasses.

* dom/ClassNodeList.cpp:
(WebCore::ClassNodeList::ClassNodeList):
(WebCore::ClassNodeList::~ClassNodeList):
(WebCore::ClassNodeList::nodeMatches): Deleted.
* dom/ClassNodeList.h:
(WebCore::ClassNodeList::nodeMatches):
(WebCore::ClassNodeList::nodeMatchesInlined): Deleted.

    Remove separate nodeMatchesInlined functions.
    We now rely on exact types and marking classes final.

* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::LiveNodeList):
(WebCore::LiveNodeList::~LiveNodeList):
(WebCore::LiveNodeList::namedItem):
(WebCore::LiveNodeList::rootNode): Deleted.
(WebCore::isMatchingElement): Deleted.
(WebCore::firstMatchingElement): Deleted.
(WebCore::lastMatchingElement): Deleted.
(WebCore::nextMatchingElement): Deleted.
(WebCore::previousMatchingElement): Deleted.
(WebCore::traverseMatchingElementsForward): Deleted.
(WebCore::traverseMatchingElementsBackward): Deleted.
(WebCore::LiveNodeList::collectionFirst): Deleted.
(WebCore::LiveNodeList::collectionLast): Deleted.
(WebCore::LiveNodeList::collectionTraverseForward): Deleted.
(WebCore::LiveNodeList::collectionTraverseBackward): Deleted.
(WebCore::LiveNodeList::length): Deleted.
(WebCore::LiveNodeList::item): Deleted.
(WebCore::LiveNodeList::memoryCost): Deleted.
(WebCore::LiveNodeList::invalidateCache): Deleted.
* dom/LiveNodeList.h:
(WebCore::LiveNodeList::invalidateCacheForAttribute):
(WebCore::CachedLiveNodeList::collectionCanTraverseBackward):
(WebCore::LiveNodeList::rootNode):
(WebCore::CachedLiveNodeList<NodeListType>::CachedLiveNodeList):

    Add CachedLiveNodeList<NodeListType> utility type that interfaces with CollectionIndexCache.
    It is the base class for all concrete LiveNodeLists.

(WebCore::CachedLiveNodeList<NodeListType>::~CachedLiveNodeList):
(WebCore::CachedLiveNodeList<NodeListType>::collectionFirst):
(WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
(WebCore::nextMatchingElement):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
(WebCore::previousMatchingElement):
(WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
(WebCore::CachedLiveNodeList<NodeListType>::willValidateIndexCache):
(WebCore::CachedLiveNodeList<NodeListType>::invalidateCache):
(WebCore::CachedLiveNodeList<NodeListType>::length):
(WebCore::CachedLiveNodeList<NodeListType>::item):
(WebCore::CachedLiveNodeList<NodeListType>::memoryCost):

    Templated code moves to header.

(WebCore::LiveNodeList::LiveNodeList): Deleted.
(WebCore::LiveNodeList::~LiveNodeList): Deleted.
(WebCore::LiveNodeList::invalidateCache): Deleted.
(WebCore::LiveNodeList::collectionCanTraverseBackward): Deleted.
(WebCore::LiveNodeList::willValidateIndexCache): Deleted.
* dom/NameNodeList.cpp:
(WebCore::NameNodeList::NameNodeList):
* dom/NameNodeList.h:
* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):
(WebCore::NodeListsNodeData::invalidateCaches):
* dom/TagNodeList.cpp:
(WebCore::TagNodeList::TagNodeList):
(WebCore::HTMLTagNodeList::HTMLTagNodeList):
(WebCore::HTMLTagNodeList::~HTMLTagNodeList):
(WebCore::TagNodeList::nodeMatches): Deleted.
(WebCore::HTMLTagNodeList::nodeMatches): Deleted.
* dom/TagNodeList.h:
(WebCore::TagNodeList::nodeMatches):
(WebCore::HTMLTagNodeList::nodeMatches):
(WebCore::TagNodeList::create): Deleted.
(WebCore::HTMLTagNodeList::nodeMatchesInlined): Deleted.
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):
* html/LabelsNodeList.h:
* html/RadioNodeList.cpp:
(WebCore::RadioNodeList::RadioNodeList):
* html/RadioNodeList.h:

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

6 years agoRemove comment from Filter.h
cavalcantii@gmail.com [Thu, 27 Mar 2014 20:07:36 +0000 (20:07 +0000)]
Remove comment from Filter.h
https://bugs.webkit.org/show_bug.cgi?id=130848

Reviewed by Simon Fraser.

Exploring the use of consts on applyScale() methods didn't yield
good results.

No new tests, no change on behavior.

* platform/graphics/filters/Filter.h:

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

6 years agoWeb Inspector: Provide SPI to disallow remote inspection of a JSContext
commit-queue@webkit.org [Thu, 27 Mar 2014 20:01:34 +0000 (20:01 +0000)]
Web Inspector: Provide SPI to disallow remote inspection of a JSContext
https://bugs.webkit.org/show_bug.cgi?id=130853

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

* API/JSContextPrivate.h: Added.
* API/JSContext.mm:
(-[JSContext _remoteInspectionEnabled]):
(-[JSContext _setRemoteInspectionEnabled:]):
ObjC SPI to enable/disable remote inspection.

* API/JSContextRefPrivate.h:
* API/JSContextRef.cpp:
(JSGlobalContextGetRemoteInspectionEnabled):
(JSGlobalContextSetRemoteInspectionEnabled):
C SPI to enable/disable remote inspection.

* JavaScriptCore.xcodeproj/project.pbxproj:
Add new private header, and export as a private header.

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

6 years agoClean up questionable style in ScriptExecutable::prepareForExecutionImpl
mhahnenberg@apple.com [Thu, 27 Mar 2014 19:19:28 +0000 (19:19 +0000)]
Clean up questionable style in ScriptExecutable::prepareForExecutionImpl
https://bugs.webkit.org/show_bug.cgi?id=130845

Reviewed by Filip Pizlo.

There was a hack added to make sure C Loop LLInt worked which included overriding the
global Options::useLLInt setting, which makes no sense to do here. We should put the
update of the global setting in Options::recomputeDependentOptions along with the other
execution engine flags.

* runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Options.cpp:
(JSC::recomputeDependentOptions):

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

6 years agoWeb Inspector: clearing the console log doesn't update the activity viewer
graouts@webkit.org [Thu, 27 Mar 2014 18:32:20 +0000 (18:32 +0000)]
Web Inspector: clearing the console log doesn't update the activity viewer
https://bugs.webkit.org/show_bug.cgi?id=130774

Reviewed by Joseph Pecoraro.

Ensure we take the changes made to the ivars into account on the view.

* UserInterface/Models/DefaultDashboard.js:
(WebInspector.DefaultDashboard.prototype._consoleWasCleared):

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

6 years agoOperator stretching: expose a math data API
fred.wang@free.fr [Thu, 27 Mar 2014 18:06:21 +0000 (18:06 +0000)]
Operator stretching: expose a math data API
https://bugs.webkit.org/show_bug.cgi?id=130572

Reviewed by Chris Fleizach.

We expose a new SimpleFontData API to give access to the data from the
OpenType MATH table using a font cache. The class OpenTypeMathData will
be implemented in bug 130324. On Darwin platform, we also implement the
missing FontPlatformData::openTypeTable function which will be necessary
to load the OpenType MATH table. The changes are intended to be used
for MathML operator stretching (bug 130322) so tests are not added yet.

* CMakeLists.txt: add new OpenTypeMathData files.
* WebCore.vcxproj/WebCore.vcxproj: ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.
* platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
We make the math and vertical data share the same key for the cache.
(WebCore::fontMathDataCacheInstance):
(WebCore::FontCache::getMathData):
(WebCore::fontVerticalDataCacheInstance):
* platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
* platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
* platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
(WebCore::SimpleFontData::SimpleFontData):
* platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
* platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
(WebCore::OpenTypeMathData::OpenTypeMathData):
* platform/graphics/opentype/OpenTypeMathData.h: Added.
(WebCore::OpenTypeMathData::create):
(WebCore::OpenTypeMathData::hasMathData):

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

6 years ago[Win] Correct handling of autogenerated WebInspectorUI files
bfulgham@apple.com [Thu, 27 Mar 2014 17:51:38 +0000 (17:51 +0000)]
[Win] Correct handling of autogenerated WebInspectorUI files
https://bugs.webkit.org/show_bug.cgi?id=130846

Reviewed by Joseph Pecoraro.

* WebInspectorUI.vcxproj/WebInspectorUIPostBuild.cmd: Files need to be placed in the
'Protocol' subdirectory of the WebInspectorUI directory.

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

6 years agoFix a crash caused by track insertion after load()
bfulgham@apple.com [Thu, 27 Mar 2014 17:50:53 +0000 (17:50 +0000)]
Fix a crash caused by track insertion after load()
https://bugs.webkit.org/show_bug.cgi?id=130777

Reviewed by Eric Carlson.

Test: media/track/track-insert-after-load-crash.html

Based on the Blink change (patch by acolwell@chromium.org):
https://codereview.chromium.org/211373009/

Source/WebCore:

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute): Remove stale LoadMediaResource flag after explicit load.

LayoutTests:

* media/track/track-insert-after-load-crash-expected.txt: Added.
* media/track/track-insert-after-load-crash.html: Added.

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

6 years agoRename WKFrameHandle to _WKFrameHandle
andersca@apple.com [Thu, 27 Mar 2014 17:42:48 +0000 (17:42 +0000)]
Rename WKFrameHandle to _WKFrameHandle
https://bugs.webkit.org/show_bug.cgi?id=130847

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKFrameHandle.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.h.
* Shared/API/Cocoa/_WKFrameHandle.mm: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.mm.
(-[_WKFrameHandle dealloc]):
(-[_WKFrameHandle isEqual:]):
(-[_WKFrameHandle hash]):
(-[_WKFrameHandle _frameID]):
(-[_WKFrameHandle copyWithZone:]):
(+[_WKFrameHandle supportsSecureCoding]):
(-[_WKFrameHandle initWithCoder:]):
(-[_WKFrameHandle encodeWithCoder:]):
(-[_WKFrameHandle API::]):
* Shared/API/Cocoa/_WKFrameHandleInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandleInternal.h.
(WebKit::wrapper):
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
(-[WKWebProcessPlugInFrame handle]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:

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