Unreviewed EFL gardening

Add failure test expectations and rebaselines for failing tests.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl-wk1/fast/forms/validation-message-appearance-expected.png: Rebaseline after r159915.
* platform/efl-wk2/fast/forms/validation-message-appearance-expected.png: Ditto.
* platform/efl/fast/forms/validation-message-appearance-expected.txt: Ditto.
* platform/efl/fast/parser/entity-comment-in-textarea-expected.png: Rebaseline after r159192.
* platform/efl/fast/parser/entity-comment-in-textarea-expected.txt: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Nix] Fix file name typo in PlatformNix.cmake
https://bugs.webkit.org/show_bug.cgi?id=125457

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-09
Reviewed by Gustavo Noronha Silva.

Wrong file name introduced in http://trac.webkit.org/changeset/160310.
* PlatformNix.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix sh4 LLINT build.
https://bugs.webkit.org/show_bug.cgi?id=125454

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

In LLINT, sh4 backend implementation didn't handle properly conditional jumps using
a LabelReference instance. This patch fixes it through sh4LowerMisplacedLabels phase.
Also, to avoid the need of a 4th temporary gpr, this phase is triggered later in
getModifiedListSH4.

* offlineasm/sh4.rb:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160315 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: [ATK] Convert the get_{string,text}_at_offset atktest.c unit tests to layout tests
https://bugs.webkit.org/show_bug.cgi?id=125451

Reviewed by Mario Sanchez Prada.

Source/WebKit/gtk:

* tests/testatk.c: Remove the tests which now exist as layout tests. Note that the
tests for atk_text_get_text_{before,after}_offset were removed without equivalents
added to the layout tests. The same is true for the END AtkTextBoundary types. Both
have been deprecated in ATK and are not being used by AT-SPI2 assistive technologies.
(testGetTextFunction):
(main):

Tools:

Create the needed callbacks for DRT and WKTR.

* DumpRenderTree/AccessibilityUIElement.cpp:
(characterAtOffsetCallback): added
(wordAtOffsetCallback): added
(lineAtOffsetCallback): added
(sentenceAtOffsetCallback): added
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(stringAtOffset): added
(AccessibilityUIElement::characterAtOffset): added
(AccessibilityUIElement::wordAtOffset): added
(AccessibilityUIElement::lineAtOffset): added
(AccessibilityUIElement::sentenceAtOffset): added
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::characterAtOffset): added
(WTR::AccessibilityUIElement::wordAtOffset): added
(WTR::AccessibilityUIElement::lineAtOffset): added
(WTR::AccessibilityUIElement::sentenceAtOffset): added
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::stringAtOffset): added
(WTR::AccessibilityUIElement::characterAtOffset): added
(WTR::AccessibilityUIElement::wordAtOffset): added
(WTR::AccessibilityUIElement::lineAtOffset): added
(WTR::AccessibilityUIElement::sentenceAtOffset): added

LayoutTests:

New tests and expectations based on the tests and expectations found in atktest.c.
These were done as platform-specific tests because only ATK-based assistive technologies
seem to have any need for this support.

* platform/gtk/accessibility/text-at-offset-embedded-objects-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-embedded-objects.html: Added.
* platform/gtk/accessibility/text-at-offset-newlines-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-newlines.html: Added.
* platform/gtk/accessibility/text-at-offset-preformatted-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-preformatted.html: Added.
* platform/gtk/accessibility/text-at-offset-simple-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-simple.html: Added.
* platform/gtk/accessibility/text-at-offset-special-chars-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-special-chars.html: Added.
* platform/gtk/accessibility/text-at-offset-textarea-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-textarea.html: Added.
* platform/gtk/accessibility/text-at-offset-textinput-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-textinput.html: Added.
* platform/gtk/accessibility/text-at-offset-wrapped-lines-expected.txt: Added.
* platform/gtk/accessibility/text-at-offset-wrapped-lines.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a test for style sharing if grandparents matches different rule chain and nth-last child
https://bugs.webkit.org/show_bug.cgi?id=125397

Reviewed by Darin Adler.

Add the test from https://chromium.googlesource.com/chromium/blink/+/30ff49bf63cdec31070ab4eda8784564f56789d4
and https://chromium.googlesource.com/chromium/blink/+/3cb1724bb52f3607006ddd0a89d356da23766115
so that we may not introduce the same regressions in WebKit.

* fast/css/nth-last-child-recalc-expected.html: Added.
* fast/css/nth-last-child-recalc.html: Added.
* fast/css/style-sharing-grand-parent-invalidate-expected.txt: Added.
* fast/css/style-sharing-grand-parent-invalidate.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
check-webkit-style: ternary operator in macro call identified as initialization list
https://bugs.webkit.org/show_bug.cgi?id=125443

Patch by Laszlo Vidacs <lac@inf.u-szeged.hu> on 2013-12-09
Reviewed by Ryosuke Niwa.

Do not match initialization list when questionmark is placed before :

* Scripts/webkitpy/style/checkers/cpp.py:
(check_member_initialization_list):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
check-webkit-style should check for extra newlines at EOF
https://bugs.webkit.org/show_bug.cgi?id=125424

Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-12-09
Reviewed by Darin Adler.

Report a style violation if extraneous newlines are added
to the end of a C++ file. There should only be one newline at EOF.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_for_missing_new_line_at_eof): Renamed from check_for_new_line_at_eof.
(check_for_extra_new_line_at_eof): Added.
(_process_lines): Added new check and renamed existing EOF check.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_extra_newlines_at_eof): Added.
(CppStyleTest.test_extra_newlines_at_eof.do_test): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Inspector.json and CodeGenerator tweaks
https://bugs.webkit.org/show_bug.cgi?id=125321

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

* inspector/protocol/Runtime.json:
Runtime.js was depending on Network.FrameId. This is a layering
violation, so ideally we can fix this later. For now, just copy
the FrameId type into Runtime. They are strings so all is good.

* inspector/CodeGeneratorInspector.py:
(Generator.EventMethodStructTemplate.append_epilog):
* inspector/CodeGeneratorInspectorStrings.py:
Improve --help usage information.
Make the script work with a single domain json file.
Add ASCIILiteral's where appropriate.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] LayoutTests are broken after r160301
https://bugs.webkit.org/show_bug.cgi?id=125447

Reviewed by Darin Adler.

r160301 moved FullScreenManagerProxyClient logic to WebViewEfl, child class
of CoordinatedGraphics::WebView, because implementations are EFL specific.
However, CoordinatedGraphics::WebView creates WebPageProxy in constructor and
WebPageProxy requires FullScreenManagerProxyClient in constructor.
So, All WK2/Efl based applications got crashed

This patch adds virtual methods for FullScreenManagerProxyClient to CoordinatedGraphics::WebView
so that WebPageProxy can get FullScreenManagerProxyClient instance without
pure viertual methods.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewExitFullScreen):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::fullScreenManagerProxyClient):
(WebKit::WebView::requestExitFullScreen):
renamed from exitFullScreen not to conflict with methods of FullScreenManagerProxyClient.
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebViewEfl.cpp:
* UIProcess/efl/WebViewEfl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix handling of 'inherit' and 'initial' for grid lines.
https://bugs.webkit.org/show_bug.cgi?id=125223

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-12-09
Reviewed by Darin Adler.

'initial' and 'inherit' are always allowed values for CSS properties.
As the CSSParser handles them automatically, those 2 values were never
taken care of in StyleResolver, leading to crashes.

Source/WebCore:

Added tests cases for 'inherit' and 'initial' to the following tests:

fast/css-grid-layout/grid-item-column-row-get-set.html
fast/css-grid-layout/grid-item-end-after-get-set.html
fast/css-grid-layout/grid-item-start-before-get-set.html

Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision

* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::StyleGridItemData):

LayoutTests:

Patch backported from Blink: https://src.chromium.org/viewvc/blink?revision=149257&view=revision

* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css-grid-layout/grid-item-end-after-get-set-expected.txt:
* fast/css-grid-layout/grid-item-end-after-get-set.html:
* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt:
* fast/css-grid-layout/grid-item-start-before-get-set.html:
* fast/css-grid-layout/resources/grid-item-column-row-parsing-utils.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[ATK] Translate ATK_ROLE_SECTION into "AXSection" in DRT/WKTR
https://bugs.webkit.org/show_bug.cgi?id=125456

Reviewed by Chris Fleizach.

Tools:

Return 'AXSection' for section roles instead of 'AXDiv'.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

LayoutTests:

Update expectations for GTK and EFL that were expecting AXDiv for
section roles, so they now expect AXSection.

* accessibility/adjacent-continuations-cause-assertion-failure-expected.txt:
* accessibility/div-within-anchors-causes-crash-expected.txt:
* platform/efl-wk1/accessibility/image-map2-expected.txt:
* platform/efl-wk1/accessibility/transformed-element-expected.txt:
* platform/efl-wk2/accessibility/image-map2-expected.txt:
* platform/efl-wk2/accessibility/transformed-element-expected.txt:
* platform/efl/accessibility/media-emits-object-replacement-expected.txt:
* platform/gtk/accessibility/aria-roles-unignored-expected.txt:
* platform/gtk/accessibility/aria-roles-unignored.html:
* platform/gtk/accessibility/entry-and-password-expected.txt:
* platform/gtk/accessibility/image-map2-expected.txt:
* platform/gtk/accessibility/media-emits-object-replacement-expected.txt:
* platform/gtk/accessibility/object-with-title-expected.txt:
* platform/gtk/accessibility/object-with-title.html:
* platform/gtk/accessibility/replaced-objects-in-anonymous-blocks-expected.txt:
* platform/gtk/accessibility/spans-paragraphs-and-divs-expected.txt:
* platform/gtk/accessibility/spans-paragraphs-and-divs.html:
* platform/gtk/accessibility/transformed-element-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] OpenGL compile error.
https://bugs.webkit.org/show_bug.cgi?id=125383

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-12-09
Reviewed by Darin Adler.

* platform/graphics/opengl/Extensions3DOpenGLES.h: Define GL_HALF_FLOAT_ARB on Windows when OPENGL_ES_2 is used.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove docs/make-bytecode-docs.pl
https://bugs.webkit.org/show_bug.cgi?id=125462

This sript is very old and no longer outputs useful data since the
op code definitions have moved from Interpreter.cpp.

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-09
Reviewed by Darin Adler.

* DerivedSources.make:
* docs/make-bytecode-docs.pl: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build of projects including <WebKit/WebUIDelegatePrivate.h>

Rubber-stamped by Dan Bernstein.

* WebView/WebAllowDenyPolicyListener.h:
Use TARGET_OS_IPHONE rather than PLATFORM(IOS) in an exposed header.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r160260): Memory pressure signal causes web process to hang.
<https://webkit.org/b/125465>

Reviewed by Tim Horton.

This command caused all of my web processes to hang:

    notifyutil -p org.WebKit.lowMemory

This only happens when the cache pruning code encounters a resource
using purgeable memory.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):

    Grab the next CachedResource pointer before continuing the loop.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSE should work in SSA
https://bugs.webkit.org/show_bug.cgi?id=125430

Reviewed by Oliver Hunt and Mark Hahnenberg.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::run):
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement Document.cloneNode()
https://bugs.webkit.org/show_bug.cgi?id=11646

Reviewed by Darin Adler.

Source/WebCore: 

Merge https://chromium.googlesource.com/chromium/blink/+/dc7879025e01d63be9fcf6a84ca6c9b8b5768a80

Implement the behavior specified in the current DOM4 working draft:
http://www.w3.org/TR/2013/WD-dom-20131107/#dom-node-clonenode

Tests: fast/dom/Document/clone-node.html
       fast/dom/HTMLDocument/clone-node-quirks-mode.html
       svg/custom/clone-node.html

* dom/Document.cpp:
(WebCore::Document::cloneNode):
(WebCore::Document::cloneDocumentWithoutChildren):
(WebCore::Document::cloneDataFromDocument):
* dom/Document.h:
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::cloneDocumentWithoutChildren):
* html/HTMLDocument.h:
* svg/SVGDocument.cpp:
(WebCore::SVGDocument::cloneDocumentWithoutChildren):
* svg/SVGDocument.h:

LayoutTests: 

* dom/xhtml/level3/core/documentgetinputencoding04-expected.txt:
* dom/xhtml/level3/core/documentgetxmlencoding05-expected.txt:
* dom/xhtml/level3/core/nodeisequalnode01-expected.txt:
* dom/xhtml/level3/core/nodeisequalnode21-expected.txt:
* dom/xhtml/level3/core/nodeisequalnode25-expected.txt:
* dom/xhtml/level3/core/nodeisequalnode26-expected.txt:
* fast/dom/Document/clone-node-expected.txt: Added.
* fast/dom/Document/clone-node.html: Added.
* fast/dom/HTMLDocument/clone-node-quirks-mode-expected.txt: Added.
* fast/dom/HTMLDocument/clone-node-quirks-mode.html: Added.
* svg/custom/clone-node-expected.txt: Added.
* svg/custom/clone-node.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, update LLVM binary drops to r196830.

* LLVMIncludesMountainLion.tar.bz2:
* LLVMLibrariesMountainLion.tar.bz2:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove miscellaneous unnecessary build statements
https://bugs.webkit.org/show_bug.cgi?id=125466

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-12-09
Reviewed by Darin Adler.

* DerivedSources.make:
* JavaScriptCore.vcxproj/build-generated-files.sh:
* JavaScriptCore.xcodeproj/project.pbxproj:
* make-generated-sources.sh:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid divide by zero in scrollbar code, and protect against Obj-C exceptions
https://bugs.webkit.org/show_bug.cgi?id=125469
<rdar://problem/15535772>

Reviewed by Beth Dakin.

In ScrollbarThemeMac::setPaintCharacteristicsForScrollbar(), proportion could
end up as NaN if scrollbar->totalSize() were zero. Protect against that.

Also wrap functions that call into Objective-C with BEGIN_BLOCK_OBJC_EXCEPTIONS/
END_BLOCK_OBJC_EXCEPTIONS.

* platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
(WebCore::ScrollbarThemeMac::updateEnabledState):
(WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
(WebCore::scrollbarPainterPaint):

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