Remove PLATFORM(IOS) from WebCore/editing (Part 2).
https://bugs.webkit.org/show_bug.cgi?id=136474

Reviewed by Tim Horton.

Removing some more PLATFORM(IOS) from the editing code.
Most of these changes are fixes that were made for IOS but never merged
to OpenSource.

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
* editing/VisibleUnits.cpp:
(WebCore::startOfDocument):
(WebCore::endOfDocument):
* editing/ios/EditorIOS.mm: No need for platform guard, this file is not built for Mac.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173287 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Address additional review feedback after landing r173283.

Reviewed by Daniel Bates.

* DumpRenderTree/config.h: Removed redundant includes.
* TestWebKitAPI/config.h: Ditto.
* WebKitTestRunner/config.h: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173288 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clicking on a select element should never hide the popup menu.
https://bugs.webkit.org/show_bug.cgi?id=136548.
<rdar://problem/10215926>
Reviewed by Simon Fraser.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler):
Never call hidePopup as a result of a click on a select element.
The only way you can properly hide a popup is to click again or lose focus on the popup itself.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] webkitpy test suite frequently fails to complete
https://bugs.webkit.org/show_bug.cgi?id=136546

Reviewed by Daniel Bates.

Properly convert the ASCII crash log produced by ntsd into
a unicode string as early as possible so that we handle it
properly when generating our logs and other test support output.

We were mixing ASCII/unicode strings under Windows, which was
causing test system failures when we processed some crash logs.

Also do a better job of handling garbage pid entries in the
Cygwin lock files.

* Scripts/webkitpy/common/system/crashlogs.py:
(CrashLogs._find_newest_log_win): The ntsd '.logopen' command
creates an ASCII file. Decode it as ASCII, not 'utf-8', and
handle the strings as unicode from that point on.
* Scripts/webkitpy/port/http_lock.py:
(HttpLock._current_lock_pid): Add logging and handle case of
the current_pid failing to cleanly convert to 'int'.
* Scripts/webkitpy/port/win.py:
(WinPort): Add 64-bit architecture as a known target for the
Windows build.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Another speculative fix for the bots.

* platform/mac-wk2/tiled-drawing/scrolling/root-overflow-with-mousewheel.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173258>
(https://bugs.webkit.org/show_bug.cgi?id=136494)

Use ENABLE_TOUCH_EVENT instead of ENABLE(TOUCH_EVENT) as the latter isn't available
to some clients of this private header.

* platform/ios/wak/WAKResponder.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve the logic for compositing backing store avoidance
https://bugs.webkit.org/show_bug.cgi?id=136556

Reviewed by Dean Jackson.

Source/WebCore:

Avoid backing store allocation in more cases by improving the logic that detects
whether a RenderLayer has any painted, non-layer descendent renderers.

Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
for renderers that paint anything. Any renderer with box decorations paints;
replaced elements paint, and non-whitespace text nodes paint. We can avoid
making backing store when whitespace nodes are present only when user-select is none,
since we have to ensure that there's backing store to paint the selection into.

Tests: compositing/backing/inline-block-no-backing.html
       compositing/backing/whitespace-nodes-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
(WebCore::RenderLayer::hasBoxDecorationsOrBackground):
(WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
rather than isReplaced(), since the latter includes inline-blocks.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
logic in the root layer, since it always wants backing store.
(WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
inline-block, so use isRenderReplaced() instead.

LayoutTests:

Tests that dump the layer tree (showing backing store) for various combinations
of child renderers and whitespace.

* compositing/backing/inline-block-no-backing-expected.txt: Added.
* compositing/backing/inline-block-no-backing.html: Added.
* compositing/backing/whitespace-nodes-no-backing-expected.txt: Added.
* compositing/backing/whitespace-nodes-no-backing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS filter on a compositing layer should not cause unncessary backing store allocation
https://bugs.webkit.org/show_bug.cgi?id=136557

Reviewed by Dean Jackson.

Source/WebCore:

Remove the style.hasFilter() check from hasBoxDecorations(), since filters aren't
a box decoration. This allows creation of simple container layers with composited filters.

Test: compositing/backing/filter-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Dump the layer tree on some layer configs with filters.

* compositing/backing/filter-no-backing-expected.txt: Added.
* compositing/backing/filter-no-backing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
border-radius should not force layer backing store
https://bugs.webkit.org/show_bug.cgi?id=136555

Reviewed by Dean Jackson.

Source/WebCore:

Border-radius is not a reason to allocate backing store; it's not relevant unless
we also have a border or background, and hasBoxDecorations() already checks for that.

With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
a background), but it doesn't check for outlines, so do that in addition.

Test: compositing/backing/border-radius-no-backing.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

Test that dumps layers on some composited elements with border-radius

* compositing/backing/border-radius-no-backing-expected.txt: Added.
* compositing/backing/border-radius-no-backing.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the Mac Production build after r173283.

* WebKitTestRunner/config.h: Reverted to defining WEBCORE_EXPORT for now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173296 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some logging to help diagnose assertions in dumpWebViewAsPixelsAndCompareWithExpected() on bots
https://bugs.webkit.org/show_bug.cgi?id=136561

Reviewed by Tim Horton.

Log for calloc() and CGBitmapContextCreate() failures.

* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContext):
(createBitmapContextFromWebView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ensure that the call frame set up by vmEntryToNative does not overlap with the stack of the callee
https://bugs.webkit.org/show_bug.cgi?id=136485

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-09-04
Reviewed by Michael Saboff.

Changed makeHostFunctionCall to keep the stack pointer above the call
frame set up by doVMEntry. Thus the callee will/can not override the top
of the call frame.

Refactored the two (32_64 and 64) versions of makeHostFunctionCall to be
more alike to help future maintenance.

* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bring back [WebPreferences setDiskImageCacheEnabled:] for backwards compatibility
https://bugs.webkit.org/show_bug.cgi?id=136560

Reviewed by Joseph Pecoraro.

I removed the disk image caching code in r173265. However, we still have clients that call
setDiskImageCacheEnabled. Add in a stub method until we can wean the clients off this call.

* WebView/WebPreferences.mm:
(-[WebPreferences setDiskImageCacheEnabled:]):
* WebView/WebPreferencesPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Speculative EFL and GTK build fix after r173272. Remove the filename argument
from the various ResourceResponse constructors.

* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
* platform/network/win/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Another speculative build fix after r173272. Add a stub implementation for
ResourceResponse::platformSuggestedFilename(). Filed bug 136562 for proper fix.

* platform/network/soup/ResourceResponseSoup.cpp:
(ResourceResponse::platformSuggestedFilename):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline three blending tests which no longer need backing store.

* css3/blending/blend-mode-blended-element-overlapping-composited-sibling-should-have-compositing-layer-expected.txt:
* css3/blending/blend-mode-parent-of-composited-blended-has-layer-expected.txt:
* css3/blending/blend-mode-with-composited-descendant-should-have-layer-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173302 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Speculative build fix. Add platformSuggestedFilename() to all the ResourceResponse header files.

* platform/network/curl/ResourceResponse.h:
(WebCore::ResourceResponse::platformSuggestedFilename):
* platform/network/soup/ResourceResponse.h:
* platform/network/win/ResourceResponse.h:
(WebCore::ResourceResponse::platformSuggestedFilename):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make sure that deleting all code first processes the call edge log, and reenable call edge profiling.

Rubber stamped by Sam Weinig.

* debugger/Debugger.cpp:
(JSC::Debugger::forEachCodeBlock):
(JSC::Debugger::setSteppingMode):
(JSC::Debugger::recompileAllJSFunctions):
* inspector/agents/InspectorRuntimeAgent.cpp:
(Inspector::recompileAllJSFunctionsForTypeProfiling):
* runtime/Options.h: Reenable call edge profiling.
* runtime/VM.cpp:
(JSC::VM::prepareToDiscardCode): Make sure this also processes the call edge log, in case any call edge profiles are about to be destroyed.
(JSC::VM::discardAllCode):
(JSC::VM::releaseExecutableMemory):
(JSC::VM::setEnabledProfiler):
(JSC::VM::waitForCompilationsToComplete): Deleted.
* runtime/VM.h: Rename waitForCompilationsToComplete() back to prepareToDiscardCode() because the purpose of the method - now as ever - is to do all of the things that need to be done to ensure that code may be safely deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, build fix for EFL and GTK ports since r173272.

* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::updateFromSoupMessageHeaders):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@173305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, speculative build fix on GTK port since r173305.

* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):

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