WebKit-https.git
5 years ago[CSS Grid Layout] Support for align-self and align-items in grid layout
jfernandez@igalia.com [Sun, 26 Apr 2015 22:44:11 +0000 (22:44 +0000)]
[CSS Grid Layout] Support for align-self and align-items in grid layout
https://bugs.webkit.org/show_bug.cgi?id=133225

Reviewed by Darin Adler.

Source/WebCore:

Implementation of align-self and align-items properties for grid. It supports
different writing-modes and direction. Margins, borders and paddings are also
considered when computing the final position and stretched size.

Overflow handling is still missing and will be added when implemented row-axis
alignment support.

Test: fast/css-grid-layout/grid-align.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeLogicalHeight):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::logicalContentHeightForChild):
(WebCore::RenderGrid::layoutGridItems):
(WebCore::computeOverflowAlignmentOffset):
(WebCore::RenderGrid::endOfRowForChild):
(WebCore::RenderGrid::startOfRowForChild):
(WebCore::RenderGrid::centeredRowPositionForChild):
(WebCore::marginWidthForChild):
(WebCore::marginHeightForChild):
(WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
(WebCore::RenderGrid::needToStretchChildLogicalHeight):
(WebCore::RenderGrid::marginLogicalHeightForChild):
(WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
(WebCore::RenderGrid::rowPositionForChild):
(WebCore::RenderGrid::findChildLogicalPosition):
(WebCore::RenderGrid::populateGridPositions): Deleted.
* rendering/RenderGrid.h:

LayoutTests:

Implementation of align-self and align-items properties ifor grid.

Several layout tests were touched for adapting them to the new grid item's
column-axis position when using RTL direction.

* fast/css-grid-layout/grid-align-expected.txt: Added.
* fast/css-grid-layout/grid-align.html: Added.
* fast/css-grid-layout/grid-element-border-grid-item.html:
* fast/css-grid-layout/grid-element-border-padding-grid-item.html:
* fast/css-grid-layout/grid-element-padding-grid-item.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl-expected.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl-expected.html:
* fast/css-grid-layout/grid-item-margin-resolution.html:

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

5 years ago[CMake][EFL] Remove unnecessary include, library path in WebKitTestRunner/PlatformEfl...
gyuyoung.kim@webkit.org [Sun, 26 Apr 2015 22:31:12 +0000 (22:31 +0000)]
[CMake][EFL] Remove unnecessary include, library path in WebKitTestRunner/PlatformEfl.cmake
https://bugs.webkit.org/show_bug.cgi?id=144217

Reviewed by Darin Adler.

* WebKitTestRunner/PlatformEfl.cmake:

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

5 years agoAX: richer text change notifications (142719)
commit-queue@webkit.org [Sun, 26 Apr 2015 22:17:11 +0000 (22:17 +0000)]
AX: richer text change notifications (142719)
https://bugs.webkit.org/show_bug.cgi?id=142719

Patch by Doug Russell <d_russell@apple.com> on 2015-04-26
Reviewed by Darin Adler.

Richer accessibility value change notifications. Introduce AXTextEditType,
postTextStateChangeNotification and postTextReplacementNotification to give assistive
tech apps more reliable context for responding to changes in web content. Also implement
a mechanism to post value changes in password form fields in coalesced ticks to thwart
analyzing the cadence of changes.

Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
and an overload of postTextReplacementNotification to give assistive tech apps more
reliable context for responding to changes in web content selection. Also block posting
selection changes on password fields.

Source/WebCore:

Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
       platform/mac/accessibility/selection-change-userinfo.html
       platform/mac/accessibility/value-change-userinfo.html

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
(WebCore::AXObjectCache::showIntent):
(WebCore::AXObjectCache::setTextSelectionIntent):
(WebCore::isPasswordFieldOrContainedByPasswordField):
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
(WebCore::AXObjectCache::rootWebArea):
(WebCore::AXObjectCache::textChangeForEditType):
(WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
(WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::textChangeForEditType):
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
(WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
(WebCore::AXObjectCache::getOrCreate): Deleted.
(WebCore::AXObjectCache::attachWrapper): Deleted.
* accessibility/AXTextStateChangeIntent.h: Added.
(WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
* accessibility/AccessibilityNodeObject.h:
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isContainedByPasswordField):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
(WebCore::AccessibilityObject::isPasswordField): Deleted.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::setSelectedTextRange):
(WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
* accessibility/AccessibilityScrollView.h:
* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::nodeTextChangePlatformNotification):
* accessibility/ios/AXObjectCacheIOS.mm:
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
(WebCore::AXPostNotificationWithUserInfo):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::postTextStateChangePlatformNotification):
(WebCore::textReplacementChangeDictionary):
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
* accessibility/mac/WebAccessibilityObjectWrapperBase.h:
* accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
(+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
(-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
(arrayRemovingNonJSONTypes):
(dictionaryRemovingNonJSONTypes):
(-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
* accessibility/mac/WebAccessibilityObjectWrapperMac.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(textMarkerRangeFromVisiblePositions):
(-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::AppendNodeCommand):
(WebCore::sendAXTextChangedIgnoringLineBreaks):
(WebCore::AppendNodeCommand::doApply):
(WebCore::AppendNodeCommand::doUnapply):
* editing/AppendNodeCommand.h:
(WebCore::AppendNodeCommand::create):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::ApplyStyleCommand):
(WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
* editing/ApplyStyleCommand.h:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapplyEditType):
(WebCore::CompositeEditCommand::CompositeEditCommand):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::insertParagraphSeparator):
(WebCore::CompositeEditCommand::insertNodeBefore):
(WebCore::CompositeEditCommand::appendNode):
(WebCore::CompositeEditCommand::removeNodePreservingChildren):
(WebCore::CompositeEditCommand::insertTextIntoNode):
(WebCore::CompositeEditCommand::deleteTextFromNode):
(WebCore::CompositeEditCommand::replaceTextInNode):
(WebCore::CompositeEditCommand::moveParagraphs):
(WebCore::EditCommandComposition::getNodesInCommand): Deleted.
(WebCore::CompositeEditCommand::applyStyle): Deleted.
(WebCore::CompositeEditCommand::insertLineBreak): Deleted.
(WebCore::CompositeEditCommand::insertNodeAt): Deleted.
(WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
(WebCore::CompositeEditCommand::inputText): Deleted.
* editing/CompositeEditCommand.h:
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
(WebCore::DeleteFromTextNodeCommand::doApply):
(WebCore::DeleteFromTextNodeCommand::doUnapply):
* editing/DeleteFromTextNodeCommand.h:
(WebCore::DeleteFromTextNodeCommand::create):
(WebCore::DeleteFromTextNodeCommand::deletedText):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
(WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
* editing/DeleteSelectionCommand.h:
(WebCore::DeleteSelectionCommand::create):
* editing/DictationCommand.cpp:
(WebCore::DictationCommand::insertTextRunWithoutNewlines):
(WebCore::DictationCommand::insertParagraphSeparator):
* editing/EditAction.h:
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
(WebCore::EditCommand::editingAction):
(WebCore::EditCommand::applyEditType):
(WebCore::EditCommand::unapplyEditType):
(WebCore::SimpleEditCommand::SimpleEditCommand):
(WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
(WebCore::EditCommand::setParent): Deleted.
* editing/EditCommand.h:
* editing/EditingAllInOne.cpp:
* editing/Editor.cpp:
(WebCore::Editor::handleTextEvent):
(WebCore::Editor::deleteSelectionWithSmartDelete):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::replaceSelectionWithText):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::unappliedEditing):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::transpose):
(WebCore::Editor::changeSelectionAfterCommand):
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeInsertFragment):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::moveTo):
(WebCore::FrameSelection::moveWithoutValidationTo):
(WebCore::FrameSelection::setSelectionByMouseIfDifferent):
(WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::updateAndRevealSelection):
(WebCore::isBoundary):
(WebCore::FrameSelection::textSelectionIntent):
(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::selectAll):
(WebCore::FrameSelection::wordSelectionContainingCaretSelection):
(WebCore::FrameSelection::modifyMovingBackward): Deleted.
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
(WebCore::FrameSelection::selectionAtWordStart): Deleted.
* editing/FrameSelection.h:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
(WebCore::FrameSelection::selection): Deleted.
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
(WebCore::InsertIntoTextNodeCommand::doApply):
(WebCore::InsertIntoTextNodeCommand::doUnapply):
* editing/InsertIntoTextNodeCommand.h:
(WebCore::InsertIntoTextNodeCommand::create):
(WebCore::InsertIntoTextNodeCommand::insertedText):
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
(WebCore::InsertNodeBeforeCommand::doApply):
(WebCore::InsertNodeBeforeCommand::doUnapply):
* editing/InsertNodeBeforeCommand.h:
(WebCore::InsertNodeBeforeCommand::create):
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
* editing/InsertParagraphSeparatorCommand.h:
(WebCore::InsertParagraphSeparatorCommand::create):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::InsertTextCommand):
* editing/InsertTextCommand.h:
(WebCore::InsertTextCommand::create):
(WebCore::InsertTextCommand::createWithMarkerSupplier):
* editing/MoveSelectionCommand.cpp:
(WebCore::MoveSelectionCommand::doApply):
* editing/RemoveNodePreservingChildrenCommand.cpp:
(WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
* editing/RemoveNodePreservingChildrenCommand.h:
(WebCore::RemoveNodePreservingChildrenCommand::create):
* editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
(WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
(WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
* editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
* editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
(WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
(WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
* editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
(WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
(WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
* editing/ReplaceSelectionCommand.h:
(WebCore::ReplaceSelectionCommand::create):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertTextRunWithoutNewlines):
(WebCore::TypingCommand::insertParagraphSeparator):
* editing/atk/FrameSelectionAtk.cpp:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* editing/ios/DictationCommandIOS.cpp:
(WebCore::DictationCommandIOS::DictationCommandIOS):
* editing/ios/DictationCommandIOS.h:
* editing/mac/FrameSelectionMac.mm:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* page/DragController.cpp:
(WebCore::DragController::concludeEditDrag):
* page/EventHandler.cpp:
(WebCore::setInitialKeyboardSelection):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(undoNameForEditAction):

Source/WebKit2:

* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):

Tools:

* DumpRenderTree/mac/AccessibilityNotificationHandler.h:
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler stopObserving]):
(-[AccessibilityNotificationHandler _notificationReceived:]):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::removeNotificationListener):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler _notificationReceived:]):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::removeNotificationListener):

LayoutTests:

* platform/mac/accessibility/input-replacevalue-userinfo-expected.txt: Added.
* platform/mac/accessibility/input-replacevalue-userinfo.html: Added.
* platform/mac/accessibility/selection-change-userinfo-expected.txt: Added.
* platform/mac/accessibility/selection-change-userinfo.html: Added.
* platform/mac/accessibility/value-change-userinfo-expected.txt: Added.
* platform/mac/accessibility/value-change-userinfo.html: Added.

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

5 years agorefine
darin@apple.com [Sun, 26 Apr 2015 21:26:42 +0000 (21:26 +0000)]
refine

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

5 years agoREGRESSION (r176751): line-height ignored in <button> elements
darin@apple.com [Sun, 26 Apr 2015 21:25:02 +0000 (21:25 +0000)]
REGRESSION (r176751): line-height ignored in <button> elements
https://bugs.webkit.org/show_bug.cgi?id=144234

Reviewed by Antti Koivisto.

Source/WebCore:

Test: fast/forms/button-line-height.html

* platform/Theme.h: Changed controlFont to return an Optional so we can tell
when the theme is overriding the font. Otherwise if the font from the user-agent
style sheet and the font from the theme are the same, we will think we are not
overriding the font when we actually are.

* platform/mac/ThemeMac.h: Updated controlFont to return Optional.
* platform/mac/ThemeMac.mm:
(WebCore::ThemeMac::controlFont): Ditto.

* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::adjustStyle): Set line height only if the font is
overriden by the theme, all the time for PushButtonPart on Mac, and not at all
for other parts. Also tightened up the logic a little since RenderStyle's
setFontDescription already does an "==" comparison; we don't have to do
that twice.

LayoutTests:

* fast/forms/button-line-height-expected.html: Added.
* fast/forms/button-line-height.html: Added.

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

5 years agoREGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
darin@apple.com [Sun, 26 Apr 2015 21:18:15 +0000 (21:18 +0000)]
REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
https://bugs.webkit.org/show_bug.cgi?id=137163

Reviewed by Andy Estes.

Source/WebCore:

Test: fast/notifications/request-notification-permission-while-reloading.html

The test doesn't crash under WebKit2, but that's still OK for our purposes.

* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
(WebCore::NotificationCenter::createNotification): Moved here from the header.
(WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
center when we need to defer a callback. Also use a lambda for the callback and changed
the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
bindings were not transferring ownership of the VoidCallback. The new type is a little
strange but it's consistent with how the bindings work right now.
(WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
to match the ref we did above.
(WebCore::NotificationCenter::requestTimedOut): Deleted.
(WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
(WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
(WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
(WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.

* Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
Changed the argument type for requestPermission to match the reality of what's passed by the
bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
vector of std::function.

LayoutTests:

* fast/notifications/request-notification-permission-while-reloading-expected.txt: Added.
* fast/notifications/request-notification-permission-while-reloading.html: Added.

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

5 years agoModernize animations code
simon.fraser@apple.com [Sun, 26 Apr 2015 20:38:20 +0000 (20:38 +0000)]
Modernize animations code
https://bugs.webkit.org/show_bug.cgi?id=144196

Reviewed by Darin Adler.

General cleanup in animation-related code.

Use C++ references where possible. Use modern loops. Make classes fast-allocated.
Use C++11 member initialization. Order member variables to optimize packing.

This removes some null checks in CompositeAnimation, but the values in m_transitions
and m_keyframeAnimations can never be null.

No behavior change.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::AnimationBase):
(WebCore::AnimationBase::animationsMatch):
(WebCore::AnimationBase::updateStateMachine):
(WebCore::AnimationBase::fireAnimationEventsIfNeeded):
(WebCore::AnimationBase::beginAnimationUpdateTime):
(WebCore::AnimationBase::getElapsedTime):
* page/animation/AnimationBase.h:
(WebCore::AnimationBase::animation):
(WebCore::AnimationBase::setAnimation):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
(WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation):
(WebCore::CompositeAnimation::clearRenderer):
(WebCore::CompositeAnimation::updateTransitions):
(WebCore::CompositeAnimation::updateKeyframeAnimations):
(WebCore::CompositeAnimation::animate):
(WebCore::CompositeAnimation::getAnimatedStyle):
(WebCore::CompositeAnimation::timeToNextService):
(WebCore::CompositeAnimation::getAnimationForProperty):
(WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
(WebCore::CompositeAnimation::suspendAnimations):
(WebCore::CompositeAnimation::resumeAnimations):
(WebCore::CompositeAnimation::overrideImplicitAnimations):
(WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
(WebCore::CompositeAnimation::isAnimatingProperty):
(WebCore::CompositeAnimation::pauseTransitionAtTime):
(WebCore::CompositeAnimation::numberOfActiveAnimations):
* page/animation/CompositeAnimation.h:
(WebCore::CompositeAnimation::create):
(WebCore::CompositeAnimation::animationController):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::ImplicitAnimation):
(WebCore::ImplicitAnimation::sendTransitionEvent):
* page/animation/ImplicitAnimation.h:
(WebCore::ImplicitAnimation::create):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::animate):
(WebCore::KeyframeAnimation::getAnimatedStyle):
(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
(WebCore::KeyframeAnimation::startAnimation):
(WebCore::KeyframeAnimation::sendAnimationEvent):
(WebCore::KeyframeAnimation::overrideAnimations):
(WebCore::KeyframeAnimation::resumeOverriddenAnimations):
(WebCore::KeyframeAnimation::timeToNextService):
* page/animation/KeyframeAnimation.h:
* platform/animation/Animation.cpp:
(WebCore::Animation::animationsMatch):
* platform/animation/Animation.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paint):
(WebCore::performOverlapTests):
* rendering/style/KeyframeList.h:
(WebCore::KeyframeList::properties):
(WebCore::KeyframeList::keyframes):
(WebCore::KeyframeList::beginProperties): Deleted.
(WebCore::KeyframeList::endProperties): Deleted.
(WebCore::KeyframeList::operator[]): Deleted.
* rendering/style/RenderStyle.h:

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

5 years agoVersioning.
bshafiei@apple.com [Sun, 26 Apr 2015 20:22:27 +0000 (20:22 +0000)]
Versioning.

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

5 years ago<rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because...
mitz@apple.com [Sun, 26 Apr 2015 20:20:08 +0000 (20:20 +0000)]
<rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
https://bugs.webkit.org/show_bug.cgi?id=144233

Reviewed by Simon Fraser.

Have the plug-in service link against WebKit.framework rather than WebKit2.framework.

* Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
we can just do it in the target’s Link Binary With Libraries build phase.

* Configurations/PluginService.64.xcconfig: Ditto.

* WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
Binariy With Libraries build phases (one service already had WebKit).

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

5 years agoStart a basic status page on webkit.org
benjamin@webkit.org [Sun, 26 Apr 2015 19:57:11 +0000 (19:57 +0000)]
Start a basic status page on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=143940

Patch by Benjamin Poulain  <benjamin@webkit.org>, Chris Bateman <chrisb808@gmail.com> on 2015-04-26
Reviewed by Darin Adler.

* status.html: Added.
Nothing fancy, for now just show the "features" list of the two features.json

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

5 years ago[JSC] Implement Math.clz32(), remove Number.clz()
benjamin@webkit.org [Sun, 26 Apr 2015 19:55:18 +0000 (19:55 +0000)]
[JSC] Implement Math.clz32(), remove Number.clz()
https://bugs.webkit.org/show_bug.cgi?id=144205

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch adds the ES6 function Math.clz32(), and remove the non-standard
Number.clz(). Number.clz() probably came from an older draft.

The new function has a corresponding instrinsic: Clz32Intrinsic,
and a corresponding DFG node: ArithClz32, optimized all the way to LLVM.

* assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::countLeadingZeros32):
* assembler/X86Assembler.h:
(JSC::X86Assembler::bsr_rr):
The x86 assembler did not have countLeadingZeros32() because there is
no native CLZ instruction on that architecture.

I have added the version with bsr + branches for the case of zero.
An other popular version uses cmov to handle the case of zero. I kept
it simple since the Assembler has no support for cmov.

It is unlikely to matter much. If the code is hot enough, LLVM picks
something good based on the surrounding code.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
Constant handling + effect propagation. The node only produces integer (between 0 and 32).

* dfg/DFGBackwardsPropagationPhase.cpp:
(JSC::DFG::BackwardsPropagationPhase::propagate):
Thanks to the definition of toUint32(), we can ignore plenty of details
from doubles.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsic):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithClz32):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileArithClz32):
* ftl/FTLOutput.h:
(JSC::FTL::Output::ctlz32):
* jit/ThunkGenerators.cpp:
(JSC::clz32ThunkGenerator):
* jit/ThunkGenerators.h:
* runtime/Intrinsic.h:
* runtime/MathCommon.h:
(JSC::clz32):
Fun fact: InstCombine does not recognize this pattern to eliminate
the branch which makes our FTL version better than the C version.

* runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::mathProtoFuncClz32):
* runtime/NumberPrototype.cpp:
(JSC::clz): Deleted.
(JSC::numberProtoFuncClz): Deleted.
* runtime/VM.cpp:
(JSC::thunkGeneratorForIntrinsic):
* tests/stress/math-clz32-basics.js: Added.
(mathClz32OnInteger):
(testMathClz32OnIntegers):
(verifyMathClz32OnIntegerWithOtherTypes):
(mathClz32OnDouble):
(testMathClz32OnDoubles):
(verifyMathClz32OnDoublesWithOtherTypes):
(mathClz32NoArguments):
(mathClz32TooManyArguments):
(testMathClz32OnConstants):
(mathClz32StructTransition):
(Math.clz32):

LayoutTests:

Basic conformance tests.

* js/Object-getOwnPropertyNames-expected.txt:
* js/math-clz32-expected.txt: Added.
* js/math-clz32.html: Renamed from LayoutTests/js/number-clz.html.
* js/number-clz-expected.txt: Removed.
* js/script-tests/Object-getOwnPropertyNames.js:
* js/script-tests/math-clz32.js: Added.
(objectConvertToString.toString):
(objectRecordToStringCall.toString):
(objectThrowOnToString.toString):
(objectWithValueOf.valueOf):
(objectThrowOnValueOf.valueOf):
(objectThrowOnValueOf.toString):
(objectRecordValueOfCall.valueOf):
(objectRecordConversionCalls.toString):
(objectRecordConversionCalls.valueOf):
* js/script-tests/number-clz.js: Removed.

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

5 years ago[ES6] Array.from need to accept iterables
utatane.tea@gmail.com [Sun, 26 Apr 2015 19:52:33 +0000 (19:52 +0000)]
[ES6] Array.from need to accept iterables
https://bugs.webkit.org/show_bug.cgi?id=141055

Reviewed by Darin Adler.

Source/JavaScriptCore:

ES6 spec requires that Array.from accepts iterable objects.
This patch introduces this functionality, Array.from accepting iterable objects.

Currently, `isConstructor` is not used. Instead of it, `typeof thiObj === "function"` is used.
However, it doesn't conform to the spec. While `isConstructor` queries the given object has `[[Construct]]`,
`typeof thisObj === "function"` queries the given object has `[[Call]]`.
This will be fixed in the subsequent patch[1].

[1]: https://bugs.webkit.org/show_bug.cgi?id=144093

* builtins/ArrayConstructor.js:
(from):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tests/stress/array-from-with-iterable.js: Added.
(shouldBe):
(.set for):
(.set var):
(.get var):
(argumentsGenerators):
(.set shouldBe):
(.set new):
* tests/stress/array-from-with-iterator.js: Added.
(shouldBe):
(shouldThrow):
(createIterator.iterator.return):
(createIterator):
(.):

LayoutTests:

Array.from now accepts iterables.

* js/array-from-expected.txt:

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

5 years agoNew baselines for iOS.
simon.fraser@apple.com [Sun, 26 Apr 2015 18:45:09 +0000 (18:45 +0000)]
New baselines for iOS.

* platform/ios-simulator-wk2/compositing/contents-scale/rounded-contents-scale-expected.txt:
* platform/ios-simulator-wk2/compositing/contents-scale/scaled-ancestor-expected.txt:
* platform/ios-simulator-wk2/compositing/contents-scale/simple-scale-expected.txt:
* platform/ios-simulator-wk2/compositing/contents-scale/z-translate-expected.txt:
* platform/ios-simulator-wk2/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/ios-simulator-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/2d-transformed-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/3d-transformed-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/clipped-by-viewport-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/clipped-visible-rect-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/coverage-clipped-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/coverage-scrolling-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/flipped-preserve-3d-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/iframe-and-layers-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/nested-transform-expected.txt:
* platform/ios-simulator-wk2/compositing/visible-rect/scrolled-expected.txt:

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

5 years agoNew WK1 results for this test.
simon.fraser@apple.com [Sun, 26 Apr 2015 18:25:33 +0000 (18:25 +0000)]
New WK1 results for this test.

* platform/mac-wk1/compositing/tiling/transform-origin-tiled-expected.txt: Added.

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

5 years agoExpand compositing coverage rect when scrolling and animating
simon.fraser@apple.com [Sun, 26 Apr 2015 17:24:40 +0000 (17:24 +0000)]
Expand compositing coverage rect when scrolling and animating
https://bugs.webkit.org/show_bug.cgi?id=144214
rdar://problem/20695926

Reviewed by Darin Adler.

Source/WebCore:

r183300 added a secondary rect that gets mapped through graphics layers during
layer flushing, which represents a rect, in layer coordinates, that represents
the portion of this layer that's visible in the viewport.

This patch extends that rect based on scrolling and animating, with the extended
coverage rect being mapped into descendants (where it's used to determine whether
they should detach their backing store). This required moving the responsibility for
extending the coverage rect from TileController (where it was used to compute
tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
of coverage rect, and pushes it onto TileControllers.

Test: compositing/tiling/transform-origin-tiled.html

* platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
TiledBacking from outside; new functions reflect that.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
old visible rect to commitLayerChangesBeforeSublayers.
(WebCore::accumulatesTransform):
(WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
then adjustCoverageRect() which adjusts for scrolling and animations.
(WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
TransformState, but we can only use this if mapping it through various transforms didn't clamp
it (which can happen with severe rotations in perspective).
(WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
ask the TileController to do coverage adjustment (code which should move into here eventually).
For other tiled layers, do motion-based adjustment. This should really be done for all layers
(an animating non-tiled layer may contain a tiled layer).
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
any more; layers only react to changed in coverage rect now.
(WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
coverage rect, here we push the new rect back into the TransformState so it will affect
descendants.
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
hand-in-hand now.
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
(WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
(WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
(WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
logging now.
(WebCore::TileController::setCoverageRect):
(WebCore::TileController::tilesWouldChangeForCoverageRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
is called at the top of committing the owning layer, we haven't yet pushed a new size to the
underlying platform layer (which TileController::bounds() consults).
(WebCore::TileController::bounds):
(WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
underlying layer hasn't been updated yet.
(WebCore::TileController::didRevalidateTiles):
(WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows
a dark blue outline for the coverage rect.
(WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
content inset is non-zero.
* platform/graphics/ca/TileCoverageMap.h:
* platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
(WebCore::TileGrid::tilesWouldChangeForCoverageRect):
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
* platform/graphics/ca/TileGrid.h:
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::operator=):
(WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
(WebCore::TransformState::mappedSecondaryQuad): Ditto.
(WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
to pass in a secondary quad, and get it mapped into the coordinate space of the last
"flattening" state (since the TransformState may have in-flight XY offset, or transform).
This mapping is achieved by re-using mapQuad(), but in the inverse direction.
(WebCore::TransformState::mapQuad): Make direction a parameter.
(WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
quad. Failure was detected by tests.
* platform/graphics/transforms/TransformState.h:
(WebCore::TransformState::isMappingSecondaryQuad):
(WebCore::TransformState::direction):
(WebCore::TransformState::inverseDirection):
(WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.

LayoutTests:

New baselines for tests dumping layer output, with coverage rect being affected
by this changeset. One new test for tiling a layer inside overflow:hidden with transform-origin.

* compositing/contents-scale/animating-expected.txt:
* compositing/contents-scale/rounded-contents-scale-expected.txt:
* compositing/contents-scale/scaled-ancestor-expected.txt:
* compositing/contents-scale/simple-scale-expected.txt:
* compositing/tiling/transform-origin-tiled.html: Added.
* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac/compositing/visible-rect/2d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/3d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt:
* platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt:
* platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt:
* platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/compositing/visible-rect/scrolled-expected.txt:

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

5 years agoFixed the build.
mitz@apple.com [Sun, 26 Apr 2015 15:47:20 +0000 (15:47 +0000)]
Fixed the build.

* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].

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

5 years agoWeb Inspector: Vertically misaligned text in Object Trees
jonowells@apple.com [Sun, 26 Apr 2015 13:00:57 +0000 (13:00 +0000)]
Web Inspector: Vertically misaligned text in Object Trees
https://bugs.webkit.org/show_bug.cgi?id=144029

Reviewed by Timothy Hatcher.

Remove top offset for object tree property titles to fix alignment issue since applying -webkit-system-font
font family to these (http://trac.webkit.org/changeset/182982).

* UserInterface/Views/ObjectTreePropertyTreeElement.css:
(.object-tree-property > .titles):

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

5 years agoMark some tests that take >10 seconds on debug bots as slow.
ap@apple.com [Sun, 26 Apr 2015 06:54:21 +0000 (06:54 +0000)]
Mark some tests that take >10 seconds on debug bots as slow.

This is too close to 30 second timeout, so it's likely that these tests would flakily
time out on other configurations, e.g. locally.

* TestExpectations:

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

5 years agoUpdated expected bindings generation test results after r183343.
mitz@apple.com [Sun, 26 Apr 2015 06:06:43 +0000 (06:06 +0000)]
Updated expected bindings generation test results after r183343.

* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
* bindings/scripts/test/ObjC/DOMTestCallback.h:
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
* bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
* bindings/scripts/test/ObjC/DOMTestEventTarget.h:
* bindings/scripts/test/ObjC/DOMTestException.h:
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
* bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
* bindings/scripts/test/ObjC/DOMTestNode.h:
* bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
* bindings/scripts/test/ObjC/DOMTestTypedefs.h:
* bindings/scripts/test/ObjC/DOMattribute.h:
* bindings/scripts/test/ObjC/DOMreadonly.h:

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

5 years agoFurther update gesture swipe shadow style
timothy_horton@apple.com [Sun, 26 Apr 2015 06:00:29 +0000 (06:00 +0000)]
Further update gesture swipe shadow style
https://bugs.webkit.org/show_bug.cgi?id=144215
<rdar://problem/19295843>

Reviewed by Dan Bernstein.

* Resources/mac/SwipeShadow.png: Removed.
* Resources/mac/SwipeShadow@2x.png: Removed.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* WebKit2.xcodeproj/project.pbxproj:
Use a CAGradientLayer instead of PNGs for the swipe shadow.

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

5 years agofont-synthesis's initial value is "style weight"
mmaxfield@apple.com [Sun, 26 Apr 2015 05:20:19 +0000 (05:20 +0000)]
font-synthesis's initial value is "style weight"
https://bugs.webkit.org/show_bug.cgi?id=144195

Reviewed by Darin Adler.

Source/WebCore:

Updated fast/css3-text/font-synthesis-parse.html.

* rendering/style/RenderStyle.h:

LayoutTests:

Updating test.

* fast/css3-text/font-synthesis-parse-expected.txt:
* fast/css3-text/font-synthesis-parse.html:

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

5 years agoUnreviewed, rolling out r183305.
commit-queue@webkit.org [Sun, 26 Apr 2015 04:16:27 +0000 (04:16 +0000)]
Unreviewed, rolling out r183305.
https://bugs.webkit.org/show_bug.cgi?id=144213

Crashes on wikipedia (Requested by litherum on #webkit).

Reverted changeset:

"[Cocoa] FontPlatformData's equality check should always use
reference URLs"
https://bugs.webkit.org/show_bug.cgi?id=144168
http://trac.webkit.org/changeset/183305

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

5 years agoWeb Inspector: Uncaught exception ReferenceError: Can't find variable: message LogCon...
commit-queue@webkit.org [Sun, 26 Apr 2015 04:12:05 +0000 (04:12 +0000)]
Web Inspector: Uncaught exception ReferenceError: Can't find variable: message LogContentView.js
https://bugs.webkit.org/show_bug.cgi?id=144210

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

* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._reappendProvisionalMessages):
With recent refactorings this change was missed.

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

5 years agoWeb Inspector: Uncaught exception using WebInspector.contentBrowser
commit-queue@webkit.org [Sun, 26 Apr 2015 03:42:21 +0000 (03:42 +0000)]
Web Inspector: Uncaught exception using WebInspector.contentBrowser
https://bugs.webkit.org/show_bug.cgi?id=144206

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

* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel.showTimelineViewForTimeline.this._timelineTreeElementMap.get select):
Use the current tab's content browser since a global one no longer exists.

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

5 years agoAdd myself to contributors.json
commit-queue@webkit.org [Sun, 26 Apr 2015 02:33:27 +0000 (02:33 +0000)]
Add myself to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=144204

Patch by Sungmann Cho <sungmann.cho@navercorp.com> on 2015-04-25
Reviewed by Darin Adler.

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

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

5 years agoSource/WebCore:
mitz@apple.com [Sun, 26 Apr 2015 01:38:31 +0000 (01:38 +0000)]
Source/WebCore:
WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=144201

Reviewed by Darin Adler.

Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
9876.5.

* bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
use 9876_5 in availability macros. Removed the definition of
__AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.

* bindings/scripts/CodeGeneratorObjC.pm:
(ReadPublicInterfaces): Use 9876_5 instead of TBD.

Source/WebKit2:
WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=144201

Reviewed by Darin Adler.

Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
9876.5.

* mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
headers, look for "9876_5" rather than "TBA".

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

5 years agoUpdate localized strings.
timothy@apple.com [Sun, 26 Apr 2015 01:28:51 +0000 (01:28 +0000)]
Update localized strings.

Source/WebCore:

* English.lproj/Localizable.strings: Updated.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js: Updated.

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

5 years agoWeb Inspector: Make JSContext debugging work with Tabs UI
timothy@apple.com [Sun, 26 Apr 2015 01:27:03 +0000 (01:27 +0000)]
Web Inspector: Make JSContext debugging work with Tabs UI
https://bugs.webkit.org/show_bug.cgi?id=144203

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._isTabTypeAllowed):
(WebInspector.activateExtraDomains):
(WebInspector._updateReloadToolbarButton):
(WebInspector._updateDownloadToolbarButton):

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

5 years agoWeb Inspector: Save and restore tab state on reload and between sessions
timothy@apple.com [Sun, 26 Apr 2015 01:26:41 +0000 (01:26 +0000)]
Web Inspector: Save and restore tab state on reload and between sessions
https://bugs.webkit.org/show_bug.cgi?id=144202

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._mainResourceDidChange):
(WebInspector._provisionalLoadStarted):
(WebInspector._restoreCookieForOpenTabs):
(WebInspector._saveCookieForOpenTabs):
(WebInspector._pageHidden):
* UserInterface/Views/TabContentView.js:
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.restoreStateFromCookie):
(WebInspector.TabContentView.prototype.saveStateToCookie):

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

5 years agoWeb Inspector: Split search from ResourceSidebarPanel into a Search tab and sidebar
timothy@apple.com [Sun, 26 Apr 2015 01:26:06 +0000 (01:26 +0000)]
Web Inspector: Split search from ResourceSidebarPanel into a Search tab and sidebar
https://bugs.webkit.org/show_bug.cgi?id=144197

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._tabContentViewForType):
(WebInspector._searchTextDidChange):
(WebInspector._focusSearchField):
(WebInspector._domNodeWasInspected):
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
* UserInterface/Images/SearchResults.svg: Added.
* UserInterface/Main.html:
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):
(WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._addStorageChild):
(WebInspector.ResourceSidebarPanel.prototype._extraDomainsActivated):
(WebInspector.ResourceSidebarPanel.prototype.get contentTreeOutlineToAutoPrune): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.forEachMatch): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourceCallback): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.resourcesCallback): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts.scriptCallback): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.searchScripts): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domSearchResults): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch.domCallback): Deleted.
(WebInspector.ResourceSidebarPanel.prototype.performSearch): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._showResourcesContentTreeOutline): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._showSearchContentTreeOutline): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._searchFieldChanged): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._searchFieldInput): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForResource): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._searchTreeElementForScript): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._focusSearchField): Deleted.
(WebInspector.ResourceSidebarPanel.prototype._scriptsToSearch): Deleted.
* UserInterface/Views/SearchBar.js:
(WebInspector.SearchBar):
* UserInterface/Views/SearchSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ResourceSidebarPanel.css.
(.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
(body.mac-platform.legacy .sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.search > .search-bar):
(body.mac-platform.legacy .sidebar > .panel.navigation.search > .search-bar):
(.sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
(body.mac-platform.legacy .sidebar > .panel.navigation.search > .search-bar > input[type="search"]):
* UserInterface/Views/SearchSidebarPanel.js: Added.
(WebInspector.SearchSidebarPanel):
(WebInspector.SearchSidebarPanel.prototype.closed):
(WebInspector.SearchSidebarPanel.prototype.focusSearchField):
(WebInspector.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholderSoon):
(WebInspector.SearchSidebarPanel.prototype.performSearch.updateEmptyContentPlaceholder):
(WebInspector.SearchSidebarPanel.prototype.performSearch.forEachMatch):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults):
(WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback):
(WebInspector.SearchSidebarPanel.prototype.performSearch):
(WebInspector.SearchSidebarPanel.prototype._searchFieldChanged):
(WebInspector.SearchSidebarPanel.prototype._searchFieldInput):
(WebInspector.SearchSidebarPanel.prototype._searchTreeElementForResource):
(WebInspector.SearchSidebarPanel.prototype._searchTreeElementForScript):
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange.delayedWork):
(WebInspector.SearchSidebarPanel.prototype._mainResourceDidChange):
(WebInspector.SearchSidebarPanel.prototype._treeElementSelected):
* UserInterface/Views/SearchTabContentView.js: Added.
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.prototype.get type):
(WebInspector.SearchTabContentView.prototype.shown):
(WebInspector.SearchTabContentView.prototype.closed):
(WebInspector.SearchTabContentView.prototype.canShowRepresentedObject):
(WebInspector.SearchTabContentView.prototype.focusSearchField):
(WebInspector.SearchTabContentView.prototype.performSearch):
* UserInterface/Views/Toolbar.css:
(.toolbar .item-section.center-right):
(.toolbar .item-section.right):
(.toolbar .search-bar):
(.toolbar .search-bar > input[type="search"]):
(.toolbar .search-bar > input[type="search"]::-webkit-textfield-decoration-container):
(body.window-inactive .toolbar .search-bar > input[type="search"]):
(.toolbar .item): Deleted.

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

5 years agoWeb Inspector: New Toolbar UI for tabs
timothy@apple.com [Sun, 26 Apr 2015 01:25:22 +0000 (01:25 +0000)]
Web Inspector: New Toolbar UI for tabs
https://bugs.webkit.org/show_bug.cgi?id=144185

Reviewed by Joseph Pecoraro.

* UserInterface/Base/ImageUtilities.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector.updateDockedState):
(WebInspector._captureDidStart):
(WebInspector._debuggerDidPause):
(WebInspector._debuggerDidResume):
(WebInspector._mainFrameDidChange):
(WebInspector._mainResourceDidChange):
(WebInspector._windowKeyDown):
(WebInspector._windowKeyUp):
(WebInspector._pageHidden):
(WebInspector._undock):
(WebInspector._dockBottom):
(WebInspector._dockRight):
(WebInspector._updateDockNavigationItems):
(WebInspector._domNodeWasInspected):
(WebInspector._inspectModeStateChanged):
(WebInspector._toggleInspectMode):
(WebInspector._downloadWebArchive):
(WebInspector._reloadPageClicked):
(WebInspector._updateDownloadToolbarButton):
(WebInspector.archiveMainFrame):
(WebInspector.canArchiveMainFrame):
* UserInterface/Images/Crosshair.svg:
* UserInterface/Images/DockBottom.svg:
* UserInterface/Images/DockRight.svg:
* UserInterface/Images/DownloadArrow.svg:
* UserInterface/Images/ReloadToolbar.svg: Added.
* UserInterface/Images/Undock.svg:
* UserInterface/Views/ActivateButtonToolbarItem.js:
(WebInspector.ActivateButtonToolbarItem):
(WebInspector.ActivateButtonToolbarItem.prototype.set label):
* UserInterface/Views/ButtonToolbarItem.css:
(.toolbar .item.button):
(body.window-inactive .toolbar .item.button):
(.toolbar.small-size .item.button > .glyph):
* UserInterface/Views/ButtonToolbarItem.js:
(WebInspector.ButtonToolbarItem):
(WebInspector.ButtonToolbarItem.prototype.set label):
* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard-container):
* UserInterface/Views/Main.css:
(body.docked.bottom):
* UserInterface/Views/Toolbar.css:
(.toolbar):
(body.mac-platform:not(.legacy, .docked) .toolbar):
(.toolbar .control-section):
(.toolbar .item-section):
(.toolbar .item-section.left):
(.toolbar .item-section.center-left):
(.toolbar .item-section.center-right):
(.toolbar .item-section.right):
* UserInterface/Views/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout.isOverflowingToolbar):
(WebInspector.Toolbar.prototype.customUpdateLayout):
(WebInspector.Toolbar.prototype.addToolbarItem):

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

5 years agoWeb Inspector: Add NavigationBar to the details sidebar
timothy@apple.com [Sun, 26 Apr 2015 01:24:40 +0000 (01:24 +0000)]
Web Inspector: Add NavigationBar to the details sidebar
https://bugs.webkit.org/show_bug.cgi?id=144191

Reviewed by Joseph Pecoraro.

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

* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
(WebInspector.DetailsSidebarPanel.prototype.get navigationItem):

* UserInterface/Views/NavigationBar.js:
(WebInspector.NavigationBar.prototype.removeNavigationItem):
Remove unused index argument.

* UserInterface/Views/Sidebar.css:
(.sidebar > .navigation-bar):
(.sidebar.has-navigation-bar > .panel):

* UserInterface/Views/Sidebar.js:
(WebInspector.Sidebar):
(WebInspector.Sidebar.prototype.addSidebarPanel):
(WebInspector.Sidebar.prototype.removeSidebarPanel):
(WebInspector.Sidebar.prototype.set selectedSidebarPanel):
(WebInspector.Sidebar.prototype.get minimumWidth):
(WebInspector.Sidebar.prototype.set width):
(WebInspector.Sidebar.prototype.set collapsed):

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

5 years agoWeb Inspector: Remove native window dock controls
timothy@apple.com [Sun, 26 Apr 2015 01:23:48 +0000 (01:23 +0000)]
Web Inspector: Remove native window dock controls
https://bugs.webkit.org/show_bug.cgi?id=144184

Reviewed by Joseph Pecoraro.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Resources/Dock.pdf: Removed.
* Resources/DockLegacy.pdf: Removed.
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController window]):
(-[WebInspectorWindowController setDockingUnavailable:]):

Source/WebKit2:

* Resources/DockBottom.pdf: Removed.
* Resources/DockBottomLegacy.pdf: Removed.
* Resources/DockRight.pdf: Removed.
* Resources/DockRightLegacy.pdf: Removed.
* UIProcess/WebInspectorProxy.h:
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoWeb Inspector: Switch over to a tab based UI
timothy@apple.com [Sun, 26 Apr 2015 01:23:04 +0000 (01:23 +0000)]
Web Inspector: Switch over to a tab based UI
https://bugs.webkit.org/show_bug.cgi?id=144154

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):
(WebInspector._tabContentViewForType):
(WebInspector._rememberOpenTabs):
(WebInspector._windowResized):
(WebInspector._tabBrowserSizeDidChange):
(WebInspector._quickConsoleDidResize):
(WebInspector._sidebarWidthDidChange):
(WebInspector._tabBrowserSelectedTabContentViewDidChange):
(WebInspector._inspectModeStateChanged):
(WebInspector._focusedContentView):
* UserInterface/Main.html:
* UserInterface/Views/Main.css:
(#tab-browser):

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

5 years agoWeb Inspector: Remove Main.js code we don't need for Tabs
timothy@apple.com [Sun, 26 Apr 2015 01:22:33 +0000 (01:22 +0000)]
Web Inspector: Remove Main.js code we don't need for Tabs
https://bugs.webkit.org/show_bug.cgi?id=144126

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.contentLoaded):

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

5 years agoWeb Inspector: Change more places that changed WebInspector.navigationSidebar.selecte...
timothy@apple.com [Sun, 26 Apr 2015 01:22:10 +0000 (01:22 +0000)]
Web Inspector: Change more places that changed WebInspector.navigationSidebar.selectedSidebarPanel to tabs
https://bugs.webkit.org/show_bug.cgi?id=144125

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.toggleDetailsSidebar):
(WebInspector.tabContentViewClassForRepresentedObject):
(WebInspector._updateModifierKeys):
(WebInspector._consoleResizerMouseDown.dockedResizerDragEnd):
(WebInspector._consoleResizerMouseDown):
(WebInspector.linkifyURLAsNode):
(WebInspector.linkifyStringAsFragmentWithCustomLinkifier):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled):
(InspectorFrontendAPI.showConsole):
(InspectorFrontendAPI.showResources):
* UserInterface/Protocol/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.inspect):
* UserInterface/Views/DebuggerTabContentView.js:
(WebInspector.DebuggerTabContentView.prototype.canShowRepresentedObject):
(WebInspector.DebuggerTabContentView.prototype.revealAndSelectBreakpoint):
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._resourcesWasClicked):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar):
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser.bestTabContentViewForClass):

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

5 years agoWeb Inspector: Make Console work in a tab world
timothy@apple.com [Sun, 26 Apr 2015 01:21:38 +0000 (01:21 +0000)]
Web Inspector: Make Console work in a tab world
https://bugs.webkit.org/show_bug.cgi?id=144112

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.isShowingConsoleTab):
(WebInspector.UIString):
(WebInspector.toggleNavigationSidebar):
(WebInspector.toggleDetailsSidebar):
(WebInspector.tabContentViewClassForRepresentedObject):
(WebInspector.linkifyStringAsFragment):
* UserInterface/Images/Console.svg: Added.
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showConsole):
* UserInterface/Views/ConsoleTabContentView.js: Added.
(WebInspector.ConsoleTabContentView):
(WebInspector.ConsoleTabContentView.prototype.shown):
(WebInspector.ConsoleTabContentView.prototype.showRepresentedObject):
(WebInspector.ConsoleTabContentView.prototype.canShowRepresentedObject):
(WebInspector.ConsoleTabContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._consoleItemWasClicked):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype.shown):
(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
(WebInspector.LogContentView.prototype._showConsoleTab):
* UserInterface/Views/LogIcon.css:
(.log-icon .icon):
* UserInterface/Views/Main.css:
(#split-content-browser .hierarchical-path-component.log-icon .icon):
(#split-content-browser .hierarchical-path-component.log-icon .title):
(#split-content-browser .hierarchical-path-component.log-icon select):

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

5 years agoWeb Inspector: Make showing a content view work in the tab world
timothy@apple.com [Sun, 26 Apr 2015 01:20:59 +0000 (01:20 +0000)]
Web Inspector: Make showing a content view work in the tab world
https://bugs.webkit.org/show_bug.cgi?id=144110

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector.hideSplitConsole):
(WebInspector.showSourceCodeLocation):
(WebInspector.showOriginalUnformattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeLocation):
(WebInspector.showOriginalOrFormattedSourceCodeTextRange):
(WebInspector.showResourceRequest):
(WebInspector.debuggerToggleBreakpoints):
(WebInspector.debuggerPauseResumeToggle):
(WebInspector.debuggerStepOver):
(WebInspector.debuggerStepInto):
(WebInspector.debuggerStepOut):
(WebInspector._focusChanged):
(WebInspector._mouseWasClicked):
(WebInspector._dragOver):
(WebInspector._captureDidStart):
(WebInspector._debuggerDidPause):
(WebInspector._debuggerDidResume):
(WebInspector._frameWasAdded):
(WebInspector._undock):
(WebInspector._updateDockNavigationItems):
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
(WebInspector.Breakpoint.prototype.appendContextMenuItems):
* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.showMainResourceForFrame):
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
* UserInterface/Views/ComputedStyleDetailsPanel.js:
(WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
(WebInspector.ComputedStyleDetailsPanel):
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.updateHierarchicalPathForCurrentContentView):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView.prototype.restoreFromCookie):
* UserInterface/Views/DOMTreeDataGridNode.js:
(WebInspector.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
(WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline):
(WebInspector.DebuggerSidebarPanel.prototype._treeElementSelected):
(WebInspector.DebuggerSidebarPanel.prototype._addIssue):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssueAdded):
* UserInterface/Views/LayerTreeDataGridNode.js:
(WebInspector.LayerTreeDataGridNode.prototype._goToArrowWasClicked):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel.prototype.get contentBrowser):
(WebInspector.NavigationSidebarPanel.prototype.set contentBrowser):
(WebInspector.NavigationSidebarPanel.prototype._updateFilter):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
(WebInspector.ObjectTreeBaseTreeElement):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel.prototype._goToRequestDataClicked):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
(WebInspector.ResourceSidebarPanel.prototype.showDefaultContentView):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
(WebInspector.ResourceSidebarPanel.prototype._mainFrameMainResourceDidChange):
(WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
(WebInspector.ResourceSidebarPanel.prototype._storageCleared):
* UserInterface/Views/ResourceTimelineDataGridNode.js:
(WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
* UserInterface/Views/TimelineDataGrid.js:
(WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeElementSelected):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.shown):
(WebInspector.TimelineSidebarPanel.showTimelineViewForTimeline):

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

5 years agoWeb Inspector: Make debugger keyboard shortcuts global
timothy@apple.com [Sun, 26 Apr 2015 01:20:05 +0000 (01:20 +0000)]
Web Inspector: Make debugger keyboard shortcuts global
https://bugs.webkit.org/show_bug.cgi?id=144068

We wont always have a DebuggerSidebarPanel to listen for the shortcuts.

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector.showSourceCodeForFrame):
(WebInspector.showSourceCode):
* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.pause):
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssueAdded):
(WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
(WebInspector.DebuggerSidebarPanel):

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

5 years agoWeb Inspector: Remove Reload and Download Web Archive buttons from FrameTreeElement
timothy@apple.com [Sun, 26 Apr 2015 01:19:35 +0000 (01:19 +0000)]
Web Inspector: Remove Reload and Download Web Archive buttons from FrameTreeElement
https://bugs.webkit.org/show_bug.cgi?id=144064

The will be global toolbar items soon.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/FrameTreeElement.js:
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):

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

5 years agoWeb Inspector: Remove time and weight from the dashboard
timothy@apple.com [Sun, 26 Apr 2015 01:19:08 +0000 (01:19 +0000)]
Web Inspector: Remove time and weight from the dashboard
https://bugs.webkit.org/show_bug.cgi?id=144063

These two items were the odd ones out since they are only available
when recording a timeline. We will need the toolbar space soon, so make
this lets us make the dashboard skinnier.

This also removes the exception catching in DashboardContainerView. It doesn't really
help us and it makes debugging an exception harder.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DashboardContainerView.css:
(.toolbar .dashboard-container):
* UserInterface/Views/DashboardContainerView.js:
(WebInspector.DashboardContainerView.prototype._dashboardViewForRepresentedObject):
* UserInterface/Views/DefaultDashboardView.css:
(body.web .toolbar.collapsed .dashboard.default > .item.resourcesCount):
(body.javascript .toolbar .dashboard.default > .item.resourcesCount):
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._updateDisplay):

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

5 years agoWeb Inspector: Remove sidebar panel shortcut and image
timothy@apple.com [Sun, 26 Apr 2015 01:18:35 +0000 (01:18 +0000)]
Web Inspector: Remove sidebar panel shortcut and image
https://bugs.webkit.org/show_bug.cgi?id=144061

Sidebar panels no longer need a keyboard shortcut or a toolbar image.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
(WebInspector.ApplicationCacheDetailsSidebarPanel):
* UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
(WebInspector.CSSStyleDetailsSidebarPanel):
* UserInterface/Views/DOMDetailsSidebarPanel.js:
(WebInspector.DOMDetailsSidebarPanel):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
* UserInterface/Views/DebuggerSidebarPanel.js:
* UserInterface/Views/DetailsSidebarPanel.js:
(WebInspector.DetailsSidebarPanel):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel):
* UserInterface/Views/NavigationSidebarPanel.js:
(WebInspector.NavigationSidebarPanel):
(WebInspector.NavigationSidebarPanel.prototype.restoreStateFromCookie):
(WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
(WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
(WebInspector.NavigationSidebarPanel.prototype.show):
(WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
* UserInterface/Views/ProbeDetailsSidebarPanel.js:
(WebInspector.ProbeDetailsSidebarPanel):
* UserInterface/Views/RenderingFrameDetailsSidebarPanel.js:
* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WebInspector.ResourceDetailsSidebarPanel):
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel):
* UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
(WebInspector.ScopeChainDetailsSidebarPanel):
* UserInterface/Views/SidebarPanel.js:
(WebInspector.SidebarPanel):
(WebInspector.SidebarPanel.prototype.added):
(WebInspector.SidebarPanel.prototype.removed):
(WebInspector.SidebarPanel.prototype.visibilityDidChange):
* UserInterface/Views/TimelineSidebarPanel.js:
(WebInspector.TimelineSidebarPanel):
(WebInspector.TimelineSidebarPanel.prototype.showTimelineViewForTimeline):

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

5 years agoWeb Inspector: Remove allowedNavigationSidebarPanels, it isn't needed
timothy@apple.com [Sun, 26 Apr 2015 01:17:57 +0000 (01:17 +0000)]
Web Inspector: Remove allowedNavigationSidebarPanels, it isn't needed
https://bugs.webkit.org/show_bug.cgi?id=144056

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
* UserInterface/Views/ContentView.js:
* UserInterface/Views/CookieStorageContentView.js:
* UserInterface/Views/DOMStorageContentView.js:
* UserInterface/Views/DOMTreeContentView.js:
* UserInterface/Views/DatabaseContentView.js:
* UserInterface/Views/DatabaseTableContentView.js:
* UserInterface/Views/FontResourceContentView.js:
* UserInterface/Views/FrameDOMTreeContentView.js:
* UserInterface/Views/LogContentView.js:
* UserInterface/Views/ResourceClusterContentView.js:
* UserInterface/Views/TimelineRecordingContentView.js:

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

5 years agoWeb Inspector: Support passing extra arguments to ContentViews during construction
timothy@apple.com [Sun, 26 Apr 2015 01:17:23 +0000 (01:17 +0000)]
Web Inspector: Support passing extra arguments to ContentViews during construction
https://bugs.webkit.org/show_bug.cgi?id=144055

This allows us to pass the TimelineSidebarPanel to Timeline views since in the future
there could be multiple timeline sidebars, one per tab. So the global instance will
be going away.

This also removes the exception catching in ContentViewContainer. It doesn't really
help us and it makes debugging an exception harder.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype.showContentViewForRepresentedObject):
(WebInspector.ContentBrowser.prototype.contentViewForRepresentedObject):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView):
* UserInterface/Views/ContentViewContainer.js:
(WebInspector.ContentViewContainer.prototype.contentViewForRepresentedObject):
(WebInspector.ContentViewContainer.prototype.showContentViewForRepresentedObject):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.LayoutTimelineView.prototype._treeElementSelected):
(WebInspector.LayoutTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.NetworkTimelineView.prototype._treeElementSelected):
(WebInspector.NetworkTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype._treeElementSelected):
(WebInspector.OverviewTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptTimelineView.js:
(WebInspector.ScriptTimelineView):
(WebInspector.ScriptTimelineView.prototype._dataGridFiltersDidChange):
(WebInspector.ScriptTimelineView.prototype._treeElementSelected):
(WebInspector.ScriptTimelineView.prototype._closeStatusButtonClicked):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
* UserInterface/Views/TimelineSidebarPanel.js:
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype.get timelineSidebarPanel):

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

5 years agoWeb Inspector: Disable global keyboard shortcuts for background tabs
timothy@apple.com [Sun, 26 Apr 2015 01:16:50 +0000 (01:16 +0000)]
Web Inspector: Disable global keyboard shortcuts for background tabs
https://bugs.webkit.org/show_bug.cgi?id=143918

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
(WebInspector.ContentBrowser.prototype.shown): Added.
(WebInspector.ContentBrowser.prototype.hidden): Added.
Disable shortcuts on the browser and find banner.

* UserInterface/Views/ContentBrowserTabContentView.js:
(WebInspector.ContentBrowserTabContentView.prototype.shown): Added.
(WebInspector.ContentBrowserTabContentView.prototype.hidden): Added.
Tell the content browser we were shown or hidden.

* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner):
(WebInspector.FindBanner.prototype.show):
(WebInspector.FindBanner.prototype.enableKeyboardShortcuts): Added.
(WebInspector.FindBanner.prototype.disableKeyboardShortcuts): Added.
Support disabling or enabling the keyboard shortcuts.

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

5 years agoWeb Inspector: Add TabBrowser and TabContentView
timothy@apple.com [Sun, 26 Apr 2015 01:16:22 +0000 (01:16 +0000)]
Web Inspector: Add TabBrowser and TabContentView
https://bugs.webkit.org/show_bug.cgi?id=143886

Reviewed by Joseph Pecoraro.

* UserInterface/Images/Debugger.svg: Added.
* UserInterface/Images/Elements.svg: Added.
* UserInterface/Images/Gear.svg: Added.
* UserInterface/Images/NewTabPlus.svg: Added.
* UserInterface/Images/Resources.svg:
* UserInterface/Images/Timeline.svg: Added.
* UserInterface/Images/ToggleLeftSidebar.svg: Added.
* UserInterface/Images/ToggleRightSidebar.svg: Added.

* UserInterface/Views/ContentBrowserTabContentView.css: Added.
(.content-browser.tab.content-view > .content-browser):

* UserInterface/Views/ContentBrowserTabContentView.js: Added.
(WebInspector.ContentBrowserTabContentView):
(WebInspector.ContentBrowserTabContentView.prototype.get contentBrowser):
(WebInspector.ContentBrowserTabContentView.prototype.shown):
(WebInspector.ContentBrowserTabContentView.prototype.hidden):
(WebInspector.ContentBrowserTabContentView.prototype.closed):
(WebInspector.ContentBrowserTabContentView.prototype.updateLayout):
(WebInspector.ContentBrowserTabContentView.prototype.get managesDetailsSidebarPanels):
(WebInspector.ContentBrowserTabContentView.prototype.showDetailsSidebarPanels):
(WebInspector.ContentBrowserTabContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarCollapsedStateDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._detailsSidebarPanelSelected):
(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserRepresentedObjectsDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._contentBrowserCurrentContentViewDidChange):
(WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObjectInNavigationSidebar):

* UserInterface/Views/DebuggerTabContentView.js: Added.
(WebInspector.DebuggerTabContentView):

* UserInterface/Views/ElementsTabContentView.js: Added.
(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.prototype._mainFrameDidChange):

* UserInterface/Views/ResourcesTabContentView.js: Added.
(WebInspector.ResourcesTabContentView):

* UserInterface/Views/SettingsTabContentView.js: Added.
(WebInspector.SettingsTabContentView):

* UserInterface/Views/TabBrowser.css: Added.
(.tab-browser):
(.tab-browser > .tab-bar):
(.tab-browser > .content-view-container):
(.tab-browser > .tab-bar + .content-view-container):

* UserInterface/Views/TabBrowser.js: Added.
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype.get tabBar):
(WebInspector.TabBrowser.prototype.get navigationSidebar):
(WebInspector.TabBrowser.prototype.get detailsSidebar):
(WebInspector.TabBrowser.prototype.get selectedTabContentView):
(WebInspector.TabBrowser.prototype.updateLayout):
(WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
(WebInspector.TabBrowser.prototype.addTabForContentView):
(WebInspector.TabBrowser.prototype.showTabForContentView):
(WebInspector.TabBrowser.prototype.closeTabForContentView):
(WebInspector.TabBrowser.prototype._tabBarItemSelected):
(WebInspector.TabBrowser.prototype._sidebarPanelSelected):
(WebInspector.TabBrowser.prototype._sidebarCollapsedStateDidChange):
(WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
(WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):

* UserInterface/Views/TabContentView.js: Added.
(WebInspector.TabContentView):
(WebInspector.TabContentView.prototype.get parentTabBrowser):
(WebInspector.TabContentView.prototype.set parentTabBrowser):
(WebInspector.TabContentView.prototype.get tabBarItem):
(WebInspector.TabContentView.prototype.get managesDetailsSidebarPanels):
(WebInspector.TabContentView.prototype.showDetailsSidebarPanels):
(WebInspector.TabContentView.prototype.canShowRepresentedObject):
(WebInspector.TabContentView.prototype.get navigationSidebarPanel):
(WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarPanels):
(WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
(WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):

* UserInterface/Views/TimelineTabContentView.js: Added.
(WebInspector.TimelineTabContentView):

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

5 years agoWeb Inspector: Add a WebInspector.TabBar class
timothy@apple.com [Sun, 26 Apr 2015 01:15:03 +0000 (01:15 +0000)]
Web Inspector: Add a WebInspector.TabBar class
https://bugs.webkit.org/show_bug.cgi?id=143442

Reviewed by Joseph Pecoraro.

* UserInterface/Main.html:
Added new files.

* UserInterface/Protocol/InspectorFrontendHostStub.js:
(window.Symbol):
(WebInspector.InspectorFrontendHostStub.prototype.showContextMenu):
Added some stubs needed to work standalone.

* UserInterface/Views/TabBar.css: Added.
(.tab-bar):
(body.window-inactive .tab-bar):
(.tab-bar > .top-border):
(body.window-inactive .tab-bar > .top-border):
(.tab-bar > .item):
(.tab-bar > :nth-child(n + 2 of .item)):
(.tab-bar > .item.pinned):
(.tab-bar > .item.selected):
(.tab-bar > .item.new-tab-button:hover):
(.tab-bar:not(.animating) > .item:not(.selected):hover + .item):
(body.window-inactive .tab-bar > .item):
(body.window-inactive .tab-bar > .item.selected):
(.tab-bar > .item > .close):
(body:not(.window-inactive) .tab-bar:not(.single-tab) > .item:hover > .close):
(.tab-bar.single-tab > .item > .close):
(.tab-bar > .item > .close:hover):
(.tab-bar > .item > .close:active):
(.tab-bar > .item > .flex-space):
(.tab-bar > .item > .flex-space:last-child):
(.tab-bar > .item > .icon):
(.tab-bar > .item.selected > .icon):
(.tab-bar > .item.new-tab-button:hover > .icon):
(.tab-bar > .item > .title):
(.tab-bar > .item > .title > .content):
(.tab-bar:not(.animating) > .item:not(.selected):hover > .title):
(.tab-bar > .item.selected > .title):
(.tab-bar.collapsed > .item):
(.tab-bar.collapsed > .item > .flex-space):
(.tab-bar.collapsed > .item > .close):
(.tab-bar.hide-titles > .item > .title):
(.tab-bar.hide-titles > .item.selected:hover > .icon):
(.tab-bar.hide-titles > .item.selected:hover > .close):
(.tab-bar.static-layout):
(.tab-bar.static-layout > .item):
(.tab-bar.animating.closing-tab > .item):
(.tab-bar.animating:matches(.expanding-tabs, .inserting-tab) > .item):
(.tab-bar.animating.inserting-tab > .item.being-inserted):
(.tab-bar.animating.closing-tab > .item.selected):
(body.window-inactive .tab-bar.animating.closing-tab > .item.selected):
(.tab-bar.dragging-tab > .item.selected):

* UserInterface/Views/TabBar.js: Added.
(WebInspector.TabBar):
(WebInspector.TabBar.prototype.get newTabItem):
(WebInspector.TabBar.prototype.set newTabItem):
(WebInspector.TabBar.prototype.addTabBarItem):
(WebInspector.TabBar.prototype.insertTabBarItem.animateTabs):
(WebInspector.TabBar.prototype.insertTabBarItem.removeStyles):
(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.insertTabBarItem.set else):
(WebInspector.TabBar.prototype.insertTabBarItem.set this):
(WebInspector.TabBar.animateTabs.get if):
(WebInspector.TabBar.animateTabs):
(WebInspector.TabBar.removeStyles):
(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.updateLayoutSoon.update):
(WebInspector.TabBar.prototype.updateLayoutSoon):
(WebInspector.TabBar.prototype.updateLayout):
(WebInspector.TabBar.prototype.get selectedTabBarItem):
(WebInspector.TabBar.prototype.set selectedTabBarItem):
(WebInspector.TabBar.prototype.get tabBarItems):
(WebInspector.TabBar.prototype.get element):
(WebInspector.TabBar.prototype._findTabBarItem):
(WebInspector.TabBar.prototype._hasMoreThanOneNormalTab):
(WebInspector.TabBar.prototype._recordTabBarItemSizesAndPositions):
(WebInspector.TabBar.prototype._clearTabBarItemSizesAndPositions):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose.):
(WebInspector.TabBar.prototype._finishExpandingTabsAfterClose):
(WebInspector.TabBar.prototype._handleMouseDown):
(WebInspector.TabBar.prototype._handleMouseMoved):
(WebInspector.TabBar.prototype._handleMouseUp):
(WebInspector.TabBar.prototype._handleMouseLeave):
(WebInspector.TabBar.prototype._handleNewTabMouseEnter):

* UserInterface/Views/TabBarItem.js: Added.
(WebInspector.TabBarItem):
(WebInspector.TabBarItem.prototype.get identifier):
(WebInspector.TabBarItem.prototype.get element):
(WebInspector.TabBarItem.prototype.get parentTabBar):
(WebInspector.TabBarItem.prototype.set parentTabBar):
(WebInspector.TabBarItem.prototype.get selected):
(WebInspector.TabBarItem.prototype.set selected):
(WebInspector.TabBarItem.prototype.get pinned):
(WebInspector.TabBarItem.prototype.get image):
(WebInspector.TabBarItem.prototype.set image):
(WebInspector.TabBarItem.prototype.get title):
(WebInspector.TabBarItem.prototype.set title):
(WebInspector.TabBarItem.prototype.updateLayout):

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

5 years agoWeb Inspector: Make closing ContentViews more leak proof
timothy@apple.com [Sun, 26 Apr 2015 01:14:13 +0000 (01:14 +0000)]
Web Inspector: Make closing ContentViews more leak proof
https://bugs.webkit.org/show_bug.cgi?id=144200

Remove all listeners on the target objects in close that match the this object.
This makes things more foolproof when something changes or a new listener is
added to the same object. TimelineRecordingContentView also had a leak where
TimelineManager and DebuggerManager listeners were not being removed.

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.closed):
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.closed):
* UserInterface/Views/ContentFlowDOMTreeContentView.js:
(WebInspector.ContentFlowDOMTreeContentView.prototype.closed):
* UserInterface/Views/FrameDOMTreeContentView.js:
(WebInspector.FrameDOMTreeContentView.prototype.closed):
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype.closed):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.closed):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.closed):

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

5 years agoSet#keys !== Set#values
commit-queue@webkit.org [Sun, 26 Apr 2015 01:08:59 +0000 (01:08 +0000)]
Set#keys !== Set#values
https://bugs.webkit.org/show_bug.cgi?id=144190

Patch by Jordan Harband <ljharb@gmail.com> on 2015-04-25
Reviewed by Darin Adler.

Source/JavaScriptCore:

per https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype.keys
Set#keys should === Set#values

* runtime/SetPrototype.cpp:
(JSC::SetPrototype::finishCreation):
(JSC::setProtoFuncValues):
(JSC::setProtoFuncEntries):
(JSC::setProtoFuncKeys): Deleted.

LayoutTests:

* js/script-tests/set-keys.js: Added.
* js/set-keys-expected.txt: Added.
* js/set-keys.html: Added.

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

5 years agoAllow for pausing a JSContext when opening a Web Inspector
joepeck@webkit.org [Sun, 26 Apr 2015 01:06:59 +0000 (01:06 +0000)]
Allow for pausing a JSContext when opening a Web Inspector
<rdar://problem/20564788>

Reviewed by Timothy Hatcher.

* inspector/remote/RemoteInspector.mm:
(Inspector::RemoteInspector::receivedSetupMessage):
* inspector/remote/RemoteInspectorConstants.h:
* inspector/remote/RemoteInspectorDebuggable.h:
* inspector/remote/RemoteInspectorDebuggableConnection.h:
* inspector/remote/RemoteInspectorDebuggableConnection.mm:
(Inspector::RemoteInspectorDebuggableConnection::setup):
On any incoming setup message, we may want to automatically
pause the debuggable. If requested, pause the debuggable
after we have setup the frontend connection.

* runtime/JSGlobalObjectDebuggable.h:
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::pause):
Pass through to the inspector controller.

* inspector/JSGlobalObjectInspectorController.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::pause):
Enable pause on next statement.

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

5 years agoWeb Inspector: Make closing ContentViews more leak proof
timothy@apple.com [Sun, 26 Apr 2015 00:59:47 +0000 (00:59 +0000)]
Web Inspector: Make closing ContentViews more leak proof
https://bugs.webkit.org/show_bug.cgi?id=144200

Remove all listeners on the target objects in close that match the this object.
This makes things more foolproof when something changes or a new listener is
added to the same object. TimelineRecordingContentView also had a leak where
TimelineManager and DebuggerManager listeners were not being removed.

Reviewed by Darin Adler.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype.closed):
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.closed):
* UserInterface/Views/ContentFlowDOMTreeContentView.js:
(WebInspector.ContentFlowDOMTreeContentView.prototype.closed):
* UserInterface/Views/FrameDOMTreeContentView.js:
(WebInspector.FrameDOMTreeContentView.prototype.closed):
* UserInterface/Views/ResourceContentView.js:
(WebInspector.ResourceContentView.prototype.closed):
* UserInterface/Views/TextResourceContentView.js:
(WebInspector.TextResourceContentView.prototype.closed):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.closed):

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

5 years agoCrash if IDBTransaction is aborted right after it's created
darin@apple.com [Sat, 25 Apr 2015 23:47:41 +0000 (23:47 +0000)]
Crash if IDBTransaction is aborted right after it's created
https://bugs.webkit.org/show_bug.cgi?id=144199

Reviewed by Simon Fraser.

Source/WebCore:

Test: storage/indexeddb/transaction-abort.html

* Modules/indexeddb/IDBTransactionBackend.cpp:
(WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
transaction if it is already complete (has been aborted).

LayoutTests:

* platform/mac-wk2/TestExpectations: Unskip storage/indexeddb/transaction-abort.html.
* storage/indexeddb/transaction-abort-expected.txt: Updated since the exact text of
the execptions is different from what was marked here as expected.

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

5 years agoclass methods should be non-enumerable
rniwa@webkit.org [Sat, 25 Apr 2015 22:03:30 +0000 (22:03 +0000)]
class methods should be non-enumerable
https://bugs.webkit.org/show_bug.cgi?id=143181

Reviewed by Darin Adler.

Source/JavaScriptCore:

Fixed the bug by using Object.defineProperty to define methods.

This patch adds the concept of link time constants and uses it to resolve Object.defineProperty
inside CodeBlock's constructor since bytecode can be linked against multiple global objects.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock): Resolve link time constants that are used. Ignore ones with register
index of zero.
* bytecode/SpecialPointer.h: Added a new enum for link time constants. It currently contains
exactly one entry for Object.defineProperty.
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::addConstant): Added. Like addConstant that takes JSValue, allocate a new
constant register for the link time constant we're adding.
(JSC::UnlinkedCodeBlock::registerIndexForLinkTimeConstant): Added.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitMoveLinkTimeConstant): Added. Like addConstantValue, allocate a new
register for the specified link time constant and notify UnlinkedCodeBlock about it.
(JSC::BytecodeGenerator::emitCallDefineProperty): Added. Create a new property descriptor and call
Object.defineProperty with it.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode): Make static and non-static getters and setters for classes
non-enumerable by using emitCallDefineProperty to define them.
(JSC::PropertyListNode::emitPutConstantProperty): Ditto for a non-accessor properties.
(JSC::ClassExprNode::emitBytecode): Make prototype.constructor non-enumerable and make prototype
property on the class non-writable, non-configurable, and non-enumerable by using defineProperty.
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init): Set m_definePropertyFunction.
(JSC::JSGlobalObject::visitChildren): Visit m_definePropertyFunction.
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::definePropertyFunction): Added.
(JSC::JSGlobalObject::actualPointerFor): Added a variant that takes LinkTimeConstant.
(JSC::JSGlobalObject::jsCellForLinkTimeConstant): Like actualPointerFor, takes LinkTimeConstant and
returns a JSCell; e.g. Object.defineProperty.
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::addDefineProperty): Added. Returns Object.defineProperty.
* runtime/ObjectConstructor.h:

LayoutTests:

Added a regression test.

Also fixed a test that previously relied on "prototype" property being writable
since this is no longer the case.

* js/class-syntax-extends-expected.txt:
* js/class-syntax-prototype.html: Added.
* js/script-tests/class-syntax-extends.js:
* js/script-tests/class-syntax-prototype.js: Added.

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

5 years ago[ES6] Implement String.fromCodePoint
utatane.tea@gmail.com [Sat, 25 Apr 2015 22:00:51 +0000 (22:00 +0000)]
[ES6] Implement String.fromCodePoint
https://bugs.webkit.org/show_bug.cgi?id=144160

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch implements String.fromCodePoint.
It accepts multiple code points and generates a string that consists of given code points.
The range [0x0000 - 0x10FFFF] is valid for code points.
If the given value is out of range, throw a range error.

When a 0xFFFF <= valid code point is given,
String.fromCodePoint generates a string that contains surrogate pairs.

* runtime/StringConstructor.cpp:
(JSC::stringFromCodePoint):
(JSC::constructWithStringConstructor):
* tests/stress/string-from-code-point.js: Added.
(shouldBe):
(shouldThrow):
(toCodePoints):
(passThrough):

LayoutTests:

Add String.fromCodePoint.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

5 years agoRename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
mrobinson@webkit.org [Sat, 25 Apr 2015 21:43:06 +0000 (21:43 +0000)]
Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
https://bugs.webkit.org/show_bug.cgi?id=144182

Reviewed by Simon Fraser.

.:

* Source/cmake/OptionsEfl.cmake: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* Source/cmake/OptionsGTK.cmake: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* Source/cmake/OptionsMac.cmake: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* Source/cmake/WebKitFeatures.cmake: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* Source/cmakeconfig.h.cmake: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Source/WTF:

* wtf/FeatureDefines.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
* win/tools/vsprops/FeatureDefinesCairo.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.

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

5 years agoMavericks fix - no window.performance there.
ap@apple.com [Sat, 25 Apr 2015 20:50:23 +0000 (20:50 +0000)]
Mavericks fix - no window.performance there.

* fast/frames/flattening/resources/iframe-to-resize.html:

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Sat, 25 Apr 2015 20:20:29 +0000 (20:20 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Unreviewed. Add more temporary logging to figure out what's going on with the test on bots.

* fast/frames/flattening/resources/iframe-to-resize.html:

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

5 years agoWeb Inspector: assertion failure when editing inline styles
commit-queue@webkit.org [Sat, 25 Apr 2015 16:29:58 +0000 (16:29 +0000)]
Web Inspector: assertion failure when editing inline styles
https://bugs.webkit.org/show_bug.cgi?id=143939

Patch by Tobias Reiss <tobi+webkit@basecode.de> on 2015-04-25
Reviewed by Timothy Hatcher.

Prevent "_updateResourceContent" from being called on inline style changes.
Introduce a flag that marks a CSSStyleSheet as a representation of an
"ElementCSSInlineStyle" (DOM Level 2 spec) and return early.

* UserInterface/Controllers/CSSStyleManager.js:
(WebInspector.CSSStyleManager.prototype.styleSheetChanged):
* UserInterface/Models/CSSStyleSheet.js:
(WebInspector.CSSStyleSheet):
(WebInspector.CSSStyleSheet.isInlineStyle):
(WebInspector.CSSStyleSheet.prototype.markAsInlineStyle):
* UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype._parseStyleDeclarationPayload):

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

5 years agomayExit() is wrong about Branch nodes with ObjectOrOtherUse: they can exit.
mark.lam@apple.com [Sat, 25 Apr 2015 15:43:45 +0000 (15:43 +0000)]
mayExit() is wrong about Branch nodes with ObjectOrOtherUse: they can exit.
https://bugs.webkit.org/show_bug.cgi?id=144152

Reviewed by Filip Pizlo.

Changed the EdgeMayExit functor to recognize ObjectUse, ObjectOrOtherUse,
StringObjectUse, and StringOrStringObjectUse kinds as potentially triggering
OSR exits.  This was overlooked in the original code.

While only the ObjectOrOtherUse kind is relevant for manifesting this bug with
the Branch node, the other 3 may also trigger the same bug for other nodes.
To prevent this bug from manifesting with other nodes (and future ones that
are yet to be added to mayExits()'s "potential won't exit" set), we fix the
EdgeMayExit functor to handle all 4 use kinds (instead of just ObjectOrOtherUse).

Also added a test to exercise a code path that will trigger this bug with
the Branch node before the fix is applied.

* dfg/DFGMayExit.cpp:
* tests/stress/branch-may-exit-due-to-object-or-other-use-kind.js: Added.
(inlinedFunction):
(foo):

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

5 years agohttps://bugs.webkit.org/show_bug.cgi?id=144038
commit-queue@webkit.org [Sat, 25 Apr 2015 08:13:03 +0000 (08:13 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=144038

Patch by Dewei Zhu <dewei_zhu@apple.com> on 2015-04-25
Reviewed by Ryosuke Niwa

Add a script to run Speedometer and JetStream on a browser.

* Scripts/run-benchmark: Wrapper script to run benchmark.
(main):
* Scripts/webkitpy/benchmark_runner/README.md: Introduction of this script.
* Scripts/webkitpy/benchmark_runner/__init__.py: Added.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/__init__.py: Added.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builder_factory.py: Added.
(BenchmarkBuilderFactory):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/benchmark_builders.json: Added.
* Scripts/webkitpy/benchmark_runner/benchmark_builder/generic_benchmark_builder.py: Added.
(GenericBenchmarkBuilder):
(GenericBenchmarkBuilder.prepare):
(GenericBenchmarkBuilder._copyBenchmarkToTempDir):
(GenericBenchmarkBuilder._applyPatch):
(GenericBenchmarkBuilder.clean):
* Scripts/webkitpy/benchmark_runner/benchmark_builder/jetstream_benchmark_builder.py: Added.
(JetStreamBenchmarkBuilder):
(JetStreamBenchmarkBuilder.prepare):
(JetStreamBenchmarkBuilder._runCreateScript):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Main module that masters all the processes of benchmark running.
(BenchmarkRunner):
(BenchmarkRunner.__init__):
(BenchmarkRunner.execute):
(BenchmarkRunner.dump):
(BenchmarkRunner.wrap):
(BenchmarkRunner.merge):
* Scripts/webkitpy/benchmark_runner/browser_driver/__init__.py: Added.
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver.py: Added.
(BrowserDriver):
(BrowserDriver.prepareEnv):
(BrowserDriver.launchUrl):
(BrowserDriver.closeBrowser):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_driver_factory.py: Added.
(BrowserDriverFactory):
* Scripts/webkitpy/benchmark_runner/browser_driver/browser_drivers.json: Added.
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_chrome_driver.py: Added.
(OSXChromeDriver):
(OSXChromeDriver.prepareEnv):
(OSXChromeDriver.launchUrl):
(OSXChromeDriver.closeBrowsers):
* Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py: Added.
(OSXSafariDriver):
(OSXSafariDriver.prepareEnv):
(OSXSafariDriver.launchUrl):
(OSXSafariDriver.closeBrowsers):
* Scripts/webkitpy/benchmark_runner/data/patches/JetStream.patch: Patch that makes JetStream compatible with this script.
* Scripts/webkitpy/benchmark_runner/data/patches/Speedometer.patch: Patch that makes Speedometer compatible with this scritp.
* Scripts/webkitpy/benchmark_runner/data/plans/jetstream.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer.plan: Added.
* Scripts/webkitpy/benchmark_runner/generic_factory.py: Factory for generic purpose.
(GenericFactory):
(GenericFactory.iterateGetItem):
(GenericFactory.create):
* Scripts/webkitpy/benchmark_runner/http_server_driver/__init__.py: Added.
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py: Added.
(ServerControl):
(ServerControl.render_GET):
(ServerControl.render_POST):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver.py: Added.
(HTTPServerDriver):
(HTTPServerDriver.serve):
(HTTPServerDriver.fetchResult):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_driver_factory.py: Added.
(HTTPServerDriverFactory):
* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server_drivers.json: Added.
* Scripts/webkitpy/benchmark_runner/http_server_driver/simple_http_server_driver.py: Added.
(SimpleHTTPServerDriver):
(SimpleHTTPServerDriver.depends):
(SimpleHTTPServerDriver.__init__):
(SimpleHTTPServerDriver.serve):
(SimpleHTTPServerDriver.baseUrl):
(SimpleHTTPServerDriver.fetchResult):
* Scripts/webkitpy/benchmark_runner/utils.py: Utility module.
(ModuleNotFoundError):
(loadModule):
(getPathFromProjectRoot):
(loadJSONFromFile):
(TimeoutError):
(timeout):
(timeout.__init__):
(timeout.handle_timeout):
(timeout.__enter__):
(timeout.__exit__):

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

5 years agoUnreviewed, rolling out r183288.
commit-queue@webkit.org [Sat, 25 Apr 2015 06:57:12 +0000 (06:57 +0000)]
Unreviewed, rolling out r183288.
https://bugs.webkit.org/show_bug.cgi?id=144189

Made js/sort-with-side-effecting-comparisons.html time out in
debug builds (Requested by ap on #webkit).

Reverted changeset:

"It shouldn't take 1846 lines of code and 5 FIXMEs to sort an
array."
https://bugs.webkit.org/show_bug.cgi?id=144013
http://trac.webkit.org/changeset/183288

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

5 years agoCRASH in operationCreateDirectArgumentsDuringExit()
fpizlo@apple.com [Sat, 25 Apr 2015 05:19:07 +0000 (05:19 +0000)]
CRASH in operationCreateDirectArgumentsDuringExit()
https://bugs.webkit.org/show_bug.cgi?id=143962

Reviewed by Geoffrey Garen.

We shouldn't assume that constant-like OSR exit values are always recoverable. They are only
recoverable so long as they are live. Therefore, OSR exit should track liveness of
constants instead of assuming that they are always live.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::noticeOSRBirth):
(JSC::DFG::GenerationInfo::appendBirth):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGVariableEvent.cpp:
(JSC::DFG::VariableEvent::dump):
* dfg/DFGVariableEvent.h:
(JSC::DFG::VariableEvent::birth):
(JSC::DFG::VariableEvent::id):
(JSC::DFG::VariableEvent::dataFormat):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::reconstruct):
* tests/stress/phantom-direct-arguments-clobber-argument-count.js: Added.
(foo):
(bar):
* tests/stress/phantom-direct-arguments-clobber-callee.js: Added.
(foo):
(bar):

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

5 years agoUnreviewed, rolling out r183303.
commit-queue@webkit.org [Sat, 25 Apr 2015 03:40:02 +0000 (03:40 +0000)]
Unreviewed, rolling out r183303.
https://bugs.webkit.org/show_bug.cgi?id=144181

Change was incorrect, broke builds (Requested by smfr on
#webkit).

Reverted changeset:

"Fix the build."
http://trac.webkit.org/changeset/183303

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

5 years ago[Cocoa] FontPlatformData's equality check should always use reference URLs
mmaxfield@apple.com [Sat, 25 Apr 2015 03:30:20 +0000 (03:30 +0000)]
[Cocoa] FontPlatformData's equality check should always use reference URLs
https://bugs.webkit.org/show_bug.cgi?id=144168

Reviewed by Tim Horton.

<rdar://problem/18985642> is not fixed, so we need to continue using the older
objectForEqualityCheck().

No new tests because there is no behavior change.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::objectForEqualityCheck):

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

5 years agoImplement parsing support for font-synthesis CSS property
mmaxfield@apple.com [Sat, 25 Apr 2015 03:29:23 +0000 (03:29 +0000)]
Implement parsing support for font-synthesis CSS property
https://bugs.webkit.org/show_bug.cgi?id=144180
Source/WebCore:

<rdar://problem/20692791>
<rdar://problem/20625024>

Reviewed by Tim Horton.

See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop

This property allows web authors to opt out of font synthesis. This patch only
implements parsing support for the property.

Test: fast/css3-text/font-synthesis-parse.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
(WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Call parseFontSynthesis().
(WebCore::CSSParser::parseFontSynthesis): Accept the grammar
"none | [ weight || style ]"
* css/CSSParser.h: Function signature.
* css/CSSPropertyNames.in: New CSS property name.
* css/CSSValueKeywords.in: New CSS value names.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
representation of font-synthesis for a given CSSValue.
* rendering/style/RenderStyle.h: Function signature.
* rendering/style/RenderStyleConstants.h: Internal representation of
font-synthesis.
* rendering/style/StyleRareInheritedData.h: Where we actually store the bits
related to this internal representation.

LayoutTests:

Reviewed by Tim Horton.

* fast/css3-text/font-synthesis-parse-expected.txt: Added.
* fast/css3-text/font-synthesis-parse.html: Added.

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

5 years agoFix the build.
simon.fraser@apple.com [Sat, 25 Apr 2015 01:31:05 +0000 (01:31 +0000)]
Fix the build.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController initWithConfiguration:]):

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

5 years agoHave the web inspector report accurate memory use for layers with detached backing...
simon.fraser@apple.com [Sat, 25 Apr 2015 01:03:03 +0000 (01:03 +0000)]
Have the web inspector report accurate memory use for layers with detached backing store
https://bugs.webkit.org/show_bug.cgi?id=144179

Reviewed by Dean Jackson.
Source/WebCore:

Only report memory use for layers whose backing store is attached.

* platform/graphics/ca/GraphicsLayerCA.cpp:
* platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
which platforms can override if they allow backing store detaching.

Source/WebKit2:

Remote layers can make their backing store volatile, so the backing only contributes
to reported memory use when attached.

* WebProcess/WebPage/mac/PlatformCALayerRemote.h:

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

5 years agoTrack a coverage rect through GraphicsLayerCA flushes, use it to mark backing store...
simon.fraser@apple.com [Sat, 25 Apr 2015 01:02:59 +0000 (01:02 +0000)]
Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
https://bugs.webkit.org/show_bug.cgi?id=144165

Reviewed by Dean Jackson.

New results for platform/mac-wk2/tiled-drawing tests that dump layer trees.

* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-div-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-div-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-mainframe-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-select-latched-select-with-handler-expected.txt:
* platform/mac-wk2/tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/simple-document-with-margin-tiles-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-speculative-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-expected.txt:
* platform/mac-wk2/tiled-drawing/tiled-drawing-zoom-scrolled-expected.txt:
* platform/mac-wk2/tiled-drawing/use-tiled-drawing-expected.txt:
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt:

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

5 years agoTrack a coverage rect through GraphicsLayerCA flushes, use it to mark backing store...
simon.fraser@apple.com [Sat, 25 Apr 2015 01:02:52 +0000 (01:02 +0000)]
Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
https://bugs.webkit.org/show_bug.cgi?id=144165

Reviewed by Dean Jackson.

Source/WebCore:

Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
which maps this rect through all the layers. Each layer tests intersection with
this rect to determine if its backing store should be attached.

This will cause us to drop backing store for layers that don't intersect the
visible part of the view, which is too aggressive. A future patch will add
some padding.

Tests: compositing/visible-rect/coverage-clipped.html
       compositing/visible-rect/coverage-scrolling.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
(WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
secondary coverage rect. A future patch will inflate this on the way down the tree.
(WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
we have a secondary coverage rect, that rect can be clipped to us too.
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
* platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
Use more C++11 initializers.
(WebCore::GraphicsLayerCA::coverageRect):

LayoutTests:

Updated results that now include coverage rects, and a new test that includes both visible
and hidden layers.

* compositing/contents-scale/animating-expected.txt:
* compositing/contents-scale/rounded-contents-scale-expected.txt:
* compositing/contents-scale/scaled-ancestor-expected.txt:
* compositing/contents-scale/simple-scale-expected.txt:
* compositing/contents-scale/z-translate-expected.txt:
* compositing/visible-rect/coverage-clipped-expected.txt: Added.
* compositing/visible-rect/coverage-clipped.html: Added.
* compositing/visible-rect/coverage-scrolling-expected.txt: Added.
* compositing/visible-rect/coverage-scrolling.html: Added.
* platform/ios-simulator-wk2/compositing/visible-rect/coverage-clipped-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/visible-rect/coverage-scrolling-expected.txt: Added.
* platform/mac-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac-wk2/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac-wk2/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt:
* platform/mac/compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-clamped-expected.txt:
* platform/mac/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt:
* platform/mac/compositing/tiling/tile-cache-zoomed-expected.txt:
* platform/mac/compositing/visible-rect/2d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/3d-transform-style-expected.txt:
* platform/mac/compositing/visible-rect/3d-transformed-expected.txt:
* platform/mac/compositing/visible-rect/animated-expected.txt:
* platform/mac/compositing/visible-rect/animated-from-none-expected.txt:
* platform/mac/compositing/visible-rect/clipped-by-viewport-expected.txt:
* platform/mac/compositing/visible-rect/clipped-visible-rect-expected.txt:
* platform/mac/compositing/visible-rect/flipped-preserve-3d-expected.txt:
* platform/mac/compositing/visible-rect/iframe-and-layers-expected.txt:
* platform/mac/compositing/visible-rect/iframe-no-layers-expected.txt:
* platform/mac/compositing/visible-rect/nested-transform-expected.txt:
* platform/mac/compositing/visible-rect/scrolled-expected.txt:

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

5 years agotheverge.com burning 100% CPU on iPad (due to window.screenX/Y)
akling@apple.com [Sat, 25 Apr 2015 00:25:39 +0000 (00:25 +0000)]
theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
<https://webkit.org/b/144175>
<rdar://problem/20694585>

Reviewed by Anders Carlsson.

Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
IPC request to the UI process that would give the same result, but spend way
more time and CPU cycles to do so.

With this change, theverge.com CPU usage goes from 100% to ~20% when idle.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):

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

5 years agoDisable ActionMenusPDFTest due to timeout on test bot
bfulgham@apple.com [Sat, 25 Apr 2015 00:19:32 +0000 (00:19 +0000)]
Disable ActionMenusPDFTest due to timeout on test bot

* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(TestWebKitAPI::TEST):

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

5 years agoTextIndicator for embedded PDFs is slightly offset
bfulgham@apple.com [Sat, 25 Apr 2015 00:16:52 +0000 (00:16 +0000)]
TextIndicator for embedded PDFs is slightly offset
https://bugs.webkit.org/show_bug.cgi?id=144172
<rdar://problem/20691304>

Reviewed by Tim Horton.

When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
step where the font ascent was used to adjust the origin used for the TextIndicator. This
patch determines the correct ascent for the range of characters in the selection, and
adjusts the offset by the difference between the ascent and the height of the selection rect.

Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
an equivalent text bounding box by insetting the rect by half the size of the ascent.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
font ascent and scale factor into account.

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

5 years agoREGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralH...
ddkilzer@apple.com [Sat, 25 Apr 2015 00:11:43 +0000 (00:11 +0000)]
REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]

Fixes the following build failures:

    WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
        CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
                                                ^~~~~~~~~~~~~~~~~~~~~~
    WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
        CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
               ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Platform/spi/ios/UIKitSPI.h:
(+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.

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

5 years agoAnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that...
dino@apple.com [Sat, 25 Apr 2015 00:11:07 +0000 (00:11 +0000)]
AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
https://bugs.webkit.org/show_bug.cgi?id=144173
<rdar://problem/20526168>

Reviewed by Simon Fraser.

Keep a list of Animations that care about scroll updates, and only
run the animation update if the list is not empty.

Covered by existing tests.

* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
if this is an animation that depends on scrolling.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
new removeFromAnimationsDependentOnScroll as this animation is deleted.
(WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
(WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
there are animations that care.
(WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
value to FrameView.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::wantsScrollUpdates):

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

5 years agoChange _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
andersca@apple.com [Sat, 25 Apr 2015 00:09:25 +0000 (00:09 +0000)]
Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=144171

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore initWithDataStore:]):
(+[_WKWebsiteDataStore defaultDataStore]):
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore isNonPersistent]):
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
(-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
* WebKit2.xcodeproj/project.pbxproj:

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

5 years agoWKPDFView does not support password-protected PDFs
timothy_horton@apple.com [Fri, 24 Apr 2015 23:54:59 +0000 (23:54 +0000)]
WKPDFView does not support password-protected PDFs
https://bugs.webkit.org/show_bug.cgi?id=144162
<rdar://problem/18411512>

Reviewed by Andy Estes.

* Platform/spi/ios/UIKitSPI.h:
Add some SPI.

* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _didLoadPDFDocument]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
and initial setup of the page views out into _didLoadPDFDocument.

If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
we'll continue on to _didLoadPDFDocument as previously.

(-[WKPDFView web_setMinimumSize:]):
Resize the password UI instead of the PDF pages if we have it.

(-[WKPDFView _computePageAndDocumentFrames]):
Don't bother doing any work revalidating PDF pages if the document is locked.

(-[WKPDFView _updatePasswordEntryField]):
Make sure that the UIDocumentPassword view is always the size of the scrollview.
This takes care of rotation.

(-[WKPDFView _keyboardDidShow:]):
Make sure that we scroll the password field around, if necessary, to keep it
on screen when editing begins.

(-[WKPDFView _showPasswordEntryField]):
(-[WKPDFView _hidePasswordEntryField]):
Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
while it's up. The UIDocumentPassword view is installed into the scroll view
to match UIWebView behavior.

(-[WKPDFView userDidEnterPassword:forPasswordView:]):
(-[WKPDFView didBeginEditingPassword:inView:]):
(-[WKPDFView didEndEditingPassword:inView:]):
(-[WKPDFView _didFailToUnlock]):
Pop up a dialog informing the user that they entered the wrong password.

(-[WKPDFView _tryToUnlockWithPassword:]):
Try to unlock the document. If it succeeds, hide the unlock UI and go back to
_didLoadPDFDocument.

* English.lproj/Localizable.strings:
Add some localizable strings.

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

5 years agoFix iOS EWS builds after updating to iOS 8.3 SDK
ddkilzer@apple.com [Fri, 24 Apr 2015 23:51:39 +0000 (23:51 +0000)]
Fix iOS EWS builds after updating to iOS 8.3 SDK

* platform/spi/cocoa/CoreTextSPI.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
- Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.

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

5 years ago[JSC] When inserting a NaN into a Int32 array, we convert it to DoubleArray then...
benjamin@webkit.org [Fri, 24 Apr 2015 23:29:32 +0000 (23:29 +0000)]
[JSC] When inserting a NaN into a Int32 array, we convert it to DoubleArray then to ContiguousArray
https://bugs.webkit.org/show_bug.cgi?id=144169

Patch by Benjamin Poulain <bpoulain@apple.com> on 2015-04-24
Reviewed by Geoffrey Garen.

* runtime/JSObject.cpp:
(JSC::JSObject::convertInt32ForValue):
DoubleArray do not store NaN, they are used for holes.
What happened was:
1) We fail to insert the NaN in the Int32 array because it is a double.
2) We were converting the array to DoubleArray.
3) We were trying to insert the value again. We would fail again because
   DoubleArray does not store NaN.
4) We would convert the DoubleArrayt to Contiguous Array, converting the values
   to boxed values.

* tests/stress/int32array-transition-on-nan.js: Added.
The behavior is not really observable. This only test nothing crashes in those
cases.

(insertNaNWhileFilling):
(testInsertNaNWhileFilling):
(insertNaNAfterFilling):
(testInsertNaNAfterFilling):
(pushNaNWhileFilling):
(testPushNaNWhileFilling):

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

5 years agoHandling additional review feedback after http://trac.webkit.org/changeset/183280
beidson@apple.com [Fri, 24 Apr 2015 23:11:07 +0000 (23:11 +0000)]
Handling additional review feedback after trac.webkit.org/changeset/183280
https://bugs.webkit.org/show_bug.cgi?id=144157.

Suggested by, implicitly reviewed by, and explicitly rubber-stamped by Alexey Proskuryakov.

* http/tests/security/cors-post-redirect-303-expected.txt: Added.
* http/tests/security/cors-post-redirect-303.html: Added.
* http/tests/security/resources/cors-post-redirect-target.php:

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

5 years agoUnreviewed iOS build fix; add declarations to AVKitSPI.h
jer.noble@apple.com [Fri, 24 Apr 2015 23:04:48 +0000 (23:04 +0000)]
Unreviewed iOS build fix; add declarations to AVKitSPI.h

* platform/spi/cocoa/AVKitSPI.h:

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

5 years agoIt shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
ggaren@apple.com [Fri, 24 Apr 2015 23:02:29 +0000 (23:02 +0000)]
It shouldn't take 1846 lines of code and 5 FIXMEs to sort an array.
https://bugs.webkit.org/show_bug.cgi?id=144013

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch implements Array.prototype.sort in JavaScript, removing the
C++ implementations. It is simpler and less error-prone to express our
operations in JavaScript, which provides memory safety, exception safety,
and recursion safety.

The performance result is mixed, but net positive in my opinion. It's
difficult to enumerate all the results, since we used to have so many
different sorting modes, and there are lots of different data patterns
across which you might want to measure sorting. Suffice it to say:

    (*) The benchmarks we track are faster or unchanged.

    (*) Sorting random input using a comparator -- which we think is
    common -- is 3X faster.

    (*) Sorting random input in a non-array object -- which jQuery does
    -- is 4X faster.

    (*) Sorting random input in a compact array of integers using a
    trivial pattern-matchable comparator is 2X *slower*.

* builtins/Array.prototype.js:
(sort.min):
(sort.stringComparator):
(sort.compactSparse): Special case compaction for sparse arrays because
we don't want to hang when sorting new Array(BIG).

(sort.compact):
(sort.merge):
(sort.mergeSort): Use merge sort because it's a reasonably efficient
stable sort. We have evidence that some sites depend on stable sort,
even though the ES6 spec does not mandate it. (See
<http://trac.webkit.org/changeset/33967>.)

This is a textbook implementation of merge sort with three optimizations:

    (1) Use iteration instead of recursion;

    (2) Use array subscripting instead of array copying in order to
    create logical sub-lists without creating physical sub-lists;

    (3) Swap src and dst at each iteration instead of copying src into
    dst, and only copy src into the subject array at the end if src is
    not the subject array.

(sort.inflate):
(sort.comparatorSort):
(sort): Sort in JavaScript for the win.

* builtins/BuiltinExecutables.cpp:
(JSC::BuiltinExecutables::createExecutableInternal): Allow non-private
names so we can use helper functions.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::isNumericCompareFunction): Deleted.
* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::setIsNumericCompareFunction): Deleted.
(JSC::UnlinkedCodeBlock::isNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::setIsNumericCompareFunction): Deleted.
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::FunctionNode::emitBytecode): We don't do this special casing based
on pattern matching anymore. This was mainly an optimization to avoid
the overhead of calling from C++ to JS, which we now avoid by
sorting in JS.

* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::pushTempSortVector): Deleted.
(JSC::Heap::popTempSortVector): Deleted.
(JSC::Heap::visitTempSortVectors): Deleted.
* heap/Heap.h: We don't have temp sort vectors anymore because we sort
in JavaScript using a normal JavaScript array for our temporary storage.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseInner): Allow capturing so we can use
helper functions.

* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction): Deleted.
(JSC::attemptFastSort): Deleted.
(JSC::performSlowSort): Deleted.
(JSC::arrayProtoFuncSort): Deleted.

* runtime/CommonIdentifiers.h: New strings used by sort.

* runtime/JSArray.cpp:
(JSC::compareNumbersForQSortWithInt32): Deleted.
(JSC::compareNumbersForQSortWithDouble): Deleted.
(JSC::compareNumbersForQSort): Deleted.
(JSC::compareByStringPairForQSort): Deleted.
(JSC::JSArray::sortNumericVector): Deleted.
(JSC::JSArray::sortNumeric): Deleted.
(JSC::ContiguousTypeAccessor::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor::replaceDataReference): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::getAsValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::setWithValue): Deleted.
(JSC::ContiguousTypeAccessor<ArrayWithDouble>::replaceDataReference): Deleted.
(JSC::JSArray::sortCompactedVector): Deleted.
(JSC::JSArray::sort): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_less): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_greater): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::get_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::set_balance_factor): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_key): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_key_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::compare_node_node): Deleted.
(JSC::AVLTreeAbstractorForArrayCompare::null): Deleted.
(JSC::JSArray::sortVector): Deleted.
(JSC::JSArray::compactForSorting): Deleted.
* runtime/JSArray.h:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation): Provide some builtins used
by sort.

Source/WTF:

Remove this custom tree implementation because it is unused. (It was
previously used to achieve a stable array sort in certain cases.)

* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/AVLTree.h: Removed.
* wtf/CMakeLists.txt:

LayoutTests:

* js/script-tests/array-holes.js:
* js/array-holes-expected.txt: This result now matches Firefox. We see
'peekaboo', which is a prototype property, rather than a hole, because
sorting uses [[Get]], which sees prototype properties.

The ES6 spec says that sorting should use [[Get]], so this new result
matches the spec a little better -- although the spec also says that the
result of sorting is undefined in this case because of the presence of
an indexed property in the prototype chain.

* js/dom/array-prototype-properties-expected.txt: Updated error message
to match other array prototype error messages.

* js/comparefn-sort-stability-expected.txt:
* js/script-tests/comparefn-sort-stability.js: Made this test bigger in
order to demonstrate that Firefox and Safari use a stable sort, and
Chrome does not.

* js/script-tests/array-sort-sparse.js:
* js/array-sort-sparse-expected.txt: Added some tests for things I got
wrong in this patch.

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Fri, 24 Apr 2015 22:31:31 +0000 (22:31 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Unreviewed follow-up. Added a notifyDone, so that the watchdog timer actually works.

* fast/frames/flattening/resources/iframe-to-resize.html:

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

5 years agoMake rangeExpandedAroundPositionByCharacters to all platforms.
enrica@apple.com [Fri, 24 Apr 2015 22:22:05 +0000 (22:22 +0000)]
Make rangeExpandedAroundPositionByCharacters to all platforms.
https://bugs.webkit.org/show_bug.cgi?id=144161

Reviewed by Tim Horton.

No change in functionality, simply making this available
to all platforms.

* editing/VisibleUnits.cpp:
(WebCore::rangeExpandedAroundPositionByCharacters):
* editing/VisibleUnits.h:
* editing/mac/DataDetection.mm:
* editing/mac/DictionaryLookup.h:
* editing/mac/DictionaryLookup.mm:
(WebCore::rangeExpandedAroundPositionByCharacters): Deleted.

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

5 years agoPurge PassRefPtr from NamedNodeMap.
akling@apple.com [Fri, 24 Apr 2015 22:05:30 +0000 (22:05 +0000)]
Purge PassRefPtr from NamedNodeMap.
<https://webkit.org/b/144091>

Reviewed by Antti Koivisto.

Use RefPtr instead of PassRefPtr in NamedNodeMap.

* dom/NamedNodeMap.cpp:
(WebCore::NamedNodeMap::getNamedItem):
(WebCore::NamedNodeMap::getNamedItemNS):
(WebCore::NamedNodeMap::removeNamedItem):
(WebCore::NamedNodeMap::removeNamedItemNS):
(WebCore::NamedNodeMap::setNamedItem):
(WebCore::NamedNodeMap::setNamedItemNS):
(WebCore::NamedNodeMap::item):
* dom/NamedNodeMap.h:

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

5 years agoUnreviewed, rolling out r183266.
commit-queue@webkit.org [Fri, 24 Apr 2015 22:00:18 +0000 (22:00 +0000)]
Unreviewed, rolling out r183266.
https://bugs.webkit.org/show_bug.cgi?id=144164

Broke 32-bit build and a test. (Requested by ap on #webkit).

Reverted changeset:

"AX: richer text change notifications (142719)"
https://bugs.webkit.org/show_bug.cgi?id=142719
http://trac.webkit.org/changeset/183266

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

5 years agoREGRESSION: WebKit2.ActionMenusTest API test fails
bfulgham@apple.com [Fri, 24 Apr 2015 21:53:47 +0000 (21:53 +0000)]
REGRESSION: WebKit2.ActionMenusTest API test fails
https://bugs.webkit.org/show_bug.cgi?id=144149
<rdar://problem/20677770>

Reviewed by Tim Horton.

Source/WebKit2:

Tested by TestWebKitAPI

The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
was receiving from root view to the plugin view. Consequently, full page PDFs
did hit testing correctly, but an <embed> PDF would not.

Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
expect 'root view' coordinates and perform the requisite conversions, rather
than expecting 'plugin view' coordinates.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
for the input.
(WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
coordinates to the PDF's view coordinate space.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
not content coordinates.

Tools:

* TestWebKitAPI/Tests/WebKit2/action-menu-targets.html: Revise to use the same test PDF
as the 'ActionMenusPDFTest'.
* TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm:
(TestWebKitAPI::TEST): Unskip the PDF portion of ActionMenusTest, and revise its expected output
to match the hit test on the 'action-menu-target.pdf' test file.

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

5 years agoCleanup: Use @memoized for property IOSSimulator.testing_device
dbates@webkit.org [Fri, 24 Apr 2015 21:39:06 +0000 (21:39 +0000)]
Cleanup: Use @memoized for property IOSSimulator.testing_device
https://bugs.webkit.org/show_bug.cgi?id=141715

Reviewed by Darin Adler.

Simplify the caching of the result of IOSSimulator.testing_device
and make the code more readable by making use of the @memoized declarator
instead of explicitly managing a private instance variable,
IOSSimulator._testing_device, for the cached result.

* Scripts/webkitpy/port/ios.py:
(IOSPort.determine_full_port_name):
(IOSSimulatorPort.__init__): Delete instance variable IOSSimulatorPort._testing_device.
(IOSSimulatorPort):
(IOSSimulatorPort.testing_device): No need to cache the created device object in
IOSSimulatorPort._testing_device since we are marking this function @memoized.
(IOSSimulatorPort.reset_preferences): Code style fix; inline self.testing_device.path instead
of caching in local variable since we only make use of this value exactly once in this function.
(IOSPort.__init__): Deleted; The instance variable IOSPort._testing_device has never
been used since being added in r178622. So, we can remove this constructor since
it's the trivial constructor once we remove the instance variable IOSPort._testing_device.

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

5 years agoOrigin header is preserved on cross-origin redirects.
beidson@apple.com [Fri, 24 Apr 2015 21:09:02 +0000 (21:09 +0000)]
Origin header is preserved on cross-origin redirects.
https://bugs.webkit.org/show_bug.cgi?id=144157.

Reviewed by Sam Weinig.

Source/WebCore:

Tests: http/tests/security/cors-post-redirect-301.html
       http/tests/security/cors-post-redirect-302.html
       http/tests/security/cors-post-redirect-307.html
       http/tests/security/cors-post-redirect-308.html

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::willSendRequest): Ditto.

LayoutTests:

* http/tests/security/cors-post-redirect-301-expected.txt: Added.
* http/tests/security/cors-post-redirect-301.html: Added.
* http/tests/security/cors-post-redirect-302-expected.txt: Added.
* http/tests/security/cors-post-redirect-302.html: Added.
* http/tests/security/cors-post-redirect-307-expected.txt: Added.
* http/tests/security/cors-post-redirect-307.html: Added.
* http/tests/security/cors-post-redirect-308-expected.txt: Added.
* http/tests/security/cors-post-redirect-308.html: Added.
* http/tests/security/resources/cors-post-redirect-target.php: Added.

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

5 years agoAddress a review comment from Joe Pecoraro.
andersca@apple.com [Fri, 24 Apr 2015 20:55:22 +0000 (20:55 +0000)]
Address a review comment from Joe Pecoraro.

* UIProcess/API/Cocoa/WKWebsiteDataStore.h:

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

5 years agoRename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
andersca@apple.com [Fri, 24 Apr 2015 20:48:32 +0000 (20:48 +0000)]
Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
https://bugs.webkit.org/show_bug.cgi?id=144158

Reviewed by Beth Dakin.

Source/WebKit2:

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::isPersistent):
(API::WebsiteDataStore::isNonPersistent): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore isPersistent]):
(-[WKWebsiteDataStore isNonPersistent]): Deleted.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore isNonPersistent]):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController initWithConfiguration:]):

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

5 years agoImmediate action not functional for embedded PDFs
bfulgham@apple.com [Fri, 24 Apr 2015 19:33:10 +0000 (19:33 +0000)]
Immediate action not functional for embedded PDFs
https://bugs.webkit.org/show_bug.cgi?id=143952
<rdar://problem/19842365>

Reviewed by Tim Horton.

Source/WebCore:

Add a dictionary lookup method to allow us to retrieve
relevant information for PDFs.

* editing/mac/DictionaryLookup.mm:
(WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
where the Lookup engine selects a smaller range than the initial automatic
selection performed on clicking.

Source/WebKit2:

Add a new method to retrieve appropriate dictionary lookup content and update the
hit test result with relevant dictionary content and the bounding rect of the
selection.

* WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
convert PDF 'in page' units to the equivalent view units.
(WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
(WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
its bounding rect and return the result in view units.
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
* WebProcess/Plugins/PluginProxy.h: Add stub.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewRectForSelection): Added.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
(WebKit::textIndicatorTransitionForActionMenu): Added helper function.
(WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
with relevant dictionary lookup content, and mark the result as a text node (if
appropriate).

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

5 years ago[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state...
jer.noble@apple.com [Fri, 24 Apr 2015 19:15:57 +0000 (19:15 +0000)]
[WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
https://bugs.webkit.org/show_bug.cgi?id=144153

Reviewed by Alexey Proskuryakov.

Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.

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

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

5 years agoSource/JavaScriptCore:
mmirman@apple.com [Fri, 24 Apr 2015 19:08:01 +0000 (19:08 +0000)]
Source/JavaScriptCore:
Made Object.prototype.__proto__ native getter and setter check that this object not null or undefined
https://bugs.webkit.org/show_bug.cgi?id=141865
rdar://problem/19927273

Reviewed by Filip Pizlo.

* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoGetter):
(JSC::globalFuncProtoSetter):

LayoutTests:
Added tests to ensure that Object.prototype.__proto__ native getter and setter do not coerce undefined to this
https://bugs.webkit.org/show_bug.cgi?id=141865
rdar://problem/19927273

Reviewed by Filip Pizlo.

* js/script-tests/sloppy-getter-setter-global-object.js: Added.
* js/sloppy-getter-setter-global-object-expected.txt: Added.
* js/sloppy-getter-setter-global-object.html: Added.

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

5 years agoMake it possible to map a secondary quad through TransformState
simon.fraser@apple.com [Fri, 24 Apr 2015 19:01:48 +0000 (19:01 +0000)]
Make it possible to map a secondary quad through TransformState
https://bugs.webkit.org/show_bug.cgi?id=144156

Reviewed by Dean Jackson.

A future patch will need to map two quads simultaneously through TransformState,
so add the ability to provide an optional secondary quad.

This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
requiring the state to be flattened when setting the quad (and now, the secondary quad).
Previously, setQuad implicitly flattened but failed to update m_mapPoint when
doing so.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
before setting the quad.
* platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
* platform/graphics/transforms/TransformState.cpp:
(WebCore::TransformState::operator=): Copy the secondary quad if we have one.
(WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
if we have one.
(WebCore::TransformState::mappedQuad): Code factored into mapQuad().
(WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
into the state's current coordinate space.
(WebCore::TransformState::mapQuad): Factored code.
* platform/graphics/transforms/TransformState.h:
(WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
(WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
(WebCore::TransformState::lastPlanarSecondaryQuad):
(WebCore::TransformState::lastPlanarQuad): Deleted.

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

5 years agoCrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkR...
antti@apple.com [Fri, 24 Apr 2015 18:57:25 +0000 (18:57 +0000)]
CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
https://bugs.webkit.org/show_bug.cgi?id=144147

Reviewed by Chris Dumez.

Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.

Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
ReadOperation: count the active operations in progress and delete WriteOperation when everything is
finished. This way we don't need to copy the function out from WriteOperation.

* NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
(WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):

    Move definition here from the header.

(WebKit::NetworkCache::Storage::~Storage):
(WebKit::NetworkCache::Storage::storeBodyAsBlob):

    Increment the operation count when storing a blob, call finishWriteOperation when done.

(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::finishReadOperation):

    Count active operations instead of finished operations. This makes the code clearer.

(WebKit::NetworkCache::Storage::dispatchWriteOperation):
(WebKit::NetworkCache::Storage::finishWriteOperation):

    Mirror the way ReadOperations work.

* NetworkProcess/cache/NetworkCacheStorage.h:
(WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.

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

5 years agofast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemit...
ap@apple.com [Fri, 24 Apr 2015 18:55:26 +0000 (18:55 +0000)]
fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
https://bugs.webkit.org/show_bug.cgi?id=144155

Reviewed by Anders Carlsson.

Cleaned the test up a little, and added logging to collect some information about
why it fails.

* fast/frames/flattening/iframe-flattening-resize-event-count.html:
* fast/frames/flattening/resources/iframe-to-resize.html:

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

5 years ago[iOS] Reimplement r182512 and r183153 in a cleaner way
mmaxfield@apple.com [Fri, 24 Apr 2015 18:45:10 +0000 (18:45 +0000)]
[iOS] Reimplement r182512 and r183153 in a cleaner way
https://bugs.webkit.org/show_bug.cgi?id=144151

Reviewed by Enrica Casucci.

On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
react to this fact by making users of a FontPlatformData use the original font passed in
to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
detect that the FontPlatformData represents a system font (the underlying APIs have
different behavior for system fonts and non-system-fonts).

However, on OS X, we create a FontPlatformData's ctFont() directly from the original
font passed in to the constructor. This preserves system-font-ness (because it no
longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
correct behavior regarding system fonts.

The difference between the two ctFont() creation codepaths seems to be historical
rather than intentional. Rather than change all the call sites of ctFont() to use a
different platform font object if a system font is detected, a cleaner solution is to
simply unify the two ctFont() creation codepaths to the version which preserves system-
font-ness. Doing this will make all users of FontPlatformData automatically have the
correct behavior with no updates.

This patch reverts the relevant parts of r182512 and r183153 in favor of this new
solution.

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformWidthForGlyph):
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::ctFontSize):
(WebCore::FontPlatformData::ctFont):
* platform/graphics/mac/SimpleFontDataCoreText.cpp:
(WebCore::Font::getCFStringAttributes):

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

5 years agoUnreviewed build fix.
mmaxfield@apple.com [Fri, 24 Apr 2015 18:26:14 +0000 (18:26 +0000)]
Unreviewed build fix.

* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::FontPlatformData):

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

5 years ago[Cocoa] Start cleaning up FontPlatformData
mmaxfield@apple.com [Fri, 24 Apr 2015 18:12:31 +0000 (18:12 +0000)]
[Cocoa] Start cleaning up FontPlatformData
https://bugs.webkit.org/show_bug.cgi?id=144133

Reviewed by Enrica Casucci.

Source/WebCore:

This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
FontPlatformData. This patch starts this effort out by removing the FontPlatformData
constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
and forwards to another constructor. This patch moves this cast to callers of this constructor,
thereby enumerating the places we have left that use NSFont with FontPlatformData.

This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
a common constructor.

This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
not 0 and not -1, and puts this common code inside a new function,
FontPlatformData::isValidCTFontRef().

No new tests because there is no behavior change.

* platform/graphics/FontPlatformData.cpp:
(WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
* platform/graphics/FontPlatformData.h:
(WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
(WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
* platform/graphics/cocoa/FontCocoa.mm:
(WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
FontPlatformData constructor.
(WebCore::Font::compositeFontReferenceFont): Ditto.
* platform/graphics/cocoa/FontPlatformDataCocoa.mm:
(WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
(WebCore::FontPlatformData::platformDataInit): Ditto.
(WebCore::FontPlatformData::platformDataAssign): Ditto.
(WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
(WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
(WebCore::FontPlatformData::FontPlatformData): Deleted.
* platform/graphics/mac/ComplexTextControllerCoreText.mm:
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
NSFont use.
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
deleted FontPlatformData constructor.
(WebCore::FontCache::createFontPlatformData): Ditto.
* platform/mac/DragImageMac.mm:
(WebCore::fontFromNSFont): Ditto.
(WebCore::widthWithFont): Ditto.
(WebCore::drawAtPoint): Ditto.

Source/WebKit/mac:

Receive casts which have been hoisted from the deleted FontPlatformData constructor.

* Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]): Receive cast which has
been hoisted from the deleted FontPlatformData constructor.
(-[NSString _web_widthWithFont:]): Ditto.
* Misc/WebStringTruncator.mm:
(fontFromNSFont): Ditto.

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

5 years agoREGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
timothy@apple.com [Fri, 24 Apr 2015 18:02:30 +0000 (18:02 +0000)]
REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
https://bugs.webkit.org/show_bug.cgi?id=144150

Reviewed by Brian Burg.

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorFrontendAPI.js:
(InspectorFrontendAPI.setTimelineProfilingEnabled): Change !== to === when
checking enabled to isCapturing().

Source/WebKit2:

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
instead of strings by not using the string version of evaluateCommandOnLoad.

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