Don't use a flattened framework path when building on OS X

Reviewed by Mark Rowe.

* Configurations/ToolExecutable.xcconfig: Use REAL_PLATFORM_NAME
to select different INSTALL_PATH values.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/Platform: [Chromium] Move createURLLoader() into Platform
https://bugs.webkit.org/show_bug.cgi?id=82587

Reviewed by James Robinson.

This patch introduces a base class for WebKitPlatformSupport that we
can use to incrementally more APIs from WebKit/chromium/public/platform
into Platform/chromium/public. Using this technique lets us avoid
making changes in the embedder during the transition.

This patch moves createURLLoader() because it's necessary for
ResourceHandle.  This is the third patch in this sequence:
https://github.com/abarth/webkit/compare/master...webcore-platform

* Platform.gypi:
* chromium/public/Platform.h: Added.
(WebKit):
(Platform):
(WebKit::Platform::createURLLoader):
(WebKit::Platform::~Platform):
* chromium/src/Platform.cpp: Added.
(WebKit):
(WebKit::Platform::initialize):
(WebKit::Platform::shutdown):
(WebKit::Platform::current):

Source/WebKit/chromium: Move createURLLoader() into Platform
https://bugs.webkit.org/show_bug.cgi?id=82587

Reviewed by James Robinson.

* public/platform/WebKitPlatformSupport.h:
(WebKit):
(WebKitPlatformSupport):
* src/WebKit.cpp:
(WebKit::initializeWithoutV8):
(WebKit::shutdown):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Template the Yarr::Interpreter on the character type
https://bugs.webkit.org/show_bug.cgi?id=82637

Reviewed by Sam Weinig.

We should be able to call to the interpreter after having already checked the character type,
without having to re-package the character pointer back up into a string!

../JavaScriptCore: 

* runtime/RegExp.cpp:
(JSC::RegExp::match):
(JSC::RegExp::matchCompareWithInterpreter):
    - Don't pass length.
* yarr/Yarr.h:
    - moved function declarations to YarrInterpreter.h.
* yarr/YarrInterpreter.cpp:
(Yarr):
(Interpreter):
(JSC::Yarr::Interpreter::InputStream::InputStream):
(InputStream):
(JSC::Yarr::Interpreter::Interpreter):
(JSC::Yarr::interpret):
    - templated Interpreter class on CharType.
* yarr/YarrInterpreter.h:
(Yarr):
    - added function declarations.

../WebCore: 

* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::findMagicComment):
* platform/text/RegularExpression.cpp:
(WebCore::RegularExpression::match):
    - Don't pass length.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix p1.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a compile assert for the size of RenderBlock
https://bugs.webkit.org/show_bug.cgi?id=82586

Reviewed by Tony Chang.

Add compile asserts for the size of RenderBlock and RenderBlock::MarginValues.
We can't add asserts for FloatingObject and MarginInfo because they're private to RenderBlock.

* rendering/RenderBlock.cpp:
(SameSizeAsRenderBlock):
(WebCore):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::repaintOverhangingFloats):
(WebCore::RenderBlock::paintFloats):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::addOverhangingFloats):
(WebCore::RenderBlock::addIntrudingFloats):
(WebCore::RenderBlock::hitTestFloats):
(WebCore::RenderBlock::adjustForBorderFit):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::shouldPaint):
(WebCore::RenderBlock::FloatingObject::setShouldPaint):
(WebCore::RenderBlock::FloatingObject::isDescendant):
(WebCore::RenderBlock::FloatingObject::setIsDescendant):
(FloatingObject):
(RenderBlock):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][EFL] run-javascriptcore-tests should be run through jhbuild
https://bugs.webkit.org/show_bug.cgi?id=82581

Patch by Dominik Röttsches <dominik.rottsches@linux.intel.com> on 2012-03-29
Reviewed by Martin Robinson.

Running Javascriptcore tests through jhbuild
for consistency with run-webkit-tests and in order to
avoid confusing libraries when facing regressions.

* Scripts/run-javascriptcore-tests:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Ensure framebuffer exists at the start of beginDrawingFrame.
https://bugs.webkit.org/show_bug.cgi?id=82569

Patch by Michal Mocny <mmocny@google.com> on 2012-03-29
Reviewed by James Robinson.

Source/WebCore:

Updated LayerRendererChromiumTest unittests.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::setVisible):
(WebCore::LayerRendererChromium::beginDrawingFrame):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::compositeAndReadback):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::compositeAndReadback):
(WebCore::CCThreadProxy::requestReadbackOnImplThread):

Source/WebKit/chromium:

* tests/LayerRendererChromiumTest.cpp:
(FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient):
(FakeLayerRendererChromiumClient::rootLayer):
(FakeLayerRendererChromiumClient):
(TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows build fix p2.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r111259.
http://trac.webkit.org/changeset/111259
https://bugs.webkit.org/show_bug.cgi?id=82650

Caused selection regression in calculations due to
misconstructed IntRectRegion. (Requested by mfenton on
#webkit).

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

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::getConsolidatedRegionOfTextQuadsForSelection):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [Mac] REGRESSION: Removing translation of local paths in KURL constructor broke some applications
        https://bugs.webkit.org/show_bug.cgi?id=82548
        <rdar://problem/11125355>
        <rdar://problem/11142152>

        Reviewed by Brady Eidson.

        * WebView/WebFrame.mm:
        (-[WebFrame loadRequest:]): Fixed this bug.
        (-[WebFrame loadHTMLString:baseURL:]): Also added translation to another API, so that I don't
        have to come back again.
        (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.

        * WebView/WebView.mm: (-[WebView setMainFrameURL:]): Changed another place where clients used
        to pass file paths instead of URLs.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move CPP files related to ResourceHandle to WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=82582

Reviewed by James Robinson.

Source/WebCore: 

This patch moves a number of files that implement parts of the platform
portion of the Chromium WebKit API from the WebKit layer to
WebCore/platform. These files are in the dependency cone of
ResourceHandle and have no dependencies on anything outside
WebCore/platform.

* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/chromium/support: Added.
* platform/chromium/support/WebData.cpp: Copied from Source/WebKit/chromium/src/WebData.cpp.
* platform/chromium/support/WebHTTPBody.cpp: Copied from Source/WebKit/chromium/src/WebHTTPBody.cpp.
* platform/chromium/support/WebHTTPLoadInfo.cpp: Copied from Source/WebKit/chromium/src/WebHTTPLoadInfo.cpp.
* platform/chromium/support/WebURL.cpp: Copied from Source/WebKit/chromium/src/WebURL.cpp.
* platform/chromium/support/WebURLError.cpp: Copied from Source/WebKit/chromium/src/WebURLError.cpp.
* platform/chromium/support/WebURLRequest.cpp: Copied from Source/WebKit/chromium/src/WebURLRequest.cpp.
* platform/chromium/support/WebURLRequestPrivate.h: Copied from Source/WebKit/chromium/src/WebURLRequestPrivate.h.
* platform/chromium/support/WebURLResponse.cpp: Copied from Source/WebKit/chromium/src/WebURLResponse.cpp.
* platform/chromium/support/WebURLResponsePrivate.h: Copied from Source/WebKit/chromium/src/WebURLResponsePrivate.h.

Source/WebKit/chromium: 

* WebKit.gyp:
* src/WebData.cpp: Removed.
* src/WebHTTPBody.cpp: Removed.
* src/WebHTTPLoadInfo.cpp: Removed.
* src/WebURL.cpp: Removed.
* src/WebURLError.cpp: Removed.
* src/WebURLRequest.cpp: Removed.
* src/WebURLRequestPrivate.h: Removed.
* src/WebURLResponse.cpp: Removed.
* src/WebURLResponsePrivate.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Images that reload via media queries don't paint when device scale factor changes
https://bugs.webkit.org/show_bug.cgi?id=82648
<rdar://problem/11143637>

Reviewed by Beth Dakin.

Commit scale factor changes before dirty rect changes, since setting the scale factor
can lead to more rects being dirtied when using the tile cache.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expectations for media tests failing w/ slider change after r112484.

Unreviewed, expectations change.

* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Moving test to skip from test-expectations.txt to Skipped
for Mac platform.

* platform/mac/Skipped:
* platform/mac/test_expectations.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] WorkerFileSystemContextObserver can reference a deleted WorkerFileSystemCallbacksBridge.
https://bugs.webkit.org/show_bug.cgi?id=82565

WorkerFileSystemCallbacksBridge relies on a cleanUpAfterCallback being called
prior to the disposal of the bridge to ensure that WorkerFileSystemContextObserver
is unsubscribed and deleted. However cleanUpAfterCallback will only execute if the bridge's
callback has executed on the worker thread, and this might not be the case if the worker
terminates.

This patch fixes this by maintaining a RefPtr from WorkerFileSystemContextObserver to
WorkerFileSystemCallbacksBridge. This ensures that bridge is not deleted while observer is alive.

Reviewed by David Levin.

* src/WorkerFileSystemCallbacksBridge.cpp:
(WebKit::WorkerFileSystemContextObserver::create):
(WebKit::WorkerFileSystemContextObserver::WorkerFileSystemContextObserver):
(WorkerFileSystemContextObserver):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112576 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix for WinCE after r112555.

* platform/text/wince/TextCodecWinCE.cpp:
(WebCore::LanguageManager::LanguageManager):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
remove ahem font from flexbox layout tests
https://bugs.webkit.org/show_bug.cgi?id=82633

Reviewed by Ojan Vafai.

These tests don't depend on the ahem font and after r112489, we seem
to be hitting a race condition on the Mac bots where we are checking
baselines while the font is still being loaded. Speculatively fix by
removing the webfont.

* css3/flexbox/flex-align-vertical-writing-mode.html:
* css3/flexbox/flex-align.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Move ResourceHandle to WebCore/platform/network/chromium
https://bugs.webkit.org/show_bug.cgi?id=82657

Reviewed by James Robinson.

Source/WebCore: 

We finally arive at our destination. This patch actually moves
WebCore::ResourceHandle from Source/WebKit/chromium/src to
Source/WebCore/network/chromium, matching its location in other ports.
To make this happen, we also need to move WrappedResourceRequest and
WrappedResourceResponse.

This patch is the last patch from
https://github.com/abarth/webkit/compare/master...webcore-platform

* WebCore.gypi:
* platform/chromium/support/WrappedResourceRequest.h: Copied from Source/WebKit/chromium/src/WrappedResourceRequest.h.
* platform/chromium/support/WrappedResourceResponse.h: Copied from Source/WebKit/chromium/src/WrappedResourceResponse.h.
* platform/network/chromium/ResourceHandle.cpp: Copied from Source/WebKit/chromium/src/ResourceHandle.cpp.
(WebCore::ResourceHandleInternal::ResourceHandleInternal):
(WebCore::ResourceHandleInternal::start):
(WebCore::ResourceHandle::loadResourceSynchronously):
(WebCore::ResourceHandle::cacheMetadata):
* platform/network/chromium/ResourceHandleInternal.h: Copied from Source/WebKit/chromium/src/ResourceHandleInternal.h.

Source/WebKit/chromium: 

* WebKit.gyp:
* src/ResourceHandle.cpp: Removed.
* src/ResourceHandleInternal.h: Removed.
* src/WrappedResourceRequest.h: Removed.
* src/WrappedResourceResponse.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scripts fail to detect when a tool crashes
https://bugs.webkit.org/show_bug.cgi?id=82659

Reviewed by Mark Rowe.

Have exitStatus() detect when the process fail to exit cleanly
(possibly because of a crash), and return a non-zero exit code
in that case.

* Scripts/VCSUtils.pm:
(exitStatus):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r110065-r110080): Content drawing outside overflow: hidden at ynet.co.il
https://bugs.webkit.org/show_bug.cgi?id=82129

Reviewed by Ojan Vafai.

Source/WebCore:

Tests: fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html
       fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html
       fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html
       fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html
       fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html
       fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html
       fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html
       fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html

This is a regression from r110072. I wrongly thought we should call ensureLayer if we create our RenderOverflow.
However the current overflow code removes the before and start overflows (like in horizontal writing mode with ltr direction,
we never have a top or a left overflow). Because of that we would not get a RenderLayer as expected and the overflow clip rects
would be wrong on our RenderLayer children.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::addLayoutOverflow):
Moved the ensureLayer() call after the check that we do have some overflow but before we remove the overflow in some directions.

LayoutTests:

* fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb-expected.html: Added.
* fast/overflow/before-after-overflow-hidden-horizontal-writing-mode-tb.html: Added.
* fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl-expected.html: Added.
* fast/overflow/before-after-overflow-hidden-vertical-writing-mode-rl.html: Added.
* fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb-expected.html: Added.
* fast/overflow/start-end-overflow-hidden-horizontal-writing-mode-tb.html: Added.
* fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl-expected.html: Added.
* fast/overflow/start-end-overflow-hidden-vertical-writing-mode-rl.html: Added.
Added 4 ref tests that should cover the 4 different values of (hasTopOverflow, hasLeftOverflow)
in RenderBox::addLayoutOverflow.

* platform/chromium-linux/fast/box-shadow/shadow-buffer-partial-expected.txt:
* platform/chromium-win/fast/block/lineboxcontain/block-font-expected.txt:
* platform/chromium-win/fast/block/lineboxcontain/block-glyphs-expected.txt:
* platform/chromium-win/fast/block/lineboxcontain/font-expected.txt:
Rebaselined those tests on Chromium linux (new layers).

* platform/chromium/test_expectations.txt:
* platform/efl/Skipped:
* platform/gtk/Skipped:
* platform/mac/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:
* platform/wk2/Skipped:
Skipped the previous tests on the other platforms.

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