WebKit-https.git
7 years agoFix builds against an SDK.
mrowe@apple.com [Sat, 27 Jul 2013 23:20:15 +0000 (23:20 +0000)]
Fix builds against an SDK.

* gtest/xcode/Config/FrameworkTarget.xcconfig: Ensure that gtest.framework is installed
in a location compatible with the SDK generation process.

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

7 years agoIf entering fullscreen for a window fails, don't leave things in a bad state
simon.fraser@apple.com [Sat, 27 Jul 2013 23:14:07 +0000 (23:14 +0000)]
If entering fullscreen for a window fails, don't leave things in a bad state
https://bugs.webkit.org/show_bug.cgi?id=119179
<rdar://problem/14517068>

Reviewed by Sam Weinig.

On Lion, attempting to take a video fullscreen when the Safari window is already
fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen:

When this happens we have to undo the work done when entering fullscreen, to
avoid leaving things in a bad state.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):

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

7 years agoAdd assertions for CSSPrimitiveValue's m_value.valueID accessor
weinig@apple.com [Sat, 27 Jul 2013 22:23:38 +0000 (22:23 +0000)]
Add assertions for CSSPrimitiveValue's m_value.valueID accessor
https://bugs.webkit.org/show_bug.cgi?id=119180

Reviewed by Andreas Kling.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
(WebCore::CSSPrimitiveValue::operator ColumnSpan):
(WebCore::CSSPrimitiveValue::operator PrintColorAdjust):
(WebCore::CSSPrimitiveValue::operator EBorderStyle):
(WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
(WebCore::CSSPrimitiveValue::operator CompositeOperator):
(WebCore::CSSPrimitiveValue::operator ControlPart):
(WebCore::CSSPrimitiveValue::operator EBackfaceVisibility):
(WebCore::CSSPrimitiveValue::operator EFillAttachment):
(WebCore::CSSPrimitiveValue::operator EFillBox):
(WebCore::CSSPrimitiveValue::operator EFillRepeat):
(WebCore::CSSPrimitiveValue::operator EBoxPack):
(WebCore::CSSPrimitiveValue::operator EBoxAlignment):
(WebCore::CSSPrimitiveValue::operator EBoxDecorationBreak):
(WebCore::CSSPrimitiveValue::operator BackgroundEdgeOrigin):
(WebCore::CSSPrimitiveValue::operator EBoxSizing):
(WebCore::CSSPrimitiveValue::operator EBoxDirection):
(WebCore::CSSPrimitiveValue::operator EBoxLines):
(WebCore::CSSPrimitiveValue::operator EBoxOrient):
(WebCore::CSSPrimitiveValue::operator ECaptionSide):
(WebCore::CSSPrimitiveValue::operator EClear):
(WebCore::CSSPrimitiveValue::operator ECursor):
(WebCore::CSSPrimitiveValue::operator CursorVisibility):
(WebCore::CSSPrimitiveValue::operator EDisplay):
(WebCore::CSSPrimitiveValue::operator EEmptyCell):
(WebCore::CSSPrimitiveValue::operator EAlignItems):
(WebCore::CSSPrimitiveValue::operator EJustifyContent):
(WebCore::CSSPrimitiveValue::operator EFlexDirection):
(WebCore::CSSPrimitiveValue::operator EAlignContent):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
(WebCore::CSSPrimitiveValue::operator EFloat):
(WebCore::CSSPrimitiveValue::operator LineBreak):
(WebCore::CSSPrimitiveValue::operator EListStylePosition):
(WebCore::CSSPrimitiveValue::operator EListStyleType):
(WebCore::CSSPrimitiveValue::operator EMarginCollapse):
(WebCore::CSSPrimitiveValue::operator EMarqueeBehavior):
(WebCore::CSSPrimitiveValue::operator RegionFragment):
(WebCore::CSSPrimitiveValue::operator EMarqueeDirection):
(WebCore::CSSPrimitiveValue::operator ENBSPMode):
(WebCore::CSSPrimitiveValue::operator EOverflow):
(WebCore::CSSPrimitiveValue::operator EPageBreak):
(WebCore::CSSPrimitiveValue::operator EPosition):
(WebCore::CSSPrimitiveValue::operator EResize):
(WebCore::CSSPrimitiveValue::operator ETableLayout):
(WebCore::CSSPrimitiveValue::operator ETextAlign):
(WebCore::CSSPrimitiveValue::operator TextAlignLast):
(WebCore::CSSPrimitiveValue::operator TextJustify):
(WebCore::CSSPrimitiveValue::operator TextDecoration):
(WebCore::CSSPrimitiveValue::operator TextDecorationStyle):
(WebCore::CSSPrimitiveValue::operator TextUnderlinePosition):
(WebCore::CSSPrimitiveValue::operator ETextSecurity):
(WebCore::CSSPrimitiveValue::operator ETextTransform):
(WebCore::CSSPrimitiveValue::operator EUnicodeBidi):
(WebCore::CSSPrimitiveValue::operator EUserDrag):
(WebCore::CSSPrimitiveValue::operator EUserModify):
(WebCore::CSSPrimitiveValue::operator EUserSelect):
(WebCore::CSSPrimitiveValue::operator EVerticalAlign):
(WebCore::CSSPrimitiveValue::operator EVisibility):
(WebCore::CSSPrimitiveValue::operator EWhiteSpace):
(WebCore::CSSPrimitiveValue::operator EWordBreak):
(WebCore::CSSPrimitiveValue::operator EOverflowWrap):
(WebCore::CSSPrimitiveValue::operator TextDirection):
(WebCore::CSSPrimitiveValue::operator WritingMode):
(WebCore::CSSPrimitiveValue::operator TextCombine):
(WebCore::CSSPrimitiveValue::operator RubyPosition):
(WebCore::CSSPrimitiveValue::operator TextEmphasisPosition):
(WebCore::CSSPrimitiveValue::operator TextOverflow):
(WebCore::CSSPrimitiveValue::operator TextEmphasisFill):
(WebCore::CSSPrimitiveValue::operator TextEmphasisMark):
(WebCore::CSSPrimitiveValue::operator TextOrientation):
(WebCore::CSSPrimitiveValue::operator EPointerEvents):
(WebCore::CSSPrimitiveValue::operator FontDescription::Kerning):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode):
(WebCore::CSSPrimitiveValue::operator FontWeight):
(WebCore::CSSPrimitiveValue::operator FontItalic):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode):
(WebCore::CSSPrimitiveValue::operator ColorSpace):
(WebCore::CSSPrimitiveValue::operator Hyphens):
(WebCore::CSSPrimitiveValue::operator LineSnap):
(WebCore::CSSPrimitiveValue::operator LineAlign):
(WebCore::CSSPrimitiveValue::operator Order):
(WebCore::CSSPrimitiveValue::operator ESpeak):
(WebCore::CSSPrimitiveValue::operator BlendMode):
(WebCore::CSSPrimitiveValue::operator LineCap):
(WebCore::CSSPrimitiveValue::operator LineJoin):
(WebCore::CSSPrimitiveValue::operator WindRule):
(WebCore::CSSPrimitiveValue::operator EAlignmentBaseline):
(WebCore::CSSPrimitiveValue::operator EBorderCollapse):
(WebCore::CSSPrimitiveValue::operator EBorderFit):
(WebCore::CSSPrimitiveValue::operator EImageRendering):
(WebCore::CSSPrimitiveValue::operator ETransformStyle3D):
(WebCore::CSSPrimitiveValue::operator ColumnAxis):
(WebCore::CSSPrimitiveValue::operator ColumnProgression):
(WebCore::CSSPrimitiveValue::operator WrapFlow):
(WebCore::CSSPrimitiveValue::operator WrapThrough):
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::operator EBufferedRendering):
(WebCore::CSSPrimitiveValue::operator EColorInterpolation):
(WebCore::CSSPrimitiveValue::operator EColorRendering):
(WebCore::CSSPrimitiveValue::operator EDominantBaseline):
(WebCore::CSSPrimitiveValue::operator EShapeRendering):
(WebCore::CSSPrimitiveValue::operator ETextAnchor):
(WebCore::CSSPrimitiveValue::operator SVGWritingMode):
(WebCore::CSSPrimitiveValue::operator EVectorEffect):
(WebCore::CSSPrimitiveValue::operator EMaskType):
Assert that the CSSPrimitiveValue is holding a CSSValueID before accessing it.

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

7 years agoREGRESSION(r153380): Can't open messages on Gmail
akling@apple.com [Sat, 27 Jul 2013 21:40:26 +0000 (21:40 +0000)]
REGRESSION(r153380): Can't open messages on Gmail
https://bugs.webkit.org/show_bug.cgi?id=119165

Patch by Ryosuke Niwa <rniwa@webkit.org> on 2013-07-27
Reviewed by Andreas Kling.

This bug was caused by r153380. The bug doesn't reproduce as long as WebKit is built by clang 4.2 and later
or final is disabled (it could be clang 4.1 and later but we don't have information about that).

Fix the bug by disabling final on earlier versions of clang. Unfortunately we can only check versions of
Apple clang since __clang_major__ and __clang_minor__ are vendor dependent.

* wtf/Compiler.h:

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

7 years agoStop pretending to support <string> for text-align.
weinig@apple.com [Sat, 27 Jul 2013 20:49:12 +0000 (20:49 +0000)]
Stop pretending to support <string> for text-align.
https://bugs.webkit.org/show_bug.cgi?id=119107

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/css/text-align-string-crash.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
Stop pretending to support <string> for text-align.

* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyTextAlign::applyValue):
ASSERT that only value IDs get passed.

LayoutTests:

* fast/css/text-align-string-crash-expected.txt: Added.
* fast/css/text-align-string-crash.html: Added.

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

7 years agoIntroduce toSVGRectElement(), use it
gyuyoung.kim@samsung.com [Sat, 27 Jul 2013 04:48:54 +0000 (04:48 +0000)]
Introduce toSVGRectElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119126

Reviewed by Andreas Kling.

As a step to change static_cast with toSVGXXX, static_cast<SVGRectElement*> can
be changed with toSVGRectElement().

No new tests, no behavior change.

* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::updateShapeFromElement):
* rendering/svg/SVGPathData.cpp:
(WebCore::updatePathFromRectElement):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::operator<<):
* svg/SVGRectElement.h:
(WebCore::toSVGRectElement):

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

7 years agoWith frame flattening on, too many resize events fired if document is resized in...
commit-queue@webkit.org [Sat, 27 Jul 2013 01:17:04 +0000 (01:17 +0000)]
With frame flattening on, too many resize events fired if document is resized in onresize handler.
https://bugs.webkit.org/show_bug.cgi?id=119075

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-07-26
Reviewed by Simon Fraser.

With http://trac.webkit.org/changeset/149287, WebCore also sends resize event in FrameView::setFrameRect.  When
flattening an iframe, setFrameRect could be called multiple times from RenderFrameBase::layoutWithFlattening and
we could get multiple resize events.  This patch adds a flag in FrameView to disallow sending resize events if
we are inside layoutWithFlattening.  The resize event will be sent in performPostLayoutTasks after the iframe
is done laying out.

Manually tested by verifying the rendering slowness in www.hi-pda.com is fixed when frame flattening is enabled.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setFrameRect):
* page/FrameView.h:
(WebCore::FrameView::setResizeEventAllowed):
(WebCore::FrameView::resizeEventAllowed):
* rendering/RenderFrameBase.cpp:
(WebCore::RenderFrameBase::layoutWithFlattening):

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

7 years agoAllow new transitions to run even when controller is suspended
dino@apple.com [Sat, 27 Jul 2013 00:57:31 +0000 (00:57 +0000)]
Allow new transitions to run even when controller is suspended
https://bugs.webkit.org/show_bug.cgi?id=119171
<rdar://problem/14511404>

Reviewed by Simon Fraser.

Source/WebCore:

Expose a new property on AnimationController that allows newly created
animations to run even if the controller says it is suspended. See WebKit
ChangeLog for more details.

Test: transitions/created-while-suspended.html

* WebCore.exp.in: Export the new methods so WebView can use them.
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Initialize new flag to false.
(WebCore::AnimationControllerPrivate::startAnimationsIfNotSuspended): Check new flag is not true.
(WebCore::AnimationControllerPrivate::setAllowsNewAnimationsWhileSuspended): Expose setter.
(WebCore::AnimationController::allowsNewAnimationsWhileSuspended): "Public" getter.
(WebCore::AnimationController::setAllowsNewAnimationsWhileSuspended): "Public" setter.
* page/animation/AnimationController.h:
* page/animation/AnimationControllerPrivate.h:
(WebCore::AnimationControllerPrivate::allowsNewAnimationsWhileSuspended):
* page/animation/CompositeAnimation.cpp:
(WebCore::CompositeAnimation::CompositeAnimation): Only suspend if new flag is false. Everything else
relies on the m_suspended flag, so the real code change is this one line.

Source/WebKit/mac:

Expose a new SPI on WebView that triggers the (buggy) old behaviour
for animations, such that any newly created animations will start even
when the document is supposedly suspended. It turns out that client content was
unknowingly relying on this behaviour - e.g. suspending a view, loading a
bunch of new content, bringing the view on screen and then unsuspending. In this
situation, we were not running CSS transitions, because the page was suspended.
However, JS was still triggering them, and content was expecting a transitionEnd event.

* WebView/WebView.mm:
(-[WebView allowsNewCSSAnimationsWhileSuspended]): Calls into AnimationController.
(-[WebView setAllowsNewCSSAnimationsWhileSuspended:]): Ditto.
* WebView/WebViewPrivate.h: New methods listed above.

LayoutTests:

This is actually a test to make sure this fix didn't break anything. There is no
way to trigger the new behaviour from the test system (or from Safari).

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

7 years agoASSERT failure in wtf/CheckedBoolean.h line 43 on Windows
msaboff@apple.com [Fri, 26 Jul 2013 23:19:30 +0000 (23:19 +0000)]
ASSERT failure in wtf/CheckedBoolean.h line 43 on Windows
https://bugs.webkit.org/show_bug.cgi?id=119170

Reviewed by Michael Saboff.

Added a copy constructor to CheckedBoolean.

* wtf/CheckedBoolean.h:
(CheckedBoolean::CheckedBoolean):

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

7 years ago[CSS Shapes] New positioning model: support for polygon shape-outside
commit-queue@webkit.org [Fri, 26 Jul 2013 23:00:24 +0000 (23:00 +0000)]
[CSS Shapes] New positioning model: support for polygon shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118085

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-26
Reviewed by Dirk Schulze.

Update polygon tests to work for new positioning model and migrate
them to be W3C spec tests. Thus, they have been imported from the
CSSWG repository now.

* TestExpectations: Remove skip for replaced test.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-000-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-000.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-001-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-001.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-002-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-polygon-002.html: Added.
* csswg/submitted/shapes/shape-outside/w3c-import.log:
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-polygon-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-polygon.html: Removed.

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

7 years agoAdded module definition file for building libEGL.
achristensen@apple.com [Fri, 26 Jul 2013 22:54:59 +0000 (22:54 +0000)]
Added module definition file for building libEGL.
https://bugs.webkit.org/show_bug.cgi?id=119162

Reviewed by Brent Fulgham.

* ANGLE.vcxproj/libEGLCommon.props: Added reference to libEGL.def.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Fri, 26 Jul 2013 21:57:56 +0000 (21:57 +0000)]
[Windows] Unreviewed build fix.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::createMetadataKeyNames): Do not include Media Selection
synbols when building without Media Selection API.

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

7 years agoREGRESSION(FTL?): Crashes in plugin tests
oliver@apple.com [Fri, 26 Jul 2013 21:21:18 +0000 (21:21 +0000)]
REGRESSION(FTL?): Crashes in plugin tests
https://bugs.webkit.org/show_bug.cgi?id=119141

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Re-export getStackTrace

* interpreter/Interpreter.h:

Source/WebCore:

Getting the correct semantics to appease the inspector is fairly
awful with the iterator system.  For the time being lets just revert
to requesting a full stack trace as we did in the past.

* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):

LayoutTests:

Bring back plugin tests

* platform/mac/TestExpectations:

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Fri, 26 Jul 2013 21:17:59 +0000 (21:17 +0000)]
[Windows] Unreviewed build fix.

Correct build when targeting a release that does not have the AVCF
Legible Output infrastructure.

* platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Exclude
a soft-link target when the API doesn't exist.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
Correct include options for non-Legible Output supporting environments.
(WebCore::MediaPlayerPrivateAVFoundationCF::processLegacyClosedCaptionsTracks):
Prevent build failure when building with legacy caption support.

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

7 years agoREGRESSION: Crash when opening a message on Gmail
fpizlo@apple.com [Fri, 26 Jul 2013 21:12:30 +0000 (21:12 +0000)]
REGRESSION: Crash when opening a message on Gmail
https://bugs.webkit.org/show_bug.cgi?id=119105

Source/JavaScriptCore:

Reviewed by Oliver Hunt and Mark Hahnenberg.

- GetById patching in the DFG needs to be more disciplined about how it derives the
  slow path.

- Fix some dumping code thread safety issues.

* bytecode/CallLinkStatus.cpp:
(JSC::CallLinkStatus::dump):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* dfg/DFGRepatch.cpp:
(JSC::DFG::getPolymorphicStructureList):
(JSC::DFG::tryBuildGetByIDList):

LayoutTests:

Reviewed by Oliver Hunt and Mark Hahnenberg.

* fast/js/dfg-get-by-id-unset-then-proto-less-warmup.html: Added.
* fast/js/dfg-get-by-id-unset-then-proto-more-warmup.html: Added.
* fast/js/dfg-get-by-id-unset-then-proto.html: Added.
* fast/js/jsc-test-list
* fast/js/script-tests/dfg-get-by-id-unset-then-proto-less-warmup.js: Added.
(foo):
(Blah):
* fast/js/script-tests/dfg-get-by-id-unset-then-proto-more-warmup.js: Added.
(foo):
(Blah):
* fast/js/script-tests/dfg-get-by-id-unset-then-proto.js: Added.
(foo):
(Blah):

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

7 years agoApply FINAL to the RenderObject hierarchy.
akling@apple.com [Fri, 26 Jul 2013 20:41:32 +0000 (20:41 +0000)]
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>

Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>

* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.

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

7 years agoAdd another method that we need to set aside subviews for
andersca@apple.com [Fri, 26 Jul 2013 20:39:57 +0000 (20:39 +0000)]
Add another method that we need to set aside subviews for
https://bugs.webkit.org/show_bug.cgi?id=119157
<rdar://problem/14554723>

Reviewed by Beth Dakin.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):

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

7 years agoAdd a mode where autosizing fixes the FrameView height to at least the WKView height
timothy_horton@apple.com [Fri, 26 Jul 2013 20:09:25 +0000 (20:09 +0000)]
Add a mode where autosizing fixes the FrameView height to at least the WKView height
https://bugs.webkit.org/show_bug.cgi?id=119104
<rdar://problem/14549021>

Reviewed by Anders Carlsson.

* WebCore.exp.in: Export FrameView::setAutoSizeFixedMinimumHeight.
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
Initialize m_autoSizeFixedMinimumHeight to 0.

(WebCore::FrameView::autoSizeIfEnabled):
Increase the FrameView height to m_autoSizeFixedMinimumHeight if necessary,
and do another layout. Store the computed intrinsic content size.

(WebCore::FrameView::setAutoSizeFixedMinimumHeight): Added.

* page/FrameView.h:
(WebCore::FrameView::autoSizingIntrinsicContentSize): Added.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
Add autoSizingShouldExpandToViewHeight parameter.

* UIProcess/API/mac/WKView.mm:
(-[WKView minimumWidthForAutoLayout]):
(-[WKView setMinimumWidthForAutoLayout:]):
Un-deprecate these as they're still useful if not sending a height.

(-[WKView shouldExpandToViewHeightForAutoLayout]):
(-[WKView setShouldExpandToViewHeightForAutoLayout:]):
* UIProcess/API/mac/WKViewPrivate.h:
New property, forward to WebPageProxy.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
New property, forward to WebPage.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
If enabled, update the FrameView's autoSizeFixedMinimumHeight.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::autoSizingShouldExpandToViewHeight):
New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
otherwise reset it to 0.

* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Retrieve intrinsic content size explicitly from the FrameView, as
it may not have used it as its final contentsSize if
autoSizeFixedMinimumHeight is set.

Set the WebPage's size in case the load is committed so that the
WebFrameLoaderClient doesn't reset us to the wrong size.

Update autoSizeFixedMinimumHeight if enabled when the view size changes.

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

7 years ago[Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
bfulgham@apple.com [Fri, 26 Jul 2013 19:19:34 +0000 (19:19 +0000)]
[Windows] Remove workarounds now that rdar://problem/14390466 is fixed.
https://bugs.webkit.org/show_bug.cgi?id=119150

Reviewed by Anders Carlsson.

* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createPlayer): Remove workaround to add legible output
after player is created.
(WebCore::AVFWrapper::createPlayerItem): Remove workaround to delay adding
legible output until player is created.
(WebCore::AVFWrapper::platformLayer): Get rid of unused temporary.

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

7 years agoWKTR should know about the JSC extensions to testRunner
fpizlo@apple.com [Fri, 26 Jul 2013 19:06:32 +0000 (19:06 +0000)]
WKTR should know about the JSC extensions to testRunner
https://bugs.webkit.org/show_bug.cgi?id=119154

Reviewed by Mark Hahnenberg and Geoffrey Garen.

This makes some fast/js tests pass.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::numberOfDFGCompiles):
(WTR::TestRunner::neverInlineFunction):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

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

7 years ago[mips] Fix LLINT build for mips backend
commit-queue@webkit.org [Fri, 26 Jul 2013 18:17:53 +0000 (18:17 +0000)]
[mips] Fix LLINT build for mips backend
https://bugs.webkit.org/show_bug.cgi?id=119152

Patch by Balazs Kilvady <kilvadyb@homejinni.com> on 2013-07-26
Reviewed by Oliver Hunt.

* offlineasm/mips.rb:

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

7 years agoSetting a large numeric property on an object causes it to allocate a huge backing...
mhahnenberg@apple.com [Fri, 26 Jul 2013 18:07:34 +0000 (18:07 +0000)]
Setting a large numeric property on an object causes it to allocate a huge backing store
https://bugs.webkit.org/show_bug.cgi?id=118914

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

There are two distinct actions that we're trying to optimize for:

new Array(100000);

and:

a = [];
a[100000] = 42;

In the first case, the programmer has indicated that they expect this Array to be very big,
so they should get a contiguous array up until some threshold, above which we perform density
calculations to see if it is indeed dense enough to warrant being contiguous.

In the second case, the programmer hasn't indicated anything about the size of the Array, so
we should be more conservative and assume it should be sparse until we've proven otherwise.

Currently both of those cases are handled by MIN_SPARSE_ARRAY_INDEX. We should distinguish
between them for the purposes of not over-allocating large backing stores like we see on
http://www.peekanalytics.com/burgerjoints/

The way that we'll do this is to keep the MIN_SPARSE_ARRAY_INDEX for the first case, and
introduce a new heuristic for the second case. If we are putting to an index above a certain
threshold (say, 1000) and it is beyond the length of the array, then we will use a sparse
map instead. So for example, in the second case above the empty array has a blank indexing
type and a length of 0. We put-by-val to an index > 1000 and > a.length, so we'll use a sparse map.

This fix is ~800x speedup on the accompanying regression test :-o

* runtime/ArrayConventions.h:
(JSC::indexIsSufficientlyBeyondLengthForSparseMap):
* runtime/JSObject.cpp:
(JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putByIndexBeyondVectorLength):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):

LayoutTests:

Added new regression test for put-by-val-ing to a blank indexing type with a large index.
This fix is ~800x speedup on this regression test :-o

* fast/js/regress/put-by-val-large-index-blank-indexing-type.html: Added.
* fast/js/regress/script-tests/put-by-val-large-index-blank-indexing-type.js: Added.

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

7 years ago[Windows] Unreviewed gardening.
bfulgham@apple.com [Fri, 26 Jul 2013 16:22:48 +0000 (16:22 +0000)]
[Windows] Unreviewed gardening.

* WebCore.vcxproj/WebCore.vcxproj: Add missing header file to ease code viewing.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

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

7 years ago[BlackBerry] LayerTiler fails to render layer after waking up
anilsson@rim.com [Fri, 26 Jul 2013 15:19:57 +0000 (15:19 +0000)]
[BlackBerry] LayerTiler fails to render layer after waking up
https://bugs.webkit.org/show_bug.cgi?id=119146

Reviewed by George Staikos.

When the application is backgrounded, all tiles are freed up to
release memory back to the system. We also mark the contents as dirty
in LayerTiler::deleteTextures() so tiles will be repopulated when
waking up again.

The problem was caused by an optimization to avoid re-rendering tiles
repeatedly until the UI thread catches up with the fact that we have
indeed rendered those tiles (which will happen when the UI thread next
composites a frame).

When contents are dirty, we're not supposed to perform this
optimization (i.e. we're not supposed to skip rendering) because the
appearance of the layer has changed, so we do need to render those
tiles. Unfortunately, the code that was supposed to forget the list of
tiles rendered was in a conditional, "if (frontVisibility)", which
happened to be false sometimes when the app woke up again. So we ended
up perpetually skipping those render jobs, and the UI thread kept
yelling at us to render them.

Fixed by unconditionally dropping the list of tiles rendered when
contents are dirty.

This can't be detected without pixel tests, which BB DRT currently
doesn't support.

JIRA 452460

* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerVisibility::clearTilesRendered):
(WebCore::LayerTiler::updateTextureContentsIfNeeded):

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

7 years agoREGRESSION(FTL): Fix lots of crashes in sh4 baseline JIT.
commit-queue@webkit.org [Fri, 26 Jul 2013 14:41:55 +0000 (14:41 +0000)]
REGRESSION(FTL): Fix lots of crashes in sh4 baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=119148

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-26
Reviewed by Csaba Osztrogon√°c.

* jit/JSInterfaceJIT.h: "secondArgumentRegister" is wrong for sh4.
* llint/LowLevelInterpreter32_64.asm: "move t0, a0" is missing
in nativeCallTrampoline for sh4. Reuse MIPS implementation to avoid
code duplication.

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

7 years agoREGRESSION(FTL): Crash in sh4 baseline JIT.
commit-queue@webkit.org [Fri, 26 Jul 2013 10:33:24 +0000 (10:33 +0000)]
REGRESSION(FTL): Crash in sh4 baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=119138

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-26
Reviewed by Csaba Osztrogon√°c.

This crash is due to incomplete report of r150146 and r148474.

* jit/JITStubsSH4.h:

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

7 years agoUnreviewed.
zandobersek@gmail.com [Fri, 26 Jul 2013 08:34:32 +0000 (08:34 +0000)]
Unreviewed.

* Target.pri: Adding missing DFG files to the Qt build.

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

7 years agoGTK and Qt buildfix after the intrusive win buildfix r153360.
ossy@webkit.org [Fri, 26 Jul 2013 05:54:22 +0000 (05:54 +0000)]
GTK and Qt buildfix after the intrusive win buildfix r153360.

* GNUmakefile.list.am:
* Target.pri:

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

7 years agoRemove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
rniwa@webkit.org [Fri, 26 Jul 2013 04:35:32 +0000 (04:35 +0000)]
Remove unused HTMLTextFormControlElement::textRendererAfterUpdateLayout
https://bugs.webkit.org/show_bug.cgi?id=119121

Reviewed by Andreas Kling.

Merge https://chromium.googlesource.com/chromium/blink/+/3255ce725711707fe1fd18be91a6d06789517220.

* html/HTMLTextFormControlElement.cpp:
* html/HTMLTextFormControlElement.h:

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

7 years agoFix document leak when selection is created inside the document
rniwa@webkit.org [Fri, 26 Jul 2013 03:59:22 +0000 (03:59 +0000)]
Fix document leak when selection is created inside the document
https://bugs.webkit.org/show_bug.cgi?id=119122

Reviewed by Andreas Kling.

Source/WebCore:

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

The bug was caused by FrameSelection::m_previousCaretNode holding onto a Node, leaking its document.
Fixed the bug by explicitly clearing it in FrameSelection::prepareForDestruction.

Test: editing/selection/leak-document-with-selection-inside.html

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::prepareForDestruction):

LayoutTests:

Added a regression test.

* editing/selection/leak-document-with-selection-inside-expected.txt: Added.
* editing/selection/leak-document-with-selection-inside.html: Added.

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

7 years agoUnreviewed, fix build break after r153360.
gyuyoung.kim@samsung.com [Fri, 26 Jul 2013 01:48:23 +0000 (01:48 +0000)]
Unreviewed, fix build break after r153360.

* CMakeLists.txt: Add CommonSlowPathsExceptions.cpp.

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

7 years agoUnreviewed build fix, AppleWin port.
roger_fong@apple.com [Fri, 26 Jul 2013 01:41:23 +0000 (01:41 +0000)]
Unreviewed build fix, AppleWin port.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.vcxproj/copy-files.cmd:

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

7 years ago[CSS Shapes] New positioning model: support for inset rectangle shape-outside
commit-queue@webkit.org [Fri, 26 Jul 2013 01:24:13 +0000 (01:24 +0000)]
[CSS Shapes] New positioning model: support for inset rectangle shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118083

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-25
Reviewed by Dirk Schulze.

Update inset-rectangle tests to work with new positioning model.
Removed some test cases that aren't really needed or aren't applicable
with the new model. These test cases live in the CSS WG's repo now, so
they've been imported here.

* TestExpectations: Remove skip lines for replaced tests.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-000-expected.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-000.html: Added.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-inset-rectangle-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-inset-rectangle-001.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-rounded-inset-rectangle.html.
* csswg/submitted/shapes/shape-outside/w3c-import.log:
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-inset-rectangle-expected.html: Removed.
* fast/shapes/shape-outside-floats/shape-outside-floats-simple-inset-rectangle.html: Removed.

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

7 years agoUnreviewed. Followup to r153360.
roger_fong@apple.com [Fri, 26 Jul 2013 00:40:29 +0000 (00:40 +0000)]
Unreviewed. Followup to r153360.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:

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

7 years ago[Windows] Speculative build fix.
msaboff@apple.com [Fri, 26 Jul 2013 00:22:14 +0000 (00:22 +0000)]
[Windows] Speculative build fix.

Moved interpreterThrowInCaller() out of LLintExceptions.cpp into new CommonSlowPathsExceptions.cpp
that is always compiled.  Made LLInt::returnToThrow() conditional on LLINT being enabled.
Roger will add the new files to Windows project in another checkin.

* JavaScriptCore.xcodeproj/project.pbxproj:
* llint/LLIntExceptions.cpp:
* llint/LLIntExceptions.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPathsExceptions.cpp: Added.
(JSC::CommonSlowPaths::interpreterThrowInCaller):
* runtime/CommonSlowPathsExceptions.h: Added.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Fri, 26 Jul 2013 00:19:54 +0000 (00:19 +0000)]
[Windows] Unreviewed build fix.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing IntendedStructureChange.h,.cpp and
parser/SourceCode.h,.cpp.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Fri, 26 Jul 2013 00:18:11 +0000 (00:18 +0000)]
[Windows] Unreviewed build fix.

* WTF.vcxproj/WTF.vcxproj: Add missing SixCharacterHash.h,.cpp files.
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.
* wtf/NumberOfCores.h: Add export macro to numberOfProcessorCores.
* wtf/PrintStream.h: Add export macro to dumpCharacter.
* wtf/SixCharacterHash.h: Add export macro to sixCharacterHashStringToInteger
and integerToSixCharacterHashString.
* wtf/text/CString.h: Add export macro to hash and equal methods.
(WTF::CStringHash::hash): Add export macro.

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

7 years agoASSERT(m_vm->apiLock().currentThreadIsHoldingLock()); fails for Safari on current ToT
andersca@apple.com [Fri, 26 Jul 2013 00:13:13 +0000 (00:13 +0000)]
ASSERT(m_vm->apiLock().currentThreadIsHoldingLock()); fails for Safari on current ToT
https://bugs.webkit.org/show_bug.cgi?id=119108

Reviewed by Mark Hahnenberg.

Add a currentThreadIsHoldingAPILock() function to VM that checks if the current thread is the exclusive API thread.

* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/Heap.cpp:
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::collect):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateSlowCase):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/VM.h:
(JSC::VM::currentThreadIsHoldingAPILock):

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

7 years agoChromeClient::focusedNodeChanged() should be focusedElementChanged().
akling@apple.com [Thu, 25 Jul 2013 23:57:40 +0000 (23:57 +0000)]
ChromeClient::focusedNodeChanged() should be focusedElementChanged().
<http://webkit.org/b/119110>

Reviewed by Anders Carlsson.

Source/WebCore:

Because only Elements can be focused.

* dom/Document.cpp:
(WebCore::Document::setFocusedElement):
* loader/EmptyClients.h:
(WebCore::EmptyChromeClient::focusedElementChanged):
* page/Chrome.cpp:
(WebCore::Chrome::focusedElementChanged):
* page/Chrome.h:
* page/ChromeClient.h:

Source/WebKit/blackberry:

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::focusedElementChanged):
* WebCoreSupport/ChromeClientBlackBerry.h:

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp:
(WebCore::ChromeClientEfl::focusedElementChanged):
* WebCoreSupport/ChromeClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::focusedElementChanged):
* WebCoreSupport/ChromeClientGtk.h:

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::focusedElementChanged):

Source/WebKit/qt:

* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::focusedElementChanged):
* WebCoreSupport/ChromeClientQt.h:

Source/WebKit/win:

* WebCoreSupport/WebChromeClient.cpp:
(WebChromeClient::focusedElementChanged):
* WebCoreSupport/WebChromeClient.h:

Source/WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.cpp:
(WebKit::ChromeClientWinCE::focusedElementChanged):
* WebCoreSupport/ChromeClientWinCE.h:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

7 years ago[WK2][Soup] Add private browsing support
kseo@webkit.org [Thu, 25 Jul 2013 23:23:42 +0000 (23:23 +0000)]
[WK2][Soup] Add private browsing support
https://bugs.webkit.org/show_bug.cgi?id=118657

Reviewed by Gustavo Noronha Silva.

Source/WebCore:

Support private browsing by adding a method to create a private
browsing soup session. This private browsing session uses a
non-persistent cookie jar and does not use the disk cache feature.

No new tests. Covered by existing private browsing tests.

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::isPrivateBrowsingSession):
Add USE(SOUP) guard to isPrivateBrowsingSession() and m_isPrivate.

* platform/network/ResourceHandle.h:
Add a factory method to create a private browsing session for soup.

* platform/network/soup/CookieJarSoup.cpp:
(WebCore::createPrivateBrowsingCookieJar):
* platform/network/soup/CookieJarSoup.h:
Add a method to create a non-persistent cookie jar for private browsing.

* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
Initialize m_isPrivate to false.
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
Implement the method by invoking ResourceHandle::createPrivateBrowsingSession.

* platform/network/soup/ResourceHandleSoup.cpp:
(WebCore::createSoupSession):
Extract common soup session creation code so that both defaultSession
and createPrivateBrowsingSession can use this function to create a soup
session.
(WebCore::ResourceHandle::defaultSession):
Change to use createSoupSession.
(WebCore::ResourceHandle::createPrivateBrowsingSession):
Create a session which uses a non-persistent cookie jar.

Source/WebKit2:

Support private browsing in WK2 by implementing private browsing
related methods in WebFrameNetworkingContext.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
Add USE(SOUP) guard.

* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
Add private browsing support methods. Copied from the Mac port.
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
Check if the frame enables private browsing and return the private
browsing session.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
Add USE(SOUP) guard.

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

7 years agoREGRESSION(FTL): Most layout tests crashes
zandobersek@gmail.com [Thu, 25 Jul 2013 23:14:51 +0000 (23:14 +0000)]
REGRESSION(FTL): Most layout tests crashes
https://bugs.webkit.org/show_bug.cgi?id=119089

Reviewed by Oliver Hunt.

* runtime/ExecutionHarness.h:
(JSC::prepareForExecution): Move prepareForExecutionImpl call into its own statement. This prevents the GCC-compiled
code to create the PassOwnPtr<JSC::JITCode> (intended as a parameter to the installOptimizedCode call) from the jitCode
RefPtr<JSC::JITCode> parameter before the latter was actually given a proper value through the prepareForExecutionImpl call.
Currently it's created beforehand and therefor holds a null pointer before it's anchored as the JIT code in
JSC::CodeBlock::setJITCode, which later indirectly causes assertions in JSC::CodeBlock::jitCompile.
(JSC::prepareFunctionForExecution): Ditto for prepareFunctionForExecutionImpl.

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

7 years agoFix build of DumpRenderTree and WebKitTestRunner when building against an SDK.
mrowe@apple.com [Thu, 25 Jul 2013 23:07:06 +0000 (23:07 +0000)]
Fix build of DumpRenderTree and WebKitTestRunner when building against an SDK.

* DumpRenderTree/mac/Configurations/Base.xcconfig: Fix framework search path when building against an SDK.
* WebKitTestRunner/Configurations/Base.xcconfig: Ditto. Also fix where our scripts look for WebCore.framework
so they pull the version out of the SDK.

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

7 years agoBuild fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder
kseo@webkit.org [Thu, 25 Jul 2013 22:36:33 +0000 (22:36 +0000)]
Build fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder
https://bugs.webkit.org/show_bug.cgi?id=118228

Reviewed by Anders Carlsson.

Build fails on some platforms where int64_t and long long are different types.

* Shared/FileAPI/BlobRegistrationData.cpp:
(WebKit::BlobRegistrationData::encode):
Add explicit casts to int64_t.
(WebKit::BlobRegistrationData::decode):
Use int64_t instead of long long.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Thu, 25 Jul 2013 22:33:08 +0000 (22:33 +0000)]
[Windows] Unreviewed build fix.

* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Add missing 'ftl'
include path.

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

7 years ago[CSS Shapes] Add missing includes to shape-inside polygon tests
zoltan@webkit.org [Thu, 25 Jul 2013 22:29:53 +0000 (22:29 +0000)]
[CSS Shapes] Add missing includes to shape-inside polygon tests
https://bugs.webkit.org/show_bug.cgi?id=119098

Reviewed by Dirk Schulze.

We need to include subpixel-utils.js for tests which use simple-polygon.js, since it uses
SubPixelLayout, otherwise both the result/expected are generating incorrect output.

* fast/shapes/shape-inside/shape-inside-regular-polygon16-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon16.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8-expected.html:
* fast/shapes/shape-inside/shape-inside-regular-polygon8.html:

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

7 years agoNull check m_frame in maximum and minimumScrollPosition
timothy_horton@apple.com [Thu, 25 Jul 2013 22:25:18 +0000 (22:25 +0000)]
Null check m_frame in maximum and minimumScrollPosition
https://bugs.webkit.org/show_bug.cgi?id=119109
<rdar://problem/14545393>

Reviewed by Darin Adler.

* page/FrameView.cpp:
(WebCore::FrameView::minimumScrollPosition):
(WebCore::FrameView::maximumScrollPosition):
Null-check m_frame (and move the early-return after the clamp-to-0
as the revert in r152911 should have).

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

7 years agoLocalizable.strings generated by extract-localizable-strings should be UTF-8
andersca@apple.com [Thu, 25 Jul 2013 21:48:27 +0000 (21:48 +0000)]
Localizable.strings generated by extract-localizable-strings should be UTF-8
https://bugs.webkit.org/show_bug.cgi?id=119106

Reviewed by Mark Rowe.

Source/WebCore:

* English.lproj/Localizable.strings:
Re-encode this as UTF-8 and remove the BOM.

* WebCore.xcodeproj/project.pbxproj:
Set the file encoding of Localizable.strings to UTF-8.

Tools:

Output strings as UTF-8.

* Scripts/extract-localizable-strings:

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

7 years agoDon't force layout when querying a fixed or non-box margin/padding property
rniwa@webkit.org [Thu, 25 Jul 2013 21:40:55 +0000 (21:40 +0000)]
Don't force layout when querying a fixed or non-box margin/padding property
https://bugs.webkit.org/show_bug.cgi?id=118032

Reviewed by David Hyatt.

Source/WebCore:

Merge https://chromium.googlesource.com/chromium/blink/+/66427d0825fcc2975bd50220cdcaa2504d6f36e5.

This patch avoids layout in ComputedStyleExtractor::propertyValue for margin and padding properties
when they are of fixed length. According to the Blink patch's author, this improves the page load
time of economist.com by 27%.

The actual code change is significantly different from the original Blink patch since we've done
some refactorins in r152938 and r153067 to make this change more self-contained.

Test: fast/css/computed-width-without-renderer.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::zoomAdjustedPaddingOrMarginPixelValue):
(WebCore::paddingOrMarginIsRendererDependent):
(WebCore::isLayoutDependent):
(WebCore::ComputedStyleExtractor::propertyValue):

LayoutTests:

Add a regression test inspired by the one added in
https://chromium.googlesource.com/chromium/blink/+/ff234b1593b2b493d47f38f687d09a87bc42c9eb.

* fast/css/computed-width-without-renderer-expected.txt: Added.
* fast/css/computed-width-without-renderer.html: Added.

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

7 years agoSource/ThirdParty/ANGLE: Made Windows build system for ANGLE and removed existing...
achristensen@apple.com [Thu, 25 Jul 2013 21:13:28 +0000 (21:13 +0000)]
Source/ThirdParty/ANGLE: Made Windows build system for ANGLE and removed existing broken build system.
Removed empty src/libGLESv2/shaders directory and old README files.
https://bugs.webkit.org/show_bug.cgi?id=119103

Reviewed by Brent Fulgham.

* ANGLE.vcxproj: Added.
* ANGLE.vcxproj/ANGLEGenerated.vcxproj: Added.
* ANGLE.vcxproj/ANGLEGenerated.vcxproj.filters: Added.
* ANGLE.vcxproj/libEGL.vcxproj: Added.
* ANGLE.vcxproj/libEGL.vcxproj.filters: Added.
* ANGLE.vcxproj/libEGLCommon.props: Added.
* ANGLE.vcxproj/libGLESv2.vcxproj: Added.
* ANGLE.vcxproj/libGLESv2.vcxproj.filters: Added.
* ANGLE.vcxproj/libGLESv2Common.props: Added.
* ANGLE.vcxproj/translator.vcxproj: Added.
* ANGLE.vcxproj/translator.vcxproj.filters: Added.
* ANGLE.vcxproj/translatorCommon.props: Added.
* src/ANGLE.sln: Removed.
* src/compiler/preprocessor/preprocessor.vcxproj: Removed.
* src/compiler/preprocessor/preprocessor.vcxproj.filters: Removed.
* src/compiler/translator_common.vcxproj: Removed.
* src/compiler/translator_common.vcxproj.filters: Removed.
* src/compiler/translator_hlsl.vcxproj: Removed.
* src/compiler/translator_hlsl.vcxproj.filters: Removed.
* src/libEGL/README: Removed.
* src/libEGL/libEGL.vcxproj: Removed.
* src/libEGL/libEGL.vcxproj.filters: Removed.
* src/libGLESv2/README: Removed.
* src/libGLESv2/libGLESv2.vcxproj: Removed.
* src/libGLESv2/libGLESv2.vcxproj.filters: Removed.
* src/libGLESv2/shaders: Removed.

Source/WebKit: Made Windows build system for ANGLE.
https://bugs.webkit.org/show_bug.cgi?id=119103

Reviewed by Brent Fulgham.

* WebKit.vcxproj/WebKit.sln:
Added ANGLEGenerated, libEGL, libGLESv2, and translator projects.
These projects are currently not built.

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

7 years ago[Windows] Provide ASM implemenation of 8-bit compare-and-swap
bfulgham@apple.com [Thu, 25 Jul 2013 20:56:43 +0000 (20:56 +0000)]
[Windows] Provide ASM implemenation of 8-bit compare-and-swap
https://bugs.webkit.org/show_bug.cgi?id=119084

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-07-25
Reviewed by Brent Fulgham.

* wtf/Atomics.h:
(WTF::weakCompareAndSwap): Add a 32-bit X86 Assembly path for
Windows build.

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

7 years ago-[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include...
weinig@apple.com [Thu, 25 Jul 2013 20:52:59 +0000 (20:52 +0000)]
-[WebHTMLView attributedSubstringForProposedRange:actualRange:] does not include strikethrough attribute in the returned attributed string
https://bugs.webkit.org/show_bug.cgi?id=119099
<rdar://problem/13439291>

Reviewed by Enrica Casucci.

Source/WebCore:

Tests:
    API Test: AttributedStringTest_Strikethrough

* platform/mac/HTMLConverter.mm:
(+[WebHTMLConverter editingAttributedStringFromRange:]):
Set the NSStrikethroughStyleAttributeName attribute when text-decoration: line-through is seen.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/AttributedString.mm:
(TestWebKitAPI::attributedString):
(TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
(TestWebKitAPI::AttributedStringTest_CustomFont::url):
(TestWebKitAPI::AttributedStringTest_CustomFont::runTest):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
(TestWebKitAPI::AttributedStringTest_Strikethrough::url):
(TestWebKitAPI::AttributedStringTest_Strikethrough::runTest):
* TestWebKitAPI/Tests/mac/attributedStringStrikethrough.html: Added.
Add tests for attributed strings with strikethrough.  Refactor the attributed string tests
to make adding more easier in the future.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Thu, 25 Jul 2013 20:40:24 +0000 (20:40 +0000)]
[Windows] Unreviewed build fix.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add some missing files:
runtime/VM.h,.cpp; Remove deleted JSGlobalData.h,.cpp.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.

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

7 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Thu, 25 Jul 2013 20:37:50 +0000 (20:37 +0000)]
[Windows] Unreviewed build fix.

* WTF.vcxproj/WTF.vcxproj: Add missing CompilationThread.h,.cpp
* WTF.vcxproj/WTF.vcxproj.filters: Ditto.

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

7 years agoMake all jit & non-jit combos build cleanly
oliver@apple.com [Thu, 25 Jul 2013 20:22:45 +0000 (20:22 +0000)]
Make all jit & non-jit combos build cleanly
https://bugs.webkit.org/show_bug.cgi?id=119102

Reviewed by Anders Carlsson.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::counterValueForOptimizeSoon):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::numberOfDFGCompiles):

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

7 years agoUnreviewed build fix after r153333.
psolanki@apple.com [Thu, 25 Jul 2013 20:19:28 +0000 (20:19 +0000)]
Unreviewed build fix after r153333.

* platform/network/cf/ResourceResponseCFNet.cpp: Remove toTimeT since it is no longer called.

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

7 years ago32 bit portion of load validation logic
oliver@apple.com [Thu, 25 Jul 2013 19:36:44 +0000 (19:36 +0000)]
32 bit portion of load validation logic
https://bugs.webkit.org/show_bug.cgi?id=118878
Reviewed by NOBODY (Build fix).
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

7 years ago[CSS Shapes] Fix typo in simple-polygon.js
betravis@adobe.com [Thu, 25 Jul 2013 19:05:37 +0000 (19:05 +0000)]
[CSS Shapes] Fix typo in simple-polygon.js
https://bugs.webkit.org/show_bug.cgi?id=119096

Reviewed by Dirk Schulze.

A function name typo was preventing tests and expectations using simple-polygon.js
from generating correct output.

* fast/shapes/resources/simple-polygon.js:
(polygonXIntercepts): Correctly camel-case function name.

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

7 years ago[CSS Shapes] New positioning model: support for circle and ellipse shape-outside
commit-queue@webkit.org [Thu, 25 Jul 2013 18:20:50 +0000 (18:20 +0000)]
[CSS Shapes] New positioning model: support for circle and ellipse shape-outside
https://bugs.webkit.org/show_bug.cgi?id=118084

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-07-25
Reviewed by Dirk Schulze.

Update circle and ellipse tests to work with new positioning. These
have been rehomed as W3C spec tests, and thus are imported from the
CSSWG's repository.

* TestExpectations: Remove skip for updated tests.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-circle-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-circle-000.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-circle.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000-expected.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-ellipse-expected.html.
* csswg/submitted/shapes/shape-outside/shape-outside-floats-ellipse-000.html: Renamed from LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-simple-ellipse.html.
* csswg/submitted/shapes/shape-outside/w3c-import.log:

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

7 years agoFix Windows build after r153134.
michael.bruning@digia.com [Thu, 25 Jul 2013 18:11:13 +0000 (18:11 +0000)]
Fix Windows build after r153134.
https://bugs.webkit.org/show_bug.cgi?id=119090

Reviewed by Oliver Hunt.

Add USE(PTHREADS) guards around pthread specific code
for now. This will cause isCompilationThread to always
return false on non pthread platforms such as Windows.

We might be able to use the Windows one-time initialization
for this, but this is only available from Windows Vista on.

* wtf/CompilationThread.cpp:
(WTF::initializeCompilationThreads):

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

7 years agoUnreviewed EFL build fix after r153315.
ch.dumez@sisa.samsung.com [Thu, 25 Jul 2013 17:55:49 +0000 (17:55 +0000)]
Unreviewed EFL build fix after r153315.

Fix build error after we started compiling with c++0x support
in r153315.

* platform/efl/RenderThemeEfl.cpp:
(WebCore::toEdjeGroup):

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

7 years agoMore 32bit build fixes
oliver@apple.com [Thu, 25 Jul 2013 17:10:51 +0000 (17:10 +0000)]
More 32bit build fixes

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

7 years agoRemove lastModifiedDate from ResourceResponse
andersca@apple.com [Thu, 25 Jul 2013 17:10:34 +0000 (17:10 +0000)]
Remove lastModifiedDate from ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=119092

Reviewed by Andreas Kling.

Source/WebCore:

Computing m_lastResponseDate is costly on some platforms and we already have a better way to
get the last response time, so convert the two call sites that used to call ResourceresponseBase::lastModifiedDate()
over to using lastModified() instead.

* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::ResourceResponseBase):
(WebCore::ResourceResponseBase::adopt):
(WebCore::ResourceResponseBase::copyData):
* platform/network/ResourceResponseBase.h:
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::platformLazyInit):
* plugins/PluginStream.cpp:
(WebCore::lastModifiedDate):
(WebCore::PluginStream::startStream):

Source/WebKit2:

Update for WebCore changes.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::lastModifiedDate):
Use ResourceResponse::lastModified() to get the last modified date.

(WebKit::PluginView::Stream::didReceiveResponse):
Call the static lastModified function.

(WebKit::PluginView::manualLoadDidReceiveResponse):
Ditto.

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

7 years agoUnreviewed EFL build fix after r153315.
ch.dumez@sisa.samsung.com [Thu, 25 Jul 2013 17:10:19 +0000 (17:10 +0000)]
Unreviewed EFL build fix after r153315.

Use -std=gnu++0x instead of -std=c++0x as we rely on GNU extensions such as
typeof().

* Source/cmake/WebKitHelpers.cmake:

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

7 years agoOptimize the thread locks for API Shims
commit-queue@webkit.org [Thu, 25 Jul 2013 17:01:56 +0000 (17:01 +0000)]
Optimize the thread locks for API Shims
https://bugs.webkit.org/show_bug.cgi?id=118573

Patch by Yi Shen <max.hong.shen@gmail.com> on 2013-07-25
Reviewed by Geoffrey Garen.

Remove the thread lock from API Shims if the VM has an exclusive thread (e.g. the VM
only used by WebCore's main thread).

Source/JavaScriptCore:

* API/APIShims.h:
(JSC::APIEntryShim::APIEntryShim):
(JSC::APICallbackShim::APICallbackShim):
* runtime/JSLock.cpp:
(JSC::JSLockHolder::JSLockHolder):
(JSC::JSLockHolder::init):
(JSC::JSLockHolder::~JSLockHolder):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

No new tests required since no functionality changed.

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::commonVM):

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

7 years ago[CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES...
betravis@adobe.com [Thu, 25 Jul 2013 16:40:40 +0000 (16:40 +0000)]
[CSS Shapes] Shape methods and member variables should be guarded with the CSS_SHAPES flag
https://bugs.webkit.org/show_bug.cgi?id=117277

Reviewed by Alexandru Chiculita.

This patch adds some compile guards that were missing from the RenderStyle and
StyleRareNonInheritedData files. When the compile guard caused parameters to
not be used, the parameters were marked using UNUSED_PARAM.

* css/CSSPropertyNames.in: Inserting a line to trigger build.
* rendering/RenderBlock.cpp:
(WebCore::shapeInfoRequiresRelayout):
(WebCore::RenderBlock::updateRegionsAndShapesBeforeChildLayout):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBox.cpp:
(WebCore::isCandidateForOpaquenessTest):
* rendering/RenderBox.h:
* rendering/RenderObject.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

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

7 years agoUnreviewed build fix after r153218.
ch.dumez@sisa.samsung.com [Thu, 25 Jul 2013 16:38:37 +0000 (16:38 +0000)]
Unreviewed build fix after r153218.

Broke the EFL port build with gcc 4.7.

* interpreter/StackIterator.cpp:
(JSC::printif):

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

7 years agoBuild fix: add missing #include.
commit-queue@webkit.org [Thu, 25 Jul 2013 16:24:07 +0000 (16:24 +0000)]
Build fix: add missing #include.
https://bugs.webkit.org/show_bug.cgi?id=119087

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-25
Reviewed by Allan Sandfeld Jensen.

* bytecode/ArrayProfile.cpp:

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

7 years ago[GTK] Add support for running unit tests in the web process
carlosgc@webkit.org [Thu, 25 Jul 2013 16:13:30 +0000 (16:13 +0000)]
[GTK] Add support for running unit tests in the web process
https://bugs.webkit.org/show_bug.cgi?id=118427

Reviewed by Gustavo Noronha Silva.

Some tests, like GObject DOM bindings API tests, run entirely in
the WebProcess, so we just need to start the test from the UI
process and wait until the test finishes running in the
WebProcess. Tests are split in two files, one containing the
actual test that runs in the WebProcess and another one to add the
tests to the glib test system that works as a
proxy. WebProcessTestRunner class starts a private DBus session
bus and starts the tests sending a message to the WebExtension
waiting until it finishes or fails. WebProcess tests are created
by defining a class derived from WebProcessTest class and
implementing the static create method and the virtual runTest
method. The macro REGISTER_TEST is used by the web process tests
to register their test cases. This patch includes the migration
of the WebKitDOMNode test, all other GObject DOM bindings tests
will be migrated in the same way in follow up patches.

* UIProcess/API/gtk/tests/DOMNodeTest.cpp: Added.
(WebKitDOMNodeTest::create): Create a new WebKitDOMNodeTest.
(WebKitDOMNodeTest::webPageFromArgs): Get the pageID parameter
from the arguments dictionary.
(WebKitDOMNodeTest::testHierarchyNavigation):
(WebKitDOMNodeTest::testInsertion):
(WebKitDOMNodeTest::runTest): Run the given test.
(registerTests): Register test cases.
* UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
compilation.
* UIProcess/API/gtk/tests/TestDOMNode.cpp: Added.
(testWebKitDOMNodeHierarchyNavigation):
(testWebKitDOMNodeInsertion):
(beforeAll):
(afterAll):
* UIProcess/API/gtk/tests/TestMain.cpp:
(main): Unset DBUS_SESSION_BUS_ADDRESS environment variable to
make sure that the GLib bus singleton is initialized by the
private DBus session bus created by the tests.
* UIProcess/API/gtk/tests/WebProcessTest.cpp: Added.
(testsMap): Initialize and get the global map of tests.
(WebProcessTest::add): Add a new test to the map, keeping a
function to create the test.
(WebProcessTest::create): Create a test for the given name.
(methodCallCallback): Handle RunTest DBus method. It creates and
runs the given test.
(webkit_web_extension_initialize):Register the DBus service for
this WebExtension.
* UIProcess/API/gtk/tests/WebProcessTest.h: Added.
* UIProcess/API/gtk/tests/WebProcessTestRunner.cpp: Added.
(WebProcessTestRunner::WebProcessTestRunner): Start a private DBus
session bus and get a connection to it.
(WebProcessTestRunner::~WebProcessTestRunner): Stop the private
DBus session bus.
(WebProcessTestRunner::proxyCreatedCallback):
(WebProcessTestRunner::proxy): Create a new proxy to send messages
to the WebExtension if it doesn't exists.
(WebProcessTestRunner::onNameAppeared): Called when the DBus
service has been registered in the WebExtension and it's safe to
create a proxy.
(WebProcessTestRunner::onNameVanished): Called when the DBus
service is unregistered. This happens when the web process crash,
so we just exit here, because the g_asserts in the web process
have already registered the error message.
(WebProcessTestRunner::testFinishedCallback): Called when the
WebProcess tests has finished.
(WebProcessTestRunner::runTest): Send a message to the
WebExtension to start the given test and monitor the service.
(WebProcessTestRunner::finishTest): Save the test result and
finish the main loop.
* UIProcess/API/gtk/tests/WebProcessTestRunner.h: Added.

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

7 years agoFix windows build after FTL upstream
allan.jensen@digia.com [Thu, 25 Jul 2013 14:26:42 +0000 (14:26 +0000)]
Fix windows build after FTL upstream

Unreviewed build fix.

* wtf/Atomics.h:
(WTF::weakCompareAndSwap):

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

7 years agoUnreviewed, build fix on the EFL port.
ryuan.choi@samsung.com [Thu, 25 Jul 2013 13:53:40 +0000 (13:53 +0000)]
Unreviewed, build fix on the EFL port.

* CMakeLists.txt: Added JSCTestRunnerUtils.cpp.

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

7 years ago[sh4] Add missing store8(TrustedImm32, void*) implementation in baseline JIT.
commit-queue@webkit.org [Thu, 25 Jul 2013 13:50:10 +0000 (13:50 +0000)]
[sh4] Add missing store8(TrustedImm32, void*) implementation in baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=119083

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-25
Reviewed by Allan Sandfeld Jensen.

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::store8):

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

7 years ago[Qt] Fix test build after FTL upstream
allan.jensen@digia.com [Thu, 25 Jul 2013 13:23:08 +0000 (13:23 +0000)]
[Qt] Fix test build after FTL upstream

Unreviewed build fix.

* Target.pri:

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

7 years ago[Qt] Build fix after FTL.
allan.jensen@digia.com [Thu, 25 Jul 2013 13:11:16 +0000 (13:11 +0000)]
[Qt] Build fix after FTL.

Un Reviewed build fix.

* Target.pri:
* interpreter/StackIterator.cpp:
(JSC::StackIterator::Frame::print):

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

7 years agoUnreviewed build fix after FTL upstream.
rgabor@webkit.org [Thu, 25 Jul 2013 13:07:55 +0000 (13:07 +0000)]
Unreviewed build fix after FTL upstream.

* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::~Worklist):

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

7 years ago[l10n] [mr] Updated WebKitGTK+ Translation(s) in Marathi [mr] language
kov@webkit.org [Thu, 25 Jul 2013 12:49:18 +0000 (12:49 +0000)]
[l10n] [mr] Updated WebKitGTK+ Translation(s) in Marathi [mr] language
https://bugs.webkit.org/show_bug.cgi?id=117282

Patch by Sandeep Shedmake <sandeep.shedmake@gmail.com> on 2013-07-25
Reviewed by Gustavo Noronha.

* mr.po: Updated.

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

7 years agoUnreviewed, build fix on the EFL port.
ryuan.choi@samsung.com [Thu, 25 Jul 2013 12:35:06 +0000 (12:35 +0000)]
Unreviewed, build fix on the EFL port.

Source/JavaScriptCore:

* CMakeLists.txt:
Added SourceCode.cpp and removed BlackBerry file.
* jit/JITCode.h:
(JSC::JITCode::nextTierJIT):
Fixed to build break because of -Werror=return-type
* parser/Lexer.cpp: Includes JSFunctionInlines.h
* runtime/JSScope.h:
(JSC::makeType):
Fixed to build break because of -Werror=return-type

Source/WTF:

* wtf/CMakeLists.txt: Added SixCharacterHash.cpp

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

7 years agoUnreviewed build fixing after FTL upstream.
kadam@inf.u-szeged.hu [Thu, 25 Jul 2013 12:31:45 +0000 (12:31 +0000)]
Unreviewed build fixing after FTL upstream.

* runtime/Executable.cpp:
(JSC::FunctionExecutable::produceCodeBlockFor):

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

7 years agoAdd missing implementation of bxxxnz in sh4 LLINT.
commit-queue@webkit.org [Thu, 25 Jul 2013 12:29:26 +0000 (12:29 +0000)]
Add missing implementation of bxxxnz in sh4 LLINT.
https://bugs.webkit.org/show_bug.cgi?id=119079

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-25
Reviewed by Allan Sandfeld Jensen.

* offlineasm/sh4.rb:

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

7 years agoUnreviewed, build fix on the Qt port.
rgabor@webkit.org [Thu, 25 Jul 2013 12:18:47 +0000 (12:18 +0000)]
Unreviewed, build fix on the Qt port.

Source/JavaScriptCore:

* Target.pri: Add additional build files for the FTL.

Source/WTF:

* WTF.pro: Add additional build files for the FTL.

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

7 years ago[CMAKE] Enforce c++0x for cmake based ports
ryuan.choi@samsung.com [Thu, 25 Jul 2013 12:09:30 +0000 (12:09 +0000)]
[CMAKE] Enforce c++0x for cmake based ports
https://bugs.webkit.org/show_bug.cgi?id=119081

Reviewed by Gyuyoung Kim.

* Source/cmake/WebKitHelpers.cmake:
Enforce c++0x for all cmake based ports to fix build break.

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

7 years agoUnreviewed buildfix after FTL upstream..
kadam@inf.u-szeged.hu [Thu, 25 Jul 2013 12:04:15 +0000 (12:04 +0000)]
Unreviewed buildfix after FTL upstream..

* interpreter/StackIterator.cpp:
(JSC::StackIterator::Frame::codeType):
(JSC::StackIterator::Frame::functionName):
(JSC::StackIterator::Frame::sourceURL):
(JSC::StackIterator::Frame::logicalFrame):

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

7 years agoUnreviewed.
zandobersek@gmail.com [Thu, 25 Jul 2013 11:23:57 +0000 (11:23 +0000)]
Unreviewed.

* heap/CopyVisitor.cpp: Include CopiedSpaceInlines header so the CopiedSpace::recycleEvacuatedBlock
method is not left undefined, causing build failures on (at least) the GTK port.

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

7 years agoSource/JavaScriptCore: Unreviewed, further build fixing on the GTK port.
zandobersek@gmail.com [Thu, 25 Jul 2013 11:19:53 +0000 (11:19 +0000)]
Source/JavaScriptCore: Unreviewed, further build fixing on the GTK port.

* GNUmakefile.list.am: Add CompilationResult source files to the build.

Source/WTF: Unreviewed, further GTK build fixing.

* GNUmakefile.am: Make libWTF.la depend on any changes made to the build targets list.
* GNUmakefile.list.am: Add SixCharacterHash source files to the build.

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

7 years agoUnreviewed GTK build fixing.
zandobersek@gmail.com [Thu, 25 Jul 2013 10:54:38 +0000 (10:54 +0000)]
Unreviewed GTK build fixing.

* GNUmakefile.am: Make the shared libjsc library depend on any changes to the build target list.
* GNUmakefile.list.am: Add additional build targets for files that were introduced by the FTL branch merge.

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

7 years agoBuildfix after this error:
ossy@webkit.org [Thu, 25 Jul 2013 10:51:41 +0000 (10:51 +0000)]
Buildfix after this error:
error: 'pathName' may be used uninitialized in this function [-Werror=uninitialized]

* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThread):

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

7 years ago[GTK] Similar fix to r153304.
ossy@webkit.org [Thu, 25 Jul 2013 10:46:43 +0000 (10:46 +0000)]
[GTK] Similar fix to r153304.

* GNUmakefile.list.am:

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

7 years agoOne more buildfix after FTL upstream.
ossy@webkit.org [Thu, 25 Jul 2013 10:42:21 +0000 (10:42 +0000)]
One more buildfix after FTL upstream.

Return a dummy value after RELEASE_ASSERT_NOT_REACHED() to make GCC happy.

* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::getValue):
(JSC::DFG::LazyJSValue::strictEqual):

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

7 years agoFix "Unhandled opcode localAnnotation" build error in sh4 and mips LLINT.
commit-queue@webkit.org [Thu, 25 Jul 2013 10:24:20 +0000 (10:24 +0000)]
Fix "Unhandled opcode localAnnotation" build error in sh4 and mips LLINT.
https://bugs.webkit.org/show_bug.cgi?id=119076

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-07-25
Reviewed by Allan Sandfeld Jensen.

* offlineasm/mips.rb:
* offlineasm/sh4.rb:

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

7 years agoUnreviewed GTK build fix.
zandobersek@gmail.com [Thu, 25 Jul 2013 09:51:42 +0000 (09:51 +0000)]
Unreviewed GTK build fix.

* GNUmakefile.list.am: Adding JSCTestRunnerUtils files to the build.

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

7 years agoUnreviewed. Further build fixing for the GTK port. Adding the forwarding header
zandobersek@gmail.com [Thu, 25 Jul 2013 09:29:43 +0000 (09:29 +0000)]
Unreviewed. Further build fixing for the GTK port. Adding the forwarding header
for JSCTestRunnerUtils.h as required by the DumpRenderTree compilation.

* ForwardingHeaders/JavaScriptCore/JSCTestRunnerUtils.h: Added.

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

7 years agoBuild break in debug after r153134: StringImpl.h:640: undefined reference to `WTF...
g.czajkowski@samsung.com [Thu, 25 Jul 2013 09:27:52 +0000 (09:27 +0000)]
Build break in debug after r153134: StringImpl.h:640: undefined reference to `WTF::isCompilationThread()
https://bugs.webkit.org/show_bug.cgi?id=119077

Reviewed by Christophe Dumez.

* wtf/CMakeLists.txt:
Added CompilationThread.{h/cpp}.

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

7 years agoUnreviewed. Fixing the GTK build after the FTL merging by updating the build targets...
zandobersek@gmail.com [Thu, 25 Jul 2013 09:08:27 +0000 (09:08 +0000)]
Unreviewed. Fixing the GTK build after the FTL merging by updating the build targets list.

* GNUmakefile.am:
* GNUmakefile.list.am:

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

7 years agoUnreviewed buildfix after FTL upstream.
kadam@inf.u-szeged.hu [Thu, 25 Jul 2013 08:34:49 +0000 (08:34 +0000)]
Unreviewed buildfix after FTL upstream.

* runtime/JSScope.h:
(JSC::needsVarInjectionChecks):

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

7 years agoOne more fix after FTL upstream.
ossy@webkit.org [Thu, 25 Jul 2013 07:53:01 +0000 (07:53 +0000)]
One more fix after FTL upstream.

* Target.pri:
* bytecode/CodeBlock.h:
* bytecode/GetByIdStatus.h:
(JSC::GetByIdStatus::GetByIdStatus):

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

7 years agoUnreviewed buildfix after FTL upstream.
ossy@webkit.org [Thu, 25 Jul 2013 06:09:39 +0000 (06:09 +0000)]
Unreviewed buildfix after FTL upstream.

Add ftl directory as include path.

* CMakeLists.txt:
* JavaScriptCore.pri:

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

7 years agoUnreviewed buildfix after FTL upstream for non C++11 builds.
ossy@webkit.org [Thu, 25 Jul 2013 05:59:09 +0000 (05:59 +0000)]
Unreviewed buildfix after FTL upstream for non C++11 builds.

* interpreter/CallFrame.h:
* interpreter/StackIteratorPrivate.h:
(JSC::StackIterator::end):

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

7 years agoEndeavour to fix CMakelist builds
oliver@apple.com [Thu, 25 Jul 2013 05:02:45 +0000 (05:02 +0000)]
Endeavour to fix CMakelist builds

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

7 years agoIntroduce toSVGPatternElement(), use it
gyuyoung.kim@samsung.com [Thu, 25 Jul 2013 04:36:13 +0000 (04:36 +0000)]
Introduce toSVGPatternElement(), use it
https://bugs.webkit.org/show_bug.cgi?id=119013

Reviewed by Andreas Kling.

As a step to change static_cast with toSVGXXX, static_cast<SVGPatternElement*> can
be changed with toSVGPatternElement().

Merge from https://src.chromium.org/viewvc/blink?view=rev&revision=154734

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* rendering/svg/SVGResources.cpp:
(WebCore::targetReferenceFromResource):
* svg/SVGPatternElement.h:
(WebCore::toSVGPatternElement):

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

7 years agofourthTier: DFG IR dumps should be easier to read
oliver@apple.com [Thu, 25 Jul 2013 04:05:36 +0000 (04:05 +0000)]
fourthTier: DFG IR dumps should be easier to read
https://bugs.webkit.org/show_bug.cgi?id=119050

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

Added a DumpContext that includes support for printing an endnote
that describes all structures in full, while the main flow of the
dump just uses made-up names for the structures. This is helpful
since Structure::dump() may print a lot. The stuff it prints is
useful, but if it's all inline with the surrounding thing you're
dumping (often, a node in the DFG), then you get a ridiculously
long print-out. All classes that dump structures (including
Structure itself) now have dumpInContext() methods that use
inContext() for dumping anything that might transitively print a
structure. If Structure::dumpInContext() is called with a NULL
context, it just uses dump() like before. Hence you don't have to
know anything about DumpContext unless you want to.

inContext(*structure, context) dumps something like %B4:Array,
and the endnote will have something like:

    %B4:Array    = 0x10e91a180:[Array, {Edge:100, Normal:101, Line:102, NumPx:103, LastPx:104}, ArrayWithContiguous, Proto:0x10e99ffe0]

where B4 is the inferred name that StringHashDumpContext came up
with.

Also shortened a bunch of other dumps, removing information that
isn't so important.

* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/ArrayProfile.cpp:
(JSC::dumpArrayModes):
* bytecode/CodeBlockHash.cpp:
(JSC):
(JSC::CodeBlockHash::CodeBlockHash):
(JSC::CodeBlockHash::dump):
* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::dumpInContext):
(JSC):
(JSC::InlineCallFrame::dumpInContext):
(JSC::InlineCallFrame::dump):
* bytecode/CodeOrigin.h:
(CodeOrigin):
(InlineCallFrame):
* bytecode/Operands.h:
(JSC::OperandValueTraits::isEmptyForDump):
(Operands):
(JSC::Operands::dump):
(JSC):
* bytecode/OperandsInlines.h: Added.
(JSC):
(JSC::::dumpInContext):
* bytecode/StructureSet.h:
(JSC::StructureSet::dumpInContext):
(JSC::StructureSet::dump):
(StructureSet):
* dfg/DFGAbstractValue.cpp:
(JSC::DFG::AbstractValue::dump):
(DFG):
(JSC::DFG::AbstractValue::dumpInContext):
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::operator!):
(AbstractValue):
* dfg/DFGCFAPhase.cpp:
(JSC::DFG::CFAPhase::performBlockCFA):
* dfg/DFGCommon.cpp:
* dfg/DFGCommon.h:
(JSC::DFG::NodePointerTraits::isEmptyForDump):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::createDumpList):
* dfg/DFGDisassembler.h:
(Disassembler):
* dfg/DFGFlushFormat.h:
(WTF::inContext):
(WTF):
* dfg/DFGFlushLivenessAnalysisPhase.cpp:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpCodeOrigin):
(JSC::DFG::Graph::dump):
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGGraph.h:
(Graph):
* dfg/DFGLazyJSValue.cpp:
(JSC::DFG::LazyJSValue::dumpInContext):
(JSC::DFG::LazyJSValue::dump):
(DFG):
* dfg/DFGLazyJSValue.h:
(LazyJSValue):
* dfg/DFGNode.h:
(JSC::DFG::nodeMapDump):
(WTF::inContext):
(WTF):
* dfg/DFGOSRExitCompiler32_64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGStructureAbstractValue.h:
(JSC::DFG::StructureAbstractValue::dumpInContext):
(JSC::DFG::StructureAbstractValue::dump):
(StructureAbstractValue):
* ftl/FTLExitValue.cpp:
(JSC::FTL::ExitValue::dumpInContext):
(JSC::FTL::ExitValue::dump):
(FTL):
* ftl/FTLExitValue.h:
(ExitValue):
* ftl/FTLLowerDFGToLLVM.cpp:
* ftl/FTLValueSource.cpp:
(JSC::FTL::ValueSource::dumpInContext):
(FTL):
* ftl/FTLValueSource.h:
(ValueSource):
* runtime/DumpContext.cpp: Added.
(JSC):
(JSC::DumpContext::DumpContext):
(JSC::DumpContext::~DumpContext):
(JSC::DumpContext::isEmpty):
(JSC::DumpContext::dump):
* runtime/DumpContext.h: Added.
(JSC):
(DumpContext):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::dump):
(JSC):
(JSC::JSValue::dumpInContext):
* runtime/JSCJSValue.h:
(JSC):
(JSValue):
* runtime/Structure.cpp:
(JSC::Structure::dumpInContext):
(JSC):
(JSC::Structure::dumpBrief):
(JSC::Structure::dumpContextHeader):
* runtime/Structure.h:
(JSC):
(Structure):

Source/WTF:

Reviewed by Mark Hahnenberg.

Added support for dumping values within a context. By default, if you say
print(inContext(value, context)) it calls value.dumpInContext(out, context)
instead of value.dump(out).

Hoisted the support for six-character hashes out of JSC::CodeBlockHash into
WTF, in the form of SixCharacterHash.h.

Added a helper for creating dump contexts where the inContext() dump will
just use a short string hash to "name" the object being dumped, and then
will print out the full dumps in an endnote to your dump.

Added support for using CString as a hashtable key.

* WTF.xcodeproj/project.pbxproj:
* wtf/PrintStream.h:
(WTF):
(ValueInContext):
(WTF::ValueInContext::ValueInContext):
(WTF::ValueInContext::dump):
(WTF::inContext):
* wtf/SixCharacterHash.cpp: Added.
(WTF):
(WTF::sixCharacterHashStringToInteger):
(WTF::integerToSixCharacterHashString):
* wtf/SixCharacterHash.h: Added.
(WTF):
* wtf/StringHashDumpContext.h: Added.
(WTF):
(StringHashDumpContext):
(WTF::StringHashDumpContext::StringHashDumpContext):
(WTF::StringHashDumpContext::getID):
(WTF::StringHashDumpContext::dumpBrief):
(WTF::StringHashDumpContext::brief):
(WTF::StringHashDumpContext::isEmpty):
(WTF::StringHashDumpContext::dump):
* wtf/text/CString.cpp:
(WTF::CString::hash):
(WTF):
(WTF::operator<):
(WTF::CStringHash::equal):
* wtf/text/CString.h:
(WTF::CString::CString):
(CString):
(WTF::CString::isHashTableDeletedValue):
(WTF):
(WTF::CStringHash::hash):
(CStringHash):

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

7 years agofourthTier: DFG should do a high-level LICM before going to FTL
oliver@apple.com [Thu, 25 Jul 2013 04:05:31 +0000 (04:05 +0000)]
fourthTier: DFG should do a high-level LICM before going to FTL
https://bugs.webkit.org/show_bug.cgi?id=118749

Reviewed by Oliver Hunt.

Implements LICM hoisting for nodes that never write anything and never read
things that are clobbered by the loop. There are some other preconditions for
hoisting, see DFGLICMPhase.cpp.

Also did a few fixes:

- ClobberSet::add was failing to switch Super entries to Direct entries in
  some cases.

- DFGClobberize.cpp needed to #include "Operations.h".

- DCEPhase needs to process the graph in reverse DFS order, when we're in SSA.

- AbstractInterpreter can now execute a Node without knowing its indexInBlock.
  Knowing the indexInBlock is an optional optimization that all other clients
  of AI still opt into, but LICM doesn't.

This makes the FTL a 2.19x speed-up on imaging-gaussian-blur.

* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGAbstractInterpreter.h:
(AbstractInterpreter):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
(JSC::DFG::::execute):
(DFG):
(JSC::DFG::::clobberWorld):
(JSC::DFG::::clobberStructures):
* dfg/DFGAtTailAbstractState.cpp: Added.
(DFG):
(JSC::DFG::AtTailAbstractState::AtTailAbstractState):
(JSC::DFG::AtTailAbstractState::~AtTailAbstractState):
(JSC::DFG::AtTailAbstractState::createValueForNode):
(JSC::DFG::AtTailAbstractState::forNode):
* dfg/DFGAtTailAbstractState.h: Added.
(DFG):
(AtTailAbstractState):
(JSC::DFG::AtTailAbstractState::initializeTo):
(JSC::DFG::AtTailAbstractState::forNode):
(JSC::DFG::AtTailAbstractState::variables):
(JSC::DFG::AtTailAbstractState::block):
(JSC::DFG::AtTailAbstractState::isValid):
(JSC::DFG::AtTailAbstractState::setDidClobber):
(JSC::DFG::AtTailAbstractState::setIsValid):
(JSC::DFG::AtTailAbstractState::setBranchDirection):
(JSC::DFG::AtTailAbstractState::setFoundConstants):
(JSC::DFG::AtTailAbstractState::haveStructures):
(JSC::DFG::AtTailAbstractState::setHaveStructures):
* dfg/DFGBasicBlock.h:
(JSC::DFG::BasicBlock::insertBeforeLast):
* dfg/DFGBasicBlockInlines.h:
(DFG):
* dfg/DFGClobberSet.cpp:
(JSC::DFG::ClobberSet::add):
(JSC::DFG::ClobberSet::addAll):
* dfg/DFGClobberize.cpp:
(JSC::DFG::doesWrites):
* dfg/DFGClobberize.h:
(DFG):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::DCEPhase):
(JSC::DFG::DCEPhase::run):
(JSC::DFG::DCEPhase::fixupBlock):
(DCEPhase):
* dfg/DFGEdgeDominates.h: Added.
(DFG):
(EdgeDominates):
(JSC::DFG::EdgeDominates::EdgeDominates):
(JSC::DFG::EdgeDominates::operator()):
(JSC::DFG::EdgeDominates::result):
(JSC::DFG::edgesDominate):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::checkArray):
* dfg/DFGLICMPhase.cpp: Added.
(LICMPhase):
(JSC::DFG::LICMPhase::LICMPhase):
(JSC::DFG::LICMPhase::run):
(JSC::DFG::LICMPhase::attemptHoist):
(DFG):
(JSC::DFG::performLICM):
* dfg/DFGLICMPhase.h: Added.
(DFG):
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):

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