REGRESSION (r162947): css3/flexbox/multiline-justify-content.html and css3/flexbox/position-absolute-child.html are timing out
https://bugs.webkit.org/show_bug.cgi?id=127809

Reviewed by Anders Carlsson.

Source/WebCore: 

These tests generate very large number of small repaint rectangles that overwhelm the region code.

* page/FrameView.cpp:
(WebCore::FrameView::repaintContentRectangle):
* platform/graphics/Region.h:
(WebCore::Region::gridSize):
(WebCore::Region::Shape::gridSize):
        
    Add accessor for getting the current region grid complexity.

* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
        
    If the region gets very complex merge the repaint rects into a single big rectangle.

LayoutTests: 

* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Serialize IDBKeyDatas to disk, not IDBKeys
https://bugs.webkit.org/show_bug.cgi?id=127829

Reviewed by Tim Horton.

Source/WebCore:

Move encode/decode from IDBKey to IDBKeyData.

* Modules/indexeddb/IDBKey.cpp:
* Modules/indexeddb/IDBKey.h:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData):
(WebCore::IDBKeyData::encode):
(WebCore::IDBKeyData::decode):
* Modules/indexeddb/IDBKeyData.h:

* WebCore.exp.in:

Source/WebKit2:

Serialize IDBKeyDatas, not IDBKeys.

* DatabaseProcess/IndexedDB/IDBSerialization.cpp:
(WebKit::deserializeIDBKeyPath):
(WebKit::serializeIDBKeyData):
* DatabaseProcess/IndexedDB/IDBSerialization.h:

* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::putRecord):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRecordFromObjectStore):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::getKeyRangeRecordFromObjectStore):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r162947): Repaint test results are different between WK1 and WK2
https://bugs.webkit.org/show_bug.cgi?id=127814

Source/WebCore: 

Reviewed by Anders Carlsson.

* page/FrameView.cpp:
(WebCore::FrameView::repaintContentRectangle):
        
    Move repaint rect logging to RenderView.

* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):
        
    Record raw repaint rects instead of optimized ones.

LayoutTests: 

Revert test results changes. We now always log raw repaint rects which are same between platforms.

* compositing/repaint/resize-repaint-expected.txt:
* fast/box-shadow/shadow-repaint-expected.txt:
* fast/css-grid-layout/grid-element-change-columns-repaint-expected.txt:
* fast/css-grid-layout/grid-element-change-rows-repaint-expected.txt:
* fast/css-grid-layout/grid-item-change-column-repaint-expected.txt:
* fast/css-grid-layout/grid-item-change-row-repaint-expected.txt:
* fast/regions/repaint/element-in-named-flow-absolute-from-fixed-expected.txt:
* fast/regions/repaint/element-in-named-flow-fixed-from-absolute-expected.txt:
* fast/regions/repaint/element-inflow-fixed-from-outflow-static-expected.txt:
* fast/regions/repaint/element-outflow-static-from-inflow-fixed-expected.txt:
* fast/regions/repaint/invalid-region-repaint-crash-expected.txt:
* fast/regions/repaint/repaint-element-inside-relative-region-expected.txt:
* fast/regions/repaint/repaint-regions-overflow-expected.txt:
* fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt:
* fast/repaint/background-shorthand-with-gradient-and-height-changes.html:
* fast/repaint/horizontal-bt-overflow-child-expected.txt:
* fast/repaint/horizontal-bt-overflow-parent-expected.txt:
* fast/repaint/horizontal-bt-overflow-same-expected.txt:
* fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt:
* fast/repaint/overflow-flipped-writing-mode-table-expected.txt:
* fast/repaint/reflection-table-layout-expected.txt:
* fast/repaint/transform-table-layout-expected.txt:
* fast/repaint/vertical-overflow-child-expected.txt:
* fast/repaint/vertical-overflow-parent-expected.txt:
* fast/repaint/vertical-overflow-same-expected.txt:
* platform/mac-wk2/TestExpectations:
* platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt:
* platform/mac/fast/images/repaint-subrect-grid-expected.txt:
* svg/repaint/repaint-webkit-svg-shadow-container-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Have XHR.getResponseHeader() return null and XHR.getAllResponseHeader() return the empty string in initial ready states
https://bugs.webkit.org/show_bug.cgi?id=125840

Patch by Youenn Fablet <youennf@gmail.com> on 2014-01-29
Reviewed by Alexey Proskuryakov.

Merging https://chromium.googlesource.com/chromium/blink/+/d201caf874a0bd6f101f517462b3cf1d8c5fce3d
This patch makes it clear that null/empty string is returned whenever the error flag is set.
This new code path is covered by the added test.

Test: http/tests/xmlhttprequest/response-access-on-error.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::getAllResponseHeaders):
(WebCore::XMLHttpRequest::getResponseHeader):
* xml/XMLHttpRequest.h:
* xml/XMLHttpRequest.idl:

LayoutTests: Have XHR.getResponseHeader() return null and XHR.getAllResponseHeaders() return empty string in initial ready states
https://bugs.webkit.org/show_bug.cgi?id=125840

Patch by Youenn Fablet <youennf@gmail.com> on 2014-01-29
Reviewed by Alexey Proskuryakov.

Merging https://chromium.googlesource.com/chromium/blink/+/d201caf874a0bd6f101f517462b3cf1d8c5fce3d
The new test exercices the new code path in case xhr received HTTP headers but m_error is set

* http/tests/xmlhttprequest/getAllResponseHeaders-expected.txt:
* http/tests/xmlhttprequest/getAllResponseHeaders.html:
* http/tests/xmlhttprequest/getResponseHeader-expected.txt:
* http/tests/xmlhttprequest/getResponseHeader.html:
* http/tests/xmlhttprequest/response-access-on-error-expected.txt: Added.
* http/tests/xmlhttprequest/response-access-on-error.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] cleanup MediaPlayer.cpp
https://bugs.webkit.org/show_bug.cgi?id=127821

Reviewed by Jer Noble.

Don't register MediaPlayerPrivateIOS unless the runtime setting for media player proxy is set.

* platform/graphics/MediaPlayer.cpp: Don't define PlatformMediaEngineClassName on iOS
(WebCore::installedMediaEngines): Drive by cleanup to return early if registration has
    already happened.
(WebCore::MediaPlayer::MediaPlayer): Don't force-register the first media engine unless
    isVideoPluginProxyEnabled returns true.


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