Fix the iOS build.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::recordNavigationSnapshot):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Mountain Lion build.

* UIProcess/mac/ViewGestureController.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162950 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a NavigationActionData object for easy storage of navigation action data
https://bugs.webkit.org/show_bug.cgi?id=127787

Reviewed by Tim Horton.

* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/NavigationActionData.cpp: Added.
(WebKit::NavigationActionData::NavigationActionData):
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h: Added.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline some repaint test results after https://trac.webkit.org/r162947
        
There are less repaint rects.

* 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/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/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@162952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebase fast/repaint/background-shorthand-with-gradient-and-height-changes.html after https://trac.webkit.org/r162947

* fast/repaint/background-shorthand-with-gradient-and-height-changes-expected.txt:
* fast/repaint/background-shorthand-with-gradient-and-height-changes.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixing several incorrect assumptions with handling isolated inlines.
https://bugs.webkit.org/show_bug.cgi?id=127608

Reviewed by Dave Hyatt.

Source/WebCore:

First, when an isolated inline spans multiple lines, we aren't guaranteed
to exit BidiResolver with a nested inline count of zero. Removing the
assert that says otherwise.

Previously in constructBidiRunsForSegment, we called bidiFirst in
an attempt to properly setup the isolatedResolver for any dom/style
that applied, but this only worked on the first line the isolated
inline appeared in. Adding a function that approaches this properly
by recursing through the parents of the starting object for the line
and post-fixing direction attributes to the resolver.

Finally, addressing an issue where the line following a removed isolated
inline (with a continuation) failed to be marked dirty.

Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/72698f203b1c50900e535b80945563b92b7eef23

Tests: fast/text/nested-bidi-assert.html
       fast/text/nested-bidi-with-continuation-crash.html

* platform/text/BidiResolver.h:
(WebCore::Run>::~BidiResolver):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setupResolverToResumeInIsolate):
(WebCore::constructBidiRunsForSegment):
* rendering/RenderLineBoxList.cpp:
(WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):

LayoutTests:

See file-specific info.

Merged from Blink: https://chromium.googlesource.com/chromium/blink/+/72698f203b1c50900e535b80945563b92b7eef23

* fast/text/nested-bidi-assert-expected.txt: Added.
* fast/text/nested-bidi-assert.html: Added. Tests that no crash occurs
when an isolated inline spans several lines
* fast/text/nested-bidi-with-continuation-crash-expected.txt: Added.
* fast/text/nested-bidi-with-continuation-crash.html: Added. Tests that
no crash occurs when additional isolates need to be set up for a
continuation

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixing several incorrect assumptions with handling isolated inlines.
https://bugs.webkit.org/show_bug.cgi?id=127608

Reviewed by Simon Fraser.

Fixing capitalization.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setUpResolverToResumeInIsolate):
(WebCore::constructBidiRunsForSegment):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162957 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add an empty WKNavigation class
https://bugs.webkit.org/show_bug.cgi?id=127796

Reviewed by Tim Horton.

* UIProcess/API/Cocoa/WKNavigation.h: Added.
* UIProcess/API/Cocoa/WKNavigation.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162959 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sticky positioning is broken for table rows
https://bugs.webkit.org/show_bug.cgi?id=112024

Patch by Viatcheslav Ostapenko <sl.ostapenko@samsung.com> on 2014-01-28
Reviewed by Simon Fraser.

Source/WebCore:

Enable sticky positioning for table elements.
Also includes fix for bug ​wkb.ug/105654
I don't have access to this bug, but from related commit message I
assume it says about "Heap use after free problem".
Debugging showed that it wasn't heap use after free.
The real problem that RenderObject::container() returns object which is
not RenderBlock and it is used as RenderBlock in
RenderBox::containingBlockLogicalHeightForPositioned() method.
Added extra isRenderBlock check and search for containingBlock if
current block is not RenderBlock.

Tests: fast/css/sticky/sticky-table-row-top.html
       fast/css/sticky/sticky-table-thead-top.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
* rendering/RenderTableRow.h:

LayoutTests:

Add layout tests for sticky positioned table row and table thead.

* fast/css/sticky/sticky-table-row-top-expected.html: Added.
* fast/css/sticky/sticky-table-row-top.html: Added.
* fast/css/sticky/sticky-table-thead-top-expected.html: Added.
* fast/css/sticky/sticky-table-thead-top.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
js/dom/post-message-numeric-property.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=127713

Reviewed by Geoffrey Garen.

Plain testRunner and js-test-post.js approaches to being asynchronous don't work
together, you need one or the other.

* js/dom/post-message-numeric-property-expected.txt:
* js/dom/script-tests/post-message-numeric-property.js:
Updated to use jsTestIsAsync, as the wrapper includes js-test-post.js. The results
are now always printed in correct order, not flakily.

* js/dom/cross-global-object-inline-global-var-expected.txt:
* js/dom/script-tests/cross-global-object-inline-global-var.js:
Ditto.

* js/dom/function-prototype.html:
* js/dom/parse-error-external-script-in-eval.html:
* js/dom/parse-error-external-script-in-new-Function.html:
* js/dom/parse-syntax-error-in-initializer.html:
Removed waitUntilDone, these tests are not asynchronous at all.

* js/dom/script-tests/cross-frame-bad-time.js:
* js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js:
* js/dom/script-tests/cross-frame-really-bad-time.js:
Updated to use jsTestIsAsync. These tests were not flaky because they happened to
run synchronously in practice, but document.writing a script into subframe won't
necessarily execute it synchronously in the future.

* js/resources/fs-test-post.js: Removed. This file was unused.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Document::topDocument() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=127786

Reviewed by Darin Adler.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::mainFrame):
(WebCore::AccessibilityObject::topDocument):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityContainer]):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
(WebCore::Document::clearAXObjectCache):
(WebCore::Document::existingAXObjectCache):
(WebCore::Document::axObjectCache):
(WebCore::Document::implicitClose):
(WebCore::Document::topDocument):
(WebCore::Document::topOrigin):
(WebCore::Document::webkitCancelFullScreen):
(WebCore::Document::webkitDidExitFullScreenForElement):
* dom/Document.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::incrementScrollEventListenersCount):
(WebCore::DOMWindow::decrementScrollEventListenersCount):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::isReplacementObscured):
* rendering/RenderView.cpp:
(WebCore::RenderView::RepaintRegionAccumulator::RepaintRegionAccumulator):



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