WebKit-https.git
6 years agoClean up MessageQueue.h
andersca@apple.com [Sat, 5 Oct 2013 21:53:59 +0000 (21:53 +0000)]
Clean up MessageQueue.h
https://bugs.webkit.org/show_bug.cgi?id=122392

Reviewed by Andreas Kling.

Source/WebCore:

Update for changes to MessageQueue, mostly changing create functions to return std::unique_ptr.
I intentionally avoided using std::make_unique in a couple of places because I didn't want to make nested classes
public, and I believe that we can change some of this code to use std::function.

* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::runLoop):
(WebCore::AsyncAudioDecoder::DecodingTask::create):
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::tableNames):
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::openAndVerifyVersion):
(WebCore::DatabaseBackend::scheduleTransaction):
(WebCore::DatabaseBackend::scheduleTransactionStep):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseOpenTask::create):
(WebCore::DatabaseBackend::DatabaseCloseTask::create):
(WebCore::DatabaseBackend::DatabaseTransactionTask::create):
(WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
(WebCore::DatabaseThread::scheduleTask):
(WebCore::DatabaseThread::scheduleImmediateTask):
(WebCore::SameDatabasePredicate::operator()):
* Modules/webdatabase/DatabaseThread.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::create):
(WebCore::MessagePortChannel::tryGetMessageFromRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
* fileapi/FileThread.cpp:
(WebCore::FileThread::postTask):
(WebCore::SameInstancePredicate::operator()):
(WebCore::FileThread::runLoop):
* fileapi/FileThread.h:
* fileapi/FileThreadTask.h:
(WebCore::createFileThreadTask):
* storage/StorageThread.cpp:
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):
(WebCore::WorkerRunLoop::Task::create):
* workers/WorkerRunLoop.h:

Source/WTF:

Make MessageQueue use std::unique_ptr and change findIf and removeIf to take const references.

* wtf/Deque.h:
Change findIf to take an rvalue reference.

* wtf/MessageQueue.h:
(WTF::::append):
(WTF::::appendAndKill):
(WTF::::appendAndCheckEmpty):
(WTF::::prepend):
(WTF::::removeIf):

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

6 years ago[WebGL] program should not be able to link if a bad shader is attached
dino@apple.com [Sat, 5 Oct 2013 19:27:35 +0000 (19:27 +0000)]
[WebGL] program should not be able to link if a bad shader is attached
https://bugs.webkit.org/show_bug.cgi?id=94036

Reviewed by Darin Adler.

If you attempt to link a program when bad shaders are attached, the
link should fail. WebGL also requires that the previously linked
program should remain intact. We were doing the former, but not
the latter.

Fix this by not calling glLinkProgram if we know we have bad
shaders, and synthesize a bad link status instead.

Test: WebGL conformance test conformance/programs/program-test.html
(found in LayoutTests/webgl)

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid
if it compiled ok.
(WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram
if we know that we don't have valid shaders.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader): Initialize m_isValid.
* html/canvas/WebGLShader.h:
(WebCore::WebGLShader::isValid): New member variable getter and setter.
(WebCore::WebGLShader::setValid):

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

6 years agoUndo texture unit code refactoring - it is ok to bind a texture to multiple locations
dino@apple.com [Sat, 5 Oct 2013 19:21:04 +0000 (19:21 +0000)]
Undo texture unit code refactoring - it is ok to bind a texture to multiple locations
https://bugs.webkit.org/show_bug.cgi?id=122369
<rdar://problem/15158465>

Reviewed by Darin Adler.

The optimisation in r152351 (http://webkit.org/b/117868) incorrectly
assumes that a texture cannot be bound to more than one location.
That's true only within the same program object. It's legal to
address TEXTURE_BINDING_2D and TEXTURE_BINDING_CUBE_MAP with the
same texture in different programs.

See https://github.com/KhronosGroup/WebGL/pull/391 for more information.

This change reverts the optimisation, but also does some minor
cleanup (0 -> nullptr, class -> struct).

Covered by the following Khronos WebGL 1.0.1 tests, which
now pass:
- conformance/more/functions/texImage2DHTML.html
- conformance/more/functions/texSubImage2D.html
- conformance/more/functions/texSubImage2DHTML.html

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:

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

6 years agoTry to #define final to sealed when building with MSVC
andersca@apple.com [Sat, 5 Oct 2013 19:02:54 +0000 (19:02 +0000)]
Try to #define final to sealed when building with MSVC
https://bugs.webkit.org/show_bug.cgi?id=122386

Reviewed by Darin Adler.

* wtf/Compiler.h:

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

6 years agoRemove createOwned
andersca@apple.com [Sat, 5 Oct 2013 18:59:00 +0000 (18:59 +0000)]
Remove createOwned
https://bugs.webkit.org/show_bug.cgi?id=122388

Reviewed by Darin Adler.

Source/JavaScriptCore:

* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::save):

Source/WebCore:

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::AnimationController):
* page/animation/AnimationController.h:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:

Source/WebKit2:

* UIProcess/API/mac/WKView.mm:
(-[WKView _setFindIndicator:fadeOut:animate:]):
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):

Source/WTF:

Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
Get rid of it and replace it with calls to std::make_unique.

* wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::open):
* wtf/FilePrintStream.h:
* wtf/HashTable.h:
(WTF::::HashTable):
* wtf/ListHashSet.h:
(WTF::::ListHashSet):
* wtf/OwnPtr.h:
* wtf/Threading.cpp:
(WTF::compatEntryPoint):
(WTF::createThread):
* wtf/ThreadingPthreads.cpp:
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
* wtf/unicode/Collator.h:
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):

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

6 years agoRemove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
darin@apple.com [Sat, 5 Oct 2013 18:32:37 +0000 (18:32 +0000)]
Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
https://bugs.webkit.org/show_bug.cgi?id=122387

Reviewed by Anders Carlsson.

Source/WebCore:

* html/canvas/CanvasStyle.h: Take out conditionals.

Source/WebKit2:

* UIProcess/API/cpp/WKRetainPtr.h: Take out conditionals.

Source/WTF:

* wtf/RefPtr.h:
* wtf/RetainPtr.h:
* wtf/Vector.h:
* wtf/text/AtomicString.h:
* wtf/text/WTFString.h:
Take out conditionals.

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

6 years agoUnreviewed GTK build fix after r156946. The framePolicyFunction is an attribute
zandobersek@gmail.com [Sat, 5 Oct 2013 18:31:23 +0000 (18:31 +0000)]
Unreviewed GTK build fix after r156946. The framePolicyFunction is an attribute
on the WebKitWebPolicyDecisionPrivate object.

* webkit/webkitwebpolicydecision.cpp:
(webkit_web_policy_decision_use):
(webkit_web_policy_decision_ignore):
(webkit_web_policy_decision_download):

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

6 years agoAdd AtomicString::number and use it
darin@apple.com [Sat, 5 Oct 2013 18:22:39 +0000 (18:22 +0000)]
Add AtomicString::number and use it
https://bugs.webkit.org/show_bug.cgi?id=122384

Reviewed by Anders Carlsson.

Source/WebCore:

* css/CSSGrammar.y.in: Use AtomicString::number instead of String::number since
we are creating an AtomicString. This can save a memory allocation if the string
happens to already be in the atomic string table.
* dom/Element.cpp:
(WebCore::Element::setIntegralAttribute): Ditto.
(WebCore::Element::setUnsignedIntegralAttribute): Ditto.
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply): Ditto.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Use setIntegralAttribute instead of
a local homegrown equivalent.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setHeight): Ditto.
(WebCore::HTMLCanvasElement::setWidth): Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setTabIndex): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setHeight): Ditto.
(WebCore::HTMLImageElement::setWidth): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setMaxLength): Ditto.
(WebCore::HTMLInputElement::setSize): Same, but setUnsignedIntegralAttribute.
(WebCore::HTMLInputElement::setHeight): Ditto.
(WebCore::HTMLInputElement::setWidth): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerSetSize): Ditto.
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::setMin): More of the same.
(WebCore::HTMLMeterElement::setMax): Ditto.
(WebCore::HTMLMeterElement::setValue): Ditto.
(WebCore::HTMLMeterElement::setLow): Ditto.
(WebCore::HTMLMeterElement::setHigh): Ditto.
(WebCore::HTMLMeterElement::setOptimum): Ditto.
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::setStart): Ditto.
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::setValue): Ditto.
(WebCore::HTMLProgressElement::setMax): Ditto.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute): Ditto.
(WebCore::HTMLSelectElement::setSize): Ditto.
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::setColSpan): Ditto.
(WebCore::HTMLTableCellElement::setRowSpan): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::setSpan): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setMaxLength): Ditto.
(WebCore::HTMLTextAreaElement::setCols): Ditto.
(WebCore::HTMLTextAreaElement::setRows): Ditto.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::setDuration): Ditto.

Source/WTF:

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::number): Added.
* wtf/text/AtomicString.h: Ditto.

* wtf/text/IntegerToStringConversion.h: Simplify includes, renamed ConversionTrait to
IntegerToStringConversionTrait. Changed String version to use String since we no longer
need to use PassRefPtr to efficiently handle return values. Replaced UnsignedIntegerTrait
with std::make_unsigned. Added AtomicString support. Use nullptr instead of 0.

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

6 years agoCut down on use of String::number
darin@apple.com [Sat, 5 Oct 2013 18:04:40 +0000 (18:04 +0000)]
Cut down on use of String::number
https://bugs.webkit.org/show_bug.cgi?id=122382

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject::putByIndex): Use Identifier::from instead of calling
String::number and creating an identifier from that. Can save creating and then
destroying a string if an identifier already exists.
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlotByIndex): Ditto.
(JSC::Arguments::getOwnPropertyNames): Ditto.
(JSC::Arguments::putByIndex): Ditto.
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::getOwnPropertyNames): Ditto.
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertyNames): Ditto.

Source/WebCore:

* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText): Use StringBuilder::appendNumber,
instead of creating a string and then appending it.
(WebCore::CSSRadialGradientValue::customCSSText): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::createKeyframe): Ditto.
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Use ASCII literals instead of
converting numeric constants to strings at runtime with String::number.
(WebCore::DeleteButtonController::show): Ditto.
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::valueAsString): Use StringBuilder::appendNumber.
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString): Ditto.
* svg/SVGRect.h: Ditto.

Source/WebKit2:

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers): Use StringBuilder::appendNumber.

Source/WTF:

* wtf/DateMath.cpp:
(WTF::appendTwoDigitNumber): Added. Replaces twoDigitStringFromNumber, which returned a
String and also allocated a temporary string for any number 10 or higher.
(WTF::makeRFC2822DateString): Updated to use the new function.

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

6 years agoTest the waters and begin using lambdas
andersca@apple.com [Sat, 5 Oct 2013 17:45:38 +0000 (17:45 +0000)]
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809

Reviewed by Andreas Kling.

Source/WebCore:

Use lambdas instead of static functions and function objects.

* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):

Source/WTF:

* wtf/ListDump.h:
(WTF::sortedListDump):
Use std::less instead of a custom lessThan function.

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

6 years ago[CSS Regions] Layout Test for selecting text ignoring region content
rego@igalia.com [Sat, 5 Oct 2013 17:07:25 +0000 (17:07 +0000)]
[CSS Regions] Layout Test for selecting text ignoring region content
https://bugs.webkit.org/show_bug.cgi?id=122353

Reviewed by Darin Adler.

Add new reftests for selecting text in texts wrapping a region, where
the region content is ignored. It compares the behavior (highlighted
text and selected content) in regions and absolute positions.

Absolute positioned elements do not fill the gaps on the right during
the selection, unlike regular elements. This is the reason why some
regular elements are floated in order to avoid such problems in the
reftests.

Provided layout tests for different writing models.

* fast/regions/resources/region-style.css: New CSS classes required for these tests.
* fast/regions/selection/selecting-text-ignoring-region-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-horiz-bt-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-horiz-bt.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-lr-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-lr.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-rl-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-rl.html: Added.
* fast/regions/selection/selecting-text-ignoring-region.html: Added.

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

6 years agoAdd *CSS* prefix to FontValue to generate toCSSFontValue()
gyuyoung.kim@samsung.com [Sat, 5 Oct 2013 17:06:13 +0000 (17:06 +0000)]
Add *CSS* prefix to FontValue to generate toCSSFontValue()
https://bugs.webkit.org/show_bug.cgi?id=122201

Reviewed by Darin Adler.

*CSS* prefix needs to be added to FontValue class in order to generate toCSSFontValue().
static_cast<FontValue*> is changed with toCSSFontValue() by this change.

No new tests, no behavior changes.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontValue.cpp: Renamed from Source/WebCore/css/FontValue.cpp.
(WebCore::CSSFontValue::customCSSText):
(WebCore::CSSFontValue::equals):
* css/CSSFontValue.h: Renamed from Source/WebCore/css/FontValue.h.
(WebCore::CSSFontValue::create):
(WebCore::CSSFontValue::CSSFontValue):
* css/CSSParser.cpp:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):

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

6 years agoFix cut and paste errors.
andersca@apple.com [Sat, 5 Oct 2013 17:02:33 +0000 (17:02 +0000)]
Fix cut and paste errors.

* Configurations/WebKit2.xcconfig:

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

6 years agoAdd the rest of the std::function weak symbols in an attempt to fix the Lion build.
andersca@apple.com [Sat, 5 Oct 2013 16:55:05 +0000 (16:55 +0000)]
Add the rest of the std::function weak symbols in an attempt to fix the Lion build.

* Configurations/WebKit2.xcconfig:

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

6 years agoUnreviewed, fix tests on older Rubies.
fpizlo@apple.com [Sat, 5 Oct 2013 16:48:28 +0000 (16:48 +0000)]
Unreviewed, fix tests on older Rubies.

* Scripts/run-jsc-stress-tests:

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

6 years agoSource/WebKit2: Another attempt at fixing the Lion build.
andersca@apple.com [Sat, 5 Oct 2013 16:46:52 +0000 (16:46 +0000)]
Source/WebKit2: Another attempt at fixing the Lion build.

* Configurations/WebKit2.xcconfig:

Tools: Don't filter the weak symbols.

* Scripts/check-for-weak-vtables-and-externals:

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

6 years agoAttempt to fix the Lion build.
andersca@apple.com [Sat, 5 Oct 2013 16:32:12 +0000 (16:32 +0000)]
Attempt to fix the Lion build.

* Configurations/WebKit2.xcconfig:
Try unexporting one of the weak symbols for now. If this succeeds, I'll add the rest.

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

6 years agoHave run-javascriptcore-tests run JS LayoutTests using run-jsc-stress-tests so that...
fpizlo@apple.com [Sat, 5 Oct 2013 16:27:51 +0000 (16:27 +0000)]
Have run-javascriptcore-tests run JS LayoutTests using run-jsc-stress-tests so that it runs in parallel
https://bugs.webkit.org/show_bug.cgi?id=122376

Tools:

Reviewed by Mark Hahnenberg.

* Scripts/jsc-stress-test-helpers/layout-test-helper: Added.
* Scripts/run-javascriptcore-tests:
(printThingsFound):
* Scripts/run-jsc-stress-tests:

LayoutTests:

Reviewed by Mark Hahnenberg.

Add a yaml file describing which directories contain JS LayoutTests. run-jsc-stress-tests
will use this file.

* jsc-layout-tests.yaml: Added.

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

6 years agoUnreviewed, rolling out r156952.
commit-queue@webkit.org [Sat, 5 Oct 2013 15:55:28 +0000 (15:55 +0000)]
Unreviewed, rolling out r156952.
http://trac.webkit.org/changeset/156952
https://bugs.webkit.org/show_bug.cgi?id=122381

Made svg/custom/large-image-pattern-crash.html assert
(Requested by ap on #webkit).

* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::shouldPaintWithinRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paint):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):
* rendering/RenderBox.h:
* rendering/RenderElement.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderLineBreak.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paint):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
* rendering/RenderTableCol.h:
* rendering/RenderText.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paintCustomHighlight):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
* rendering/svg/SVGRenderingContext.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::rendererClipChild):
* svg/SVGUseElement.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):

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

6 years agoNeed to check if some HTML child elements are HTMLUnknownElement
darin@apple.com [Sat, 5 Oct 2013 15:01:59 +0000 (15:01 +0000)]
Need to check if some HTML child elements are HTMLUnknownElement
https://bugs.webkit.org/show_bug.cgi?id=120297

Reviewed by Andreas Kling.

Source/WebCore:

Test: fast/media/media-disable-crash.html

* dom/make_names.pl:
(printConstructorInterior): Added additional comments about the
wrapperOnlyIfMediaIsAvailable feature.
(printTypeHelpers): Added an isHTMLUnknownElement check to the check helper
functions for tags with the wrapperOnlyIfMediaIsAvailable feature.
(printWrapperFunctions): Instead of redoing the media player check and the
settings check, and possibly making a wrapper of the wrong type, call
isHTMUnknownElement, guaranteeing that the wrapper will match the element
it is wrapping.

* html/HTMLElement.h: Move HTMLElementTypeHelpers.h to the bottom of the
file so that functions from that file can be use the HTMLElement class and
other things defined in this file.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::paused): Added an assertion that made the regression
test reliably assert, rather than intermittently (for me, non-reproducibly) crash.

LayoutTests:

Based on a test written by Zan Dobersek <zdobersek@igalia.com>.

* fast/media/media-disable-crash-expected.txt: Added.
* fast/media/media-disable-crash.html: Added.

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

6 years agoMove paint() to RenderElement
antti@apple.com [Sat, 5 Oct 2013 11:58:30 +0000 (11:58 +0000)]
Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371

Reviewed by Darin Adler.

RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.

This also requires some type tightening elsewhere in the code.

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

6 years agoDoYouEvenBench: Add Facebook's React TodoMVC test case
rniwa@webkit.org [Sat, 5 Oct 2013 09:41:19 +0000 (09:41 +0000)]
DoYouEvenBench: Add Facebook's React TodoMVC test case
https://bugs.webkit.org/show_bug.cgi?id=122379

Reviewed by Andreas Kling.

Add React/TodoMVC as a new test case. Somehow we beat Firefox on this one as well.

* DoYouEvenBench/benchmark.html:
* DoYouEvenBench/todomvc/labs: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower.json: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/LICENSE: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/README.md: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/director.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/director.min.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/ender.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/JSXTransformer.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/bower.json: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/react.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/react.min.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.css: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/bg.png: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/index.html: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/app.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/footer.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/todoItem.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/utils.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/readme.md: Added.

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

6 years agoFix an assertion failure introduced in r156925.
rniwa@webkit.org [Sat, 5 Oct 2013 06:54:54 +0000 (06:54 +0000)]
Fix an assertion failure introduced in r156925.

Add HTMLImageElement to the document-wide map only if it's in the document.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):

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

6 years agoDon't preflight spell checker when calling -setContinuousSpellCheckingEnabled repeatedly
ap@apple.com [Sat, 5 Oct 2013 06:40:44 +0000 (06:40 +0000)]
Don't preflight spell checker when calling -setContinuousSpellCheckingEnabled repeatedly
https://bugs.webkit.org/show_bug.cgi?id=122329

Reviewed by Darin Adler.

* WebView/WebView.mm: (-[WebView setContinuousSpellCheckingEnabled:]): Don't do any
work if preference didn't change (continuousSpellCheckingEnabled is a static that
starts with false).

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

6 years agotext-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
darin@apple.com [Sat, 5 Oct 2013 06:38:33 +0000 (06:38 +0000)]
text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
https://bugs.webkit.org/show_bug.cgi?id=21312

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/text/text-transform-turkish-and-azeri.html

This patch covers text-transform: uppercase and text-transform: lowercase.
More changes will be needed to cover text-transform: capitalize.

* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchNode): Use String::upper instead of String::makeUpper.
* page/EventHandler.cpp:
(WebCore::findDropZone): Use String::lower instead of String::makeLower.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use String::upper instead of String::makeUpper.
* platform/network/blackberry/rss/RSS10Parser.cpp: [Seriously, how is an RSS parser
part of WebKit's networking layer? Where are the tests that cover this? Seems wrong
to have this code in the project.]
(WebCore::RSS10Parser::parseXmlDoc): Use lower instead of makeLower.
(WebCore::RSS10Parser::parseItem): Ditto.
(WebCore::RSS10Parser::parseFeed): Ditto.
* platform/network/blackberry/rss/RSS20Parser.cpp:
(WebCore::RSS20Parser::parseXmlDoc): Ditto.
(WebCore::RSS20Parser::parseItem): Ditto.
(WebCore::RSS20Parser::parseFeed): Ditto.
(WebCore::RSS20Parser::parseEnclosure): Ditto.
* platform/network/blackberry/rss/RSSAtomParser.cpp:
(WebCore::RSSAtomParser::parseXmlDoc): Ditto.
(WebCore::RSSAtomParser::parseItem): Ditto.
(WebCore::RSSAtomParser::parseFeed): Ditto.
(WebCore::RSSAtomParser::parseLink): Ditto.
(WebCore::RSSAtomParser::parseContent): Ditto.
(WebCore::RSSAtomParser::parseAuthor): Ditto.
(WebCore::RSSAtomParser::parseCategory): Ditto.
* platform/text/win/LocaleWin.cpp:
(WebCore::convertLocaleNameToLCID): Use String::lower instead of String::makeLower.
* rendering/RenderText.cpp:
(WebCore::applyTextTransform): Use String::upper and String::lower instead of
String::makeUpper and String::makeLower, and also pass in the locale to each.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Changed this so it doesn't call
upper just to return an already known string constant.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::doCommand): Use StringImpl::upper instead of
StringImpl::makeUpper.

Source/WTF:

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
(WTF::StringImpl::lower): Ditto.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.cpp:
(WTF::String::lower): Ditto.
(WTF::String::upper): Ditto.
* wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they
offer no advantages over the lower and upper functions. Also added a constructor that takes
a RefPtr<StringImpl> with move construction to help.

LayoutTests:

* fast/text/text-transform-turkish-and-azeri-expected.html: Added.
* fast/text/text-transform-turkish-and-azeri.html: Added.

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

6 years agoRoll out r156930 and r156937, they caused 34 assertion failures on bots.
ap@apple.com [Sat, 5 Oct 2013 06:32:05 +0000 (06:32 +0000)]
Roll out r156930 and r156937, they caused 34 assertion failures on bots.

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

6 years agoFramePolicyFunction should be an std::function
andersca@apple.com [Sat, 5 Oct 2013 04:52:04 +0000 (04:52 +0000)]
FramePolicyFunction should be an std::function
https://bugs.webkit.org/show_bug.cgi?id=122362

Reviewed by Darin Adler.

Source/WebCore:

This makes policy callback handling simpler inside WebKit.

* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
* loader/FrameLoaderClient.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):

Source/WebKit/efl:

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::callPolicyFunction):
(WebCore::FrameLoaderClientEfl::dispatchWillSubmitForm):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForResponse):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNewWindowAction):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
* WebCoreSupport/FrameLoaderClientEfl.h:

Source/WebKit/gtk:

* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchWillSubmitForm):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* WebCoreSupport/FrameLoaderClientGtk.h:
* webkit/webkitwebpolicydecision.cpp:
(webkit_web_policy_decision_use):
(webkit_web_policy_decision_ignore):
(webkit_web_policy_decision_download):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):

Source/WebKit/win:

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::receivedPolicyDecision):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):

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

6 years agoCTTE: IconController and IconLoader should have Frame& backpointer.
akling@apple.com [Sat, 5 Oct 2013 04:48:33 +0000 (04:48 +0000)]
CTTE: IconController and IconLoader should have Frame& backpointer.
<https://webkit.org/b/122372>

Reviewed by Anders Carlsson.

Also slap IconLoader with FINAL glove.

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

6 years agoUnreviewed EFL build fix after r156924
ryuan.choi@samsung.com [Sat, 5 Oct 2013 04:30:38 +0000 (04:30 +0000)]
Unreviewed EFL build fix after r156924

* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::platformInitialize):

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

6 years agoIt should be even easier to run and debug a failing JSC stress test
fpizlo@apple.com [Sat, 5 Oct 2013 04:24:04 +0000 (04:24 +0000)]
It should be even easier to run and debug a failing JSC stress test
https://bugs.webkit.org/show_bug.cgi?id=122337

Reviewed by Oliver Hunt.

If a test fails, you can now just say:

sh WebKitBuild/Debug/jsc-stress-results/regress/script-tests/emscripten-cube2hash.js.ftl-eager-no-cjit

and get the reproduction. You don't have to set any environment variables like before.
Also if you want to debug the failing test you can now just say:

sh WebKitBuild/Debug/jsc-stress-results/regress/script-tests/emscripten-cube2hash.js.ftl-eager-no-cjit lldb --

Broadly, any arguments passed to the reproduction script are prepended to the command to
run the test. This is sort of quirky and won't work for some tests (for example the
profiler tests run a ruby script that runs some other stuff) but it'll work for most of
them and that's good enough for now.

* Scripts/run-jsc-stress-tests:

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

6 years agoCTTE: RenderScrollbar DOM owner is always an Element.
akling@apple.com [Sat, 5 Oct 2013 03:50:42 +0000 (03:50 +0000)]
CTTE: RenderScrollbar DOM owner is always an Element.
<https://webkit.org/b/122348>

Reviewed by Antti Koivisto.

When RenderScrollbar is owned by a DOM node, it's always Element.
Tighten the code a bit with this knowledge.

Also marked the class FINAL and beat it with the OVERRIDE stick.

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

6 years agoTypingCommand helpers should take Document&.
akling@apple.com [Sat, 5 Oct 2013 03:34:51 +0000 (03:34 +0000)]
TypingCommand helpers should take Document&.
<https://webkit.org/b/122370>

Reviewed by Anders Carlsson.

Instead of taking a Document* and immediately asserting that it's
non-null, just take Document&.

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

6 years agoUse more references instead of pointers in DocumentOrderedMap
rniwa@webkit.org [Sat, 5 Oct 2013 02:59:02 +0000 (02:59 +0000)]
Use more references instead of pointers in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=122368

Reviewed by Andreas Kling.

Use AtomicStringImpl& instead of AtomicString* or AtomicString& to eliminate
assertions and nullity checks.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap):
(WebCore::Document::removeImageElementByLowercasedUsemap):
(WebCore::Document::imageElementByLowercasedUsemap):
* dom/Document.h:
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLowercasedUsemap):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* dom/Element.cpp:
(WebCore::Element::updateNameForTreeScope):
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForTreeScope):
(WebCore::Element::updateIdForDocument):
(WebCore::Element::updateLabel):
* dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* dom/IdTargetObserverRegistry.h:
(WebCore::IdTargetObserverRegistry::notifyObservers):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById):
(WebCore::TreeScope::getAllElementsById):
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::removeElementById):
(WebCore::TreeScope::getElementByName):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::removeElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::removeImageMap):
(WebCore::TreeScope::getImageMap):
(WebCore::TreeScope::addLabel):
(WebCore::TreeScope::removeLabel):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
(WebCore::TreeScope::hasElementWithId):
(WebCore::TreeScope::containsMultipleElementsWithId):
(WebCore::TreeScope::hasElementWithName):
(WebCore::TreeScope::containsMultipleElementsWithName):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItem):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem):
(WebCore::HTMLDocument::removeDocumentNamedItem):
(WebCore::HTMLDocument::addWindowNamedItem):
(WebCore::HTMLDocument::removeWindowNamedItem):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItem):
(WebCore::HTMLDocument::hasDocumentNamedItem):
(WebCore::HTMLDocument::documentNamedItemContainsMultipleElements):
(WebCore::HTMLDocument::windowNamedItem):
(WebCore::HTMLDocument::hasWindowNamedItem):
(WebCore::HTMLDocument::windowNamedItemContainsMultipleElements):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::parseAttribute):
(WebCore::HTMLMapElement::insertedInto):
(WebCore::HTMLMapElement::removedFrom):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):

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

6 years agoCTTE: PolicyChecker backpointer to Frame should be a reference.
akling@apple.com [Sat, 5 Oct 2013 02:06:33 +0000 (02:06 +0000)]
CTTE: PolicyChecker backpointer to Frame should be a reference.
<https://webkit.org/b/122354>

Reviewed by Anders Carlsson.

PolicyChecker is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.

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

6 years agoEditor should use reference-getting document() internally.
akling@apple.com [Sat, 5 Oct 2013 01:06:19 +0000 (01:06 +0000)]
Editor should use reference-getting document() internally.
<https://webkit.org/b/122364>

Reviewed by Darin Adler.

Instead of grabbing at Editor::m_frame.document(), use the nice
Editor::document() helper that always returns a Document&.

Calling Editor methods on a Frame's editor() while there is no
Document in the Frame is a programming error and this is covered
by an assertion in document().

This removes a bunch of null checks and enables further cleanup.

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

6 years agoTry to fix the Windows build after r156930.
mrobinson@webkit.org [Sat, 5 Oct 2013 01:03:44 +0000 (01:03 +0000)]
Try to fix the Windows build after r156930.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paintCharacter): Use ceilf and floorf to avoid issues
with overload collisions and implicit casts of LayoutUnits.

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

6 years agoChange ScriptDebugServer to use DebuggerCallFrame instead of JavaScriptCallFrame.
mark.lam@apple.com [Sat, 5 Oct 2013 00:51:31 +0000 (00:51 +0000)]
Change ScriptDebugServer to use DebuggerCallFrame instead of JavaScriptCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121969.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
   DebuggerCallFrame now tracks whether it is valid instead of needing
   JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
   just before it pauses and calls back to its client, and then invalidates
   it immediately when the callback returns. Every subsequent callback to
   the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
   it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
   it is needed i.e. when the client calls callerFrame(). Similarly,
   JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
   instead of the entire DebuggerCallFrame because that is all that is
   needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.

* debugger/Debugger.cpp:
* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::callerFrame):
(JSC::DebuggerCallFrame::dynamicGlobalObject):
(JSC::DebuggerCallFrame::sourceId):
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::type):
(JSC::DebuggerCallFrame::thisValue):
(JSC::DebuggerCallFrame::evaluate):
(JSC::DebuggerCallFrame::evaluateWithCallFrame):
(JSC::DebuggerCallFrame::invalidate):
(JSC::DebuggerCallFrame::positionForCallFrame):
(JSC::DebuggerCallFrame::sourceIdForCallFrame):
(JSC::DebuggerCallFrame::thisValueForCallFrame):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::create):
(JSC::DebuggerCallFrame::exec):
(JSC::DebuggerCallFrame::line):
(JSC::DebuggerCallFrame::column):
(JSC::DebuggerCallFrame::position):
(JSC::DebuggerCallFrame::isValid):
* interpreter/StackVisitor.cpp:

Source/WebCore:

Tests: inspector-protocol/debugger/call-frame-function-name.html
       inspector-protocol/debugger/call-frame-this-host.html
       inspector-protocol/debugger/call-frame-this-nonstrict.html
       inspector-protocol/debugger/call-frame-this-strict.html

1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
   DebuggerCallFrame now tracks whether it is valid instead of needing
   JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
   just before it pauses and calls back to its client, and then invalidates
   it immediately when the callback returns. Every subsequent callback to
   the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
   it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
   it is needed i.e. when the client calls callerFrame(). Similarly,
   JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
   instead of the entire DebuggerCallFrame because that is all that is
   needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.

* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::thisObject):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
(WebCore::JavaScriptCallFrame::caller):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::functionName):
(WebCore::JavaScriptCallFrame::type):
(WebCore::JavaScriptCallFrame::scopeChain):
(WebCore::JavaScriptCallFrame::dynamicGlobalObject):
(WebCore::JavaScriptCallFrame::thisValue):
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::DebuggerCallFrameScope::DebuggerCallFrameScope):
(WebCore::DebuggerCallFrameScope::~DebuggerCallFrameScope):
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
(WebCore::ScriptDebugServer::breakProgram):
(WebCore::ScriptDebugServer::stepOverStatement):
(WebCore::ScriptDebugServer::stepOutOfFunction):
(WebCore::ScriptDebugServer::currentDebuggerCallFrame):
(WebCore::ScriptDebugServer::dispatchDidPause):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::pauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):

Source/WebKit/mac:

1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
   DebuggerCallFrame now tracks whether it is valid instead of needing
   JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
   just before it pauses and calls back to its client, and then invalidates
   it immediately when the callback returns. Every subsequent callback to
   the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
   it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
   it is needed i.e. when the client calls callerFrame(). Similarly,
   JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
   instead of the entire DebuggerCallFrame because that is all that is
   needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.

* WebView/WebScriptDebugDelegate.mm:
(-[WebScriptCallFramePrivate dealloc]):
(-[WebScriptCallFrame _initWithGlobalObject:functionName:exceptionValue:JSC::]):
(-[WebScriptCallFrame functionName]):
(-[WebScriptCallFrame exception]):
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::exception):

LayoutTests:

* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):
* inspector-protocol/debugger/call-frame-function-name-expected.txt: Added.
* inspector-protocol/debugger/call-frame-function-name.html: Added.
* inspector-protocol/debugger/call-frame-this-host-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-host.html: Added.
* inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-nonstrict.html: Added.
* inspector-protocol/debugger/call-frame-this-strict-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-strict.html: Added.
* inspector/debugger/pause-in-internal-script-expected.txt:

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

6 years agoRemove Qt definitions from Platform.h
bfulgham@apple.com [Sat, 5 Oct 2013 00:40:52 +0000 (00:40 +0000)]
Remove Qt definitions from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=122349

Reviewed by Anders Carlsson.

* wtf/Platform.h: Remove unused PLATFORM(QT) stanzas from file.

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

6 years agoSilence compiler warning when building 64-bit (on Windows)
bfulgham@apple.com [Sat, 5 Oct 2013 00:40:09 +0000 (00:40 +0000)]
Silence compiler warning when building 64-bit (on Windows)

Reviewed by Geoffrey Garen.

* jit/JSInterfaceJIT.h: Add a static cast for assignment.

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

6 years ago[Win] Turn off FastMalloc on Windows
bfulgham@apple.com [Sat, 5 Oct 2013 00:35:16 +0000 (00:35 +0000)]
[Win] Turn off FastMalloc on Windows
https://bugs.webkit.org/show_bug.cgi?id=122352

Reviewed by Darin Adler.

* wtf/Platform.h: Enable USE_SYSTEM_MALLOC when building on
Windows to stick to the MSVCRT allocator/deallocator.

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

6 years agoRef-ify more stack guards.
akling@apple.com [Sat, 5 Oct 2013 00:35:12 +0000 (00:35 +0000)]
Ref-ify more stack guards.
<https://webkit.org/b/122360>

Reviewed by Anders Carlsson.

Make another pass turning RefPtr<T> into Ref<T> where possible.

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

6 years agoRemove WTF smart pointers 'const_pointer_cast'
mikhail.pozdnyakov@intel.com [Sat, 5 Oct 2013 00:26:12 +0000 (00:26 +0000)]
Remove WTF smart pointers 'const_pointer_cast'
https://bugs.webkit.org/show_bug.cgi?id=122325

Reviewed by Darin Adler.

Removed WTF smart pointers 'const_pointer_cast' functions as:
- they were not used
- their implementation was wrong as they tried to cast to a different pointer type

* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
* wtf/RefPtr.h:

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

6 years ago[MathML] Remove RenderTree modification during layout and refactor the StretchyOp...
mrobinson@webkit.org [Sat, 5 Oct 2013 00:08:08 +0000 (00:08 +0000)]
[MathML] Remove RenderTree modification during layout and refactor the StretchyOp code
https://bugs.webkit.org/show_bug.cgi?id=121416

Source/WebCore:

Reviewed by David Hyatt.

Tests: mathml/presentation/mo-minus.html
       mathml/presentation/mo-stacked-glyphs.html
       mathml/presentation/mo-stretchy-vertical-bar.html
       mathml/very-large-stretchy-operators.html

MathML stretched operators by both modifying the width of the operator
and adding children to the operator node in the render tree.

Instead we make the operator width equal to the widest glyph possible that we use
to represent the operator.  Additionally instead of rendering stretchy glyphs via
stacked operator pieces in separate render tree nodes, keep only one node for the
glyph, and use a custom paint method to paint the stacked representation.

With this patch, rendering seems roughly equivalent on Mac and markedly better
on Linux.

* css/mathml.css:
Not sure what this line-height:0 was here for, but it caused bugs with the new code

* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::attach):
(WebCore):
(WebCore::MathMLTextElement::childrenChanged):
Need to update the anonymous render tree below <mo> elements when their
children change or when the renderer is first attached.

* mathml/MathMLTextElement.h:
(MathMLTextElement):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
Now that the preferred width doesn't depend on the height, we don't
need to override computePreferredLogicalWidths at all.

* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::styleDidChange):
Need to update the anonymous renderers for the anonymous RenderMathMLOperators.

* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::expandedStretchHeight):
Store the non-expanded stretch height so that we can detect when the height
actually changed.

(WebCore::RenderMathMLOperator::stretchToHeight):
Only update the style on the anonymous render tree since this is called
from RenderMathMLRow::layout

(WebCore::RenderMathMLOperator::styleDidChange):
(WebCore::RenderMathMLOperator::glyphBoundsForCharacter): A helper to get glyph boundaries.
(WebCore::RenderMathMLOperator::glyphHeightForCharacter): Ditto for glyph width.
(WebCore::RenderMathMLOperator::advanceForCharacter): The advance is different from the width,
and we want the width of the operator to be the advance instead of the tight bounding width.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the max of all possible glyphs
we can use to render this operator.
(WebCore::RenderMathMLOperator::updateFromElement): We add a child for rendering the non-scaled
version of the glyph.
(WebCore::RenderMathMLOperator::firstCharacterForStretching): Helper to figure out what character
is the character used for stretching operations.
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): Helper to find an acceptable set
of glyph pieces for stretching characters.
(WebCore::RenderMathMLOperator::updateStyle): Resize the operator to the appropriate height and hide
the child if we are using the stretchy style.
(WebCore::RenderMathMLOperator::firstLineBoxBaseline):
(WebCore::RenderMathMLOperator::paintCharacter): Helper to paint a single character component of the
stretchy glyph.
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Helper to paint the extender glue between
features of the stretchy glyph.
(WebCore::RenderMathMLOperator::paint): Properly paint stretchy glyphs.
* rendering/mathml/RenderMathMLOperator.h: Update method declarations.

LayoutTests:

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-10-04
Reviewed by David Hyatt.

Add some reftests for stretchy operators.

* TestExpectations: The remaining MathML pixel tests are broken by this patch.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* mathml/presentation/mo-minus.html: Added.
* mathml/presentation/mo-stacked-glyphs-expected.html: Added.
* mathml/presentation/mo-stacked-glyphs.html: Added.
* mathml/presentation/mo-stretchy-vertical-bar-expected-mismatch.html: Added.
* mathml/presentation/mo-stretchy-vertical-bar.html: Added.
* mathml/very-large-stretchy-operators-expected.txt: Added.
* mathml/very-large-stretchy-operators.html: Added.

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

6 years agoBuild fix after r156925. It collided with r156903.
rniwa@webkit.org [Sat, 5 Oct 2013 00:00:03 +0000 (00:00 +0000)]
Build fix after r156925. It collided with r156903.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):

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

6 years ago[Windows] Correct run-path when using 64-bit binaries.
bfulgham@apple.com [Fri, 4 Oct 2013 23:58:37 +0000 (23:58 +0000)]
[Windows] Correct run-path when using 64-bit binaries.

Reviewed by David Kilzer.

* Scripts/webkitdirs.pm:
(determineConfigurationProductDir): If running in 64-bit mode, use the 'bin64'
directory. Otherwise use the existing 'bin32' directory.

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

6 years agoClean out some FrameLoaderClient hooks that no ports were using.
akling@apple.com [Fri, 4 Oct 2013 23:47:57 +0000 (23:47 +0000)]
Clean out some FrameLoaderClient hooks that no ports were using.
<https://webkit.org/b/122356>

Reviewed by Anders Carlsson.

Removed the following hooks that were leftovers from dead ports:

    - didExhaustMemoryAvailableForScript
    - didNotAllowScript
    - didNotAllowPlugins
    - willCheckAndDispatchMessageEvent
    - didChangeName
    - dispatchWillInsertBody
    - dispatchDidChangeResourcePriority

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

6 years agoTeach webkitdirs.pm to honor the --64-bit flag
bfulgham@apple.com [Fri, 4 Oct 2013 23:34:28 +0000 (23:34 +0000)]
Teach webkitdirs.pm to honor the --64-bit flag
https://bugs.webkit.org/show_bug.cgi?id=122357

Reviewed by David Kilzer.

* Scripts/webkitdirs.pm:
(argumentsForConfiguration): Modify to check if --64-bit is supplied
by the user.
(findMatchingArguments): Added.
(hasArgument): Added.
(checkForArgumentAndRemoveFromArrayRef): Refactor to use the new
findMatchingArguments subroutine.

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

6 years agoFocusController::advanceFocus spends a lot of time in HTMLMapElement::imageElement
rniwa@webkit.org [Fri, 4 Oct 2013 23:33:10 +0000 (23:33 +0000)]
FocusController::advanceFocus spends a lot of time in HTMLMapElement::imageElement
https://bugs.webkit.org/show_bug.cgi?id=122313

Reviewed by Andreas Kling.

The bug was caused by HTMLMapElement::imageElement traversing the entire document to look for
the image element associated with a given map element. Because HTMLCollection used to find the
image element is not cached, it traversed the entire document on every area element we visit,
resulting in O(n^2) behavior.

Fixed the bug by adding the name-to-image-element map on document to avoid the traversal in
HTMLMapElement::imageElement.

* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap): Added.
(WebCore::Document::removeImageElementByLowercasedUsemap): Added.
(WebCore::Document::imageElementByLowercasedUsemap): Added.

* dom/Document.h: Added m_imagesByUsemap.

* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLowercasedUsemap): Added.
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap): Added.

* dom/DocumentOrderedMap.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Update the name-to-usemap map. The code to parse
the usemap attribute and strip # was moved from HTMLMapElement::imageElement.
(WebCore::HTMLImageElement::insertedInto): Ditto.
(WebCore::HTMLImageElement::removedFrom): Ditto.
(WebCore::HTMLImageElement::matchesLowercasedUsemap): Added; called by DocumentOrderedMap.

* html/HTMLImageElement.h:

* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement): Call Document::imageElementByUsemap instead of
looking through all image elements in the document.

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

6 years ago../WebCore: Unify rubberband control
weinig@apple.com [Fri, 4 Oct 2013 23:25:55 +0000 (23:25 +0000)]
../WebCore: Unify rubberband control
https://bugs.webkit.org/show_bug.cgi?id=122341

Reviewed by Tim Horton.

- Consolidates the two ways we were passing state about whether
  to rubber-band on a particular edge down to one.

* WebCore.exp.in:
* page/Page.cpp:
* page/Page.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::isRubberBandInProgress):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::rubberBandsAtLeft):
(WebCore::ScrollingTree::rubberBandsAtRight):
(WebCore::ScrollingTree::rubberBandsAtBottom):
(WebCore::ScrollingTree::rubberBandsAtTop):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):

../WebKit2: Unify rubber-band control
https://bugs.webkit.org/show_bug.cgi?id=122341

Reviewed by Tim Horton.

- Consolidates the two ways we were passing state about whether
  to rubber-band on a particular edge down to one.
- Adds SPI to control whether you can rubber band on the left
  or right edge.
- Add a linked-on-or-after check to control whether we use the
  legacy implicit rubber band control based on back/forward.

* UIProcess/API/C/WKPage.cpp:
(WKPageRubberBandsAtLeft):
(WKPageSetRubberBandsAtLeft):
(WKPageRubberBandsAtRight):
(WKPageSetRubberBandsAtRight):
(WKPageRubberBandsAtBottom):
(WKPageSetRubberBandsAtBottom):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::rubberBandsAtLeft):
(WebKit::WebPageProxy::setRubberBandsAtLeft):
(WebKit::WebPageProxy::rubberBandsAtRight):
(WebKit::WebPageProxy::setRubberBandsAtRight):
(WebKit::WebPageProxy::rubberBandsAtTop):
(WebKit::WebPageProxy::setRubberBandsAtTop):
(WebKit::WebPageProxy::rubberBandsAtBottom):
(WebKit::WebPageProxy::setRubberBandsAtBottom):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::shouldUseLegacyImplicitRubberBandControl):
(WebKit::WebPageProxy::platformInitialize):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

6 years agoWeb Inspector: pressing the Cmd key over a CSS property should underline it immediate...
graouts@apple.com [Fri, 4 Oct 2013 23:01:50 +0000 (23:01 +0000)]
Web Inspector: pressing the Cmd key over a CSS property should underline it immediately (jump to definition mode)
https://bugs.webkit.org/show_bug.cgi?id=119012

Reviewed by Joseph Pecoraro.

We add an "enabled" state to the tokenTrackingController to indicate that we're interested
in tracking hovered tokens. The tokenTrackingController is now only enabled in the
CSSStyleDeclarationTextEditor when the Cmd key is pressed and in the SourceCodeTextEditor
when either the Cmd key is pressed (NonSymbolTokens mode) or when the debugger is paused
(JavaScriptExpression mode).

The tokenTrackingController is now smarter about how it tracks mouse events when it's enabled,
tracking "mouseenter" and "mouseleave" events to enable tracking allowing immediate detection of
tokens being hovered or no longer being hovered even with quick mouse movements. Additioanlly,
using the new top-level mouse coordinates tracking, we can detect a hovered token as soon as
it's being enabled to provide instant feedback to the user.

This new top-level mouse coordinates tracking couple with tracking of modifier keys also fixes
http://webkit.org/b/119011.

* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
Highlight the last known hovered candidate's range as soon as the Cmd key is pressed and enable
the tokenTrackingController if we're dealing with a non-read-only editor. When the Cmd key is
released, disable the tokenTrackingController.

* UserInterface/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get enabled):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set enabled):
New enabled state for the tokenTrackingController which indicates whether it should be tracking
mouse events to track hovered tokens in the editor. Upon being enabled, the tokenTrackingController
looks up the mouse coordinates continuously tracked at the window level to check for a token
at the last known mouse coordinates in case we're already over a token that may be highlighted.

(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightLastHoveredRange):
New public method allowing to highlight the last know candidate range, if any. This is used from
editor code when the Cmd key is pressed and we want to force the last know candidate to be
highlighted.

(WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking):
Make these two methods private now that they're automatically called by the "mouseenter" and
"mouseleave" event handling when we're in the "enabled" state. Additionally, the public
"tracking" property has been removed since it is no longer useful to the developer.

(WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseEntered):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseLeft):
New handlers for the "mouseenter" and "mouseleave" events enabling tracking of hovered tokens.

(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
Refactor _mouseMovedOverEditor() into two methods with the new _updateHoveredTokenInfo()
allowing to customize the mouse coordinates to be used since we may call
_updateHoveredTokenInfo() outside of the context of a mouse event (ie. a keypress event).

(WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
(WebInspector.CodeMirrorTokenTrackingController.prototype._resetTrackingStates):
New private method combining all the various states that need to be reset when tracking
is turned off, including the removal of the highlighted range if any. This is now called
when the window loses focus.

* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector._mouseMoved):
Add a new window-level "mousemove" event handler to always track mouse coordinates and key modifier
states. This ensures that we may have the most accurate information possible for key modifiers and
allow code to query the last recorded mouse position in situations where it wouldn't be possible
to have dealt with a mouse event, as is the case when the tokenTrackingController just started tracking.

* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerEnabled):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
Update the "enabled" state on the tokenTrackingController when it may have changed based
on those two conditions: we should have either an active debugger call frame or the
Cmd key should have been pressed. This ensures we only track hovered tokens as needed.

(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
Highlight the last known hovered candidate's range as soon as the Cmd key is pressed.

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

6 years agoCTTE: SubframeLoader backpointer to Frame should be a reference.
akling@apple.com [Fri, 4 Oct 2013 22:49:40 +0000 (22:49 +0000)]
CTTE: SubframeLoader backpointer to Frame should be a reference.
<https://webkit.org/b/122350>

Reviewed by Anders Carlsson.

SubframeLoader is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.

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

6 years agoRemove some unneeded code from WidgetMac
andersca@apple.com [Fri, 4 Oct 2013 22:46:15 +0000 (22:46 +0000)]
Remove some unneeded code from WidgetMac
https://bugs.webkit.org/show_bug.cgi?id=122355

Reviewed by Dan Bernstein.

Source/WebCore:

Remove code to manage the visible rect, it's not needed anymore.

* platform/Widget.h:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::~Widget):
(WebCore::Widget::setFrameRect):
(WebCore::Widget::setPlatformWidget):

Source/WebKit/mac:

Remove code to handle the visible rect changing, it's not needed anymore since we always put Netscape plug-ins into their own layers now.

* Plugins/Hosted/WebHostedNetscapePluginView.mm:
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:

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

6 years agoUpdate all the tests, and include new file.
oliver@apple.com [Fri, 4 Oct 2013 22:45:37 +0000 (22:45 +0000)]
Update all the tests, and include new file.

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

6 years agoFTL: Add support for ValueToInt32(bool(x))
commit-queue@webkit.org [Fri, 4 Oct 2013 22:45:09 +0000 (22:45 +0000)]
FTL: Add support for ValueToInt32(bool(x))
https://bugs.webkit.org/show_bug.cgi?id=122346

Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-04
Reviewed by Geoffrey Garen.

* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileValueToInt32):

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

6 years ago[iOS] Upstream disk image cache
dbates@webkit.org [Fri, 4 Oct 2013 22:41:11 +0000 (22:41 +0000)]
[iOS] Upstream disk image cache
https://bugs.webkit.org/show_bug.cgi?id=121985

Reviewed by Joseph Pecoraro.

Source/WebCore:

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::isUsingDiskImageCache):
* loader/ResourceBuffer.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::canUseDiskImageCache): Added.
(WebCore::CachedImage::useDiskImageCache): Added.
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::isSafeToMakePurgeable):
(WebCore::CachedResource::isUsingDiskImageCache): Added.
* loader/cache/CachedResource.h:
(WebCore::CachedResource::canUseDiskImageCache): Added.
(WebCore::CachedResource::useDiskImageCache): Added.
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::flushCachedImagesToDisk): Added.
(WebCore::MemoryCache::TypeStatistic::addResource):
(WebCore::MemoryCache::dumpStats):
(WebCore::MemoryCache::dumpLRULists):
* loader/cache/MemoryCache.h:
(WebCore::MemoryCache::TypeStatistic::TypeStatistic):
* loader/ios/DiskImageCacheClientIOS.h: Added.
* loader/ios/DiskImageCacheIOS.h: Added.
* loader/ios/DiskImageCacheIOS.mm: Added.
* platform/Logging.h:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::SharedBuffer):
(WebCore::SharedBuffer::~SharedBuffer):
(WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Added.
(WebCore::SharedBuffer::allowToBeMemoryMapped): Added.
(WebCore::SharedBuffer::failedMemoryMap): Added.
(WebCore::SharedBuffer::markAsMemoryMapped): Added.
(WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Added.
(WebCore::SharedBuffer::memoryMappedNotificationCallback): Added.
(WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Added.
(WebCore::SharedBuffer::data):
(WebCore::SharedBuffer::append):
(WebCore::SharedBuffer::buffer):
(WebCore::SharedBuffer::getSomeData):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::isMemoryMapped): Added.
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::SharedBuffer):

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:
* ios/WebCoreSupport/WebDiskImageCacheClientIOS.h: Added.
* ios/WebCoreSupport/WebDiskImageCacheClientIOS.mm: Added.

Source/WebKit/mac:

* Misc/WebCache.mm:
(+[WebCache statistics]):
* WebView/WebDataSource.mm:
(BufferMemoryMapped): Added.
(-[WebDataSource _setAllowToBeMemoryMapped]): Added.
(-[WebDataSource setDataSourceDelegate:]): Added.
(-[WebDataSource dataSourceDelegate]): Added.
(-[WebDataSource dealloc]):
* WebView/WebDataSourcePrivate.h: Declared private delegate
protocol, WebDataSourcePrivateDelegate.
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences diskImageCacheEnabled]): Added.
(-[WebPreferences setDiskImageCacheEnabled:]): Added.
(-[WebPreferences diskImageCacheMinimumImageSize]): Added.
(-[WebPreferences setDiskImageCacheMinimumImageSize:]): Added.
(-[WebPreferences diskImageCacheMaximumCacheSize]): Added.
(-[WebPreferences setDiskImageCacheMaximumCacheSize:]): Added.
(-[WebPreferences _diskImageCacheSavedCacheDirectory]): Added.
(-[WebPreferences _setDiskImageCacheSavedCacheDirectory:]): Added.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView _preferencesChanged:]):

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

6 years agoUpdate svn-config for new Visual Studio extensions
ap@apple.com [Fri, 4 Oct 2013 22:25:25 +0000 (22:25 +0000)]
Update svn-config for new Visual Studio extensions
https://bugs.webkit.org/show_bug.cgi?id=122344

Reviewed by Brent Fulgham.

* svn-config: Add new Visual Studio extensions.

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

6 years ago[CSS Shapes] Basic shapes should be animatable for shape-outside
betravis@adobe.com [Fri, 4 Oct 2013 22:25:20 +0000 (22:25 +0000)]
[CSS Shapes] Basic shapes should be animatable for shape-outside
https://bugs.webkit.org/show_bug.cgi?id=122343

Reviewed by Dirk Schulze.

Source/WebCore:

Test: fast/shapes/shape-outside-floats/shape-outside-animation.html

Add shape outside to the list of animatable properties. The infrastructure
is already in place for animating basic shapes on shape-inside and clipping
paths. See https://bugs.webkit.org/show_bug.cgi?id=101854.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

LayoutTests:

Add tests checking that shape-outside basic shape values correctly tween
between values.

* animations/resources/animation-test-helpers.js:
(getPropertyValue): Add shape-outside to list of properties that do not parse
with the default behavior.
(comparePropertyValue): Compare shape-outsides after parsing their shape notation.
* fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt: Added.
* fast/shapes/shape-outside-floats/shape-outside-animation.html: Added.

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

6 years agoTighten typing in some RenderLayer code.
akling@apple.com [Fri, 4 Oct 2013 22:22:00 +0000 (22:22 +0000)]
Tighten typing in some RenderLayer code.
<https://webkit.org/b/122342>

Reviewed by Antti Koivisto.

Use tighter types instead of Node and RenderObject inside RenderLayer
where applicable.

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

6 years ago[CSS Regions] Layout Tests for selecting text in 2 regions for other writing modes
rego@igalia.com [Fri, 4 Oct 2013 21:59:32 +0000 (21:59 +0000)]
[CSS Regions] Layout Tests for selecting text in 2 regions for other writing modes
https://bugs.webkit.org/show_bug.cgi?id=122327

Reviewed by Alexandru Chiculita.

Add versions for other writing modes (horizontal-bt, vertical-lr and
vertical-rl) for test
fast/regions/selection/selecting-text-in-2-regions.html.

* fast/regions/resources/helper.js:
(selectContentByIdsVert): Add new method when selecting context in a
vertical writing mode.
* fast/regions/resources/region-style.css: Add some new CSS classes for
vertical writing mode.
* fast/regions/selection/selecting-text-in-2-regions-horiz-bt-expected.html:
Added.
* fast/regions/selection/selecting-text-in-2-regions-horiz-bt.html:
Added.
* fast/regions/selection/selecting-text-in-2-regions-vert-lr-expected.html:
Added.
* fast/regions/selection/selecting-text-in-2-regions-vert-lr.html:
Added.
* fast/regions/selection/selecting-text-in-2-regions-vert-rl-expected.html:
Added.
* fast/regions/selection/selecting-text-in-2-regions-vert-rl.html:
Added.

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

6 years agoBuild fix.
oliver@apple.com [Fri, 4 Oct 2013 21:52:29 +0000 (21:52 +0000)]
Build fix.

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

6 years agoInserting a JS generated keyframe animation shouldn't trigger a whole document style...
commit-queue@webkit.org [Fri, 4 Oct 2013 20:46:57 +0000 (20:46 +0000)]
Inserting a JS generated keyframe animation shouldn't trigger a whole document style recalc
https://bugs.webkit.org/show_bug.cgi?id=119479

Patch by Ralph Thomas <ralpht@gmail.com> on 2013-10-04
Reviewed by Antti Koivisto.

Change CSSStyleSheet::didMutateRules to not invalidate all node's styles when inserting a
@-webkit-keyframes rule, and to instead insert the rule directly into the StyleResolver.

Test: animation/keyframes-dynamic.html: adds and removes keyframe rules using JavaScript and
validates that the correct elements are animated.

* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::didMutateRules):
(WebCore::CSSStyleSheet::insertRule):
* css/CSSStyleSheet.h:

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

6 years agoMade WinLauncher have better error handling, crash reporting, and modifiability.
commit-queue@webkit.org [Fri, 4 Oct 2013 20:37:53 +0000 (20:37 +0000)]
Made WinLauncher have better error handling, crash reporting, and modifiability.
https://bugs.webkit.org/show_bug.cgi?id=122319

Patch by Alex Christensen <achristensen@webkit.org> on 2013-10-04
Reviewed by Brent Fulgham.

* WinLauncher/WinLauncher.cpp:
(WinLauncherWebHost::didFailProvisionalLoadWithError):
Don't display the numerous "Cancelled" messages that are obviously from the user.
(createCrashReport): Added.
(dllLauncherEntryPoint):
Made main loop back into while loop and write a crash report if it crashes.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
* WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters:
Added WinLauncherReplace.h.
* WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props:
Added linking to DbgHelp.lib.
* WinLauncher/WinLauncherReplace.h:
Added to make modifying WinLauncher behaviour and appearance easy.
(processCrashDump): Added.

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

6 years agoSupport for-of syntax
oliver@apple.com [Fri, 4 Oct 2013 20:35:24 +0000 (20:35 +0000)]
Support for-of syntax
https://bugs.webkit.org/show_bug.cgi?id=122339

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for for-of syntax to JSC.  As part of doing this I had to make
us support unique empty strings as identifiers.  In a follow on patch i'm
going to remove the distinction entirely as it's purely a complicating
separation.

Otherwise the logic here is fairly self-explanatory.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::addConstant):
(JSC::BytecodeGenerator::emitCall):
* bytecompiler/BytecodeGenerator.h:
* bytecompiler/NodesCodegen.cpp:
(JSC::CallArguments::CallArguments):
(JSC::ForOfNode::emitBytecode):
* jit/JITOperations.cpp:
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createForOfLoop):
* parser/NodeConstructors.h:
(JSC::EnumerationNode::EnumerationNode):
(JSC::ForInNode::ForInNode):
(JSC::ForOfNode::ForOfNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::::parseVarDeclarationList):
(JSC::::parseForStatement):
* parser/Parser.h:
(JSC::Parser::isofToken):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createForOfLoop):
* runtime/ArrayIteratorPrototype.cpp:
(JSC::ArrayIteratorPrototype::finishCreation):
(JSC::arrayIteratorPrototypeIterate):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::create):
(JSC::ArrayPrototype::finishCreation):
* runtime/ArrayPrototype.h:
* runtime/CommonIdentifiers.cpp:
(JSC::CommonIdentifiers::CommonIdentifiers):
* runtime/CommonIdentifiers.h:
* runtime/Identifier.h:
(JSC::Identifier::from):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::dumpInContext):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectNativeFunction):
* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):
* runtime/PropertyName.h:
(JSC::PropertyName::PropertyName):

Source/WTF:

Update assertions and add a helper function to StringImpl
to save repeated unique or identifier calls.

* wtf/text/StringImpl.h:
(WTF::StringImpl::isIdentifierOrUnique):
(WTF::StringImpl::setIsIdentifier):
(WTF::StringImpl::setIsAtomic):

LayoutTests:

Add test cases for the one type that supports for-of so far

* js/basic-for-of-expected.txt: Added.
* js/basic-for-of.html: Added.
* js/regress/for-of-iterate-array-entries.html: Added.
* js/regress/for-of-iterate-array-keys.html: Added.
* js/regress/for-of-iterate-array-values.html: Added.
* js/regress/script-tests/for-of-iterate-array-entries.js: Added.
(foo):
* js/regress/script-tests/for-of-iterate-array-keys.js: Added.
(foo):
* js/regress/script-tests/for-of-iterate-array-values.js: Added.
(foo):

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/fileapi/ with the OperationsNot...
zandobersek@gmail.com [Fri, 4 Oct 2013 20:33:41 +0000 (20:33 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/fileapi/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122275

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/fileapi/.

* fileapi/Blob.idl:
* fileapi/FileException.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/dom/ with the OperationsNotDele...
zandobersek@gmail.com [Fri, 4 Oct 2013 20:31:17 +0000 (20:31 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/dom/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122271

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/dom/.

* dom/CharacterData.idl:
* dom/ChildNode.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMCoreException.idl:
* dom/DOMImplementation.idl:
* dom/DOMNamedFlowCollection.idl:
* dom/DOMStringList.idl:
* dom/DOMStringMap.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventException.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/MutationObserver.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeIterator.idl:
* dom/NodeList.idl:
* dom/Range.idl:
* dom/RangeException.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/TreeWalker.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/xml/ with the OperationsNotDele...
zandobersek@gmail.com [Fri, 4 Oct 2013 20:22:34 +0000 (20:22 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/xml/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122269

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/xml/.

* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestException.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathException.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:

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

6 years agoFTL::OSRExit::convertToForward() shouldn't misuse Operands<>::operator[]
msaboff@apple.com [Fri, 4 Oct 2013 19:36:12 +0000 (19:36 +0000)]
FTL::OSRExit::convertToForward() shouldn't misuse Operands<>::operator[]
https://bugs.webkit.org/show_bug.cgi?id=122336

Reviewed by Geoffrey Garen.

Changed code in change set r156900 to use the operand() accessor instead of operator[].

* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExit::convertToForward):

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

6 years ago[CSS Shapes] Shape Outside should relayout when set dynamically
betravis@adobe.com [Fri, 4 Oct 2013 19:31:01 +0000 (19:31 +0000)]
[CSS Shapes] Shape Outside should relayout when set dynamically
https://bugs.webkit.org/show_bug.cgi?id=122197

Reviewed by Alexandru Chiculita.

Source/WebCore:

Tests: fast/shapes/shape-outside-floats/shape-outside-dynamic-shape.html
       fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-overhang.html

When shape outside is modified, dependent content needs to relayout. This patch
removes the float from the float lists and marks dependents for layout using
RenderBox::removeFloatingOrPositionedChildFromBlockLists(). This is the same
method used when switching from float: left to float: right and vice versa
(see RenderElement::styleWillChange).

* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateShapeOutsideInfoAfterStyleChange): Mark shape-outside dependents
for layout.
* rendering/RenderBox.h:
(WebCore::RenderBox::markShapeOutsideDependentsForLayout): Mark all the items that may be
affected by this shape-outside for relayout.

LayoutTests:

Test that a shape can be dynamically added, modified, or removed and that
content does a proper relayout.

* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-overhang-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-overhang.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-dynamic-shape.html: Added.

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

6 years agoTighten markContainingBlocksForLayout
antti@apple.com [Fri, 4 Oct 2013 19:22:38 +0000 (19:22 +0000)]
Tighten markContainingBlocksForLayout
https://bugs.webkit.org/show_bug.cgi?id=122326

Reviewed by Anders Carlsson.

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

6 years agoNode: removedFrom() and insertedInto() should use references.
akling@apple.com [Fri, 4 Oct 2013 18:51:32 +0000 (18:51 +0000)]
Node: removedFrom() and insertedInto() should use references.
<https://webkit.org/b/122315>

Reviewed by Anders Carlsson.

ContainerNode* -> ContainerNode&

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

6 years agoOptimize strings copies in srcset parser
ap@apple.com [Fri, 4 Oct 2013 18:41:09 +0000 (18:41 +0000)]
Optimize strings copies in srcset parser
https://bugs.webkit.org/show_bug.cgi?id=121899

Patch by Romain Perier <romain.perier@gmail.com> on 2013-10-04
Reviewed by Alexey Proskuryakov.

No new tests, covered by existing ones.

* html/parser/HTMLParserIdioms.cpp:
(WebCore::parseImagesWithScaleFromSrcsetAttribute): Don't copy
image.imageURL at each loop iteration, save indexes instead.
(WebCore::bestFitSourceForImageAttributes): Make a String for
the URL only when the corresponding candidate is chosen
by the selection algorithm. It reduces the number of copies
significantly and improves performance
(around 30% with the "Release" profile and 60% with the "Debug" one).

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

6 years agoTests added in r141354 erroneously assume correction suggestion to be in the context...
g.czajkowski@samsung.com [Fri, 4 Oct 2013 18:40:03 +0000 (18:40 +0000)]
Tests added in r141354 erroneously assume correction suggestion to be in the context menu
https://bugs.webkit.org/show_bug.cgi?id=113742

Reviewed by Ryosuke Niwa.

Tests from r141354 erroneously assume that all WebKit ports populate
spell checking suggestion in the context menu.

Remove verification of spell checking suggestion and all context menu stuff from tests
that do that unnecessarily. Instead of that check whether spelling markers behave correctly,
for example, after deleting a text, double click or selecting a misspellings.

However, two tests are adapted to verify spell checking suggestions (their availability
rather than correctness, similarly to context-menu-suggestions.html).
Those are useful for ports which populate spelling suggestion in the context menu.

* editing/spelling/resources/util.js:
(initSpellTest):
Do not assume that the tests are running with "Windows" editing behavior.
Unix ports do not make a selection for the misspelled word and they don't
require selection to get spell checking suggestions.

* editing/spelling/spelling-changed-text-expected.txt:
* editing/spelling/spelling-changed-text.html:
* editing/spelling/spelling-double-clicked-word-expected.txt:
* editing/spelling/spelling-double-clicked-word.html:
* editing/spelling/spelling-exactly-selected-word-expected.txt:
* editing/spelling/spelling-exactly-selected-word.html:
Remove verification of correction suggestion.
Instead of that check whether the spelling markers behave correctly.

* editing/spelling/context-menu-suggestions-multiword-selection-expected.txt: Renamed from LayoutTests/editing/spelling/spelling-multiword-selection-expected.txt.
* editing/spelling/context-menu-suggestions-multiword-selection.html: Renamed from LayoutTests/editing/spelling/spelling-multiword-selection.html.
* editing/spelling/context-menu-suggestions-subword-selection-expected.txt: Renamed from LayoutTests/editing/spelling/spelling-subword-selection-expected.txt.
* editing/spelling/context-menu-suggestions-subword-selection.html: Renamed from LayoutTests/editing/spelling/spelling-subword-selection.html.
Adapt those tests for platforms which populate spell check suggestion
in the context menu.

* platform/efl-wk2/TestExpectations:
Now context-menu-suggestions-multiword-selection.html and
context-menu-suggestions-subword-selection.html are passing for EFL.

* platform/gtk-wk2/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
Update tests path due to rename.

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

6 years agoFTL: Crash in OSRExit::convertToForward() using VirtualRegister.offset() as array...
msaboff@apple.com [Fri, 4 Oct 2013 18:38:16 +0000 (18:38 +0000)]
FTL: Crash in OSRExit::convertToForward() using VirtualRegister.offset() as array index
https://bugs.webkit.org/show_bug.cgi?id=122332

Reviewed by Oliver Hunt.

Changed the uses of .offset(), which returns a negative number for locals, to be
toLocal() which returns a local's ordinal number.

* ftl/FTLOSRExit.cpp:
(JSC::FTL::OSRExit::convertToForward):

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

6 years agoremove dpranke from webkitpy watchlist
dpranke@chromium.org [Fri, 4 Oct 2013 18:34:11 +0000 (18:34 +0000)]
remove dpranke from webkitpy watchlist
https://bugs.webkit.org/show_bug.cgi?id=122331

Reviewed by Brent Fulgham.

* Scripts/webkitpy/common/config/watchlist:

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

6 years ago[mac][wk2] ScrollPinningBehaviors, SpacebarScrolling, and ScrollByLineCommands fail...
timothy_horton@apple.com [Fri, 4 Oct 2013 18:30:35 +0000 (18:30 +0000)]
[mac][wk2] ScrollPinningBehaviors, SpacebarScrolling, and ScrollByLineCommands fail after r156793
https://bugs.webkit.org/show_bug.cgi?id=122299

Reviewed by Beth Dakin.

* TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp:
* TestWebKitAPI/Tests/WebKit2/mac/EditorCommands.mm:
The last fix didn't work; instead of trying to block, turn off threaded scrolling for all three tests.

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

6 years agoWatchlist is broken after <http://trac.webkit.org/r156880>
ap@apple.com [Fri, 4 Oct 2013 18:26:35 +0000 (18:26 +0000)]
Watchlist is broken after <trac.webkit.org/r156880>

* Scripts/webkitpy/common/config/watchlist: Remove an incorrect change.

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

6 years agoAdd callOperation to Baseline JIT
msaboff@apple.com [Fri, 4 Oct 2013 18:20:40 +0000 (18:20 +0000)]
Add callOperation to Baseline JIT
https://bugs.webkit.org/show_bug.cgi?id=122306

Reviewed by Geoffrey Garen.

Created baseline JIT compatible versions for a few flavors of callOperation().
Migrated cti_op_new_regexp() and its caller to callOperation(operationNewRegexp()).

* dfg/DFGOperations.cpp: Moved operationNewRegexp() to JITOperations
* dfg/DFGOperations.h:
* jit/JIT.h:
(JSC::JIT::appendCall):
* jit/JITInlines.h:
(JSC::JIT::appendCallWithExceptionCheck):
(JSC::JIT::appendCallWithExceptionCheckSetJSValueResult):
(JSC::JIT::callOperation):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_new_regexp):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITStubs.cpp:
* jit/JITStubs.h:
* jit/JSInterfaceJIT.h:

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

6 years agoRemove Qt features from build and test tools
bfulgham@apple.com [Fri, 4 Oct 2013 18:20:19 +0000 (18:20 +0000)]
Remove Qt features from build and test tools
https://bugs.webkit.org/show_bug.cgi?id=122312

Reviewed by Anders Carlsson.

* Scripts/build-dumprendertree:
* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/old-run-webkit-tests:
(openDumpTool):
(buildPlatformResultHierarchy):
(buildPlatformTestHierarchy):
(readSkippedFiles):
* Scripts/run-launcher:
* Scripts/run-qtwebkit-tests: Removed.
* Scripts/run-webkit-tests:
(useNewRunWebKitTests):
* Scripts/update-webkit:
* Scripts/webkit-build-directory:
* Scripts/webkitdirs.pm:
(argumentsForConfiguration):
(jscProductDir):
(builtDylibPathForName):
(isAppleWebKit):
(launcherPath):
(launcherName):
(checkRequiredSystemConfig):
(setupCygwinEnv):
(copyInspectorFrontendFiles):
(setPathForRunningWebKitApp):
* Scripts/webkitpy/common/checkout/baselineoptimizer.py:
* Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
(BaselineOptimizerTest.test_mac_future):
(BaselineOptimizerTest.test_win_does_not_drop_to_win_7sp0):
(BaselineOptimizerTest.test_common_directory_includes_root):
(BaselineOptimizerTest.test_virtual_ports_filtered):
* Scripts/webkitpy/common/checkout/changelog_unittest.py:
(test_parse_reviewer_text):
* Scripts/webkitpy/common/config/watchlist:
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(PortTest.disabled_test_chromium_mac_lion_in_test_shell_mode):
* Scripts/webkitpy/port/base.py:
(Port.__init__):
(Port._port_flag_for_scripts):
(Port._wk2_port_name):
* Scripts/webkitpy/port/builders.py:
* Scripts/webkitpy/port/factory.py:
(platform_options):
(PortFactory):
(PortFactory._default_port):
* Scripts/webkitpy/port/factory_unittest.py:
(FactoryTest.test_gtk):
* Scripts/webkitpy/port/qt.py: Removed.
* Scripts/webkitpy/port/qt_unittest.py: Removed.
* Scripts/webkitpy/style/checker.py:
* Scripts/webkitpy/style/checker_unittest.py:
(GlobalVariablesTest.test_path_rules_specifier):
* Scripts/webkitpy/style/checkers/cmake.py:
(CMakeChecker):
* Scripts/webkitpy/style/checkers/cpp.py:
(_classify_include):
(check_include_line):
(check_identifier_name_in_declaration):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(OrderOfIncludesTest.test_classify_include):
(WebKitStyleTest.test_names):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
(TestExpectationsTestCase.test_determine_port_from_expectations_path):
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaselineTest.test_baseline_directory):
* Scripts/webkitpy/tool/main.py:
(WebKitPatch):

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

6 years agoAdd svn:ignore to *.pyc files in inspector/Scripts directory, so that they don't
ap@apple.com [Fri, 4 Oct 2013 17:00:40 +0000 (17:00 +0000)]
Add svn:ignore to *.pyc files in inspector/Scripts directory, so that they don't
show up as unversioned all the time.

* inspector/Scripts: Added property svn:ignore.

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

6 years ago[Win][WebGL] Crash on exit
commit-queue@webkit.org [Fri, 4 Oct 2013 16:15:34 +0000 (16:15 +0000)]
[Win][WebGL] Crash on exit
https://bugs.webkit.org/show_bug.cgi?id=120764

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-04
Reviewed by Martin Robinson.

On exit, libGLESv2.dll is detached from the process and relevant memory is released
before the atexit GL context cleanup handler is called, causing a NULL pointer crash.
The GL context cleanup code was originally written to avoid a X server crash on exit,
so it's only needed for PLATFORM(X11).

* platform/graphics/GLContext.cpp: Only clean up active GL contexts on exit for PLATFORM(X11).
(WebCore::GLContext::cleanupSharedX11Display):
(WebCore::GLContext::cleanupActiveContextsAtExit):
(WebCore::GLContext::GLContext):
(WebCore::GLContext::~GLContext):

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

6 years ago[GTK] Enable text edition UndoOperations support in WebKit2
commit-queue@webkit.org [Fri, 4 Oct 2013 16:14:06 +0000 (16:14 +0000)]
[GTK] Enable text edition UndoOperations support in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=122305

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2013-10-04
Reviewed by Carlos Garcia Campos.

Source/WebKit2:

Replaced the notImplemented() function calls for
the corresponding implementation of the edit operations
provided by the DefaultUndoController class.

* GNUmakefile.list.am:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
* UIProcess/API/gtk/PageClientImpl.h:

LayoutTests:

* platform/gtk-wk2/TestExpectations: Corrected the expectations
with the new results.

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

6 years ago[CSSRegions] Regions as stacking contexts should paint over positioned sibling
mihnea@adobe.com [Fri, 4 Oct 2013 16:02:46 +0000 (16:02 +0000)]
[CSSRegions] Regions as stacking contexts should paint over positioned sibling
https://bugs.webkit.org/show_bug.cgi?id=122321

Reviewed by Alexandru Chiculita.

Source/WebCore:

Test: fast/regions/layers/region-normalflow-stacking-context.html

Since regions are stacking contexts, they should not be in normal flow list of layers.
More clean-up after https://bugs.webkit.org/show_bug.cgi?id=117365 and https://bugs.webkit.org/show_bug.cgi?id=121828
which enabled the layers.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly):
(WebCore::RenderLayer::shouldBeSelfPaintingLayer):

LayoutTests:

Add a new test and modify existing tests to take into account the stacking context behavior
for non-positioned regions.

* fast/regions/autoheight-regions-mark-expected.txt:
* fast/regions/layers/region-normalflow-stacking-context-expected.html: Added.
* fast/regions/layers/region-normalflow-stacking-context.html: Added.
* fast/regions/shape-inside/shape-inside-on-regions-block-content-overflow-bottom-positioned-multiple-shapes-expected.html:
* fast/regions/shape-inside/shape-inside-on-regions-inline-content-overflow-bottom-positioned-multiple-shapes-expected.html:

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

6 years agoRemove WebAssertions.h
andersca@apple.com [Fri, 4 Oct 2013 15:26:44 +0000 (15:26 +0000)]
Remove WebAssertions.h
https://bugs.webkit.org/show_bug.cgi?id=122328

Reviewed by Jessie Berlin.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Misc/WebAssertions.h: Removed.

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

6 years agoUnreviewed EFL gardening
m.pakula@samsung.com [Fri, 4 Oct 2013 15:22:41 +0000 (15:22 +0000)]
Unreviewed EFL gardening

Remove failure expectations from tests that are passing.

* platform/efl-wk2/TestExpectations: update js/dom/create-lots-of-workers.html path.
* platform/efl/TestExpectations:

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

6 years ago[EFL] Enable correct behaviour for deleting regional indicator symbols
commit-queue@webkit.org [Fri, 4 Oct 2013 14:22:31 +0000 (14:22 +0000)]
[EFL] Enable correct behaviour for deleting regional indicator symbols
https://bugs.webkit.org/show_bug.cgi?id=122209

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-10-04
Reviewed by Gyuyoung Kim.

Source/WebCore:

Regional indicator symbols that are combined should behave as a single character when deleting.
Removed unused variable initialState.

* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):

LayoutTests:

Now editing/deleting/regional-indicators.html is passing on EFL port.

* platform/efl/TestExpectations:

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

6 years agoRemove Qt leftovers from WebKit2
commit-queue@webkit.org [Fri, 4 Oct 2013 14:16:22 +0000 (14:16 +0000)]
Remove Qt leftovers from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=122317

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-10-04
Reviewed by Anders Carlsson.

* Platform/CoreIPC/unix/ConnectionUnix.cpp:
(CoreIPC::Connection::platformInitialize):
(CoreIPC::Connection::platformInvalidate):
(CoreIPC::Connection::readyReadHandler):
(CoreIPC::Connection::open):
(CoreIPC::Connection::sendOutgoingMessage):
* Shared/API/c/WKBase.h:
* Shared/NativeWebTouchEvent.h:
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/BackingStore.h:
* UIProcess/InspectorServer/WebInspectorServer.cpp:
(WebKit::WebInspectorServer::inspectorUrlForPageID):
* UIProcess/InspectorServer/WebInspectorServer.h:
* UIProcess/InspectorServer/WebSocketServer.cpp:
* UIProcess/InspectorServer/WebSocketServer.h:
* UIProcess/WebPageProxy.cpp:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::getPluginDisplay):
(WebKit::x11Screen):
(WebKit::displayDepth):
(WebKit::rootWindowID):
(WebKit::NetscapePlugin::x11HostDisplay):
(WebKit::NetscapePlugin::platformPostInitializeWindowless):
(WebKit::NetscapePlugin::platformPaint):

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/css/ with the OperationsNotDele...
zandobersek@gmail.com [Fri, 4 Oct 2013 12:23:15 +0000 (12:23 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/css/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122276

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/css/.

* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/DOMWindowCSS.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheet.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSFilterValue.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* css/WebKitCSSTransformValue.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/loader/appcache/ with the Opera...
zandobersek@gmail.com [Fri, 4 Oct 2013 11:59:23 +0000 (11:59 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/loader/appcache/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122274

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/loader/appcache/.

* loader/appcache/DOMApplicationCache.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/plugins/ with the OperationsNot...
zandobersek@gmail.com [Fri, 4 Oct 2013 11:55:18 +0000 (11:55 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/plugins/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122273

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/plugins/.

* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/storage/ with the OperationsNot...
zandobersek@gmail.com [Fri, 4 Oct 2013 11:51:16 +0000 (11:51 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/storage/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122272

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/storage/.

* storage/Storage.idl:
* storage/StorageEvent.idl:

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

6 years ago[WebIDL] Annotate IDL interfaces under Source/WebCore/workers/ with the OperationsNot...
zandobersek@gmail.com [Fri, 4 Oct 2013 11:41:00 +0000 (11:41 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/workers/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122270

Reviewed by Darin Adler.

Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.

This patch covers IDL interfaces under Source/WebCore/workers/.

* workers/DedicatedWorkerGlobalScope.idl:
* workers/Worker.idl:
* workers/WorkerGlobalScope.idl:
* workers/WorkerLocation.idl:

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

6 years ago[CSS Regions] Infinite loop when computing widows
abucur@adobe.com [Fri, 4 Oct 2013 08:49:21 +0000 (08:49 +0000)]
[CSS Regions] Infinite loop when computing widows
https://bugs.webkit.org/show_bug.cgi?id=122215

Reviewed by David Hyatt.

Source/WebCore:

The patch ensures it's not possible to relayout a block indefinitely because of widows contraints. You can't
break a block more than once to account for widows. This can happen if, for example, some lines are moved
to the next container and there the content breaks in another container again without respecting the widows property.
This is in line with the idea of not leaving empty fragmentation containers during layout.

Test: fast/regions/regions-widows-stack-overflow.html

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::adjustLinePositionForPagination):
(WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
(WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):

* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData): Rename the m_shouldBreakAtLineToAvoidWidow
flag to m_didBreakAtLineToAvoidWidow.

(WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow): Use the line index to determine if it should break or not.
(WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow): Use to determine if a break already happened because of widows.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):

LayoutTests:

Test there is no stack overflow when trying to break for widows that are caused by other widows.

* fast/regions/regions-widows-stack-overflow-expected.html: Added.
* fast/regions/regions-widows-stack-overflow.html: Added.

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

6 years agoUnreviewed. Add myself to some watchlists.
gyuyoung.kim@samsung.com [Fri, 4 Oct 2013 06:05:06 +0000 (06:05 +0000)]
Unreviewed. Add myself to some watchlists.

* Scripts/webkitpy/common/config/watchlist:

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

6 years agoAssert that we don't try to index past the end of the m_coreTextIndices array
andersca@apple.com [Fri, 4 Oct 2013 04:42:02 +0000 (04:42 +0000)]
Assert that we don't try to index past the end of the m_coreTextIndices array
https://bugs.webkit.org/show_bug.cgi?id=122308

Reviewed by Dan Bernstein.

Because an assertion failure is better than a random crash.

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextRun::indexAt):

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

6 years agoRemove WebNSNotificationCenterExtras
andersca@apple.com [Fri, 4 Oct 2013 04:38:29 +0000 (04:38 +0000)]
Remove WebNSNotificationCenterExtras
https://bugs.webkit.org/show_bug.cgi?id=122316

Reviewed by Dan Bernstein.

Source/WebKit:

Update Xcode project.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Use dispatch_async to ensure that notifications are posted on the main thread.

* Misc/WebIconDatabase.mm:
(-[WebIconDatabase _sendNotificationForURL:]):
(-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
* Misc/WebNSNotificationCenterExtras.h: Removed.
* Misc/WebNSNotificationCenterExtras.m: Removed.

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

6 years agoREGRESSION (r155787): WebKitTestRunner rebuilds from scratch when doing an incrementa...
mrowe@apple.com [Fri, 4 Oct 2013 04:11:43 +0000 (04:11 +0000)]
REGRESSION (r155787): WebKitTestRunner rebuilds from scratch when doing an incremental build

Reviewed by Dan Bernstein.

* WebKit2.xcodeproj/project.pbxproj: Have unifdef generate its output to a temporary file. If its exit status
indicates that the content did not change, remove the temporary file. If the content changed, moved the temporary file
over the destination. This avoids updating the modification date of the file when it has not changed.

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

6 years agoMove setting of some layout bits to RenderElement
antti@apple.com [Fri, 4 Oct 2013 04:04:35 +0000 (04:04 +0000)]
Move setting of some layout bits to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122256

Reviewed by Andreas Kling.

These bits never apply to RenderText nodes:

normalChildNeedsLayout
posChildNeedsLayout
needsSimplifiedNormalFlowLayout
normalChildNeedsLayout
positionedMovementLayout

The code for setting them can be moved to RenderElement.

Also separated the code paths for setting and clearing the bits and uninlined
everything that is not massively popular.

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

6 years agoREGRESSION (r156811): WebCore rebuilds from scratch when doing an incremental build
mrowe@apple.com [Fri, 4 Oct 2013 03:19:44 +0000 (03:19 +0000)]
REGRESSION (r156811): WebCore rebuilds from scratch when doing an incremental build

The change in r156811 resulted in several public headers in the JavaScriptCore framework having their modification
date touched on every build, even if their contents had not changed. This resulted in a large portion of WebCore
needing to rebuilt after an incremental build of JavaScriptCore.

Reviewed by Dan Bernstein.

* JavaScriptCore.xcodeproj/project.pbxproj: Have unifdef generate its output to a temporary file. If its exit status
indicates that the content did not change, remove the temporary file. If the content changed, moved the temporary file
over the destination.

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

6 years agoRemove shouldRubberBandInDirection from the WKBundlePageUIClient
weinig@apple.com [Fri, 4 Oct 2013 03:08:46 +0000 (03:08 +0000)]
Remove shouldRubberBandInDirection from the WKBundlePageUIClient
https://bugs.webkit.org/show_bug.cgi?id=122309

Reviewed by Andreas Kling.

../WebCore:

* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/FrameView.cpp:
* page/FrameView.h:
* platform/ScrollableArea.h:
* platform/mac/ScrollAnimatorMac.mm:
(WebCore::ScrollAnimatorMac::shouldRubberBandInDirection):

../WebKit/efl:

* WebCoreSupport/ChromeClientEfl.h:

../WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.h:

../WebKit/mac:

* WebCoreSupport/WebChromeClient.h:

../WebKit/win:

* WebCoreSupport/WebChromeClient.h:

../WebKit/wince:

* WebCoreSupport/ChromeClientWinCE.h:

../WebKit2:

WKBundlePageUIClient's shouldRubberBandInDirection has never worked with
threaded scrolling, so remove it.

* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.h:

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

6 years ago<rdar://problem/15116673> [mac] Build failure when the source directory is not named...
mitz@apple.com [Fri, 4 Oct 2013 00:43:40 +0000 (00:43 +0000)]
<rdar://problem/15116673> [mac] Build failure when the source directory is not named ANGLE
https://bugs.webkit.org/show_bug.cgi?id=122307

Reviewed by Mark Rowe.

* ANGLE.xcodeproj/project.pbxproj: Ensure that the symlink to SRCROOT in
DerivedSources/ANGLE is named ANGLE.

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