Fix Tools/Scripts/webkitpy/port/factory.py --help to display which configuration is default
https://bugs.webkit.org/show_bug.cgi?id=124143

Patch by Éva Balázsfalvi <balazsfalvi.eva@stud.u-szeged.hu> on 2013-11-14
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/port/factory.py:
(configuration_options):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix build for sh4 architectures (broken since r159276).
https://bugs.webkit.org/show_bug.cgi?id=124344

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-14
Reviewed by Csaba Osztrogonác.

* offlineasm/sh4.rb: There is no fp alias for r14 register for sh4.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use [ImplementedAs=defaultStatus] for Window.defaultstatus
https://bugs.webkit.org/show_bug.cgi?id=124334

Reviewed by Christophe Dumez.

No new tests, this is just refactoring.

Use [ImplementedAs=defaultStatus] for Window.defaultstatus
and remove unnecessary code from DOMWindow.
Because 'defaultstatus' is an alias of defaultStatus.

* page/DOMWindow.h:
* page/DOMWindow.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-perf-tests should warn loudly if you're using a Debug build.
https://bugs.webkit.org/show_bug.cgi?id=105236

Patch by Éva Balázsfalvi <balazsfalvi.eva@stud.u-szeged.hu> on 2013-11-14
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner.run):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Popovers may shrink unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=124350

Reviewed by Timothy Hatcher.

Because we always get the intersection of the preferred frame and the container frame to
ensure the popover fits within its container based on a preferred frame that would place
the arrow within the center of the attachment edge, we get in situations where we may
shrink the popover instead of shifting it to fit within the container frame. We now first
shift the preferred frame before getting its intersection with the container frame to
avoid such situations.

* UserInterface/Popover.js:
(WebInspector.Popover.prototype._bestMetricsForEdge):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Change WKTR/DRT AX methods to use nullptr
https://bugs.webkit.org/show_bug.cgi?id=124352

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-11-14
Reviewed by Anders Carlsson.

Change WKTR/DRT accessibility related methods to use nullptr.

* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::AccessibilityController):
(AccessibilityController::elementAtPoint):
(AccessibilityController::removeNotificationListener):
(AccessibilityController::childElementById):
* DumpRenderTree/atk/AccessibilityNotificationHandlerAtk.cpp:
(AccessibilityNotificationHandler::AccessibilityNotificationHandler):
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::elementAtPoint):
(AccessibilityUIElement::linkedUIElementAtIndex):
(AccessibilityUIElement::getChildAtIndex):
(AccessibilityUIElement::titleUIElement):
(AccessibilityUIElement::parentElement):
(AccessibilityUIElement::subrole):
(AccessibilityUIElement::roleDescription):
(AccessibilityUIElement::orientation):
(AccessibilityUIElement::ariaDropEffects):
(AccessibilityUIElement::uiElementForSearchPredicate):
(AccessibilityUIElement::cellForColumnAndRow):
(AccessibilityUIElement::disclosedRowAtIndex):
(AccessibilityUIElement::ariaOwnsElementAtIndex):
(AccessibilityUIElement::ariaFlowToElementAtIndex):
(AccessibilityUIElement::selectedRowAtIndex):
(AccessibilityUIElement::rowAtIndex):
(AccessibilityUIElement::disclosedByRow):
(AccessibilityUIElement::removeNotificationListener):
(AccessibilityUIElement::classList):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::AccessibilityController::logAccessibilityEvents):
(WTR::AccessibilityController::resetToConsistentState):
(WTR::childElementById):
(WTR::AccessibilityController::accessibleElementById):
(WTR::AccessibilityController::removeNotificationListener):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback):
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::elementAtPoint):
(WTR::AccessibilityUIElement::childAtIndex):
(WTR::AccessibilityUIElement::linkedUIElementAtIndex):
(WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
(WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
(WTR::AccessibilityUIElement::disclosedRowAtIndex):
(WTR::AccessibilityUIElement::rowAtIndex):
(WTR::AccessibilityUIElement::selectedChildAtIndex):
(WTR::AccessibilityUIElement::selectedRowAtIndex):
(WTR::AccessibilityUIElement::titleUIElement):
(WTR::AccessibilityUIElement::parentElement):
(WTR::AccessibilityUIElement::disclosedByRow):
(WTR::AccessibilityUIElement::uiElementAttributeValue):
(WTR::AccessibilityUIElement::orientation):
(WTR::AccessibilityUIElement::uiElementForSearchPredicate):
(WTR::AccessibilityUIElement::cellForColumnAndRow):
(WTR::AccessibilityUIElement::horizontalScrollbar):
(WTR::AccessibilityUIElement::verticalScrollbar):
(WTR::AccessibilityUIElement::removeNotificationListener):
(WTR::AccessibilityUIElement::textMarkerRangeForElement):
(WTR::AccessibilityUIElement::previousTextMarker):
(WTR::AccessibilityUIElement::nextTextMarker):
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
(WTR::AccessibilityUIElement::endTextMarkerForBounds):
(WTR::AccessibilityUIElement::startTextMarkerForBounds):
(WTR::AccessibilityUIElement::textMarkerForPoint):
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
(WTR::AccessibilityUIElement::textMarkerForIndex):
(WTR::AccessibilityUIElement::supportedActions):
(WTR::AccessibilityUIElement::pathDescription):
(WTR::AccessibilityUIElement::mathPostscriptsDescription):
(WTR::AccessibilityUIElement::mathPrescriptsDescription):
(WTR::AccessibilityUIElement::classList):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r159276): Fix lots of crashes for sh4 architecture.
https://bugs.webkit.org/show_bug.cgi?id=124347

Patch by Julien Brianceau <jbriance@cisco.com> on 2013-11-14
Reviewed by Michael Saboff.

Since r159276, we have (t4 == a0 == r4) and (t5 == a1 == r5) in LLINT for sh4.
This leads to argument register trampling in cCallX macros, especially with cCall2
macro when arg1 == t4.

* llint/LowLevelInterpreter32_64.asm: Use a new "setargs" pseudo-op to setup arguments for sh4.
* offlineasm/instructions.rb:
* offlineasm/sh4.rb: Lower "setargs" pseudo-op to setup argument registers and prevent register trampling issues.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Cleaner Backend Method Calling Code Generation
https://bugs.webkit.org/show_bug.cgi?id=124333

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

No change in functionality, just improved generated code.

* inspector/CodeGeneratorInspector.py:
(Generator.process_command):
* inspector/CodeGeneratorInspectorStrings.py:
* inspector/InspectorBackendDispatcher.cpp:
* inspector/InspectorBackendDispatcher.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r159276): rbp register overwritten in Win 64 version of callToJavascript stub
https://bugs.webkit.org/show_bug.cgi?id=124361

Reviewed by Oliver Hunt.

Swapped operand ordering to: mov rax, rbp

* jit/JITStubsMSVC64.asm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Empty polygons with non-zero shape-padding cause an ASSERT crash
https://bugs.webkit.org/show_bug.cgi?id=124324

Reviewed by Andreas Kling.

Source/WebCore:

PolygonShape::shapePaddingBounds() and PolygonShape::shapeMarginBounds() no
longer attempt to compute a new FloatPolygon when the original is empty, i.e.
when it has less than three vertices.

Tests: fast/shapes/shape-inside/shape-inside-empty-polygon-crash.html
       fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash.html

* rendering/shapes/PolygonShape.cpp:
(WebCore::PolygonShape::shapePaddingBounds): Don't compute a padding FloatPolygon if the original polygon is empty.
(WebCore::PolygonShape::shapeMarginBounds): Don't compute a margin FloatPolygon if the original polygon is empty.

LayoutTests:

* fast/shapes/shape-inside/shape-inside-empty-polygon-crash-expected.txt: Added.
* fast/shapes/shape-inside/shape-inside-empty-polygon-crash.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement RSASSA-PKCS1-v1_5 sign/verify
https://bugs.webkit.org/show_bug.cgi?id=124335

Reviewed by Sam Weinig.

Source/WebCore:

Test: crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html

* WebCore.xcodeproj/project.pbxproj: Added new files, removed Mac SHA algorithm files.

* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::getCommonCryptoDigestAlgorithm):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
Implemented. These take two steps, first a digest is computed, and then it's signed.

* crypto/CryptoDigest.h: Added.
* crypto/mac/CryptoDigestMac.cpp: Added.
(WebCore::CryptoDigest::CryptoDigest):
(WebCore::CryptoDigest::~CryptoDigest):
(WebCore::CryptoDigest::create):
(WebCore::CryptoDigest::addBytes):
(WebCore::CryptoDigest::computeHash):
Added a cross-platform interface and Mac implementation to compute a digest. It
should be possible to use it outside WebCrypto if we need to (perhaps even merge
with  WTF SHA-1 class).
The Mac implementation is kind of ugly, but at least it encapsulates the ugliness.

* crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::digest):
* crypto/algorithms/CryptoAlgorithmSHA224.cpp: (WebCore::CryptoAlgorithmSHA224::digest):
* crypto/algorithms/CryptoAlgorithmSHA256.cpp: (WebCore::CryptoAlgorithmSHA256::digest):
* crypto/algorithms/CryptoAlgorithmSHA384.cpp: (WebCore::CryptoAlgorithmSHA384::digest):
* crypto/algorithms/CryptoAlgorithmSHA512.cpp: (WebCore::CryptoAlgorithmSHA512::digest):
* crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Removed.
* crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Removed.
These are all cross-platform now.

LayoutTests:

* crypto/subtle/rsassa-pkcs1-v1_5-sign-verify-expected.txt: Added.
* crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Versioning.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
https://bugs.webkit.org/show_bug.cgi?id=124293

Reviewed by Chris Fleizach.

Source/WebCore:

Added ability to get accessibility table column or row count without fetching all columns or rows.

Test: platform/mac/accessibility/table-column-and-row-count.html

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

Added test to ensure NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute
behave as expected. Also updated existing table tests to reflect this additional API.

* platform/mac/accessibility/table-column-and-row-count-expected.txt: Added.
* platform/mac/accessibility/table-column-and-row-count.html: Added.
* platform/mac/accessibility/table-detection-expected.txt:
* platform/mac/accessibility/table-with-rules-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement RSASSA-PKCS1-v1_5 sign/verify
https://bugs.webkit.org/show_bug.cgi?id=124335

Build fix.

* crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove duplicate entry.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r159276): Fix lots of crashes for arm_traditional architecture.
https://bugs.webkit.org/show_bug.cgi?id=124365

Reviewed by Oliver Hunt.

Crashes were caused by a mixup between regular registers and temporary registers in ARM_EXTRA_GPRS.

* llint/LowLevelInterpreter32_64.asm: Warning, t3 != a3. It's safer to use an implementation using aX
registers like the MIPS one for cCallX macros.
* offlineasm/arm.rb: Rearrange ARM_EXTRA_GPRS according to the new register distribution in LLINT.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] HMAC sign/verify crashes when key is empty
https://bugs.webkit.org/show_bug.cgi?id=124372

Reviewed by Sam Weinig.

Source/WebCore: 

Test: crypto/subtle/hmac-sign-verify-empty-key.html

* crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature): Give it
a non-null pointer then.

LayoutTests: 

* crypto/subtle/hmac-sign-verify-empty-key-expected.txt: Added.
* crypto/subtle/hmac-sign-verify-empty-key.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a new mode where fixed elements don't constrain their positions during a
rubber band
https://bugs.webkit.org/show_bug.cgi?id=124260

Reviewed by Tim Horton.

This patch adds a new enum called ScrollBehaviorForFixedElements, which has
two values, StickToDocumentBounds or StickToWindowBounds. StickToDocumentBounds 
corresponds to our current behavior, where fixed elements constrain 
their positions during a rubber-band so that they stay stuck to the document.
The new mode, StickToWindowBounds, will cause fixed elements to always stay
fixed relative to the window.

scrollOffsetForFixedPosition() now takes a new parameter for the fixed behavior
so that it knows whether or not to constrain the position.
* page/FrameView.cpp:
(WebCore::FrameView::scrollOffsetForFixedPosition):
        
Right now, just return StickToDocumentBounds and retain existing behavior.
(WebCore::FrameView::scrollBehaviorForFixedElements):
* page/FrameView.h:

The scrolling thread needs to know about the fixed element scroll behavior,
so this code makes ScrollingStateScrollingNodes keep track of that 
information to pass over to the scrolling thread.
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements):
* page/scrolling/ScrollingStateScrollingNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
* page/scrolling/ScrollingTreeScrollingNode.h:
(WebCore::ScrollingTreeScrollingNode::scrollBehaviorForFixedElements):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::setScrollBehaviorForFixedElementsForNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
        
Here is the new enum.
* platform/ScrollTypes.h:
        
Another place where we only want to constrain scroll position if that is the
mode we are in.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/security/frameNavigation/xss-DENIED-plugin-navigation.html is slow, frequently > 30 second timeout
https://bugs.webkit.org/show_bug.cgi?id=124373

* platform/mac/TestExpectations:
Mark test as slow on Mountain Lion Release bot.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build failure; update MediaPlayerPrivateAVFFoundationCF::seekToTime after r159208.

After r159208, seekToTime takes tolerance parameters.

Patch by Jer Noble <jer.noble@apple.com> on 2013-11-13

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
(WebCore::AVFWrapper::seekToTime):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:



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