WebKit-https.git
6 years agoUnreviewed build fix attempt for Windows.
ryuan.choi@samsung.com [Fri, 30 Aug 2013 02:15:47 +0000 (02:15 +0000)]
Unreviewed build fix attempt for Windows.

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
Renamed JSMapConstructor and JSMapPrototype.

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

6 years agoFix build break after r154861
ryuan.choi@samsung.com [Fri, 30 Aug 2013 02:08:32 +0000 (02:08 +0000)]
Fix build break after r154861
https://bugs.webkit.org/show_bug.cgi?id=120503

Reviewed by Geoffrey Garen.

Unreviewed build fix attempt for GTK, Qt Windows and CMake based ports.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* Target.pri:
* runtime/MapData.h:
(JSC::MapData::KeyType::KeyType):

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

6 years agoCodeBlock: LLIntCallLinkInfo vector can be sized-to-fit at creation.
akling@apple.com [Fri, 30 Aug 2013 01:21:23 +0000 (01:21 +0000)]
CodeBlock: LLIntCallLinkInfo vector can be sized-to-fit at creation.
<https://webkit.org/b/120487>

Reviewed by Oliver Hunt.

CodeBlock::m_llintCallLinkInfos never changes size after creation, so make it a Vector
instead of a SegmentedVector. Use resizeToFit() instead of grow() since we know the
exact amount of space needed.

* bytecode/CodeBlock.h:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::shrinkToFit):

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

6 years agoFix issues found by MSVC (which also happily fixes an unintentional pessimisation)
oliver@apple.com [Fri, 30 Aug 2013 01:10:18 +0000 (01:10 +0000)]
Fix issues found by MSVC (which also happily fixes an unintentional pessimisation)

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

6 years agoImplement ES6 Map object
oliver@apple.com [Fri, 30 Aug 2013 00:55:34 +0000 (00:55 +0000)]
Implement ES6 Map object
https://bugs.webkit.org/show_bug.cgi?id=120333

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Implement support for the ES6 Map type and related classes.

* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/CopyToken.h: Add a new token to track copying the backing store
* runtime/CommonIdentifiers.h: Add new identifiers
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
    Add new structures and prototypes

* runtime/JSMap.cpp: Added.
* runtime/JSMap.h: Added.
    New JSMap class to represent a Map instance

* runtime/MapConstructor.cpp: Added.
* runtime/MapConstructor.h: Added.
    The Map constructor

* runtime/MapData.cpp: Added.
* runtime/MapData.h: Added.
    The most interesting data structure.  The roughly corresponds
    to the ES6 notion of MapData.  It provides the core JSValue->JSValue
    map implementation.  We implement it using 2 hashtables and a flat
    table.  Due to the different semantics of string comparisons vs.
    all others we need have one map keyed by String and the other by
    generic JSValue.  The actual table is represented more or less
    exactly as described in the ES6 draft - a single contiguous list of
    key/value pairs.  The entire map could be achieved with just this
    table, however we need the HashMaps in order to maintain O(1) lookup.

    Deleted values are simply cleared as the draft says, however the
    implementation compacts the storage on copy as long as the are no
    active iterators.

* runtime/MapPrototype.cpp: Added.
* runtime/MapPrototype.h: Added.
    Implement Map prototype functions

* runtime/VM.cpp:
    Add new structures.

LayoutTests:

Tests

* fast/js/basic-map-expected.txt: Added.
* fast/js/basic-map.html: Added.
* fast/js/script-tests/basic-map.js: Added.

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

6 years ago[Mac] Web Inspector: inspector/storage-panel-dom-storage-update.html fails
commit-queue@webkit.org [Fri, 30 Aug 2013 00:39:09 +0000 (00:39 +0000)]
[Mac] Web Inspector: inspector/storage-panel-dom-storage-update.html fails
https://bugs.webkit.org/show_bug.cgi?id=116241

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

* platform/mac/TestExpectations:

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

6 years agoAvoid Node references from AXObjectCache from leaking
rniwa@webkit.org [Fri, 30 Aug 2013 00:27:13 +0000 (00:27 +0000)]
Avoid Node references from AXObjectCache from leaking
https://bugs.webkit.org/show_bug.cgi?id=120501

Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/454f31497613b6d0fbcfb0df757254b64a177c06
without any tests since we don't have the same infrastructure to detect leaks in WebKit.

A real world example of this would be selecting an <option> item inside frame by keyboard. The node will not be deref()-ed until the topDocument() is detached.

The issue was that AccessibilityMenuListOption is created in childrenChanged()
hook called when its RenderObject is being destroyed. This patch modifies AccessibilityMenuListPopup so it won't create AccessibilityMenuListOption if its
element is already detached.

* accessibility/AccessibilityMenuListPopup.cpp:
(WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::didUpdateActiveOption):

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

6 years agoImplement object-fit CSS property
simon.fraser@apple.com [Fri, 30 Aug 2013 00:23:23 +0000 (00:23 +0000)]
Implement object-fit CSS property
https://bugs.webkit.org/show_bug.cgi?id=52040

Source/WebCore:

Reviewed by Antti Koivisto, Sam Weinig.

Merge object-fit patch from Blink r156535, which started as a patch
by me.

Since then, the spec has gone to CR. This patch is an
implementation of object-fit as described in
http://www.w3.org/TR/2012/CR-css3-images-20120417/#object-fit

Object-fit is used to maintain the aspect ratio of replaced content
within its content box. All object-fit values but the initial one
('fill') will always ensure that the aspect ratio is retained, in
different ways (fit inside the content box, cover the content box, or
use intrinsic size). Painting is always clipped against the content
box, regardless of the 'overflow' property.

Tests: fast/css/object-fit/object-fit-canvas.html
       fast/css/object-fit/object-fit-embed.html
       fast/css/object-fit/object-fit-grow-landscape.html
       fast/css/object-fit/object-fit-grow-portrait.html
       fast/css/object-fit/object-fit-img-svg.html
       fast/css/object-fit/object-fit-img-svg2.html
       fast/css/object-fit/object-fit-img.html
       fast/css/object-fit/object-fit-input-image.html
       fast/css/object-fit/object-fit-object.html
       fast/css/object-fit/object-fit-shrink.html
       fast/css/object-fit/object-fit-video-poster.html
       fast/css/parsing-object-fit.html
       http/tests/css/object-fit-delayed-img-svg.html
       media/video-object-fit-change.html
       media/video-object-fit.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EObjectFit):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* css/html.css:
(video): Set object-fit to 'contain'. This is how VIDEO elements
work, apparently.
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::imageSizeForRenderer):
* loader/cache/CachedImage.h:
* platform/graphics/LayoutSize.h:
(WebCore::fitLayoutSizeToAspectRatio): New function to grow or shrink
in one dimension to fit to the aspect ratio.
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::paintReplaced): Apply object-fit and
clip if necessary.
* rendering/RenderImage.cpp:
(WebCore::RenderImage::updateInnerContentRect):
(WebCore::RenderImage::imageDimensionsChanged): Update intrinsic
size properly, and recalculate the inner content rectangle (the
exact area occupied by the replaced content) again if appropriate.
(WebCore::RenderImage::paintReplaced): Apply object-fit and clip
if necessary.
(WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
object-fit may leave parts of the content box empty, in which case
it won't be fully obscured.
(WebCore::RenderImage::layout):
* rendering/RenderImage.h:
* rendering/RenderImageResource.cpp:
(WebCore::RenderImageResource::intrinsicSize): Need this to
differentiate between intrinsic and extrinsic size for SVG images.
* rendering/RenderImageResource.h:
* rendering/RenderImageResourceStyleImage.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::replacedContentRect): Return the
rectangle occupied by the replaced content. This will be identical
to the content box if object-fit is 'fill', but will typically be
something else for other values.
* rendering/RenderReplaced.h:
* rendering/RenderVideo.cpp:
(WebCore::RenderVideo::videoBox): Not much left to do here, with
the new RenderReplaced::replacedContentRect() method in place.
(WebCore::RenderVideo::paintReplaced): Apply object-fit and clip
if necessary.
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresRepaint):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:

LayoutTests:

Reviewed by Antti Koivisto, Sam Weinig.

Tests for object-fit.

* fast/css/object-fit/object-fit-canvas-expected.html: Added.
* fast/css/object-fit/object-fit-canvas.html: Added.
* fast/css/object-fit/object-fit-embed-expected.html: Added.
* fast/css/object-fit/object-fit-embed.html: Added.
* fast/css/object-fit/object-fit-grow-landscape-expected.html: Added.
* fast/css/object-fit/object-fit-grow-landscape.html: Added.
* fast/css/object-fit/object-fit-grow-portrait-expected.html: Added.
* fast/css/object-fit/object-fit-grow-portrait.html: Added.
* fast/css/object-fit/object-fit-img-expected.html: Added.
* fast/css/object-fit/object-fit-img-svg-expected.html: Added.
* fast/css/object-fit/object-fit-img-svg.html: Added.
* fast/css/object-fit/object-fit-img-svg2-expected.html: Added.
* fast/css/object-fit/object-fit-img-svg2.html: Added.
* fast/css/object-fit/object-fit-img.html: Added.
* fast/css/object-fit/object-fit-input-image-expected.html: Added.
* fast/css/object-fit/object-fit-input-image.html: Added.
* fast/css/object-fit/object-fit-object-expected.html: Added.
* fast/css/object-fit/object-fit-object.html: Added.
* fast/css/object-fit/object-fit-shrink-expected.html: Added.
* fast/css/object-fit/object-fit-shrink.html: Added.
* fast/css/object-fit/object-fit-video-poster-expected.html: Added.
* fast/css/object-fit/object-fit-video-poster.html: Added.
* fast/css/parsing-object-fit-expected.txt: Added.
* fast/css/parsing-object-fit.html: Added.
* fast/css/resources/circle.svg: Added.
* fast/css/resources/circle2.svg: Added.
* fast/css/resources/circles-landscape-small.png: Added.
* fast/css/resources/circles-landscape.png: Added.
* fast/css/resources/circles-portrait-small.png: Added.
* fast/css/resources/circles-portrait.png: Added.
* http/tests/css/object-fit-delayed-img-svg-expected.html: Added.
* http/tests/css/object-fit-delayed-img-svg.html: Added.
* media/video-object-fit-change-expected.html: Added.
* media/video-object-fit-change.html: Added.
* media/video-object-fit-expected.html: Added.
* media/video-object-fit.html: Added.
* platform/mac/TestExpectations:

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

6 years agonew-run-webkit-tests does not respect --no-sample-on-timeout switch
commit-queue@webkit.org [Fri, 30 Aug 2013 00:10:18 +0000 (00:10 +0000)]
new-run-webkit-tests does not respect --no-sample-on-timeout switch
https://bugs.webkit.org/show_bug.cgi?id=120491

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

* Scripts/webkitpy/port/server_process.py:
(ServerProcess._handle_timeout):

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

6 years agoSVG clipping, masking, and gradients-on-text do not respect the device scale factor
timothy_horton@apple.com [Fri, 30 Aug 2013 00:07:33 +0000 (00:07 +0000)]
SVG clipping, masking, and gradients-on-text do not respect the device scale factor
https://bugs.webkit.org/show_bug.cgi?id=120377
<rdar://problem/14777944>

Reviewed by Simon Fraser.

Tests: svg/custom/masking-clipping-hidpi.svg

calculateTransformationToOutermostCoordinateSystem should include the page's
device scale factor in its transform.

* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):

Add a test that ensures that when deviceScaleFactor=2, masks, clipping,
gradients, and patterns are rendered @2x.

* svg/custom/masking-clipping-hidpi-expected.svg: Added.
* svg/custom/masking-clipping-hidpi.svg: Added.

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

6 years agoAX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
cfleizach@apple.com [Thu, 29 Aug 2013 23:59:36 +0000 (23:59 +0000)]
AX: Crash when VoiceOver reference a TextMarker from an iframe that has been removed
https://bugs.webkit.org/show_bug.cgi?id=120318

Reviewed by Darin Adler.

Source/WebCore:

These crashes occur because an AXTextMarker is retrieved that reference a Node in an iframe.
The iframe goes away, but when it tries to clean up and remove that Node from the InUse cache,
the document() tree has already been detached, so it never clears the actual InUse cache.

The fix here is to pre-emptively clean up any nodes in the document going away when the frame is about to disconnect.

I'm removing the clearAXObjectCache() at the disconnectOwnerElement because it
   1) Cleared the AXObjectCache for the iframe document (which is always empty -- only the top level doc maintains the cache), because
        the document() tree had already been detached... so it essentially did nothing.
   2) And if it did work, we wouldn't want this behavior -- that is to say, when an iframe goes away, we don't want to clear the entire cache for all
       the other documents (there's even an existing layout test to verify this behavior).

Test: platform/mac/accessibility/stale-textmarker-crash.html

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::clearTextMarkerNodesInUse):
* accessibility/AXObjectCache.h:
* page/Frame.cpp:
(WebCore::Frame::disconnectOwnerElement):

LayoutTests:

* platform/mac/accessibility/stale-textmarker-crash-expected.txt: Added.
* platform/mac/accessibility/stale-textmarker-crash.html: Added.

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

6 years agoTeach DFG::Worklist and its clients that it may be reused for different kinds of...
fpizlo@apple.com [Thu, 29 Aug 2013 23:45:26 +0000 (23:45 +0000)]
Teach DFG::Worklist and its clients that it may be reused for different kinds of compilations
https://bugs.webkit.org/show_bug.cgi?id=120489

Reviewed by Geoffrey Garen.

If the baseline JIT hits an OSR entry trigger into the DFG and we already have a
DFG compilation but we've also started one or more FTL compilations, then we
shouldn't get confused. Previously we would have gotten confused because we would
see an in-process deferred compile (the FTL compile) and also an optimized
replacement (the DFG code).

If the baseline JIT hits an OSR entry trigger into the DFG and we previously
did two things in this order: triggered a tier-up compilation from the DFG into
the FTL, and then jettisoned the DFG code because it exited a bunch, then we
shouldn't be confused by the presence of an in-process deferred compile (the FTL
compile). Previously we would have waited for that compile to finish; but the more
sensible thing to do is to let it complete and then invalidate it, while at the
same time enqueueing a DFG compile to create a new, more valid, DFG code block.

If the DFG JIT hits a loop OSR entry trigger (into the FTL) and it has already
triggered an FTL compile for replacement, then it should fire off a second compile
instead of thinking that it can wait for that one to finish. Or vice-versa. We
need to allow for two FTL compiles to be enqueued at the same time (one for
replacement and one for OSR entry in a loop).

Then there's also the problem that DFG::compile() is almost certainly going to be
the hook for triggering both DFG compiles and the two kinds of FTL compiles, but
right now there is no way to tell it which one you want.

This fixes these problems and removes a bunch of potential confusion by making the
key for a compile in the DFG::Worklist be a CompilationMode (one of DFGMode,
FTLMode, or FTLForOSREntryMode). That mode is also passed to DFG::compile().

Awkwardly, this still leaves us in a no DFG->FTL tier-up situation - so
DFG::compile() is always passed DFGMode and then it might do an FTL compile if
possible. Fixing that is a bigger issue for a later changeset.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::checkIfOptimizationThresholdReached):
* dfg/DFGCompilationKey.cpp: Added.
(JSC::DFG::CompilationKey::dump):
* dfg/DFGCompilationKey.h: Added.
(JSC::DFG::CompilationKey::CompilationKey):
(JSC::DFG::CompilationKey::operator!):
(JSC::DFG::CompilationKey::isHashTableDeletedValue):
(JSC::DFG::CompilationKey::profiledBlock):
(JSC::DFG::CompilationKey::mode):
(JSC::DFG::CompilationKey::operator==):
(JSC::DFG::CompilationKey::hash):
(JSC::DFG::CompilationKeyHash::hash):
(JSC::DFG::CompilationKeyHash::equal):
* dfg/DFGCompilationMode.cpp: Added.
(WTF::printInternal):
* dfg/DFGCompilationMode.h: Added.
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::key):
* dfg/DFGPlan.h:
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::enqueue):
(JSC::DFG::Worklist::compilationState):
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::runThread):
* dfg/DFGWorklist.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):

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

6 years ago[Windows] Unreviewed build fix after r154847.
bfulgham@apple.com [Thu, 29 Aug 2013 23:36:43 +0000 (23:36 +0000)]
[Windows] Unreviewed build fix after r154847.
If you are going to exclude promises, actually exclude the build components.

* interpreter/CallFrame.h: Exclude promise declarations
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset): Exclude promise code.
(JSC::JSGlobalObject::visitChildren): Ditto.
* runtime/VM.cpp: Ditto.
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h:

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

6 years ago[Windows] Unreviewed build fix after r154847.
bfulgham@apple.com [Thu, 29 Aug 2013 23:31:50 +0000 (23:31 +0000)]
[Windows] Unreviewed build fix after r154847.

* win/tools/vsprops/FeatureDefines.props: Add missing definition for ENABLE_PROMISES
* win/tools/vsprops/FeatureDefinesCairo.props: Ditto

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

6 years agoMake incrementing and decrementing numbers by 0.1 require the control key, and not...
timothy@apple.com [Thu, 29 Aug 2013 23:18:06 +0000 (23:18 +0000)]
Make incrementing and decrementing numbers by 0.1 require the control key, and not near zero numbers.

https://bugs.webkit.org/show_bug.cgi?id=120492
<rdar://problem/13738935> Incrementing and decrementing numbers near zero is annoying compared to earlier releases

Reviewed by Joseph Pecoraro.

* UserInterface/CodeMirrorAdditions.js:
(alterNumber): Remove near zero check.

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

6 years ago[Windows] More unreviewed gardening of project file.
bfulgham@apple.com [Thu, 29 Aug 2013 23:06:34 +0000 (23:06 +0000)]
[Windows] More unreviewed gardening of project file.
Move css files inline with related source code.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

6 years ago[BlackBerry] Scrolling text with FCC does not work while composing an email
commit-queue@webkit.org [Thu, 29 Aug 2013 23:00:52 +0000 (23:00 +0000)]
[BlackBerry] Scrolling text with FCC does not work while composing an email
https://bugs.webkit.org/show_bug.cgi?id=120493

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-08-29
Reviewed by Rob Buis.
Internally reviewed by Gen Mak and Konrad Piascik.

JIRA 468007
m_cannotScrollIfHasFloatLayoutSizeRoundingError was true which prevented
FCC scrolling.
TransformedActualVisibleSize is quite different in email compose card
than browser. In this case, the issue was caused by transformedActualVisibleSize(768, 750)
which was not the actual visible size of the webkit part of the Cascades
view when keyboard popped up. We usually don't do keyboard adaptation for
windowless page clients; therefore, there will be no viewport change of
WebKit.
To fix the bug, we can ignore the windowless page clients.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::hasFloatLayoutSizeRoundingError):

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

6 years ago.: Add ENABLE guards for Promises
weinig@apple.com [Thu, 29 Aug 2013 22:54:38 +0000 (22:54 +0000)]
.: Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Source/autotools/SetupWebKitFeatures.m4:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore: Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSPromise.cpp:
* runtime/JSPromise.h:
* runtime/JSPromiseCallback.cpp:
* runtime/JSPromiseCallback.h:
* runtime/JSPromiseConstructor.cpp:
* runtime/JSPromiseConstructor.h:
* runtime/JSPromisePrototype.cpp:
* runtime/JSPromisePrototype.h:
* runtime/JSPromiseResolver.cpp:
* runtime/JSPromiseResolver.h:
* runtime/JSPromiseResolverConstructor.cpp:
* runtime/JSPromiseResolverConstructor.h:
* runtime/JSPromiseResolverPrototype.cpp:
* runtime/JSPromiseResolverPrototype.h:

Source/WebCore: Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac: Add ENABLE gaurds for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2: Add ENABLE gaurds for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Configurations/FeatureDefines.xcconfig:

Source/WTF: Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* wtf/FeatureDefines.h:

Tools: Add ENABLE guards for Promises
https://bugs.webkit.org/show_bug.cgi?id=120488

Reviewed by Andreas Kling.

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:

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

6 years agoREGRESSION (r153222, 32-bit): NULL JSValue() seen when running peacekeeper benchmark
msaboff@apple.com [Thu, 29 Aug 2013 22:47:20 +0000 (22:47 +0000)]
REGRESSION (r153222, 32-bit): NULL JSValue() seen when running peacekeeper benchmark
https://bugs.webkit.org/show_bug.cgi?id=120080

Rubber stamped by Oliver Hunt.

Added layout test that crashes without the fix in bug 120080.

* fast/js/lazy-create-arguments-from-get-by-val-expected.txt: Added.
* fast/js/lazy-create-arguments-from-get-by-val.html: Added.
* fast/js/script-tests/lazy-create-arguments-from-get-by-val.js: Added.

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

6 years agoUnreviewed, fix FTL build.
fpizlo@apple.com [Thu, 29 Aug 2013 22:41:15 +0000 (22:41 +0000)]
Unreviewed, fix FTL build.

* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::callCheck):

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

6 years agoInspector: Use a bit of RefPtr::release() in generated code.
akling@apple.com [Thu, 29 Aug 2013 21:20:03 +0000 (21:20 +0000)]
Inspector: Use a bit of RefPtr::release() in generated code.
<https://webkit.org/b/120485>

Reviewed by Darin Adler.

Just something I spotted while reading InspectorBackendDispatcher.cpp.
Avoid 3 cases of reference count churnery.

* inspector/CodeGeneratorInspectorStrings.py:

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

6 years agoXMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
dino@apple.com [Thu, 29 Aug 2013 21:12:11 +0000 (21:12 +0000)]
XMLSerializer-attribute-namespace-prefix-conflicts can't produce reliable results
https://bugs.webkit.org/show_bug.cgi?id=120490

Marking as [ Pass Failure ] for the moment.

* TestExpectations:

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

6 years ago[GTK] Should enable WebGL by default on MiniBrowser
commit-queue@webkit.org [Thu, 29 Aug 2013 20:52:29 +0000 (20:52 +0000)]
[GTK] Should enable WebGL by default on MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120420

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Enable WebGL by default on MiniBrowser.

* MiniBrowser/gtk/main.c:
(main):

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

6 years agoAccording to DOM4, all DocType nodes should have a document
ch.dumez@sisa.samsung.com [Thu, 29 Aug 2013 20:48:16 +0000 (20:48 +0000)]
According to DOM4, all DocType nodes should have a document
https://bugs.webkit.org/show_bug.cgi?id=99244

Reviewed by Darin Adler.

Source/WebCore:

Doctypes now always have a node document and can be moved across document boundaries as per
the latest DOM4 specification:
http://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
http://dom.spec.whatwg.org/#dom-node-ownerdocument

This means that DOMImplementation.createDocumentType() now sets the ownerDocument of the
new DocumentType Node to the associated document of the current "context" object. In
DOM4, all nodes have a document at all times. DocumentType nodes can now be moved across
document boundaries so that the node can be added to a Document after being created.

This means we will no longer need to special case DocumentType nodes in the code and
Node::document() can no longer return NULL, which means that we'll be able to remove
NULL checks in call sites.

Firefox stable and since recently Blink already follow DOM4 here while IE10 does not (yet).

Test: fast/dom/createDocumentType-ownerDocument.html

* dom/ContainerNode.cpp:
(WebCore::checkAcceptChild):
* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType):
(WebCore::DOMImplementation::createDocument):
* dom/Node.h:
(WebCore::Node::document):

LayoutTests:

Add layout test to check that DocumentType Nodes have a document after being
created. Also update a few existing test cases to reflect this change.

* fast/dom/DOMImplementation/createDocument-with-used-doctype-expected.txt:
* fast/dom/DOMImplementation/createDocument-with-used-doctype.html:
* fast/dom/DOMImplementation/resources/createDocument-with-used-doctype-frame.html:
* fast/dom/XMLSerializer-doctype2-expected.txt:
* fast/dom/XMLSerializer-doctype2.html:
* fast/dom/createDocumentType-ownerDocument-expected.txt: Added.
* fast/dom/createDocumentType-ownerDocument.html: Added.
* fast/dom/move-nodes-across-documents.html:
* fast/dom/node-iterator-with-doctype-root-expected.txt:
* fast/dom/node-iterator-with-doctype-root.html:
* fast/events/dispatch-event-no-document-expected.txt:
* fast/events/dispatch-event-no-document.html:

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

6 years agoREGRESSION(r153222, 32-bit): NULL JSValue() seen when running peacekeeper benchmark.
commit-queue@webkit.org [Thu, 29 Aug 2013 20:35:32 +0000 (20:35 +0000)]
REGRESSION(r153222, 32-bit): NULL JSValue() seen when running peacekeeper benchmark.
https://bugs.webkit.org/show_bug.cgi?id=120080

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

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emitSlow_op_get_argument_by_val): Revert changes introduced by r153222 in this function.

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

6 years agoKill code that became dead after http://trac.webkit.org/changeset/154833
fpizlo@apple.com [Thu, 29 Aug 2013 20:30:05 +0000 (20:30 +0000)]
Kill code that became dead after trac.webkit.org/changeset/154833

Rubber stamped by Oliver Hunt.

* dfg/DFGDriver.h:

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

6 years agoCodeBlock's magic for scaling tier-up thresholds should be more reusable
fpizlo@apple.com [Thu, 29 Aug 2013 20:27:15 +0000 (20:27 +0000)]
CodeBlock's magic for scaling tier-up thresholds should be more reusable
https://bugs.webkit.org/show_bug.cgi?id=120486

Reviewed by Oliver Hunt.

Removed the counterValueForBlah() methods and exposed the reusable scaling logic
as a adjustedCounterValue() method.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::adjustedCounterValue):
(JSC::CodeBlock::optimizeAfterWarmUp):
(JSC::CodeBlock::optimizeAfterLongWarmUp):
(JSC::CodeBlock::optimizeSoon):
* bytecode/CodeBlock.h:
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::handleExitCounts):

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

6 years agoPasteboard::writeSelection violates layering (first step, fixes it for Mac platform...
darin@apple.com [Thu, 29 Aug 2013 20:09:21 +0000 (20:09 +0000)]
Pasteboard::writeSelection violates layering (first step, fixes it for Mac platform only)
https://bugs.webkit.org/show_bug.cgi?id=120483

Reviewed by Anders Carlsson.

* editing/Editor.cpp:
(WebCore::Editor::cut): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.
(WebCore::Editor::copy): Ditto.

* editing/Editor.h: Removed an old unused Mac-only writeSelectionToPasteboard function
that was a cover that called through to Pasteboard::writeSelectionForTypes. Added a new
Mac-only writeSelectionToPasteboard function that is destined to become cross-platform soon.

* editing/mac/EditorMac.mm:
(WebCore::Editor::writeSelectionToPasteboard): Added. Uses a new pattern where the Editor
puts all the data into a structure called PasteboardWebContent then calls the Pasteboard to
do the work. The platform-specific aspect of PasteboardWebContent is what formats are needed
for each platform.

* page/DragController.cpp:
(WebCore::DragController::startDrag): Added some comments. Use the new writeSelectionToPasteboard
function on Mac instead of Pasteboard::writeSelection.

* platform/Pasteboard.h: Remove some unneeded forward declarations. Added comments for all functions
that don't belong in this class because they are layering violations; this becomes the to do list for
the project we are beginning here. Added the new PasteboardWebContent structure, empty on all platforms
except for Mac for now. Removed writeSelectionForTypes, a Mac-only function that is no longer used.
Added setTypes and writeAfterSettingTypes, the two halves of the future function named writeWebContent.
Put the writeSelection function inside a "not Mac" if statement. Later to be deleted entirely.

* platform/mac/PasteboardMac.mm: Removed now-unneeded selectionPasteboardTypes,
Pasteboard::writeSelectionForTypes, and writeSelection functions.
(WebCore::Pasteboard::setTypes): Added. First half of writing web content to the pasteboard.
(WebCore::Pasteboard::writeAfterSettingTypes): Added. Second half of writing web content to the pasteboard.

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

6 years agoRemove code behind ENABLE(DIALOG_ELEMENT)
antti@apple.com [Thu, 29 Aug 2013 20:06:33 +0000 (20:06 +0000)]
Remove code behind ENABLE(DIALOG_ELEMENT)
https://bugs.webkit.org/show_bug.cgi?id=120467

Reviewed by Darin Adler.

It is incomplete and no one is building it.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* bindings/generic/RuntimeEnabledFeatures.cpp:
* bindings/generic/RuntimeEnabledFeatures.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* css/html.css:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::removedFrom):
(WebCore::Element::setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries):
* dom/Element.h:
(WebCore::Element::isDisabledFormControl):
* dom/ElementRareData.h:
(WebCore::ElementRareData::ElementRareData):
* html/HTMLDialogElement.cpp: Removed.
* html/HTMLDialogElement.h: Removed.
* html/HTMLDialogElement.idl: Removed.
* html/HTMLElementsAllInOne.cpp:
* html/HTMLTagNames.in:
* rendering/RenderDialog.cpp: Removed.
* rendering/RenderDialog.h: Removed.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::rebuildZOrderLists):
(WebCore::RenderLayer::collectLayers):
* rendering/RenderLayer.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isCounter):
* rendering/RenderingAllInOne.cpp:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:

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

6 years agoReverting a change that was made in https://bugs.webkit.org/show_bug.cgi?id=120472.
dino@apple.com [Thu, 29 Aug 2013 19:45:44 +0000 (19:45 +0000)]
Reverting a change that was made in https://bugs.webkit.org/show_bug.cgi?id=120472.

* media/track/track-cue-rendering-on-resize-expected.txt:

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

6 years agoCodeBlock::prepareForExecution() is silly
fpizlo@apple.com [Thu, 29 Aug 2013 19:28:55 +0000 (19:28 +0000)]
CodeBlock::prepareForExecution() is silly
https://bugs.webkit.org/show_bug.cgi?id=120453

Reviewed by Oliver Hunt.

Instead of saying:

    codeBlock->prepareForExecution(stuff, BaselineJIT, more stuff)

we should just say:

    JIT::compile(stuff, codeBlock, more stuff);

And similarly for the LLInt and DFG.

This kills a bunch of code, since CodeBlock::prepareForExecution() is just a
wrapper that uses the JITType argument to call into the appropriate execution
engine, which is what the user wanted to do in the first place.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
* bytecode/CodeBlock.h:
* dfg/DFGDriver.cpp:
(JSC::DFG::compileImpl):
(JSC::DFG::compile):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGWorklist.cpp:
(JSC::DFG::globalWorklist):
* dfg/DFGWorklist.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* jit/JIT.h:
(JSC::JIT::compile):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntEntrypoint.cpp: Copied from Source/JavaScriptCore/llint/LLIntEntrypoints.cpp.
(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setEntrypoint):
* llint/LLIntEntrypoint.h: Copied from Source/JavaScriptCore/llint/LLIntEntrypoints.h.
* llint/LLIntEntrypoints.cpp: Removed.
* llint/LLIntEntrypoints.h: Removed.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
* runtime/Executable.cpp:
(JSC::ScriptExecutable::prepareForExecutionImpl):

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

6 years agoFix slider thumb event handling to use local, not absolute coordinates
simon.fraser@apple.com [Thu, 29 Aug 2013 19:15:33 +0000 (19:15 +0000)]
Fix slider thumb event handling to use local, not absolute coordinates
https://bugs.webkit.org/show_bug.cgi?id=120480

Reviewed by Darin Adler.

SliderThumbElement::setPositionFromPoint() did all of its coordinate
math by mapping renderer rects into absolute coordinates, which was
unnecessary and expensive.

Fix by doing all the math in the coordinate space of the input's
renderer. This simplified the code. Also, currentPosition
was computed but unused, so was removed.

No behavior change. Tested by fast/forms/range/slider-transformed.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::setPositionFromPoint):

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

6 years agoAdd a Command-R shortcut in MiniBrowser
simon.fraser@apple.com [Thu, 29 Aug 2013 19:15:30 +0000 (19:15 +0000)]
Add a Command-R shortcut in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120442

Reviewed by Dean Jackson.

Add a "Reload Page" item to the View menu with a Command-R
shortcut.

* MiniBrowser/mac/MainMenu.xib:

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

6 years ago[Automake] libWebCoreDOM.la could use a better name
zandobersek@gmail.com [Thu, 29 Aug 2013 19:07:20 +0000 (19:07 +0000)]
[Automake] libWebCoreDOM.la could use a better name
https://bugs.webkit.org/show_bug.cgi?id=120232

Reviewed by Martin Robinson.

Source/WebCore:

* bindings/gobject/GNUmakefile.am: Rename the libWebCoreDOM library to libGObjectDOMBindings.

Source/WebKit/gtk:

* GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.

Source/WebKit2:

* GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.

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

6 years agoWeb Inspector: Consolidate inspector-protocol tests into domains
joepeck@webkit.org [Thu, 29 Aug 2013 18:58:45 +0000 (18:58 +0000)]
Web Inspector: Consolidate inspector-protocol tests into domains
https://bugs.webkit.org/show_bug.cgi?id=120450

Reviewed by Timothy Hatcher.

Move around tests and clean them up in the process.

* http/tests/inspector-protocol/resources/protocol-test.js:
* inspector-protocol/css/getSupportedCSSProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties-expected.txt.
* inspector-protocol/css/getSupportedCSSProperties.html: Renamed from LayoutTests/inspector-protocol/css-getSupportedCSSProperties.html.
* inspector-protocol/dom/focus-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-focus-expected.txt.
* inspector-protocol/dom/focus.html: Renamed from LayoutTests/inspector-protocol/dom-focus.html.
* inspector-protocol/dom/request-child-nodes-depth-expected.txt: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth-expected.txt.
* inspector-protocol/dom/request-child-nodes-depth.html: Renamed from LayoutTests/inspector-protocol/dom-request-child-nodes-depth.html.
* inspector-protocol/heap-profiler/heap-snapshot-with-detached-dom-tree.html:
* inspector-protocol/heap-profiler/heap-snapshot-with-event-listener.html:
* inspector-protocol/heap-profiler/take-heap-snapshot.html:
* inspector-protocol/nmi-webaudio-expected.txt: Removed.
* inspector-protocol/nmi-webaudio-leak-test-expected.txt: Removed.
* inspector-protocol/nmi-webaudio-leak-test.html: Removed.
* inspector-protocol/nmi-webaudio.html: Removed.
* inspector-protocol/page/frameScheduledNavigation.html:
* inspector-protocol/page/frameStartedLoading.html:
* inspector-protocol/page/resources/blank.html: Renamed from LayoutTests/inspector-protocol/resources/blank.html.
* inspector-protocol/page/setEmulatedMedia-expected.txt: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception-expected.txt.
* inspector-protocol/page/setEmulatedMedia.html: Renamed from LayoutTests/inspector-protocol/media-query-listener-exception.html.
* inspector-protocol/resources/audio-context.html: Removed.
* inspector-protocol/runtime/getProperties-expected.txt: Renamed from LayoutTests/inspector-protocol/runtime-getProperties-expected.txt.
* inspector-protocol/runtime/getProperties.html: Renamed from LayoutTests/inspector-protocol/runtime-getProperties.html.
* platform/efl/TestExpectations:
* platform/gtk-wk1/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years agoWeb Inspector: Download Web Archive of Inspected Page
joepeck@webkit.org [Thu, 29 Aug 2013 18:58:39 +0000 (18:58 +0000)]
Web Inspector: Download Web Archive of Inspected Page
https://bugs.webkit.org/show_bug.cgi?id=119774

Reviewed by Timothy Hatcher.

Source/WebCore:

Add PageAgent.archive which will return a Base-64 encoded web archive
when successful. In order to then allow saving non-string files, extend
InspectorFrontendHost.save to allow for Base-64 encoded data.

* inspector/Inspector.json:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* inspector/InspectorPageAgent.h:
Introduce and implement PageAgent.archive. Create a Web Archive of the
page's main frame.

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.h:
(WebCore::InspectorFrontendClientLocal::save):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::save):
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
Extend InspectorFrontendHost.save to include a base64Encoded param.

* inspector/front-end/FileManager.js:
* inspector/front-end/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.save):
Misc. updates to the old inspector for function changes.

Source/WebInspectorUI:

* UserInterface/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._saveDataToFile):
Allow a custom save handler which will do all the work.

* UserInterface/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype.get supportsSave):
(WebInspector.DOMTreeContentView.prototype.get saveData.saveHandler):
(WebInspector.DOMTreeContentView.prototype.get saveData):
Allow Save keyboard shortcut to download an archive viewing the DOM Tree.

* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatus):
* UserInterface/FrameTreeElement.js:
(WebInspector.FrameTreeElement):
(WebInspector.FrameTreeElement.prototype.updateStatusForMainFrame):
(WebInspector.FrameTreeElement.prototype._mainResourceDidChange):
(WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
(WebInspector.FrameTreeElement.prototype._reloadPageClicked):
(WebInspector.FrameTreeElement.prototype._downloadButtonClicked):
(WebInspector.FrameTreeElement.prototype._updateDownloadButton):
(WebInspector.FrameTreeElement.prototype._pageArchiveStarted):
(WebInspector.FrameTreeElement.prototype._pageArchiveEnded):
Move handling of main frame TreeElement buttons to FrameTreeElement.
Add a Download button, and enable/disable it appropriately.

* UserInterface/ResourceTreeElement.css:
* UserInterface/TreeElementStatusButton.css: Copied from Source/WebInspectorUI/UserInterface/ResourceTreeElement.css.
(.item > .status > .status-button):
(.item > .status > .status-button > svg *):
(.item.selected > .status > .status-button > svg *):
(.item.selected > .status > .status-button:active > svg *):
(.item > .status > .status-button.disabled > svg *):
(.item.selected > .status > .status-button.disabled > svg *):
* UserInterface/TreeElementStatusButton.js: Added.
(WebInspector.TreeElementStatusButton):
(WebInspector.TreeElementStatusButton.prototype.get element):
(WebInspector.TreeElementStatusButton.prototype.get hidden):
(WebInspector.TreeElementStatusButton.prototype.set hidden):
(WebInspector.TreeElementStatusButton.prototype.get enabled):
(WebInspector.TreeElementStatusButton.prototype.set enabled):
(WebInspector.TreeElementStatusButton.prototype._clicked):
Make buttons in the TreeElement status a generic class to share styling
and handling of the buttons. New "disabled" state with even more
transparent is used when the page is downloading.

* UserInterface/Main.html:
* UserInterface/Main.js:
(WebInspector.archiveMainFrame):
(WebInspector.canArchiveMainFrame):
Generic API for archiving the page and determining if you can archive it.

* UserInterface/InspectorBackendCommands.js:
* UserInterface/InspectorFrontendHostStub.js:
(.WebInspector.InspectorFrontendHostStub.prototype.save):
* UserInterface/Images/DownloadArrow.svg: Added.
* Localizations/en.lproj/localizedStrings.js:
Misc. updates and new files.

Source/WebKit/mac:

Update to support InspectorFrontendHost.save's new base64Encoded
parameter. It means the incoming content is binary data, not a string.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):

Source/WebKit2:

Update to support InspectorFrontendHost.save's new base64Encoded
parameter. It means the incoming content is binary data, not a string.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::save):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSave):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::save):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::save):
* WebProcess/WebPage/WebInspector.h:

LayoutTests:

* inspector-protocol/page/archive-expected.txt: Added.
* inspector-protocol/page/archive.html: Added.

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

6 years agoGardening: fixed broken non-DFG build.
mark.lam@apple.com [Thu, 29 Aug 2013 18:43:21 +0000 (18:43 +0000)]
Gardening: fixed broken non-DFG build.
https://bugs.webkit.org/show_bug.cgi?id=120481.

Not reviewed.

* interpreter/StackIterator.h:

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

6 years agoPositioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
robert@webkit.org [Thu, 29 Aug 2013 18:38:44 +0000 (18:38 +0000)]
Positioned Replaced Elements That Aren't RenderReplaced get Incorrect Width
https://bugs.webkit.org/show_bug.cgi?id=93735

Reviewed by David Hyatt.

Source/WebCore:

Replaced elements that aren't RenderReplaced aren't |isReplaced| and don't have an
intrinsic height or width. This causes them to go down the wrong height and width computation
path in RenderBox when they are absolute positioned.

The notion of |isReplaced| is entwined with the notion of being |isInline| so it isn't really
possible to make them isReplaced without re-wiring a lot of code. So instead use an ad-hoc definition
of isReplacedElement in RenderBox to bring all replaced elements into the height and width calculation.
To make sure we get the right height and width in there, give non-RenderReplaced replaced renderers
the helpers for returning their approximation of intrinsic height and width.

The initial attempt at landing this patch had to be rolled out because it used LayoutUnit() for default
intrinsic height of some replaced elements and this made the layout of the elements unstable in some sites.
The fix for this issue is captured in intrinsic-button-and-input-height.html.

Tests: fast/replaced/intrinsic-button-and-input-height.html
       fast/replaced/width-and-height-of-positioned-replaced-elements.html

* rendering/RenderBox.cpp:
(WebCore::isReplacedElement):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::intrinsicSize):
* rendering/RenderButton.h:
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::RenderListBox):
(WebCore::RenderListBox::computePreferredLogicalWidths):
(WebCore::RenderListBox::computeLogicalHeight):
* rendering/RenderListBox.h:
* rendering/RenderMenuList.h:
* rendering/RenderReplaced.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::RenderTextControl):
(WebCore::RenderTextControl::computeLogicalHeight):
* rendering/RenderTextControl.h:

LayoutTests:

* fast/replaced/intrinsic-button-and-input-height-expected.txt: Added.
* fast/replaced/intrinsic-button-and-input-height.html: Added.
* fast/replaced/width-and-height-of-positioned-replaced-elements.html: Added.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.png: Added.
* platform/qt/fast/replaced/width-and-height-of-positioned-replaced-elements-expected.txt: Added.

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

6 years ago[Windows] Unreviewed gardening. Add missing *.css files from project.
bfulgham@apple.com [Thu, 29 Aug 2013 18:28:03 +0000 (18:28 +0000)]
[Windows] Unreviewed gardening. Add missing *.css files from project.

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

6 years agoCodeBlock compilation and installation should be simplified and rationalized
fpizlo@apple.com [Thu, 29 Aug 2013 18:25:36 +0000 (18:25 +0000)]
CodeBlock compilation and installation should be simplified and rationalized
https://bugs.webkit.org/show_bug.cgi?id=120326

Reviewed by Oliver Hunt.

Rolling r154804 back in after fixing no-LLInt build.

Previously Executable owned the code for generating JIT code; you always had
to go through Executable. But often you also had to go through CodeBlock,
because ScriptExecutable couldn't have virtual methods, but CodeBlock could.
So you'd ask CodeBlock to do something, which would dispatch through a
virtual method that would select the appropriate Executable subtype's method.
This all meant that the same code would often be duplicated, because most of
the work needed to compile something was identical regardless of code type.
But then we tried to fix this, by having templatized helpers in
ExecutionHarness.h and JITDriver.h. The result was that if you wanted to find
out what happened when you asked for something to be compiled, you'd go on a
wild ride that started with CodeBlock, touched upon Executable, and then
ricocheted into either ExecutionHarness or JITDriver (likely both).

Another awkwardness was that for concurrent compiles, the DFG::Worklist had
super-special inside knowledge of what JITStubs.cpp's cti_optimize would have
done once the compilation finished.

Also, most of the DFG JIT drivers assumed that they couldn't install the
JITCode into the CodeBlock directly - instead they would return it via a
reference, which happened to be a reference to the JITCode pointer in
Executable. This was super weird.

Finally, there was no notion of compiling code into a special CodeBlock that
wasn't used for handling calls into an Executable. I'd like this for FTL OSR
entry.

This patch solves these problems by reducing all of that complexity into just
three primitives:

- Executable::newCodeBlock(). This gives you a new code block, either for call
  or for construct, and either to serve as the baseline code or the optimized
  code. The new code block is then owned by the caller; Executable doesn't
  register it anywhere. The new code block has no JITCode and isn't callable,
  but it has all of the bytecode.

- CodeBlock::prepareForExecution(). This takes the CodeBlock's bytecode and
  produces a JITCode, and then installs the JITCode into the CodeBlock. This
  method takes a JITType, and always compiles with that JIT. If you ask for
  JITCode::InterpreterThunk then you'll get JITCode that just points to the
  LLInt entrypoints. Once this returns, it is possible to call into the
  CodeBlock if you do so manually - but the Executable still won't know about
  it so JS calls to that Executable will still be routed to whatever CodeBlock
  is associated with the Executable.

- Executable::installCode(). This takes a CodeBlock and makes it the code-for-
  entry for that Executable. This involves unlinking the Executable's last
  CodeBlock, if there was one. This also tells the GC about any effect on
  memory usage and does a bunch of weird data structure rewiring, since
  Executable caches some of CodeBlock's fields for the benefit of virtual call
  fast paths.

This functionality is then wrapped around three convenience methods:

- Executable::prepareForExecution(). If there is no code block for that
  Executable, then one is created (newCodeBlock()), compiled
  (CodeBlock::prepareForExecution()) and installed (installCode()).

- CodeBlock::newReplacement(). Asks the Executable for a new CodeBlock that
  can serve as an optimized replacement of the current one.

- CodeBlock::install(). Asks the Executable to install this code block.

This patch allows me to kill *a lot* of code and to remove a lot of
specializations for functions vs. not-functions, and a lot of places where we
pass around JITCode references and such. ExecutionHarness and JITDriver are
both gone. Overall this patch has more red than green.

It also allows me to work on FTL OSR entry and tier-up:

- FTL tier-up: this will involve DFGOperations.cpp asking the DFG::Worklist
  to do some compilation, but it will require the DFG::Worklist to do
  something different than what JITStubs.cpp would want, once the compilation
  finishes. This patch introduces a callback mechanism for that purpose.

- FTL OSR entry: this will involve creating a special auto-jettisoned
  CodeBlock that is used only for FTL OSR entry. The new set of primitives
  allows for this: Executable can vend you a fresh new CodeBlock, and you can
  ask that CodeBlock to compile itself with any JIT of your choosing. Or you
  can take that CodeBlock and compile it yourself. Previously the act of
  producing a CodeBlock-for-optimization and the act of compiling code for it
  were tightly coupled; now you can separate them and you can create such
  auto-jettisoned CodeBlocks that are used for a one-shot OSR entry.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::prepareForExecutionImpl):
(JSC::CodeBlock::prepareForExecution):
(JSC::CodeBlock::prepareForExecutionAsynchronously):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::FunctionCodeBlock::jettisonImpl):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasBaselineJITProfiling):
* bytecode/DeferredCompilationCallback.cpp: Added.
(JSC::DeferredCompilationCallback::DeferredCompilationCallback):
(JSC::DeferredCompilationCallback::~DeferredCompilationCallback):
* bytecode/DeferredCompilationCallback.h: Added.
* dfg/DFGDriver.cpp:
(JSC::DFG::tryCompile):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
* dfg/DFGFailedFinalizer.cpp:
(JSC::DFG::FailedFinalizer::finalize):
(JSC::DFG::FailedFinalizer::finalizeFunction):
* dfg/DFGFailedFinalizer.h:
* dfg/DFGFinalizer.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGJITFinalizer.h:
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::notifyReady):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
(JSC::DFG::Plan::finalizeAndNotifyCallback):
* dfg/DFGPlan.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::runThread):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalize):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* heap/Heap.h:
(JSC::Heap::isDeferred):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* jit/JITDriver.h: Removed.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
* jit/JITToDFGDeferredCompilationCallback.cpp: Added.
(JSC::JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::create):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
* jit/JITToDFGDeferredCompilationCallback.h: Added.
* llint/LLIntEntrypoints.cpp:
(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
* llint/LLIntEntrypoints.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::setUpCall):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/CommonSlowPaths.cpp:
* runtime/CompilationResult.cpp:
(WTF::printInternal):
* runtime/CompilationResult.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Executable.h:
(JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
(JSC::ExecutableBase::offsetOfNumParametersFor):
(JSC::ScriptExecutable::prepareForExecution):
(JSC::FunctionExecutable::jettisonOptimizedCodeFor):
* runtime/ExecutionHarness.h: Removed.

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

6 years agoSharedBuffer m_segments and m_dataArray must be exclusive
psolanki@apple.com [Thu, 29 Aug 2013 18:01:31 +0000 (18:01 +0000)]
SharedBuffer m_segments and m_dataArray must be exclusive
https://bugs.webkit.org/show_bug.cgi?id=77715

Patch by Pratik Solanki <pratik.solanki@gmail.com> on 2013-08-29
Reviewed by Benjamin Poulain.

When USE(NETWORK_CFDATA_ARRAY_CALLBACK) is enabled, we use m_dataArray to hold the incoming
data. We do not use m_segments. Since they are exclusive in practice, do not define or use
m_segments when NETWORK_CFDATA_ARRAY_CALLBACK is enabled.

No new tests because no functional changes.

* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::clear):
(WebCore::SharedBuffer::copy):
(WebCore::SharedBuffer::buffer):
(WebCore::SharedBuffer::getSomeData):
* platform/SharedBuffer.h:

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

6 years agoWeb Inspector: Consolidate inspector-protocol Debugger tests
commit-queue@webkit.org [Thu, 29 Aug 2013 17:54:22 +0000 (17:54 +0000)]
Web Inspector: Consolidate inspector-protocol Debugger tests
https://bugs.webkit.org/show_bug.cgi?id=120449

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

Move the tests, and clean-up their syntax a bit to be more
consistent, readable, and compact.

* inspector-protocol/debugger/column-breakpoint.html:
* inspector-protocol/debugger/pause-dedicated-worker-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker-expected.txt.
* inspector-protocol/debugger/pause-dedicated-worker.html: Renamed from LayoutTests/inspector-protocol/debugger-pause-dedicated-worker.html.
* inspector-protocol/debugger/resources/dedicated-worker.js: Renamed from LayoutTests/inspector-protocol/resources/dedicated-worker.js.
* inspector-protocol/debugger/setVariableValue-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue-expected.txt.
* inspector-protocol/debugger/setVariableValue.html: Renamed from LayoutTests/inspector-protocol/debugger-setVariableValue.html.
* inspector-protocol/debugger/terminate-dedicated-worker-while-paused-expected.txt: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused-expected.txt.
* inspector-protocol/debugger/terminate-dedicated-worker-while-paused.html: Renamed from LayoutTests/inspector-protocol/debugger-terminate-dedicated-worker-while-paused.html.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

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

6 years agoChange StackIterator to not require writes to the JS stack.
mark.lam@apple.com [Thu, 29 Aug 2013 17:41:44 +0000 (17:41 +0000)]
Change StackIterator to not require writes to the JS stack.
https://bugs.webkit.org/show_bug.cgi?id=119657.

Reviewed by Geoffrey Garen.

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* interpreter/CallFrame.h:
- Removed references to StackIteratorPrivate.h.
* interpreter/StackIterator.cpp:
(JSC::StackIterator::numberOfFrames):
(JSC::StackIterator::gotoFrameAtIndex):
(JSC::StackIterator::gotoNextFrame):
(JSC::StackIterator::resetIterator):
(JSC::StackIterator::find):
(JSC::StackIterator::readFrame):
(JSC::StackIterator::readNonInlinedFrame):
- Reads in the current CallFrame's data for non-inlined frames.
(JSC::inlinedFrameOffset):
- Convenience function to compute the inlined frame offset based on the
  CodeOrigin. If the offset is 0, then we're looking at the physical frame.
  Otherwise, it's an inlined frame.
(JSC::StackIterator::readInlinedFrame):
- Determines the inlined frame's caller frame. Will read in the caller
  frame if it is also an inlined frame i.e. we haven't reached the
  outer most frame yet. Otherwise, will call readNonInlinedFrame() to
  read on the outer most frame.
  This is based on the old StackIterator::Frame::logicalFrame().
(JSC::StackIterator::updateFrame):
- Reads the data of the caller frame of the current one. This function
  is renamed and moved from the old StackIterator::Frame::logicalCallerFrame(),
  but is now simplified because it delegates to the readInlinedFrame()
  to get the caller for inlined frames.
(JSC::StackIterator::Frame::arguments):
- Fixed to use the inlined frame versions of Arguments::create() and
  Arguments::tearOff() when the frame is an inlined frame.
(JSC::StackIterator::Frame::print):
(debugPrintCallFrame):
(debugPrintStack):
- Because sometimes, we want to see the whole stack while debugging.
* interpreter/StackIterator.h:
(JSC::StackIterator::Frame::argumentCount):
(JSC::StackIterator::Frame::callerFrame):
(JSC::StackIterator::Frame::callee):
(JSC::StackIterator::Frame::scope):
(JSC::StackIterator::Frame::codeBlock):
(JSC::StackIterator::Frame::bytecodeOffset):
(JSC::StackIterator::Frame::inlinedFrameInfo):
(JSC::StackIterator::Frame::isJSFrame):
(JSC::StackIterator::Frame::isInlinedFrame):
(JSC::StackIterator::Frame::callFrame):
(JSC::StackIterator::Frame::Frame):
(JSC::StackIterator::Frame::~Frame):
- StackIterator::Frame now caches commonly used accessed values from
  the CallFrame. It still delegates argument queries to the CallFrame.
(JSC::StackIterator::operator*):
(JSC::StackIterator::operator->):
(JSC::StackIterator::operator!=):
(JSC::StackIterator::operator++):
(JSC::StackIterator::end):
(JSC::StackIterator::operator==):
* interpreter/StackIteratorPrivate.h: Removed.

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

6 years ago[iOS] Upstream changes to WebCore/style
dbates@webkit.org [Thu, 29 Aug 2013 17:35:01 +0000 (17:35 +0000)]
[iOS] Upstream changes to WebCore/style
https://bugs.webkit.org/show_bug.cgi?id=120173

Reviewed by Darin Adler.

* style/StyleResolveTree.cpp:
(WebCore::Style::elementImplicitVisibility): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle): Added; specific to iOS.
(WebCore::Style::resolveTree): Modified to instantiate CheckForVisibilityChangeOnRecalcStyle when building on iOS.

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

6 years ago[cairo] canvas drawing on itself doesn't work with accelerated canvas
a.renevier@samsung.com [Thu, 29 Aug 2013 17:23:29 +0000 (17:23 +0000)]
[cairo] canvas drawing on itself doesn't work with accelerated canvas
https://bugs.webkit.org/show_bug.cgi?id=118808

Reviewed by Martin Robinson.

Source/WebCore:

When copying an accelerated image, we try to get its dimensions with
cairo_image_surface_get_width/cairo_image_surface_get_height. As
surface is not an image, this returns width and height of 0.

Many other places use cairo_image_surface_get although the surface may
be a gl surface.

This patch fixes those issues by implementing a cairoSurfaceSize
helper that returns the surface size whatever type it is.

It use cairo_surface_create_similar instead of
cairo_image_surface_create in copyCairoImageSurface. It also calls
cairo_paint in encodeImage when a drawing over a black background is
needed.

It copies the surface to an image surface if needed in extractImage.

No new tests. Covered by existing tests.

* platform/graphics/cairo/BitmapImageCairo.cpp:
(WebCore::BitmapImage::BitmapImage):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::checkForSolidColor):
* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::copyCairoImageSurface):
(WebCore::cairoSurfaceSize):
* platform/graphics/cairo/CairoUtilities.h:
* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):
* platform/graphics/gtk/GdkCairoUtilities.cpp:
(cairoSurfaceToGdkPixbuf):
* platform/graphics/gtk/GdkCairoUtilities.h:
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::BitmapImage::getGdkPixbuf):
* platform/gtk/DragIcon.cpp:
(WebCore::DragIcon::setImage):

Source/WebKit/gtk:

Change cairoImageSurfaceToGdkPixbuf to cairoSurfaceToGdkPixbuf.

* webkit/webkitfavicondatabase.cpp:
(getIconPixbufSynchronously):

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

6 years ago[GTK] [WK2] TestWebKitWebView page-visibility fails
commit-queue@webkit.org [Thu, 29 Aug 2013 17:22:16 +0000 (17:22 +0000)]
[GTK] [WK2] TestWebKitWebView page-visibility fails
https://bugs.webkit.org/show_bug.cgi?id=120406

Patch by Brian Holt <brian.holt@samsung.com> on 2013-08-29
Reviewed by Gustavo Noronha Silva.

Removed the webkit prefix for document visibility properties.

* UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
(testWebViewPageVisibility):

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

6 years agoSource/JavaScriptCore: VM::throwException() crashes reproducibly in testapi with...
commit-queue@webkit.org [Thu, 29 Aug 2013 17:03:32 +0000 (17:03 +0000)]
Source/JavaScriptCore: VM::throwException() crashes reproducibly in testapi with !ENABLE(JIT)
https://bugs.webkit.org/show_bug.cgi?id=120472

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-29
Reviewed by Filip Pizlo.

With the JIT disabled, interpreterThrowInCaller was attempting to throw an error,
but the topCallFrame was not set yet. By passing the error object into interpreterThrowInCaller
throwException can be called when topCallFrame is set.
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPathsExceptions.cpp:
(JSC::CommonSlowPaths::interpreterThrowInCaller):
* runtime/CommonSlowPathsExceptions.h:

Renamed genericThrow -> genericUnwind, because this function no longer has the ability
to throw errors. It unwinds the stack in order to report them.
* dfg/DFGOperations.cpp:
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
(JSC::jitThrowNew):
(JSC::jitThrow):
* jit/JITExceptions.h:
* llint/LLIntExceptions.cpp:
(JSC::LLInt::doThrow):

LayoutTests: VM::throwException() crashes reproducibly in testapi with !ENABLE(JIT)
https://bugs.webkit.org/show_bug.cgi?id=120472

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-29
Reviewed by Filip Pizlo.
An error that was not being reported before is now caught and being reported.
* media/track/track-cue-rendering-on-resize-expected.txt:

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

6 years ago[Windows] Unreviewed build fix after r154809
bfulgham@apple.com [Thu, 29 Aug 2013 16:56:42 +0000 (16:56 +0000)]
[Windows] Unreviewed build fix after r154809

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove two no-longer-existing
export symbols.

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

6 years agoFollow-up to r154810 and r154810: Missing tests and fix one misplaced call to setCapt...
simon.pena@samsung.com [Thu, 29 Aug 2013 16:41:24 +0000 (16:41 +0000)]
Follow-up to r154810 and r154810: Missing tests and fix one misplaced call to setCaptionDisplayMode
https://bugs.webkit.org/show_bug.cgi?id=120474

Reviewed by Eric Carlson.

I previously used a regular expression that didn't catch all the tests needing this
update. Additionally, in one of them I put the setCaptionDisplayMode in the wrong place,
before the function was defined by video-test.js. This new patch addresses all of that.

* media/track/media-element-enqueue-event-crash.html:
* media/track/regions-webvtt/text-track-cue-region-attribute.html:
* media/track/regions-webvtt/text-track-region-parser.html:
* media/track/track-add-remove-cue.html:
* media/track/track-cue-mutable-fragment.html:
* media/track/track-cue-mutable-text.html:
* media/track/track-cue-mutable.html:
* media/track/track-cue-negative-timestamp.html:
* media/track/track-cue-rendering-on-resize.html:
* media/track/track-cues-cuechange.html:
* media/track/track-cues-enter-exit.html:
* media/track/track-cues-missed.html:
* media/track/track-cues-pause-on-exit.html:
* media/track/track-cues-seeking.html:
* media/track/track-cues-sorted-before-dispatch.html:
* media/track/track-default-attribute.html:
* media/track/track-load-from-element-readyState.html:
* media/track/track-mode-disabled-crash.html:
* media/track/track-remove-quickly.html:

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

6 years agoUnreviewed, rolling out r154804.
commit-queue@webkit.org [Thu, 29 Aug 2013 16:41:07 +0000 (16:41 +0000)]
Unreviewed, rolling out r154804.
http://trac.webkit.org/changeset/154804
https://bugs.webkit.org/show_bug.cgi?id=120477

Broke Windows build (assumes LLInt features not enabled on
this build) (Requested by bfulgham on #webkit).

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::linkIncomingCall):
(JSC::CodeBlock::unlinkIncomingCalls):
(JSC::CodeBlock::reoptimize):
(JSC::ProgramCodeBlock::replacement):
(JSC::EvalCodeBlock::replacement):
(JSC::FunctionCodeBlock::replacement):
(JSC::ProgramCodeBlock::compileOptimized):
(JSC::ProgramCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::EvalCodeBlock::compileOptimized):
(JSC::EvalCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::FunctionCodeBlock::compileOptimized):
(JSC::FunctionCodeBlock::replaceWithDeferredOptimizedCode):
(JSC::ProgramCodeBlock::jitCompileImpl):
(JSC::EvalCodeBlock::jitCompileImpl):
(JSC::FunctionCodeBlock::jitCompileImpl):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::jitType):
(JSC::CodeBlock::jitCompile):
* bytecode/DeferredCompilationCallback.cpp: Removed.
* bytecode/DeferredCompilationCallback.h: Removed.
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
(JSC::DFG::tryFinalizePlan):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
(JSC::DFG::tryCompileFunction):
(JSC::DFG::tryFinalizePlan):
* dfg/DFGFailedFinalizer.cpp:
(JSC::DFG::FailedFinalizer::finalize):
(JSC::DFG::FailedFinalizer::finalizeFunction):
* dfg/DFGFailedFinalizer.h:
* dfg/DFGFinalizer.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGJITFinalizer.h:
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::finalize):
* dfg/DFGPlan.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
(JSC::DFG::Worklist::runThread):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalize):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* heap/Heap.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* jit/JITDriver.h: Added.
(JSC::jitCompileIfAppropriateImpl):
(JSC::jitCompileFunctionIfAppropriateImpl):
(JSC::jitCompileIfAppropriate):
(JSC::jitCompileFunctionIfAppropriate):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
* jit/JITToDFGDeferredCompilationCallback.cpp: Removed.
* jit/JITToDFGDeferredCompilationCallback.h: Removed.
* llint/LLIntEntrypoints.cpp:
(JSC::LLInt::getFunctionEntrypoint):
(JSC::LLInt::getEvalEntrypoint):
(JSC::LLInt::getProgramEntrypoint):
* llint/LLIntEntrypoints.h:
(JSC::LLInt::getEntrypoint):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::setUpCall):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/CommonSlowPaths.cpp:
* runtime/CompilationResult.cpp:
(WTF::printInternal):
* runtime/CompilationResult.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::compileOptimized):
(JSC::EvalExecutable::jitCompile):
(JSC::EvalExecutable::compileInternal):
(JSC::EvalExecutable::replaceWithDeferredOptimizedCode):
(JSC::ProgramExecutable::compileOptimized):
(JSC::ProgramExecutable::jitCompile):
(JSC::ProgramExecutable::compileInternal):
(JSC::ProgramExecutable::replaceWithDeferredOptimizedCode):
(JSC::FunctionExecutable::compileOptimizedForCall):
(JSC::FunctionExecutable::compileOptimizedForConstruct):
(JSC::FunctionExecutable::jitCompileForCall):
(JSC::FunctionExecutable::jitCompileForConstruct):
(JSC::FunctionExecutable::produceCodeBlockFor):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForCall):
(JSC::FunctionExecutable::compileForConstructInternal):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeForConstruct):
* runtime/Executable.h:
(JSC::ExecutableBase::offsetOfJITCodeWithArityCheckFor):
(JSC::ExecutableBase::offsetOfNumParametersFor):
(JSC::ExecutableBase::catchRoutineFor):
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::compile):
(JSC::FunctionExecutable::compileForCall):
(JSC::FunctionExecutable::compileForConstruct):
(JSC::FunctionExecutable::compileFor):
(JSC::FunctionExecutable::compileOptimizedFor):
(JSC::FunctionExecutable::replaceWithDeferredOptimizedCodeFor):
(JSC::FunctionExecutable::jitCompileFor):
* runtime/ExecutionHarness.h: Added.
(JSC::prepareForExecutionImpl):
(JSC::prepareFunctionForExecutionImpl):
(JSC::installOptimizedCode):
(JSC::prepareForExecution):
(JSC::prepareFunctionForExecution):
(JSC::replaceWithDeferredOptimizedCode):

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

6 years agoBuildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
ossy@webkit.org [Thu, 29 Aug 2013 16:20:43 +0000 (16:20 +0000)]
Buildfix after r154806 for !ENABLE(CSS_REGIONS) platforms.
https://bugs.webkit.org/show_bug.cgi?id=120461

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-29
Reviewed by Csaba Osztrogon√°c.

moveToFlowThreadIfNeeded() is used only inside of ENABLE(CSS_REGIONS)
block (and only once), so it should be guarded too.

* style/StyleResolveTree.cpp:

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

6 years agoBUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS
ddkilzer@apple.com [Thu, 29 Aug 2013 15:47:19 +0000 (15:47 +0000)]
BUILD FIX (r154778): AXSearchFieldCancelButtonText() is not defined on iOS

See: AX: Cancel button in search field not accessible.
<https://webkit.org/b/120322>

Fixes the following build error:

    In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:44:
    Source/WebCore/accessibility/AccessibilitySearchFieldButtons.cpp:46:12: error: use of undeclared identifier 'AXSearchFieldCancelButtonText'
        return AXSearchFieldCancelButtonText();
               ^
    1 error generated.

* accessibility/AccessibilitySearchFieldButtons.cpp:
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
Return String() instead of calling AXSearchFieldCancelButtonText() on iOS.

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

6 years ago[GTK] Unreviewed gardening. Rebaselining after r154479 and r154702
simon.pena@samsung.com [Thu, 29 Aug 2013 15:32:16 +0000 (15:32 +0000)]
[GTK] Unreviewed gardening. Rebaselining after r154479 and r154702

* platform/gtk/editing/deleting/delete-br-004-expected.txt: Rebaseline after r154479.
* platform/gtk/editing/deleting/delete-br-005-expected.txt: Ditto.
* platform/gtk/editing/deleting/delete-br-006-expected.txt: Ditto.
* platform/gtk/editing/selection/5057506-2-expected.txt: Rebaseline after r154702.
* platform/gtk/editing/selection/5057506-expected.txt: Ditto.

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

6 years agoAdd setCaptionDisplayMode('Automatic') to remaining tests with track 'default' attrib...
simon.pena@samsung.com [Thu, 29 Aug 2013 14:40:10 +0000 (14:40 +0000)]
Add setCaptionDisplayMode('Automatic') to remaining tests with track 'default' attribute after r154527
https://bugs.webkit.org/show_bug.cgi?id=120471

Reviewed by Eric Carlson.

As done in r154527, some LayoutTests with track 'default' attribute
need the caption mode set to automatic.

* media/track/track-css-all-cues.html:
* media/track/track-css-cue-lifetime.html:
* media/track/track-css-matching-default.html:
* media/track/track-css-matching-lang.html:
* media/track/track-css-matching-timestamps.html:
* media/track/track-css-matching.html:
* media/track/track-css-property-whitelist.html:
* media/track/track-css-user-override.html:
* media/track/track-cue-container-rendering-position.html:
* media/track/track-cue-nothing-to-render.html:
* media/track/track-cue-rendering-on-resize.html:
* media/track/track-cue-rendering-rtl.html:
* media/track/track-cue-rendering-snap-to-lines-not-set.html:
* media/track/track-cue-rendering-with-padding.html:
* media/track/track-cue-rendering.html:

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

6 years agoRemove NodeRenderingContext
antti@apple.com [Thu, 29 Aug 2013 14:02:22 +0000 (14:02 +0000)]
Remove NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=120466

Reviewed by Andreas Kling.

Switch the few remaining clients of this class to call the underlying code directly.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::initForStyleResolve):
* dom/DOMAllInOne.cpp:
* dom/Node.cpp:
* dom/Node.h:

    Remove Node::parentNodeForRenderingAndStyle(). Make clients invoke NodeRenderingTraversal::parent() directly.

* dom/NodeRenderingContext.cpp: Removed.
* dom/NodeRenderingContext.h: Removed.
* dom/ShadowRoot.h:
* dom/Text.cpp:
* dom/Text.h:
* dom/TreeScope.cpp:
* dom/TreeScope.h:

    Remove virtual TreeScope::resetStyleInheritance. Make clients cast to ShadowRoot when needed.

* html/HTMLSummaryElement.cpp:
(WebCore::HTMLSummaryElement::detailsElement):
* style/StyleResolveTree.cpp:
(WebCore::Style::createTextRendererIfNeeded):

    For consistency switch resetStyleInheritance check to use parentNode() instead of renderingParentNode. This matches the NodeRenderingTraversal implementation.
    This difference is probably not testable in current trunk.

(WebCore::Style::resolveTree):

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

6 years ago[GTK] Skip grammar checking tests.
g.czajkowski@samsung.com [Thu, 29 Aug 2013 13:41:19 +0000 (13:41 +0000)]
[GTK] Skip grammar checking tests.
Unreviewed gardening after r154675.

* platform/gtk/TestExpectations:
Skip failing tests after r154675 until GTK+ implements
grammar checking feature.

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

6 years ago[GTK] Update apt dependency list
berto@igalia.com [Thu, 29 Aug 2013 12:35:00 +0000 (12:35 +0000)]
[GTK] Update apt dependency list
https://bugs.webkit.org/show_bug.cgi?id=120399

Reviewed by Philippe Normand.

Remove bogus package gail-3.0, add xfonts-utils (needed by
xorg-xserver) and switch to the latest versions of libtiff and
libjpeg.

* gtk/install-dependencies:

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

6 years agoMove element renderer creation out of NodeRenderingContext
antti@apple.com [Thu, 29 Aug 2013 12:25:23 +0000 (12:25 +0000)]
Move element renderer creation out of NodeRenderingContext
https://bugs.webkit.org/show_bug.cgi?id=120461

Reviewed by Andreas Kling.

Move NodeRenderingContext::createRendererIfNeeded() and the related utility functions to StyleResolveTree.

Tighten typing and constness. Refactor sligthly to be more understandable.

* dom/Element.cpp:
(WebCore::Element::shouldMoveToFlowThread):
* dom/Element.h:
* dom/NodeRenderingContext.cpp:
(WebCore::NodeRenderingContext::NodeRenderingContext):
(WebCore::NodeRenderingContext::nextRenderer):
(WebCore::NodeRenderingContext::previousRenderer):
(WebCore::NodeRenderingContext::parentRenderer):
* dom/NodeRenderingContext.h:
* dom/PseudoElement.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::nextSiblingRenderer):
(WebCore::Style::shouldCreateRenderer):
(WebCore::Style::elementInsideRegionNeedsRenderer):
(WebCore::Style::moveToFlowThreadIfNeeded):
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::attachRenderTree):
* svg/SVGElement.cpp:
(WebCore::SVGElement::shouldMoveToFlowThread):
* svg/SVGElement.h:

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

6 years ago[WK2][Mac] WebKitTestRunner doesn't force system appearance
ap@apple.com [Thu, 29 Aug 2013 06:11:10 +0000 (06:11 +0000)]
[WK2][Mac] WebKitTestRunner doesn't force system appearance
https://bugs.webkit.org/show_bug.cgi?id=120437

Reviewed by Darin Adler.

* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize): Set AppleAquaColorVariant,
AppleHighlightColor and AppleOtherHighlightColor to the same values that DRT uses.
Fixed formatting.

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

6 years agoCodeBlock compilation and installation should be simplified and rationalized
fpizlo@apple.com [Thu, 29 Aug 2013 04:03:05 +0000 (04:03 +0000)]
CodeBlock compilation and installation should be simplified and rationalized
https://bugs.webkit.org/show_bug.cgi?id=120326

Reviewed by Oliver Hunt.

Previously Executable owned the code for generating JIT code; you always had
to go through Executable. But often you also had to go through CodeBlock,
because ScriptExecutable couldn't have virtual methods, but CodeBlock could.
So you'd ask CodeBlock to do something, which would dispatch through a
virtual method that would select the appropriate Executable subtype's method.
This all meant that the same code would often be duplicated, because most of
the work needed to compile something was identical regardless of code type.
But then we tried to fix this, by having templatized helpers in
ExecutionHarness.h and JITDriver.h. The result was that if you wanted to find
out what happened when you asked for something to be compiled, you'd go on a
wild ride that started with CodeBlock, touched upon Executable, and then
ricocheted into either ExecutionHarness or JITDriver (likely both).

Another awkwardness was that for concurrent compiles, the DFG::Worklist had
super-special inside knowledge of what JITStubs.cpp's cti_optimize would have
done once the compilation finished.

Also, most of the DFG JIT drivers assumed that they couldn't install the
JITCode into the CodeBlock directly - instead they would return it via a
reference, which happened to be a reference to the JITCode pointer in
Executable. This was super weird.

Finally, there was no notion of compiling code into a special CodeBlock that
wasn't used for handling calls into an Executable. I'd like this for FTL OSR
entry.

This patch solves these problems by reducing all of that complexity into just
three primitives:

- Executable::newCodeBlock(). This gives you a new code block, either for call
  or for construct, and either to serve as the baseline code or the optimized
  code. The new code block is then owned by the caller; Executable doesn't
  register it anywhere. The new code block has no JITCode and isn't callable,
  but it has all of the bytecode.

- CodeBlock::prepareForExecution(). This takes the CodeBlock's bytecode and
  produces a JITCode, and then installs the JITCode into the CodeBlock. This
  method takes a JITType, and always compiles with that JIT. If you ask for
  JITCode::InterpreterThunk then you'll get JITCode that just points to the
  LLInt entrypoints. Once this returns, it is possible to call into the
  CodeBlock if you do so manually - but the Executable still won't know about
  it so JS calls to that Executable will still be routed to whatever CodeBlock
  is associated with the Executable.

- Executable::installCode(). This takes a CodeBlock and makes it the code-for-
  entry for that Executable. This involves unlinking the Executable's last
  CodeBlock, if there was one. This also tells the GC about any effect on
  memory usage and does a bunch of weird data structure rewiring, since
  Executable caches some of CodeBlock's fields for the benefit of virtual call
  fast paths.

This functionality is then wrapped around three convenience methods:

- Executable::prepareForExecution(). If there is no code block for that
  Executable, then one is created (newCodeBlock()), compiled
  (CodeBlock::prepareForExecution()) and installed (installCode()).

- CodeBlock::newReplacement(). Asks the Executable for a new CodeBlock that
  can serve as an optimized replacement of the current one.

- CodeBlock::install(). Asks the Executable to install this code block.

This patch allows me to kill *a lot* of code and to remove a lot of
specializations for functions vs. not-functions, and a lot of places where we
pass around JITCode references and such. ExecutionHarness and JITDriver are
both gone. Overall this patch has more red than green.

It also allows me to work on FTL OSR entry and tier-up:

- FTL tier-up: this will involve DFGOperations.cpp asking the DFG::Worklist
  to do some compilation, but it will require the DFG::Worklist to do
  something different than what JITStubs.cpp would want, once the compilation
  finishes. This patch introduces a callback mechanism for that purpose.

- FTL OSR entry: this will involve creating a special auto-jettisoned
  CodeBlock that is used only for FTL OSR entry. The new set of primitives
  allows for this: Executable can vend you a fresh new CodeBlock, and you can
  ask that CodeBlock to compile itself with any JIT of your choosing. Or you
  can take that CodeBlock and compile it yourself. Previously the act of
  producing a CodeBlock-for-optimization and the act of compiling code for it
  were tightly coupled; now you can separate them and you can create such
  auto-jettisoned CodeBlocks that are used for a one-shot OSR entry.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::prepareForExecution):
(JSC::CodeBlock::install):
(JSC::CodeBlock::newReplacement):
(JSC::FunctionCodeBlock::jettisonImpl):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasBaselineJITProfiling):
* bytecode/DeferredCompilationCallback.cpp: Added.
(JSC::DeferredCompilationCallback::DeferredCompilationCallback):
(JSC::DeferredCompilationCallback::~DeferredCompilationCallback):
* bytecode/DeferredCompilationCallback.h: Added.
* dfg/DFGDriver.cpp:
(JSC::DFG::tryCompile):
* dfg/DFGDriver.h:
(JSC::DFG::tryCompile):
* dfg/DFGFailedFinalizer.cpp:
(JSC::DFG::FailedFinalizer::finalize):
(JSC::DFG::FailedFinalizer::finalizeFunction):
* dfg/DFGFailedFinalizer.h:
* dfg/DFGFinalizer.h:
* dfg/DFGJITFinalizer.cpp:
(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):
* dfg/DFGJITFinalizer.h:
* dfg/DFGOSRExitPreparation.cpp:
(JSC::DFG::prepareCodeOriginForOSRExit):
* dfg/DFGOperations.cpp:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::Plan):
(JSC::DFG::Plan::compileInThreadImpl):
(JSC::DFG::Plan::finalizeWithoutNotifyingCallback):
(JSC::DFG::Plan::finalizeAndNotifyCallback):
* dfg/DFGPlan.h:
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::completeAllReadyPlansForVM):
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalize):
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLJITFinalizer.h:
* heap/Heap.h:
(JSC::Heap::isDeferred):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* jit/JITDriver.h: Removed.
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
* jit/JITToDFGDeferredCompilationCallback.cpp: Added.
(JSC::JITToDFGDeferredCompilationCallback::JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::~JITToDFGDeferredCompilationCallback):
(JSC::JITToDFGDeferredCompilationCallback::create):
(JSC::JITToDFGDeferredCompilationCallback::compilationDidComplete):
* jit/JITToDFGDeferredCompilationCallback.h: Added.
* llint/LLIntEntrypoints.cpp:
(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
* llint/LLIntEntrypoints.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::jitCompileAndSetHeuristics):
(JSC::LLInt::setUpCall):
* runtime/ArrayPrototype.cpp:
(JSC::isNumericCompareFunction):
* runtime/CommonSlowPaths.cpp:
* runtime/CompilationResult.cpp:
(WTF::printInternal):
* runtime/CompilationResult.h:
* runtime/Executable.cpp:
(JSC::ScriptExecutable::installCode):
(JSC::ScriptExecutable::newCodeBlockFor):
(JSC::ScriptExecutable::newReplacementCodeBlockFor):
(JSC::ScriptExecutable::prepareForExecutionImpl):
* runtime/Executable.h:
(JSC::ScriptExecutable::prepareForExecution):
(JSC::FunctionExecutable::jettisonOptimizedCodeFor):
* runtime/ExecutionHarness.h: Removed.

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

6 years ago<https://webkit.org/b/119806> [Mac] Add a way to easily test attributed string generation
rniwa@webkit.org [Thu, 29 Aug 2013 03:04:07 +0000 (03:04 +0000)]
<https://webkit.org/b/119806> [Mac] Add a way to easily test attributed string generation

Reviewed by Darin Adler.

Tools:

Add textInputController.legacyAttributedString to retrieve the attributed string for copy & paste.

We can't use textInputController.attributedSubstringFromRange as it uses WebHTMLConverter's static
editingAttributedStringFromRange function, which doesn't implement the full converter at the moment.

Also NSMutableAttributedString.ranges and WebNSRange so that JavaScript can get a list of all
ranges in a given attributed string.

* DumpRenderTree/mac/TextInputController.m:
(-[WebNSRange initWithNSRange:]):
(-[WebNSRange location]):
(-[WebNSRange length]):
(+[WebNSRange isSelectorExcludedFromWebScript:]):
(+[NSMutableAttributedString isSelectorExcludedFromWebScript:]):
(+[NSMutableAttributedString webScriptNameForSelector:]):
(-[NSMutableAttributedString ranges]): Added.
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController legacyAttributedString:]):

LayoutTests:

Add basic tests for textInputController.legacyAttributedString.

* platform/mac-wk2/TestExpectations:
* platform/mac/editing/attributed-string: Added.
* platform/mac/editing/attributed-string/anchor-element-expected.txt: Added.
* platform/mac/editing/attributed-string/anchor-element.html: Added.
* platform/mac/editing/attributed-string/basic-expected.txt: Added.
* platform/mac/editing/attributed-string/basic.html: Added.
* platform/mac/editing/attributed-string/font-size-expected.txt: Added.
* platform/mac/editing/attributed-string/font-size.html: Added.
* platform/mac/editing/attributed-string/font-style-variant-effect-expected.txt: Added.
* platform/mac/editing/attributed-string/font-style-variant-effect.html: Added.
* platform/mac/editing/attributed-string/font-weight-expected.txt: Added.
* platform/mac/editing/attributed-string/font-weight.html: Added.
* platform/mac/editing/attributed-string/letter-spacing-expected.txt: Added.
* platform/mac/editing/attributed-string/letter-spacing.html: Added.
* platform/mac/editing/attributed-string/resources: Added.
* platform/mac/editing/attributed-string/resources/dump-attributed-string.js: Added.
(.):
* platform/mac/editing/attributed-string/text-decorations-expected.txt: Added.
* platform/mac/editing/attributed-string/text-decorations.html: Added.
* platform/mac/editing/attributed-string/vertical-align-expected.txt: Added.
* platform/mac/editing/attributed-string/vertical-align.html: Added.

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

6 years agoAX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
cfleizach@apple.com [Thu, 29 Aug 2013 02:33:42 +0000 (02:33 +0000)]
AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 27
https://bugs.webkit.org/show_bug.cgi?id=120434

Reviewed by Darin Adler.

Crash logs indicate that there's a null pointer access in rootObject. That seems like it could only
happen in Document was null.

Unfortunately, there are no reproducible steps and no other information to construct a test case.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::rootObject):

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

6 years agoThe code to look for an ancestor form element is duplicated in three different places
rniwa@webkit.org [Thu, 29 Aug 2013 01:35:21 +0000 (01:35 +0000)]
The code to look for an ancestor form element is duplicated in three different places
https://bugs.webkit.org/show_bug.cgi?id=120391

Reviewed by Darin Adler.

Unduplicated the code by putting a single implementation in HTMLFormElement.cpp.

* WebCore.order:
* html/FormAssociatedElement.cpp:
(WebCore::FormAssociatedElement::findAssociatedForm):
(WebCore::FormAssociatedElement::formAttributeChanged):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::virtualForm):
* html/HTMLElement.h:
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::findClosestFormAncestor):
* html/HTMLFormElement.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::HTMLObjectElement):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::HTMLTreeBuilder):

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

6 years agoStop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
rniwa@webkit.org [Thu, 29 Aug 2013 01:13:07 +0000 (01:13 +0000)]
Stop throwing DOM exceptions in internal 'XMLHttpRequest' response getters
https://bugs.webkit.org/show_bug.cgi?id=120446

Reviewed by Alexey Proskuryakov.

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

Unlike 'responseText' and 'responseXML', 'responseBlob' and
'responseArrayBuffer' are not exposed to JavaScript (they don't
appear in the IDL or in the specification). As they are only called from
custom bindings in response to a JavaScript call to the 'response' getter,
we can safely replace the exception-throwing code in the implementation
with an ASSERT that the request type is correct.

* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::response):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseBlob):
(WebCore::XMLHttpRequest::responseArrayBuffer):
* xml/XMLHttpRequest.h:

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

6 years agoExpand classList test to cover exception in toString
rniwa@webkit.org [Thu, 29 Aug 2013 01:11:18 +0000 (01:11 +0000)]
Expand classList test to cover exception in toString
https://bugs.webkit.org/show_bug.cgi?id=120444

Reviewed by Benjamin Poulain.

Merge https://chromium.googlesource.com/chromium/blink/+/825fefb837133d5545964c17f6aa4b62bfe3df0c

When add and remove is called and there is an exception being thrown
in one of the arguments we need to ensure that we are not calling the
implementation of add and remove.

* fast/dom/HTMLElement/class-list-expected.txt:
* fast/dom/HTMLElement/class-list-quirks-expected.txt:
* fast/dom/HTMLElement/script-tests/class-list.js:
(shouldBeEqualToString):

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

6 years ago[EFL] Let Page create the main Frame
ryuan.choi@samsung.com [Thu, 29 Aug 2013 00:31:24 +0000 (00:31 +0000)]
[EFL] Let Page create the main Frame
https://bugs.webkit.org/show_bug.cgi?id=120360

Reviewed by Darin Adler.

Page always creates the main Frame by itself after r154616.
This patch follows the changes for WebKit/Efl like other ports.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::createFrame):
Moved the logic of ewk_view_frame_create.
* ewk/ewk_frame.cpp:
(ewk_frame_init):
(ewk_frame_child_add):
Moved construction logic of Frame and FrameLoderClientEfl from ewk_view.
(EWKPrivate::setCoreFrame):
* ewk/ewk_frame_private.h:
* ewk/ewk_view.cpp: Removed _ewk_view_core_frame_new.
(_ewk_view_priv_new):
(_ewk_view_smart_add):
(ewk_view_frame_rect_changed):
* ewk/ewk_view_private.h:

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

6 years agoSource/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=119548
commit-queue@webkit.org [Thu, 29 Aug 2013 00:28:42 +0000 (00:28 +0000)]
Source/JavaScriptCore: https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
Reviewed by Geoffrey Garen.

Gardening of exception throws. The act of throwing an exception was being handled in
different ways depending on whether the code was running in the LLint, Baseline JIT,
or the DFG Jit. This made development in the vm exception and error objects difficult.

 * runtime/VM.cpp:
(JSC::appendSourceToError):
This function moved from the interpreter into the VM. It views the developers code
(if there is a codeBlock) to extract what was trying to be evaluated when the error
occurred.

(JSC::VM::throwException):
This function takes in the error object and sets the following:
    1: The VM's exception stack
    2: The VM's exception
    3: Appends extra information on the error message(via appendSourceToError)
    4: The error object's line number
    5: The error object's column number
    6: The error object's sourceURL
    7: The error object's stack trace (unless it already exists because the developer
        created the error object).

(JSC::VM::getExceptionInfo):
(JSC::VM::setExceptionInfo):
(JSC::VM::clearException):
(JSC::clearExceptionStack):
* runtime/VM.h:
(JSC::VM::exceptionOffset):
(JSC::VM::exception):
(JSC::VM::addressOfException):
(JSC::VM::exceptionStack):
VM exception and exceptionStack are now private data members.

* interpreter/Interpreter.h:
(JSC::ClearExceptionScope::ClearExceptionScope):
Created this structure to temporarily clear the exception within the VM. This
needed to see if addition errors occur when setting the debugger as we are
unwinding the stack.

 * interpreter/Interpreter.cpp:
(JSC::Interpreter::unwind):
Removed the code that would try to add error information if it did not exist.
All of this functionality has moved into the VM and all error information is set
at the time the error occurs.

The rest of these functions reference the new calling convention to throw an error.

* API/APICallbackFunction.h:
(JSC::APICallbackFunction::call):
* API/JSCallbackConstructor.cpp:
(JSC::constructJSCallback):
* API/JSCallbackObjectFunctions.h:
(JSC::::getOwnPropertySlot):
(JSC::::defaultValue):
(JSC::::put):
(JSC::::putByIndex):
(JSC::::deleteProperty):
(JSC::::construct):
(JSC::::customHasInstance):
(JSC::::call):
(JSC::::getStaticValue):
(JSC::::staticFunctionGetter):
(JSC::::callbackGetter):
* debugger/Debugger.cpp:
(JSC::evaluateInGlobalCallFrame):
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::evaluate):
* dfg/DFGAssemblyHelpers.h:
(JSC::DFG::AssemblyHelpers::emitExceptionCheck):
* dfg/DFGOperations.cpp:
(JSC::DFG::operationPutByValInternal):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::callCheck):
* heap/Heap.cpp:
(JSC::Heap::markRoots):
* interpreter/CallFrame.h:
(JSC::ExecState::clearException):
(JSC::ExecState::exception):
(JSC::ExecState::hadException):
* interpreter/Interpreter.cpp:
(JSC::eval):
(JSC::loadVarargs):
(JSC::stackTraceAsString):
(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall):
* interpreter/Interpreter.h:
(JSC::ClearExceptionScope::ClearExceptionScope):
* jit/JITCode.cpp:
(JSC::JITCode::execute):
* jit/JITExceptions.cpp:
(JSC::genericThrow):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_catch):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::emit_op_catch):
* jit/JITStubs.cpp:
(JSC::returnToThrowTrampoline):
(JSC::throwExceptionFromOpCall):
(JSC::DEFINE_STUB_FUNCTION):
(JSC::jitCompileFor):
(JSC::lazyLinkFor):
(JSC::putByVal):
(JSC::cti_vm_handle_exception):
* jit/SlowPathCall.h:
(JSC::JITSlowPathCall::call):
* jit/ThunkGenerators.cpp:
(JSC::nativeForGenerator):
* jsc.cpp:
(functionRun):
(functionLoad):
(functionCheckSyntax):
* llint/LLIntExceptions.cpp:
(JSC::LLInt::doThrow):
(JSC::LLInt::returnToThrow):
(JSC::LLInt::callToThrow):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter.cpp:
(JSC::CLoop::execute):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/ArrayConstructor.cpp:
(JSC::constructArrayWithSizeQuirk):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opIn):
* runtime/CommonSlowPathsExceptions.cpp:
(JSC::CommonSlowPaths::interpreterThrowInCaller):
* runtime/Completion.cpp:
(JSC::evaluate):
* runtime/Error.cpp:
(JSC::addErrorInfo):
(JSC::throwTypeError):
(JSC::throwSyntaxError):
* runtime/Error.h:
(JSC::throwVMError):
* runtime/ExceptionHelpers.cpp:
(JSC::throwOutOfMemoryError):
(JSC::throwStackOverflowError):
(JSC::throwTerminatedExecutionException):
* runtime/Executable.cpp:
(JSC::EvalExecutable::create):
(JSC::FunctionExecutable::produceCodeBlockFor):
* runtime/FunctionConstructor.cpp:
(JSC::constructFunction):
(JSC::constructFunctionSkippingEvalEnabledCheck):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::put):
(JSC::JSArray::push):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::toObjectSlowCase):
(JSC::JSValue::synthesizePrototype):
(JSC::JSValue::putToPrimitive):
* runtime/JSFunction.cpp:
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::create):
(JSC::::createUninitialized):
(JSC::::validateRange):
(JSC::::setWithSpecificType):
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::encode):
(JSC::decode):
(JSC::globalFuncProtoSetter):
* runtime/JSNameScope.cpp:
(JSC::JSNameScope::put):
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::put):
(JSC::JSObject::defaultValue):
(JSC::JSObject::hasInstance):
(JSC::JSObject::defaultHasInstance):
(JSC::JSObject::defineOwnNonIndexProperty):
(JSC::throwTypeError):
* runtime/ObjectConstructor.cpp:
(JSC::toPropertyDescriptor):
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* runtime/StringObject.cpp:
(JSC::StringObject::defineOwnProperty):
* runtime/StringRecursionChecker.cpp:
(JSC::StringRecursionChecker::throwStackOverflowError):

Source/WebCore: https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
Reviewed by Geoffrey Garen.

Gets column information from the error object for reporting exceptions.
* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):
* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStackFromException):

Moved setting an exception into the vm, These functions changed to use the new functionality.

* bindings/js/JSAudioBufferSourceNodeCustom.cpp:
(WebCore::JSAudioBufferSourceNode::setBuffer):
* bindings/js/JSBiquadFilterNodeCustom.cpp:
(WebCore::JSBiquadFilterNode::setType):
* bindings/js/JSCryptoCustom.cpp:
(WebCore::JSCrypto::getRandomValues):
* bindings/js/JSDOMBinding.cpp:
(WebCore::setDOMException):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::JSInjectedScriptHost::setFunctionVariableValue):
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::evaluate):
(WebCore::JSJavaScriptCallFrame::setVariableValue):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
* bindings/js/JSOscillatorNodeCustom.cpp:
(WebCore::JSOscillatorNode::setType):
* bindings/js/JSPannerNodeCustom.cpp:
(WebCore::JSPannerNode::setPanningModel):
(WebCore::JSPannerNode::setDistanceModel):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getExtension):
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::JSWebGLRenderingContext::getParameter):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneBase::throwStackOverflow):
(WebCore::CloneDeserializer::throwValidationError):
(WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
(JSC::Bindings::CInstance::invokeMethod):
(JSC::Bindings::CInstance::invokeDefaultMethod):
(JSC::Bindings::CInstance::invokeConstruct):
(JSC::Bindings::CInstance::toJSPrimitive):
* bridge/objc/objc_instance.mm:
(ObjcInstance::invokeMethod):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcArray::setValueAt):
(JSC::Bindings::ObjcArray::valueAt):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::throwError):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtField::valueFromInstance):
(JSC::Bindings::QtField::setValueToInstance):
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::put):
(JSC::RuntimeArray::putByIndex):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::throwInvalidAccessError):

Source/WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
Reviewed by Geoffrey Garen.

Moved setting an exception into the vm, These functions changed to use the new functionality.

* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::invokeMethod):

Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
Reviewed by Geoffrey Garen.

Moved setting an exception into the vm, These functions changed to use the new functionality.

* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::callObject):
(WebKit::JSNPObject::callConstructor):
(WebKit::JSNPObject::throwInvalidAccessError):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=119548
Refactoring Exception throws.

Patch by Chris Curtis <chris_curtis@apple.com> on 2013-08-28
Reviewed by Geoffrey Garen.

Column/line information was added into these results.
* fast/events/window-onerror4-expected.txt:
* fast/js/global-recursion-on-full-stack-expected.txt:

fixed a variable name in a case when shouldThrowType failed.
* fast/js/mozilla/resources/js-test-pre.js:
(shouldThrowType):

Sorted the properties to allow the results always show in the same order.
* fast/js/script-tests/exception-properties.js:
* fast/js/exception-properties-expected.txt:

This test needed to be modified to have the line numbers match on the output across
wk and wk2. This test is inherently flaky because is relies on size of the available
native stack. To account for the flakiness an additional call was made to force the
results to match.
This patch now records and outputs the line number where the errors were occurring.
This was causing the test results to no longer match because of the line numbers.
By changing how to account for the flakiness, the results match again.
* fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt:
* fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html:

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

6 years ago Remove an unused data member from Page.
ap@apple.com [Wed, 28 Aug 2013 23:59:25 +0000 (23:59 +0000)]
    Remove an unused data member from Page.

        Rubber-stamped by Brady Eidson.

        * page/Page.cpp:
        * page/Page.h:
        Removed m_cookieEnabled. This was completely dead code, long obsoleted by PageSettings.

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

6 years agoUnreviewed build fix - copy/paste failure, copied too much.
kov@webkit.org [Wed, 28 Aug 2013 23:58:20 +0000 (23:58 +0000)]
Unreviewed build fix - copy/paste failure, copied too much.

* bindings/gobject/WebKitDOMCustom.h:

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

6 years ago[WebGL] CoreGraphics can provide greyscale image data
dino@apple.com [Wed, 28 Aug 2013 23:54:05 +0000 (23:54 +0000)]
[WebGL] CoreGraphics can provide greyscale image data
https://webkit.org/b/120443

Reviewed by Simon Fraser.

Source/WebCore:

CoreGraphics can decode greyscale or greyscale+alpha images
while preserving the format. Our WebGL texture unpacker
was seeing this and assuming it meant the data did not come
from an <img> element. Since that method already special cased
CoreGraphics, the fix was to simply return true for these
extra types.

I also renamed srcFormatComeFromDOMElementOrImageData
to srcFormatComesFromDOMElementOrImageData.

Test: fast/canvas/webgl/tex-image-with-greyscale-image.html

* platform/graphics/GraphicsContext3D.cpp: Call new name.
* platform/graphics/GraphicsContext3D.h:
(WebCore::GraphicsContext3D::srcFormatComesFromDOMElementOrImageData):
Add support for R8, AR8, A8, and RA8 data formats.

LayoutTests:

New test that attempts to load and draw an image that only has grey
and alpha channels.

* fast/canvas/webgl/resources/greyscale.png: Added.
* fast/canvas/webgl/tex-image-with-greyscale-image-expected.txt: Added.
* fast/canvas/webgl/tex-image-with-greyscale-image.html: Added.

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

6 years ago[GTK] Please incorporate German translation update
kov@webkit.org [Wed, 28 Aug 2013 23:44:30 +0000 (23:44 +0000)]
[GTK] Please incorporate German translation update
https://bugs.webkit.org/show_bug.cgi?id=120016

Patch by Christian Kirbach <Christian.Kirbach@googlemail.com> on 2013-08-28
Reviewed by Gustavo Noronha.

* de.po: updated.

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

6 years ago[Windows] LayoutTests on Windows debug fails and exits early
bfulgham@apple.com [Wed, 28 Aug 2013 23:41:02 +0000 (23:41 +0000)]
[Windows] LayoutTests on Windows debug fails and exits early
https://bugs.webkit.org/show_bug.cgi?id=120438

Reviewed by Tim Horton.

Visual Studio mishandles char* containing utf8-content. Must manually
escape non-ASCII characters so the byte stream is correct for localized
string lookup.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cannotShowURLError): Replace unicode apostrophe
character with utf8-byte equivalent.
(WebFrameLoaderClient::cannotShowMIMETypeError): Ditto.
(WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto.

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

6 years ago[GTK] Enable maintainer mode configure switch
kov@webkit.org [Wed, 28 Aug 2013 23:35:34 +0000 (23:35 +0000)]
[GTK] Enable maintainer mode configure switch
https://bugs.webkit.org/show_bug.cgi?id=120424

Reviewed by Martin Robinson.

The maintainer mode feature is used by ostree and other automated builders to ensure no autotools
regeneration will happen for a regular tarball build; ostree builders, for instance, are very
conservative with toolchain upgrades, and are still using aclocal 1.12. WebKit's latest tarball
(2.1.90) for some reason tries to regenerate build files, and the build fails because it can't find
the version of aclocal that was used for generating the tarball (1.13).

* configure.ac: enable maintainer mode feature.

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

6 years ago[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
kov@webkit.org [Wed, 28 Aug 2013 23:34:43 +0000 (23:34 +0000)]
[GTK] HTMLElement lost setID and getID - need to add compatibility symbols
https://bugs.webkit.org/show_bug.cgi?id=120440

Reviewed by Martin Robinson.

No tests, just adding compatibility symbols.

setID and getID were removed, and the parent class (Element) ones should be used instead.
We need to keep our ABI compatible, though, so add compatibility symbols.

* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_id):
(webkit_dom_html_element_set_id):
* bindings/gobject/WebKitDOMCustom.h:

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

6 years agoFix compositing layers in columns
simon.fraser@apple.com [Wed, 28 Aug 2013 22:52:53 +0000 (22:52 +0000)]
Fix compositing layers in columns
https://bugs.webkit.org/show_bug.cgi?id=120436

Source/WebCore:

Reviewed by Dave Hyatt.

Remove the old hack in RenderLayer::updateLayerPosition() for placing
layers in columns, which changed the layer position for composited
layers; this broke hit-testing.

Fix a better way by moving compositing layers to the correct
positions that take column offsets into account, by fixing
RenderLayer::convertToLayerCoords() to optionally apply column
adjustment, and using this in the code which positions compositing layers.

Tests: compositing/columns/ancestor-clipped-in-paginated.html
       compositing/columns/clipped-in-paginated.html
       compositing/columns/composited-columns-vertical-rl.html
       compositing/columns/composited-columns.html
       compositing/columns/composited-in-paginated-rl.html
       compositing/columns/composited-in-paginated-writing-mode-rl.html
       compositing/columns/composited-lr-paginated-repaint.html
       compositing/columns/composited-rl-paginated-repaint.html
       compositing/columns/hittest-composited-in-paginated.html
       compositing/columns/rotated-in-paginated.html
       compositing/columns/untransformed-composited-in-paginated.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPosition):
(WebCore::RenderLayer::convertToPixelSnappedLayerCoords):
(WebCore::accumulateOffsetTowardsAncestor):
(WebCore::RenderLayer::convertToLayerCoords):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateCompositedBounds):
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):

LayoutTests:

Reviewed by Dave Hyatt.

Various testcases for compositing in columns.

* compositing/columns/ancestor-clipped-in-paginated-expected.txt: Added.
* compositing/columns/ancestor-clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/clipped-in-paginated-expected.txt: Added.
* compositing/columns/clipped-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-columns-expected.txt: Added.
* compositing/columns/composited-columns-vertical-rl-expected.txt: Added.
* compositing/columns/composited-columns-vertical-rl.html: Added.
* compositing/columns/composited-columns.html: Added.
* compositing/columns/composited-in-paginated-rl-expected.txt: Added.
* compositing/columns/composited-in-paginated-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-in-paginated-writing-mode-rl-expected.txt: Added.
* compositing/columns/composited-in-paginated-writing-mode-rl.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/composited-in-paginated.html:
* compositing/columns/composited-lr-paginated-repaint-expected.txt: Added.
* compositing/columns/composited-lr-paginated-repaint.html: Added.
* compositing/columns/composited-nested-columns-expected.txt: Added.
* compositing/columns/composited-nested-columns.html: Added.
* compositing/columns/composited-rl-paginated-repaint-expected.txt: Added.
* compositing/columns/composited-rl-paginated-repaint.html: Added.
* compositing/columns/hittest-composited-in-paginated-expected.txt: Added.
* compositing/columns/hittest-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/rotated-in-paginated-expected.txt: Added.
* compositing/columns/rotated-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.
* compositing/columns/untransformed-composited-in-paginated-expected.txt: Added.
* compositing/columns/untransformed-composited-in-paginated.html: Copied from LayoutTests/compositing/columns/composited-in-paginated.html.

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

6 years ago[WinCairo] Unreviewed build fix.
bfulgham@apple.com [Wed, 28 Aug 2013 22:50:20 +0000 (22:50 +0000)]
[WinCairo] Unreviewed build fix.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
missing Cairo symbols; don't export CG symbols for Cairo build.

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

6 years ago[WinCairo] Unreviewed build fix.
bfulgham@apple.com [Wed, 28 Aug 2013 22:49:17 +0000 (22:49 +0000)]
[WinCairo] Unreviewed build fix.

* WebCore.vcxproj/WebCore.vcxproj: Don't exclude the full screen
window from the build.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.

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

6 years agoFix the build after r154780
benjamin@webkit.org [Wed, 28 Aug 2013 22:44:23 +0000 (22:44 +0000)]
Fix the build after r154780

* dom/SpaceSplitString.cpp:
(WebCore::SpaceSplitStringData::create):

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

6 years ago[GTK] accessibility/menu-list-sends-change-notification.html has incorrect expected...
commit-queue@webkit.org [Wed, 28 Aug 2013 22:35:14 +0000 (22:35 +0000)]
[GTK] accessibility/menu-list-sends-change-notification.html has incorrect expected results
https://bugs.webkit.org/show_bug.cgi?id=120419

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-08-28
Reviewed by Chris Fleizach.

Tools:

Added a notification for AXFocusedUIElementChanged.

* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener): Added a notification for AXFocusedUIElementChanged.

LayoutTests:

Updated the expected results according to the fix added to AccessibilityCallbacksAtk.cpp
where a notification was added for AXFocusedUIElementChanged.

* platform/gtk/accessibility/menu-list-sends-change-notification-expected.txt:

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

6 years agoSimplify and clean SpaceSplitString
benjamin@webkit.org [Wed, 28 Aug 2013 22:29:13 +0000 (22:29 +0000)]
Simplify and clean SpaceSplitString
https://bugs.webkit.org/show_bug.cgi?id=120385

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-08-27
Reviewed by Ryosuke Niwa.

Clean up of SpaceSplitString following the cleaning of the DOMTokenList hierarchy.
This brings the following:
- Fix the coding style of the header.
- Remove the concepts of empty and null. The list can now be empty or have something.
  There is no null state.
- Put the tokens directly following SpaceSplitStringData instead of using a Vector in between.

* WebCore.exp.in:
* dom/ElementData.h:
(WebCore::ElementData::hasClass):
* dom/SpaceSplitString.cpp:
(WebCore::tokenizeSpaceSplitString):
(WebCore::SpaceSplitStringData::containsAll):
(WebCore::SpaceSplitString::set):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
(WebCore::TokenCounterProcessor::TokenCounterProcessor):
(WebCore::TokenCounterProcessor::processToken):
(WebCore::TokenCounterProcessor::tokenCount):
(WebCore::TokenInitializerProcessor::TokenInitializerProcessor):
(WebCore::TokenInitializerProcessor::processToken):
(WebCore::TokenInitializerProcessor::nextMemoryBucket):
(WebCore::SpaceSplitStringData::create):
(WebCore::SpaceSplitStringData::destroy):
* dom/SpaceSplitString.h:
(WebCore::SpaceSplitStringData::contains):
(WebCore::SpaceSplitStringData::size):
(WebCore::SpaceSplitStringData::operator[]):
(WebCore::SpaceSplitStringData::ref):
(WebCore::SpaceSplitStringData::deref):
(WebCore::SpaceSplitStringData::SpaceSplitStringData):
(WebCore::SpaceSplitStringData::~SpaceSplitStringData):
(WebCore::SpaceSplitStringData::tokenArrayStart):
(WebCore::SpaceSplitString::SpaceSplitString):
(WebCore::SpaceSplitString::operator!=):
(WebCore::SpaceSplitString::clear):
(WebCore::SpaceSplitString::contains):
(WebCore::SpaceSplitString::containsAll):
(WebCore::SpaceSplitString::size):
(WebCore::SpaceSplitString::isEmpty):
(WebCore::SpaceSplitString::operator[]):
(WebCore::SpaceSplitString::spaceSplitStringContainsValue):
* html/ClassList.cpp:
(WebCore::ClassList::classNames):
* page/EventHandler.cpp:
(WebCore::findDropZone):

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

6 years agoNamespace prefix is blindly followed when serializing
rwlbuis@webkit.org [Wed, 28 Aug 2013 22:25:19 +0000 (22:25 +0000)]
Namespace prefix is blindly followed when serializing
https://bugs.webkit.org/show_bug.cgi?id=19121
Serializer doesn't handling inconsistent prefixes properly
https://bugs.webkit.org/show_bug.cgi?id=117764
Attribute namespaces are serialized as if they were element ones
https://bugs.webkit.org/show_bug.cgi?id=22958

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add code to make sure unique prefixes and namespace declarations are generated.
Unique prefix generation happens when:
- the same prefix is used to map to different namespaces or
- no prefix is given but the attribute is in a namespace.

This is done in order to not violate constraints listed in http://www.w3.org/TR/xml-names11/. In general
the pseudo code listed in http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
is used, doing the following for attributes:
if the attribute has a namespace then
  if the attribute has no prefix OR prefix is not declared OR conflicts with existing prefix mapping to different NS then
    try to find the matching in-scope declaration by looking up the prefix in the namespace -> prefix mapping, if found use that prefix
    else if the attribute prefix is not null AND not mapped in-scope, declare the prefix
    else generate a unique prefix for the namespace

To keep track of in-scope namespaces a prefix to namespace mapping is used.

Tests: fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html
       fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html
       fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html
       svg/custom/xlink-prefix-generation-in-attributes.html

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::MarkupAccumulator):
(WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
(WebCore::MarkupAccumulator::appendNamespace):
(WebCore::MarkupAccumulator::generateUniquePrefix):
(WebCore::MarkupAccumulator::appendAttribute):
* editing/MarkupAccumulator.h:

LayoutTests:

Add tests to make sure unique prefixes and namespace declarations are generated for the
case when the same prefix is used to map to different namespaces. All testcases are based
on the testcases attached to the bugs.

* fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts-expected.txt: Added.
* fast/dom/XMLSerializer-attribute-namespace-prefix-conflicts.html: Added.
* fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict-expected.txt: Added.
* fast/dom/XMLSerializer-same-prefix-different-namespaces-conflict.html: Added.
* fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix-expected.txt: Added.
* fast/dom/XMLSerializer-setAttributeNS-namespace-no-prefix.html: Added.
* svg/custom/xlink-prefix-generation-in-attributes-expected.txt: Added.
* svg/custom/xlink-prefix-generation-in-attributes.html: Added.

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

6 years agoAX: Cancel button in search field not accessible.
commit-queue@webkit.org [Wed, 28 Aug 2013 22:19:25 +0000 (22:19 +0000)]
AX: Cancel button in search field not accessible.
<https://webkit.org/b/120322>

Source/WebCore:

Expose the cancel button that shows in an input element of
type search to accessibility.

Patch by Sam White <samuel_white@apple.com> on 2013-08-28
Reviewed by Chris Fleizach.

Test: platform/mac/accessibility/search-field-cancel-button.html

* CMakeLists.txt:
* English.lproj/Localizable.strings:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilitySearchFieldButtons.cpp: Added.
(WebCore::AccessibilitySearchFieldCancelButton::create):
(WebCore::AccessibilitySearchFieldCancelButton::AccessibilitySearchFieldCancelButton):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityDescription):
(WebCore::AccessibilitySearchFieldCancelButton::accessibilityText):
(WebCore::AccessibilitySearchFieldCancelButton::press):
(WebCore::AccessibilitySearchFieldCancelButton::computeAccessibilityIsIgnored):
* accessibility/AccessibilitySearchFieldButtons.h: Added.
* dom/Element.h:
(WebCore::Element::isSearchFieldCancelButtonElement):
* html/shadow/TextControlInnerElements.h:
* platform/LocalizedStrings.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXSearchFieldCancelButtonText):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::AXSearchFieldCancelButtonText):

LayoutTests:

Make sure the cancel button that shows in an input element of
type search is accessible and actionable.

Patch by Sam White <samuel_white@apple.com> on 2013-08-28
Reviewed by Chris Fleizach.

* platform/mac/accessibility/search-field-cancel-button-expected.txt: Added.
* platform/mac/accessibility/search-field-cancel-button.html: Added.

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

6 years agoWeb Inspector: Give reload icon an :active state and allow CSS to style some SVG...
joepeck@webkit.org [Wed, 28 Aug 2013 20:42:02 +0000 (20:42 +0000)]
Web Inspector: Give reload icon an :active state and allow CSS to style some SVG images
https://bugs.webkit.org/show_bug.cgi?id=120384

Reviewed by Timothy Hatcher.

The Reload icon is duplicated just to provide different fill colors.
Convert from using <img> to an <svg> document for this image, and style
it with CSS. This also makes it trivial to add an :active state.

* UserInterface/ImageUtilities.js:
(.invokeCallbackWithDocument):
(.imageLoad):
(.imageError):
(wrappedSVGDocument):
Helpers for downloading and in memory caching SVG images.

* UserInterface/Images/Reload.svg:
* UserInterface/Images/ReloadSelected.svg: Removed.
Updated Reload image better matches the original design (slightly
larger). And the duplicate image can be removed.

* UserInterface/ResourceTreeElement.css:
(.item.resource > .status > .reload-button):
(.item.resource > .status > .reload-button > svg *):
(.item.resource.selected > .status > .reload-button > svg *):
(.item.resource.selected > .status > .reload-button:active > svg *):
Different styles, including a new :active style.

* UserInterface/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype._updateStatusWithMainFrameButtons):
(WebInspector.ResourceTreeElement.prototype._updateStatus):
Handle updating the main frame's state asynchronously since loading the SVG
image document is asynchronous.

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

6 years agoDecrease number of workers used in NRWT by the Windows port.
roger_fong@apple.com [Wed, 28 Aug 2013 20:33:57 +0000 (20:33 +0000)]
Decrease number of workers used in NRWT by the Windows port.
https://bugs.webkit.org/show_bug.cgi?id=120435.

Reviewed by Brent Fulgham.

* Scripts/webkitpy/port/win.py:
(WinPort.default_child_processes):

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

6 years agoMediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
eric.carlson@apple.com [Wed, 28 Aug 2013 20:26:22 +0000 (20:26 +0000)]
MediaPlayerPrivateAVFoundationObjC is painting video frames under the video layer
https://bugs.webkit.org/show_bug.cgi?id=120170

Reviewed by Simon Fraser.

No new tests, it is only possible to test in the debugger.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::hasAvailableVideoFrame): Drive by optimization.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext): Move logic from paint here.
(WebCore::MediaPlayerPrivateAVFoundationObjC::paint): Do nothing if we already have a video layer,
    otherwise call paint().

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

6 years agoAdd child and descendant const iterators
antti@apple.com [Wed, 28 Aug 2013 19:43:51 +0000 (19:43 +0000)]
Add child and descendant const iterators
https://bugs.webkit.org/show_bug.cgi?id=120430

Reviewed by Andreas Kling

This patch adds const-correct DOM tree traversal iterators. It also uses them in a few places.

Some const_casts have been applied where constness breaks.

* dom/ChildIterator.h:
(WebCore::::ChildConstIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildConstIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h:
(WebCore::::DescendantConstIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantConstIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Node.cpp:
(WebCore::Node::numberOfScopedHTMLStyleChildren):
* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::legend):
* html/HTMLFieldSetElement.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::finishParsingChildren):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::containsJavaApplet):
* svg/SVGElement.cpp:
(WebCore::SVGElement::title):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):
(WebCore::SVGSVGElement::getElementById):
* svg/SVGSVGElement.h:

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

6 years agoAX:Null pointer may be dereferenced.
commit-queue@webkit.org [Wed, 28 Aug 2013 19:41:12 +0000 (19:41 +0000)]
AX:Null pointer may be dereferenced.
https://bugs.webkit.org/show_bug.cgi?id=120300

Patch by Lukasz Gajowy <l.gajowy@samsung.com> on 2013-08-28
Reviewed by Chris Fleizach.

Added a check if newObj is not null and an assert in order to avoid dereferecing null pointer.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::getOrCreate):

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

6 years agoDocument::elementSheet() should return a reference
psolanki@apple.com [Wed, 28 Aug 2013 19:24:50 +0000 (19:24 +0000)]
Document::elementSheet() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120433

Reviewed by Andreas Kling.

Since elementSheet() always retruns a valid pointer, we can simply return a reference
instead. Also rename m_elemSheet to m_elementSheet.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseInlineStyleDeclaration):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::recalcStyle):
(WebCore::Document::updateBaseURL):
(WebCore::Document::elementSheet):
* dom/Document.h:
* dom/StyledElement.cpp:
(WebCore::StyledElement::setInlineStyleFromString):
(WebCore::StyledElement::setInlineStyleProperty):
(WebCore::StyledElement::addSubresourceAttributeURLs):
(WebCore::StyledElement::addPropertyToPresentationAttributeStyle):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):

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

6 years agoREGRESSION(r154586): Past names map should only be used when named item is empty
rniwa@webkit.org [Wed, 28 Aug 2013 19:00:01 +0000 (19:00 +0000)]
REGRESSION(r154586): Past names map should only be used when named item is empty
https://bugs.webkit.org/show_bug.cgi?id=120432

Reviewed by Anders Carlsson.

Source/WebCore:

Don't add the element from the past names map if we've found elements of the given name.

Test: fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html

* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::getNamedElements):

LayoutTests:

Add a regression test so that we never regress again.

* fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty-expected.txt: Added.
* fast/forms/past-names-map-should-be-used-only-when-named-item-is-empty.html: Added.

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

6 years ago[Windows] Provide useful error messages for WebKitErrorDomain errors
bfulgham@apple.com [Wed, 28 Aug 2013 18:44:20 +0000 (18:44 +0000)]
[Windows] Provide useful error messages for WebKitErrorDomain errors
https://bugs.webkit.org/show_bug.cgi?id=120428

Reviewed by Anders Carlsson.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::cancelledError): Provide text for this error.
(WebFrameLoaderClient::blockedError): Hook up WEB_UI_STRING for this error.
(WebFrameLoaderClient::cannotShowURLError): Ditto
(WebFrameLoaderClient::interruptedForPolicyChangeError): Ditto
(WebFrameLoaderClient::cannotShowMIMETypeError): Ditto
(WebFrameLoaderClient::fileDoesNotExistError): Provide text for this error.
(WebFrameLoaderClient::pluginWillHandleLoadError): Hook up WEB_UI_STRING for this error.
(WebFrameLoaderClient::dispatchDidFailToStartPlugin): Ditto.
(WebFrameLoaderClient::createJavaAppletWidget): Ditto.
(WebFrameLoaderClient::webHistory): Remove blank line above method.

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

6 years agoAllow the Flash plug-in to open its preference pane
andersca@apple.com [Wed, 28 Aug 2013 18:35:51 +0000 (18:35 +0000)]
Allow the Flash plug-in to open its preference pane
https://bugs.webkit.org/show_bug.cgi?id=120431
<rdar://problem/14857039>

Reviewed by Andreas Kling.

Forward the -[NSWorkspace openFile:] call to the UI process and allow opening
the Flash preference pane (if Flash asks for it).

* PluginProcess/PluginProcess.h:
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSWorkspace_openFile):
(WebKit::initializeCocoaOverrides):
(WebKit::PluginProcess::openFile):
* UIProcess/Plugins/PluginProcessProxy.h:
* UIProcess/Plugins/PluginProcessProxy.messages.in:
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::openURL):
(WebKit::shouldOpenFile):
(WebKit::PluginProcessProxy::openFile):

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

6 years agoFix a typo in the test name.
rniwa@webkit.org [Wed, 28 Aug 2013 18:31:41 +0000 (18:31 +0000)]
Fix a typo in the test name.

* fast/forms/past-names-map-should-not-contain-disassociated-elements-expected.txt: Copied from LayoutTests/fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt.
* fast/forms/past-names-map-should-not-contain-disassociated-elements.html: Copied from LayoutTests/fast/forms/past-names-map-should-not-contained-disassociated-elements.html.
* fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt: Removed.
* fast/forms/past-names-map-should-not-contained-disassociated-elements.html: Removed.

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

6 years agoDon't keep unassociated elements in the past names map
rniwa@webkit.org [Wed, 28 Aug 2013 18:28:55 +0000 (18:28 +0000)]
Don't keep unassociated elements in the past names map
https://bugs.webkit.org/show_bug.cgi?id=120328

Reviewed by Darin Adler.

Source/WebCore:

Remove elements from the past names map of a form element when they are disassociated with the form to match
the behaviors of Firefox 24 and Internet Explorer 10. The specification feedback has been submitted to WHATWG
in http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-August/040586.html

Also fix a memory leak via the past names map when the elements in the map becomes an ancestor of the form
element by storing a raw pointer in the map. This is safe because the form associated elements are kept alive
by another mechanism.

Because ~FormAssociatedElement removes entries from the past names map, we could no longer store HTMLElement*
in HTMLFormElement::m_pastNamesMap as that requires casting FormAssociatedElement* to HTMLElement*, which is
not possible in ~FormAssociatedElement. We instead store pointers to FormNamedItem, new base class of
FormAssociatedElement and HTMLImageElement.

Test: fast/forms/past-names-map-should-not-contained-disassociated-elements.html

* Target.pri:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/FormAssociatedElement.cpp:
* html/FormAssociatedElement.h:
(WebCore::toHTMLElement):

* html/FormNamedItem.h: Added.
(WebCore::FormNamedItem::~FormNamedItem):

* html/HTMLElement.h:
(WebCore::HTMLElement::asFormNamedItem): Added. This allows the conversion from a HTMLFormControlElement,
HTMLObjectElement, HTMLImageElement to FormNamedItem in getNamedElements to update the past names map.

* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::removeFormElement):
(WebCore::HTMLFormElement::removeImgElement):
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap): Asserts that FormNamedItem added to or obtained
from the past names map is either a form associated element or an image element; the condition guarantees
that the item will be removed from the map before its element gets destructed.

(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addToPastNamesMap):
(WebCore::HTMLFormElement::removeFromPastNamesMap): Finds and removes the obsolete item from the map in O(n).
Note that removeFromVector, which is called on m_associatedElements or m_imageElements before this function is called,
is already O(n).

(WebCore::HTMLFormElement::getNamedElements):

* html/HTMLFormElement.h:
* html/HTMLImageElement.h:
* html/HTMLObjectElement.h:

LayoutTests:

Add a regression test. Also Updated the tests to expect the new behavior in which elements are not accessible via
their past names in a form element's name getter once they're disassociated with the form element.

* fast/forms/form-image-access-by-name-expected.txt:
* fast/forms/form-image-access-by-name.html:
* fast/forms/old-names-expected.txt:
* fast/forms/old-names.html:
* fast/forms/past-names-map-should-not-contained-disassociated-elements-expected.txt: Added.
* fast/forms/past-names-map-should-not-contained-disassociated-elements.html: Added.

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

6 years agoDuplicate in-band tracks when switching <source> elements
commit-queue@webkit.org [Wed, 28 Aug 2013 18:27:03 +0000 (18:27 +0000)]
Duplicate in-band tracks when switching <source> elements
https://bugs.webkit.org/show_bug.cgi?id=120369

Patch by Brendan Long <b.long@cablelabs.com> on 2013-08-28
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/track/track-in-band-duplicate-tracks-when-source-changes.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::createMediaPlayer):
Delete existing in-band tracks before creating a new media player.

LayoutTests:

* media/track/track-in-band-duplicate-tracks-when-source-changes.html: Added.
* media/track/track-in-band-duplicate-tracks-when-source-changes-expected.txt: Added.

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

6 years ago[Windows] Loader is not properly determining supported MIME types
bfulgham@apple.com [Wed, 28 Aug 2013 17:29:12 +0000 (17:29 +0000)]
[Windows] Loader is not properly determining supported MIME types
https://bugs.webkit.org/show_bug.cgi?id=120383

Reviewed by Eric Carlson.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::canShowMIMEType): Modify to ask WebView if it can
display the media type. Use new helper function to avoid converting a String
to BSTR, only to immediatly be converted from BSTR back to String.
(WebFrameLoaderClient::canShowMIMETypeAsHTML): Ditto.
* WebView.cpp:
(WebView::canShowMIMEType): Move logic to a new (similarly named) helper function.
(WebView::canShowMIMETypeAsHTML): Ditto.
* WebView.h: Add declaration for two new helper functions.

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

6 years agoCode cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
bjonesbe@adobe.com [Wed, 28 Aug 2013 17:11:59 +0000 (17:11 +0000)]
Code cleanup: rename FloatIntervalSearchAdapter and remove unnecessary inlines
https://bugs.webkit.org/show_bug.cgi?id=120378

Reviewed by Darin Adler.

Rename FloatIntervalSearchAdapter to ComputeFloatOffsetAdapter. The
naming of this adapter has caused much confusion in reading the code,
as it wasn't apparent that calls to it were actually doing anything
other than searching the interval tree. The new name is a much better
description of what it actually does.

Also, rename m_lowValue and m_highValue member variables to make it
easier to read the code that uses them.

Removed the inlines based on a change by eseidel in Blink.

No new tests, no behavior change.

* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded): Update for renames.
(WebCore::::collectIfNeeded): Ditto.
(WebCore::::getHeightRemaining): Ditto.
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine): Ditto.
(WebCore::RenderBlock::logicalRightFloatOffsetForLine): Ditto.
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatingObject::x): Remove unnecessary inline.
(WebCore::RenderBlock::FloatingObject::maxX): Ditto.
(WebCore::RenderBlock::FloatingObject::y): Ditto.
(WebCore::RenderBlock::FloatingObject::maxY): Ditto.
(WebCore::RenderBlock::FloatingObject::width): Ditto.
(WebCore::RenderBlock::FloatingObject::height): Ditto.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter): Rename.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::lowValue): Rename m_lowValue.
(WebCore::RenderBlock::ComputeFloatOffsetAdapter::highValue): Rename m_highValue.

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

6 years ago[CSS Exclusions] Differentiate names in the simple rectangle test script
commit-queue@webkit.org [Wed, 28 Aug 2013 17:11:40 +0000 (17:11 +0000)]
[CSS Exclusions] Differentiate names in the simple rectangle test script
https://bugs.webkit.org/show_bug.cgi?id=105208

Patch by Niklas Nielsen <nnielsen@adobe.com> on 2013-08-28
Reviewed by Alexandru Chiculita.

Rename createRectangleTest and createRectangleTestResult to drawTestRectangle and drawExpectedRectangle respectively.

* fast/shapes/resources/simple-rectangle.js:
(drawTextRectangle):
(drawExpectedRectangle):
* fast/shapes/shape-inside/shape-inside-floats-simple-expected.html:
* fast/shapes/shape-inside/shape-inside-floats-simple.html:
* fast/shapes/shape-inside/shape-inside-multiple-blocks-dynamic-expected.html:
* fast/shapes/shape-inside/shape-inside-multiple-blocks-dynamic.html:
* fast/shapes/shape-inside/shape-inside-outside-shape-expected.html:
* fast/shapes/shape-inside/shape-inside-outside-shape.html:
* fast/shapes/shape-inside/shape-inside-recursive-layout-expected.html:
* fast/shapes/shape-inside/shape-inside-recursive-layout.html:
* fast/shapes/shape-inside/shape-inside-subsequent-blocks-expected.html:
* fast/shapes/shape-inside/shape-inside-subsequent-blocks.html:

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

6 years ago[wk2] Resolve unused parameters in WebPlatformStrategies.cpp
commit-queue@webkit.org [Wed, 28 Aug 2013 17:05:20 +0000 (17:05 +0000)]
[wk2] Resolve unused parameters in WebPlatformStrategies.cpp
https://bugs.webkit.org/show_bug.cgi?id=120410

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
Reviewed by Darin Adler.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getPluginInfo):
(WebKit::WebPlatformStrategies::transientLocalStorageNamespace):

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

6 years ago[wk2] Resolve unused parameter warnings in the WebProcess.cpp
commit-queue@webkit.org [Wed, 28 Aug 2013 17:04:02 +0000 (17:04 +0000)]
[wk2] Resolve unused parameter warnings in the WebProcess.cpp
https://bugs.webkit.org/show_bug.cgi?id=120412

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
Reviewed by Darin Adler.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::startMemorySampler):

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

6 years agoResolve unused parameter warning in ScriptedAnimationController.cpp.
commit-queue@webkit.org [Wed, 28 Aug 2013 17:03:19 +0000 (17:03 +0000)]
Resolve unused parameter warning in ScriptedAnimationController.cpp.
https://bugs.webkit.org/show_bug.cgi?id=120408

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-08-28
Reviewed by Darin Adler.

* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::setThrottled):

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