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
Rubber-stamped by Tim Horton.

Post-checkin review comment! StickToViewportBounds sounds better and more accurate 
than StickToWindowBounds.

* platform/ScrollTypes.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fullscreen/anonymous-block-merge-crash.html often times out in WebKit1
https://bugs.webkit.org/show_bug.cgi?id=124318

* platform/mac/TestExpectations:
Used the wrong kind of failure for a notifyDone timeout.


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