Improved RuleData packing on some 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=93737

Reviewed by Andreas Kling.

Certain 32-bit plarforms use an 8-byte alignment for uint64_t. We can save 4 bytes per
object on these platforms by using two naturally-aligning unsigned ints instead.

* css/StyleResolver.cpp:
(RuleData):
(SameSizeAsRuleData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: REGRESSION(r125159): ASSERTION FAILED: m_listsInvalidatedAtDocument.contains(list) in Document::unregisterNodeListCache.
https://bugs.webkit.org/show_bug.cgi?id=93729

Reviewed by Ryosuke Niwa.

In Document::registerNodeListCache() it was not adding PropertyNodeList
cache to m_listsInvalidatedAtDocument the as node list currently not rooted
at the document. Where in Document::unregisterNodeListCache() it was trying
to remove PropertyNodeList cache from m_listsInvalidatedAtDocument. Hence it
caused the assertion failure.

We need to check if m_rootType is NodeListIsRootedAtDocumentIfOwnerHasItemrefAttr,
not that it's currently rooted at the document.

Test: fast/dom/MicroData/propertynodelist-crash.html

* dom/DynamicNodeList.h:
(WebCore::DynamicNodeListCacheBase::isRootedAtDocument):

LayoutTests: REGRESSION(r125159): ASSERTION FAILED: m_listsInvalidatedAtDocument.contains(list) in Document::unregisterNodeListCache.
https://bugs.webkit.org/show_bug.cgi?id=93729 

Reviewed by Ryosuke Niwa.

Added a test to ensure that it does not crash in Document::unregisterNodeListCache.

* fast/dom/MicroData/propertynodelist-crash-expected.txt: Added.
* fast/dom/MicroData/propertynodelist-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow blocking of third-party localStorage and sessionStorage
https://bugs.webkit.org/show_bug.cgi?id=93390

Reviewed by Adam Barth.

Source/WebCore:

Add checks for if a page is third-party and third-party storage blocking is enabled while accessing storage.

Tests: http/tests/security/cross-origin-local-storage-allowed.html
       http/tests/security/cross-origin-local-storage.html
       http/tests/security/cross-origin-session-storage-allowed.html
       http/tests/security/cross-origin-session-storage.html
       http/tests/security/same-origin-document-domain-storage-allowed.html

* dom/Document.cpp:
(WebCore::Document::initSecurityContext): Initialize securityOrigin with knowledge of if we should block third-party storage.
* page/DOMWindow.cpp: Check if the origin trying to access storage is third-party relative to the top document.
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* page/SecurityOrigin.cpp: Add a call in Security origin to see if another origin counts as a third-party.
(WebCore::SecurityOrigin::SecurityOrigin):
(WebCore::SecurityOrigin::canAccessLocalStorage):
(WebCore):
(WebCore::SecurityOrigin::isThirdParty):
* page/SecurityOrigin.h:
(WebCore::SecurityOrigin::blockThirdPartyStorage):
(SecurityOrigin):
* testing/InternalSettings.cpp: Add an internals.settings hook for setting third-party storage blocking enabled.
(WebCore::InternalSettings::setThirdPartyStorageBlockingEnabled):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

LayoutTests:

Created tests for testing accessing localStorage and selfStorage from a third party and first party when third-party blocking is on and off.

* http/tests/security/cross-origin-local-storage-allowed-expected.txt: Added.
* http/tests/security/cross-origin-local-storage-allowed.html: Added.
* http/tests/security/cross-origin-local-storage-expected.txt: Added.
* http/tests/security/cross-origin-local-storage.html: Added.
* http/tests/security/cross-origin-session-storage-allowed-expected.txt: Added.
* http/tests/security/cross-origin-session-storage-allowed.html: Added.
* http/tests/security/cross-origin-session-storage-expected.txt: Added.
* http/tests/security/cross-origin-session-storage.html: Added.
* http/tests/security/same-origin-document-domain-storage-allowed-expected.html: Added.
* http/tests/security/same-origin-document-domain-storage-allowed.html: Added.
* http/tests/security/resources/document-domain-iframe-for-local-storage.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-local-storage.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-session-storage.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125335 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-08-10

* DEPS:

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