commit-queue@webkit.org [Mon, 26 Aug 2013 23:25:26 +0000 (23:25 +0000)]
Unreviewed, rolling out r154640.
http://trac.webkit.org/changeset/154640
https://bugs.webkit.org/show_bug.cgi?id=120329
Caused flaky crashes on a lot of editing tests (Requested by
rniwa on #webkit).
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/mac/PoseAsClass.h: Removed.
* WebKitTestRunner/mac/PoseAsClass.mm: Removed.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformInitialize):
(WTR::TestController::platformDestroy):
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.h: Removed.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154650
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Mon, 26 Aug 2013 23:23:42 +0000 (23:23 +0000)]
Automatic bug reports case pain
https://bugs.webkit.org/show_bug.cgi?id=120330
Reviewed by Anders Carlsson.
* Scripts/webkitpy/tool/commands/download.py: Made the following changes to the Description
of bugs filed by the bot: changed “the sheriff-bot” to “webkitbot”, changed “case pain” to
“fail”, and removed “"Only you can prevent forest fires." -- Smokey the Bear”.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154649
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 26 Aug 2013 22:49:18 +0000 (22:49 +0000)]
AlternativeTextController should hold onto Frame as a reference
https://bugs.webkit.org/show_bug.cgi?id=120327
Reviewed by Andreas Kling.
While in the area I also:
- Reference-ified Editor::killRing().
- Const-ified Editor::m_killRing, Editor::m_spellChecker, and Editor::m_alternativeTextController.
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::AlternativeTextController):
(WebCore::AlternativeTextController::stopPendingCorrection):
(WebCore::AlternativeTextController::isSpellingMarkerAllowed):
(WebCore::AlternativeTextController::applyAlternativeTextToRange):
(WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
(WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::handleAlternativeTextUIResult):
(WebCore::AlternativeTextController::rootViewRectForRange):
(WebCore::AlternativeTextController::respondToChangedSelection):
(WebCore::AlternativeTextController::respondToAppliedEditing):
(WebCore::AlternativeTextController::respondToUnappliedEditing):
(WebCore::AlternativeTextController::alternativeTextClient):
(WebCore::AlternativeTextController::editorClient):
(WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
(WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
(WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
(WebCore::AlternativeTextController::insertDictatedText):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/AlternativeTextController.h:
(WebCore::AlternativeTextController::UNLESS_ENABLED):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::addToKillRing):
* editing/Editor.h:
(WebCore::Editor::killRing):
* editing/EditorCommand.cpp:
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154648
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
aestes@apple.com [Mon, 26 Aug 2013 22:40:55 +0000 (22:40 +0000)]
Fix issues found by the Clang Static Analyzer
https://bugs.webkit.org/show_bug.cgi?id=120230
Reviewed by Darin Adler.
Source/JavaScriptCore:
* API/JSValue.mm:
(valueToString): Don't leak every CFStringRef when in Objective-C GC.
* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::~ObjCCallbackFunctionImpl): Don't
release m_invocation's target since NSInvocation will do it for us on
-dealloc.
(objCCallbackFunctionForBlock): Tell NSInvocation to retain its target
and -release our reference to the copied block.
* API/tests/minidom.c:
(createStringWithContentsOfFile): Free buffer before returning.
* API/tests/testapi.c:
(createStringWithContentsOfFile): Ditto.
Source/WebCore:
* WebCore.xcodeproj/project.pbxproj: Removed FoundationExtras.h.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed CFAutoreleaseHelper().
(AXTextMarkerRange): Used HardAutorelease() instead of
CFAutoreleaseHelper().
(AXTextMarkerRangeStart): Ditto.
(AXTextMarkerRangeEnd): Ditto.
(textMarkerForVisiblePosition): Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver initWithCallback:]): Called [super init]
first so that we don't later use ivars from the wrong self.
(-[WebCoreAVFLoaderDelegate initWithCallback:]): Ditto.
* platform/mac/FoundationExtras.h: Removed.
* platform/mac/KURLMac.mm:
(WebCore::KURL::operator NSURL *): Used WTF's HardAutorelease().
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::mapHostNameWithRange): Used HardAutorelease() instead of
WebCoreCFAutorelease().
(WebCore::URLWithData): Ditto.
(WebCore::userVisibleString): Ditto.
(WebCore::URLByRemovingComponentAndSubsequentCharacter): Used Vector<>
with an inline capacity rather than heap-allocating a buffer.
* platform/mac/WebCoreObjCExtras.h: Used HardAutorelease() instead of
WebCoreCFAutorelease().
* platform/text/mac/StringImplMac.mm:
(WTF::StringImpl::operator NSString *): Used WTF's HardAutorelease().
Source/WebKit/mac:
* Misc/WebNSFileManagerExtras.mm:
(-[NSFileManager _webkit_startupVolumeName]): Used HardAutorelease()
instead of WebCFAutorelease().
* Misc/WebNSObjectExtras.h: Removed definition of WebCFAutorelease().
* Misc/WebNSURLExtras.mm:
(-[NSURL _web_URLWithLowercasedScheme]): Used HardAutorelease()
instead of WebCFAutorelease().
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView createPluginLayer]): Stop leaking
CGColors (CALayer retains its backgroundColor property despite the
property attributes claiming otherwise).
* Plugins/WebBasePluginPackage.mm:
(+[WebBasePluginPackage preferredLocalizationName]): Used
HardAutorelease() instead of WebCFAutorelease().
* WebView/WebDeviceOrientationProviderMock.mm:
(-[WebDeviceOrientationProviderMockInternal lastOrientation]): Stop
leaking WebDeviceOrientations.
* WebView/WebPDFRepresentation.mm:
(-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Used
HardAutorelease() instead of WebCFAutorelease().
* WebView/WebView.mm:
(+[WebView _setCacheModel:]): Ditto.
(-[WebView _removeObjectForIdentifier:]): Ditto.
Source/WebKit2:
* UIProcess/API/mac/WKBrowsingContextController.mm:
(autoreleased): Don't leak CFURLs when in Objective-C GC.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Don't leak CFStrings when in Objective-C GC.
Source/WTF:
* wtf/ObjcRuntimeExtras.h:
(HardAutorelease): Added a canonical implementation of HardAutorelease.
Tools:
* DumpRenderTree/mac/DumpRenderTreePasteboard.m:
(-[LocalPasteboard initWithName:]): Called [super init] first so that we
don't later use ivars from the wrong self.
* DumpRenderTree/mac/TestRunnerMac.mm:
(-[APITestDelegate initWithCompletionCondition:]): Ditto.
* TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm:
(TestWebKitAPI::TEST): Don't leak WKProcessGroups,
WKBrowsingContextGroups, and WKViews.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154647
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ossy@webkit.org [Mon, 26 Aug 2013 22:34:41 +0000 (22:34 +0000)]
[WK2] Buildfix for non Mac platforms
https://bugs.webkit.org/show_bug.cgi?id=120294
Reviewed by Darin Adler.
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
* NetworkProcess/NetworkResourceLoader.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154646
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
psolanki@apple.com [Mon, 26 Aug 2013 21:54:39 +0000 (21:54 +0000)]
Page::console() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120320
Reviewed by Darin Adler.
Page::m_console is never NULL so console() can just return a reference.
* css/CSSParser.cpp:
(WebCore::CSSParser::logError):
* dom/Document.cpp:
(WebCore::Document::addConsoleMessage):
(WebCore::Document::addMessage):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::pageConsole):
* page/Page.h:
(WebCore::Page::console):
* xml/XSLStyleSheetLibxslt.cpp:
(WebCore::XSLStyleSheet::parseString):
* xml/XSLTProcessorLibxslt.cpp:
(WebCore::docLoaderFunc):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154645
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis@webkit.org [Mon, 26 Aug 2013 21:53:05 +0000 (21:53 +0000)]
Lonely stop crashes
https://bugs.webkit.org/show_bug.cgi?id=87964
Reviewed by Darin Adler.
Source/WebCore:
Provide a nodeAtFloatPoint implementation for RenderSVGGradientStop to avoid hitting the assert in RenderObject::nodeAtFloatPoint.
Test: svg/custom/stop-crash-hittest.svg
* rendering/svg/RenderSVGGradientStop.h:
LayoutTests:
Add testcase by taking stop-crash.svg and adding hittest instructions.
* svg/custom/stop-crash-hittest-expected.txt: Added.
* svg/custom/stop-crash-hittest.svg: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154644
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 26 Aug 2013 21:50:32 +0000 (21:50 +0000)]
Editor::spellChecker() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120325
Reviewed by Anders Carlsson.
* editing/Editor.cpp:
(WebCore::Editor::Editor):
* editing/Editor.h:
(WebCore::Editor::spellChecker):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::SpellChecker):
(WebCore::SpellChecker::client):
(WebCore::SpellChecker::isAsynchronousEnabled):
(WebCore::SpellChecker::didCheck):
(WebCore::SpellChecker::didCheckSucceed):
* editing/SpellChecker.h:
* page/EditorClient.h:
* testing/Internals.cpp:
(WebCore::Internals::lastSpellCheckRequestSequence):
(WebCore::Internals::lastSpellCheckProcessedSequence):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154643
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
roger_fong@apple.com [Mon, 26 Aug 2013 21:42:33 +0000 (21:42 +0000)]
AppleWin build fix following r154627.
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj.filters:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154642
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bjonesbe@adobe.com [Mon, 26 Aug 2013 21:35:35 +0000 (21:35 +0000)]
Optimize FloatIntervalSearchAdapter::collectIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=120237
Reviewed by David Hyatt.
Source/WebCore:
This is a port of 3 Blink patches:
https://codereview.chromium.org/
22463002 (By shatch@chromium.org)
https://chromiumcodereview.appspot.com/
22909005 (By me)
https://chromiumcodereview.appspot.com/
23084002 (By me)
shatch optimized FloatIntervalSearchAdapter by having it store the
outermost float instead of making a bunch of calls to
logical(Left/Right/Bottom)ForFloat, and then only making that call
once when heightRemaining needs to be computed.
I noticed that now we were storing both the last float encountered and
the outermost float, and that the behavior for shape-outside wasn't
significantly changed by using the outermost float instead of the last
float encountered (and in most cases, using the outermost float gives
more reasonable behavior). Since this isn't covered in the spec yet, I
changed shape-outside to use the outermost float, making it so that we
only need to store one float pointer when walking the placed floats
tree, and keeping the performance win.
Also while changing updateOffsetIfNeeded, removed const, since that is
a lie. Nothing about that method is const.
Test: fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html
* rendering/RenderBlock.cpp:
(WebCore::::updateOffsetIfNeeded):
(WebCore::::collectIfNeeded):
(WebCore::::getHeightRemaining):
(WebCore::RenderBlock::logicalLeftFloatOffsetForLine):
(WebCore::RenderBlock::logicalRightFloatOffsetForLine):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
(WebCore::RenderBlock::FloatIntervalSearchAdapter::outermostFloat):
LayoutTests:
Test shape-outside behavior when there is more than one float on a
given line.
* fast/shapes/shape-outside-floats/shape-outside-floats-outermost-expected.html: Added.
* fast/shapes/shape-outside-floats/shape-outside-floats-outermost.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154641
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Mon, 26 Aug 2013 21:34:58 +0000 (21:34 +0000)]
WebKitTestRunner needs to protect the user's pasteboard contents while running
https://bugs.webkit.org/show_bug.cgi?id=81419
<rdar://problem/
11066794>
Reviewed by Darin Adler.
Mostly a copy/paste of DRT code.
Tested manually by making sure that editing/pasteboard/copy-image-with-alt-text.html
doesn't interfere with my clipboard while being run in a loop.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* WebKitTestRunner/mac/PoseAsClass.h: Added.
* WebKitTestRunner/mac/PoseAsClass.mm: Added.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformInitialize):
(WTR::TestController::platformDestroy):
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.h: Added.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154640
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Mon, 26 Aug 2013 21:11:12 +0000 (21:11 +0000)]
[Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
https://bugs.webkit.org/show_bug.cgi?id=113094
Reviewed by Darin Adler.
Mac platform implementation has checks for pasteboard change count, but it
didn't use to update the count when writing to pasteboad from JavaScript.
* platform/PasteboardStrategy.h: Changed changeCount function to return a long
instead of an int, as the underlying Mac type is NSInteger. Changed all methods
that modify the pasteboard to return a new change count.
* platform/PlatformPasteboard.h: Changed all methods that modify the pasteboard
to return a new change count.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::clear): Update m_changeCount.
(WebCore::Pasteboard::writeSelectionForTypes): Ditto.
(WebCore::Pasteboard::writePlainText): Ditto.
(WebCore::writeURLForTypes): Ditto.
(WebCore::Pasteboard::writeURL): Ditto.
(WebCore::writeFileWrapperAsRTFDAttachment): Ditto.
(WebCore::Pasteboard::writeImage): Ditto.
(WebCore::Pasteboard::writePasteboard): Ditto.
(WebCore::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::changeCount): Changed returned type to long to avoid
data loss.
(WebCore::PlatformPasteboard::copy): Return new change count.
(WebCore::PlatformPasteboard::addTypes): Ditto.
(WebCore::PlatformPasteboard::setTypes): Ditto.
(WebCore::PlatformPasteboard::setBufferForType): Ditto.
(WebCore::PlatformPasteboard::setPathnamesForType): Ditto.
(WebCore::PlatformPasteboard::setStringForType): Ditto. Replaced -[NSURL writeToPasteboard:]
with an equivalent implemnentation that tells use whether writing was successful.
There is difference with invalid URL string handling - we used to silently ignore
such requets, but set pasteboard content to empty URL now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154639
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 21:09:32 +0000 (21:09 +0000)]
[Windows] Unreviewed build fix after r154629.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Add missing build files.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154638
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 26 Aug 2013 20:50:45 +0000 (20:50 +0000)]
Another GTK+ build fix.
* WebCoreSupport/FrameLoaderClientGtk.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154637
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 26 Aug 2013 20:45:47 +0000 (20:45 +0000)]
GTK+ build fix. Like r154620.
* webkit/webkitwebframe.cpp:
(webkit_web_frame_new):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154636
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 26 Aug 2013 20:42:43 +0000 (20:42 +0000)]
Windows build fix attempt after r154629.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154635
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
roger_fong@apple.com [Mon, 26 Aug 2013 20:37:46 +0000 (20:37 +0000)]
Unreviewed. Add missing interface files that were left out in r154627.
* Interfaces/Accessible2/AccessibleEditableText.idl: Added.
* Interfaces/Accessible2/AccessibleText.idl: Added.
* Interfaces/Accessible2/AccessibleText2.idl: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154634
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mhahnenberg@apple.com [Mon, 26 Aug 2013 20:29:06 +0000 (20:29 +0000)]
JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage does a check on the length of the ArrayStorage after possible reallocing it
https://bugs.webkit.org/show_bug.cgi?id=120278
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
* runtime/JSObject.cpp:
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
LayoutTests:
* fast/js/put-direct-index-beyond-vector-length-resize-expected.txt: Added.
* fast/js/put-direct-index-beyond-vector-length-resize.html: Added.
* fast/js/script-tests/put-direct-index-beyond-vector-length-resize.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154633
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Mon, 26 Aug 2013 20:09:11 +0000 (20:09 +0000)]
Fix indention of Executable.h.
Rubber stamped by Mark Hahnenberg.
* runtime/Executable.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154632
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 20:08:31 +0000 (20:08 +0000)]
[Windows] Let Page create the main Frame.
https://bugs.webkit.org/show_bug.cgi?id=120323
Reviewed by Anders Carlsson.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::WebFrameLoaderClient): Remove assertion that frame
is passed as construction argument.
(WebFrameLoaderClient::createFrame): Call new 'createSubframeWithOwnerElement'
* WebCoreSupport/WebFrameLoaderClient.h: Update constructor to
handle case of no default frame argument.
(WebFrameLoaderClient::setWebFrame): Added.
* WebFrame.cpp:
(WebFrame::createSubframeWithOwnerElement): Renamed from 'init'.
(WebFrame::initWithWebFrameView): Added for new page-driven load path.
* WebFrame.h: Added new method signatures.
* WebView.cpp:
(WebView::initWithFrame): Update to match behavior of other ports.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154631
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mhahnenberg@apple.com [Mon, 26 Aug 2013 20:01:55 +0000 (20:01 +0000)]
Object.defineProperty should be able to create a PropertyDescriptor where m_attributes == 0
https://bugs.webkit.org/show_bug.cgi?id=120314
Reviewed by Darin Adler.
Currently with the way that defineProperty works, we leave a stray low bit set in
PropertyDescriptor::m_attributes in the following code:
var o = {};
Object.defineProperty(o, 100, {writable:true, enumerable:true, configurable:true, value:"foo"});
This is due to the fact that the lowest non-zero attribute (ReadOnly) is represented as 1 << 1
instead of 1 << 0. We then calculate the default attributes as (DontDelete << 1) - 1, which is 0xF,
but only the top three bits mean anything. Even in the case above, the top three bits are set
to 0 but the bottom bit remains set, which causes us to think m_attributes is non-zero.
Since some of these attributes and their corresponding values are exposed in the JavaScriptCore
framework's public C API, it's safer to just change how we calculate the default value, which is
where the weirdness was originating from in the first place.
* runtime/PropertyDescriptor.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154630
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Mon, 26 Aug 2013 19:19:50 +0000 (19:19 +0000)]
Add support for Promises
https://bugs.webkit.org/show_bug.cgi?id=120260
Reviewed by Darin Adler.
Source/JavaScriptCore:
Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
- Despite Promises being defined in the DOM, the implementation is being put in JSC
in preparation for the Promises eventually being defined in ECMAScript.
* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
Add new files.
* jsc.cpp:
Update jsc's GlobalObjectMethodTable to stub out the new QueueTaskToEventLoop callback. This mean's
you can't quite use Promises with with the command line tool yet.
* interpreter/CallFrame.h:
(JSC::ExecState::promisePrototypeTable):
(JSC::ExecState::promiseConstructorTable):
(JSC::ExecState::promiseResolverPrototypeTable):
* runtime/VM.cpp:
(JSC::VM::VM):
(JSC::VM::~VM):
* runtime/VM.h:
Add supporting code for the new static lookup tables.
* runtime/CommonIdentifiers.h:
Add 3 new identifiers, "Promise", "PromiseResolver", and "then".
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
Add supporting code Promise and PromiseResolver's constructors and structures.
* runtime/JSGlobalObject.h:
(JSC::TaskContext::~TaskContext):
Add a new callback to the GlobalObjectMethodTable to post a task on the embedder's runloop.
(JSC::JSGlobalObject::promisePrototype):
(JSC::JSGlobalObject::promiseResolverPrototype):
(JSC::JSGlobalObject::promiseStructure):
(JSC::JSGlobalObject::promiseResolverStructure):
(JSC::JSGlobalObject::promiseCallbackStructure):
(JSC::JSGlobalObject::promiseWrapperCallbackStructure):
Add supporting code Promise and PromiseResolver's constructors and structures.
* runtime/JSPromise.cpp: Added.
* runtime/JSPromise.h: Added.
* runtime/JSPromiseCallback.cpp: Added.
* runtime/JSPromiseCallback.h: Added.
* runtime/JSPromiseConstructor.cpp: Added.
* runtime/JSPromiseConstructor.h: Added.
* runtime/JSPromisePrototype.cpp: Added.
* runtime/JSPromisePrototype.h: Added.
* runtime/JSPromiseResolver.cpp: Added.
* runtime/JSPromiseResolver.h: Added.
* runtime/JSPromiseResolverConstructor.cpp: Added.
* runtime/JSPromiseResolverConstructor.h: Added.
* runtime/JSPromiseResolverPrototype.cpp: Added.
* runtime/JSPromiseResolverPrototype.h: Added.
Add Promise implementation.
Source/WebCore:
Add an initial implementation of Promises - http://dom.spec.whatwg.org/#promises.
- Despite Promises being defined in the DOM, the implementation is being put in JSC
in preparation for the Promises eventually being defined in ECMAScript.
Tests: fast/js/Promise-already-fulfilled.html
fast/js/Promise-already-rejected.html
fast/js/Promise-already-resolved.html
fast/js/Promise-catch-in-workers.html
fast/js/Promise-catch.html
fast/js/Promise-chain.html
fast/js/Promise-exception.html
fast/js/Promise-fulfill-in-workers.html
fast/js/Promise-fulfill.html
fast/js/Promise-init-in-workers.html
fast/js/Promise-init.html
fast/js/Promise-reject-in-workers.html
fast/js/Promise-reject.html
fast/js/Promise-resolve-chain.html
fast/js/Promise-resolve-in-workers.html
fast/js/Promise-resolve-with-then-exception.html
fast/js/Promise-resolve-with-then-fulfill.html
fast/js/Promise-resolve-with-then-reject.html
fast/js/Promise-resolve.html
fast/js/Promise-simple-fulfill-inside-callback.html
fast/js/Promise-simple-fulfill.html
fast/js/Promise-simple-in-workers.html
fast/js/Promise-simple.html
fast/js/Promise-static-fulfill.html
fast/js/Promise-static-reject.html
fast/js/Promise-static-resolve.html
fast/js/Promise-then-in-workers.html
fast/js/Promise-then-without-callbacks-in-workers.html
fast/js/Promise-then-without-callbacks.html
fast/js/Promise-then.html
fast/js/Promise-types.html
fast/js/Promise.html
* GNUmakefile.list.am:
* Target.pri:
* UseJSC.cmake:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
Add new files.
* bindings/js/JSDOMGlobalObjectTask.cpp: Added.
(WebCore::JSGlobalObjectCallback::create):
(WebCore::JSGlobalObjectCallback::~JSGlobalObjectCallback):
(WebCore::JSGlobalObjectCallback::call):
(WebCore::JSGlobalObjectCallback::JSGlobalObjectCallback):
(WebCore::JSGlobalObjectTask::JSGlobalObjectTask):
(WebCore::JSGlobalObjectTask::~JSGlobalObjectTask):
(WebCore::JSGlobalObjectTask::performTask):
* bindings/js/JSDOMGlobalObjectTask.h: Added.
(WebCore::JSGlobalObjectTask::create):
Add a new task type to be used with the GlobalObjectMethodTable's new QueueTaskToEventLoop callback.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::queueTaskToEventLoop):
* bindings/js/JSDOMWindowBase.h:
Implement the GlobalObjectMethodTable callback, QueueTaskToEventLoop.
* bindings/js/JSMainThreadExecState.h:
All using JSMainThreadExecState as a simple RAII object.
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
(WebCore::JSWorkerGlobalScopeBase::allowsAccessFrom):
(WebCore::JSWorkerGlobalScopeBase::supportsProfiling):
(WebCore::JSWorkerGlobalScopeBase::supportsRichSourceInfo):
(WebCore::JSWorkerGlobalScopeBase::shouldInterruptScript):
(WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled):
(WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
* bindings/js/JSWorkerGlobalScopeBase.h:
Add a GlobalObjectMethodTable and implement QueueTaskToEventLoop. Forward the other callbacks
to JSGlobalObject so they retain their existing behavior.
LayoutTests:
Add tests adapted from the Mozilla and Blink projects.
* fast/js/Promise-already-fulfilled-expected.txt: Added.
* fast/js/Promise-already-fulfilled.html: Added.
* fast/js/Promise-already-rejected-expected.txt: Added.
* fast/js/Promise-already-rejected.html: Added.
* fast/js/Promise-already-resolved-expected.txt: Added.
* fast/js/Promise-already-resolved.html: Added.
* fast/js/Promise-catch-expected.txt: Added.
* fast/js/Promise-catch-in-workers-expected.txt: Added.
* fast/js/Promise-catch-in-workers.html: Added.
* fast/js/Promise-catch.html: Added.
* fast/js/Promise-chain-expected.txt: Added.
* fast/js/Promise-chain.html: Added.
* fast/js/Promise-exception-expected.txt: Added.
* fast/js/Promise-exception.html: Added.
* fast/js/Promise-expected.txt: Added.
* fast/js/Promise-fulfill-expected.txt: Added.
* fast/js/Promise-fulfill-in-workers-expected.txt: Added.
* fast/js/Promise-fulfill-in-workers.html: Added.
* fast/js/Promise-fulfill.html: Added.
* fast/js/Promise-init-expected.txt: Added.
* fast/js/Promise-init-in-workers-expected.txt: Added.
* fast/js/Promise-init-in-workers.html: Added.
* fast/js/Promise-init.html: Added.
* fast/js/Promise-reject-expected.txt: Added.
* fast/js/Promise-reject-in-workers-expected.txt: Added.
* fast/js/Promise-reject-in-workers.html: Added.
* fast/js/Promise-reject.html: Added.
* fast/js/Promise-resolve-chain-expected.txt: Added.
* fast/js/Promise-resolve-chain.html: Added.
* fast/js/Promise-resolve-expected.txt: Added.
* fast/js/Promise-resolve-in-workers-expected.txt: Added.
* fast/js/Promise-resolve-in-workers.html: Added.
* fast/js/Promise-resolve-with-then-exception-expected.txt: Added.
* fast/js/Promise-resolve-with-then-exception.html: Added.
* fast/js/Promise-resolve-with-then-fulfill-expected.txt: Added.
* fast/js/Promise-resolve-with-then-fulfill.html: Added.
* fast/js/Promise-resolve-with-then-reject-expected.txt: Added.
* fast/js/Promise-resolve-with-then-reject.html: Added.
* fast/js/Promise-resolve.html: Added.
* fast/js/Promise-simple-expected.txt: Added.
* fast/js/Promise-simple-fulfill-expected.txt: Added.
* fast/js/Promise-simple-fulfill-inside-callback-expected.txt: Added.
* fast/js/Promise-simple-fulfill-inside-callback.html: Added.
* fast/js/Promise-simple-fulfill.html: Added.
* fast/js/Promise-simple-in-workers-expected.txt: Added.
* fast/js/Promise-simple-in-workers.html: Added.
* fast/js/Promise-simple.html: Added.
* fast/js/Promise-static-fulfill-expected.txt: Added.
* fast/js/Promise-static-fulfill.html: Added.
* fast/js/Promise-static-reject-expected.txt: Added.
* fast/js/Promise-static-reject.html: Added.
* fast/js/Promise-static-resolve-expected.txt: Added.
* fast/js/Promise-static-resolve.html: Added.
* fast/js/Promise-then-expected.txt: Added.
* fast/js/Promise-then-in-workers-expected.txt: Added.
* fast/js/Promise-then-in-workers.html: Added.
* fast/js/Promise-then-without-callbacks-expected.txt: Added.
* fast/js/Promise-then-without-callbacks-in-workers-expected.txt: Added.
* fast/js/Promise-then-without-callbacks-in-workers.html: Added.
* fast/js/Promise-then-without-callbacks.html: Added.
* fast/js/Promise-then.html: Added.
* fast/js/Promise-types-expected.txt: Added.
* fast/js/Promise-types.html: Added.
* fast/js/Promise.html: Added.
* fast/js/resources/Promise-catch-in-workers.js: Added.
* fast/js/resources/Promise-fulfill-in-workers.js: Added.
* fast/js/resources/Promise-init-in-workers.js: Added.
* fast/js/resources/Promise-reject-in-workers.js: Added.
* fast/js/resources/Promise-resolve-in-workers.js: Added.
* fast/js/resources/Promise-simple-in-workers.js: Added.
* fast/js/resources/Promise-then-in-workers.js: Added.
* fast/js/resources/Promise-then-without-callbacks-in-workers.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154629
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rwlbuis@webkit.org [Mon, 26 Aug 2013 19:03:46 +0000 (19:03 +0000)]
Computed style of fill/stroke properties incorrect on references
https://bugs.webkit.org/show_bug.cgi?id=114761
Reviewed by Darin Adler.
Source/WebCore:
The computed style of the fill and stroke properties did not include
the url() function. Added the url() string to output.
Updated existing tests to cover the issue.
* css/CSSPrimitiveValue.cpp: Cleanup.
(WebCore::CSSPrimitiveValue::customCssText):
* svg/SVGPaint.cpp: Added "url("
(WebCore::SVGPaint::customCssText):
LayoutTests:
Add tests to verify that url function is included for references.
* svg/css/script-tests/svg-attribute-parser-mode.js:
* svg/css/svg-attribute-parser-mode-expected.txt:
* transitions/svg-transitions-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154628
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
roger_fong@apple.com [Mon, 26 Aug 2013 19:01:23 +0000 (19:01 +0000)]
<https://bugs.webkit.org/show_bug.cgi?id=119829> Add IAccessibleText and IAccessibleEditableText interfaces and implementation to AppleWin port.
Reviewed by Chris Fleizach.
* AccessibleBase.cpp:
(AccessibleBase::createInstance): Create an AccessibleText instance when necessary.
(AccessibleBase::QueryService):
* AccessibleBase.h:
* AccessibleTextImpl.cpp: Added.
(AccessibleText::AccessibleText):
(AccessibleText::addSelection):
(AccessibleText::get_attributes): Not Implemented
(AccessibleText::get_caretOffset):
(AccessibleText::get_characterExtents):
(AccessibleText::get_nSelections):
(AccessibleText::get_offsetAtPoint):
(AccessibleText::get_selection):
(AccessibleText::get_text):
(AccessibleText::get_textBeforeOffset): Not Implemented
(AccessibleText::get_textAfterOffset): Not Implemented
(AccessibleText::get_textAtOffset): Not Implemented
(AccessibleText::removeSelection):
(AccessibleText::setCaretOffset):
(AccessibleText::setSelection):
(AccessibleText::get_nCharacters):
(AccessibleText::scrollSubstringTo):
(AccessibleText::scrollSubstringToPoint):
(AccessibleText::get_newText): Not Implemented
(AccessibleText::get_oldText): Not Implemented
(AccessibleText::get_attributeRange): Not Implemented
(AccessibleText::copyText):
(AccessibleText::deleteText):
(AccessibleText::insertText):
(AccessibleText::cutText):
(AccessibleText::pasteText):
(AccessibleText::replaceText):
(AccessibleText::setAttributes): Not Implemented
(AccessibleText::QueryInterface):
(AccessibleText::Release):
(AccessibleText::convertSpecialOffset):
(AccessibleText::initialCheck):
* AccessibleTextImpl.h: Added.
(AccessibleText::~AccessibleText):
(AccessibleText::AddRef):
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj:
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters:
* WebKit.vcxproj/WebKit/WebKit.vcxproj:
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj:
* WebKit.vcxproj/WebKitGUID/WebKitGUID.vcxproj.filters:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154627
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 18:45:21 +0000 (18:45 +0000)]
Plenty of -Wcast-align warnings in KeywordLookup.h
https://bugs.webkit.org/show_bug.cgi?id=120316
Reviewed by Darin Adler.
* KeywordLookupGenerator.py: Use reinterpret_cast instead of a C-style cast when casting
the character pointers to types of larger size. This avoids spewing lots of warnings
in the KeywordLookup.h header when compiling with the -Wcast-align option.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154626
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 18:43:59 +0000 (18:43 +0000)]
Undefine __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS before redefining them
https://bugs.webkit.org/show_bug.cgi?id=120313
Reviewed by Darin Adler.
* wtf/LLVMHeaders.h: Undefine the two macros before they are defined again.
This way we avoid the compilation-time warnings about the macros being invalidly redefined.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154625
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 18:41:26 +0000 (18:41 +0000)]
Prettify generated build guards in HTMLElementFactory.cpp
https://bugs.webkit.org/show_bug.cgi?id=120310
Reviewed by Darin Adler.
Build guards should wrap the constructor definitions without empty lines between
the guards and the constructor code. Similarly, build guards for addTag calls
shouldn't put an empty line after the build guard closure.
* dom/make_names.pl:
(printConstructorInterior):
(printConstructors):
(printFunctionInits):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154623
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
robert@webkit.org [Mon, 26 Aug 2013 18:31:24 +0000 (18:31 +0000)]
Avoid painting every non-edge collapsed border twice over
https://bugs.webkit.org/show_bug.cgi?id=119759
Reviewed by David Hyatt.
Source/WebCore:
Every collapsed border that isn't on the edge of a table gets painted at least twice, once by each
adjacent cell. The joins are painted four times. This is unnecessary and results in tables with semi-transparent
borders getting rendered incorrectly - each border adjoing two cells is painted twice and ends up darker than it should be.
Fixing the overpainting at joins is another day's work. This patch ensures each collapsed border inside a table is only
painted once. It does this by only allowing cells at the top and left edge of the table to paint their top and left collapsed borders.
All the others can only paint their right and bottom collapsed border. This works because the borders are painted from bottom right to top left.
Tests: fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html
fast/table/border-collapsing/collapsed-borders-adjoining-sections.html
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
LayoutTests:
* fast/table/border-collapsing/collapsed-borders-adjoining-sections-expected.html: Added.
* fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.png: Added.
* fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl-expected.txt: Added.
The painting here, though still wrong, is a progression on the behaviour prior to bug 11759 where
the left border was painted twice. The painting can be resolved completely when we no longer paint
twice at the border joins.
* fast/table/border-collapsing/collapsed-borders-adjoining-sections-vertical-rl.html: Added.
* fast/table/border-collapsing/collapsed-borders-adjoining-sections.html: Added.
* fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.png: Added.
* fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells-expected.txt: Added.
* fast/table/border-collapsing/collapsed-borders-painted-once-on-inner-cells.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154622
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 18:18:57 +0000 (18:18 +0000)]
Unreviewed build fix.
Source/WebCore:
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
Source/WebKit/mac:
* WebView/WebFrame.mm:
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
Source/WebKit2:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createWithCoreMainFrame):
(WebKit::WebFrame::createSubframe):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154620
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 18:06:11 +0000 (18:06 +0000)]
Unreviewed buid fix.
* page/Page.cpp:
(WebCore::Page::setNeedsRecalcStyleInAllFrames): Remove extra '{' character.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154619
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
psolanki@apple.com [Mon, 26 Aug 2013 17:57:00 +0000 (17:57 +0000)]
PageGroup::groupSettings() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=120319
Reviewed by Andreas Kling.
PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
Source/WebCore:
* Modules/indexeddb/IDBFactory.cpp:
* page/PageGroup.h:
(WebCore::PageGroup::groupSettings):
* storage/StorageNamespaceImpl.cpp:
(WebCore::StorageNamespaceImpl::localStorageNamespace):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerProxy::groupSettings):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
Source/WebKit/blackberry:
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::didChangeSettings):
Source/WebKit/gtk:
* webkit/webkitwebdatabase.cpp:
(webkit_set_web_database_directory_path):
Source/WebKit2:
* WebProcess/Storage/StorageNamespaceImpl.cpp:
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154618
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 17:54:33 +0000 (17:54 +0000)]
WebCore: Let Page create the main Frame.
<https://webkit.org/b/119964>
Source/WebCore:
Reviewed by Anders Carlsson.
Previously, Frame::create() would call Page::setMainFrame() when constructing the
main Frame for a Page. Up until that point, Page had a null mainFrame().
To guarantee that Page::mainFrame() is never null, we re-order things so that
Page is responsible for creating its own main Frame. We do this at the earliest
possible point; in the Page constructor initializer list.
Constructing a Frame requires a FrameLoaderClient*, so I've added such a field to
the PageClients struct.
When creating a WebKit-layer frame, we now wrap the already-instantiated
Page::mainFrame() instead of creating a new Frame.
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
Add an EmptyFrameLoaderClient to the PageClients constructed here.
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
Updated to wrap Page::mainFrame() in a FrameView instead of creating their
own Frame manually.
* page/Frame.cpp:
(WebCore::Frame::create):
* page/Page.h:
Remove Page::setMainFrame() and the only call site.
* page/Page.cpp:
(WebCore::Page::Page):
Construct Page::m_mainFrame in the initializer list.
(WebCore::Page::PageClients::PageClients):
Add "FrameLoaderClient* loaderClientForMainFrame" to PageClients.
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
Null-check the Frame::document() before calling through on it. This would
otherwise crash when changing font-related Settings before calling init() on
the Frame (like InspectorOverlay does.)
Source/WebKit/gtk:
Tweak WebKit1/GTK for changes in WebCore.
Patch by Zan Dobersek <zdobersek@igalia.com>
Reviewed by Gustavo Noronha Silva.
* WebCoreSupport/FrameLoaderClientGtk.h:
(WebKit::FrameLoaderClient::setWebFrame):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_new):
* webkit/webkitwebview.cpp:
(webkit_web_view_init):
Source/WebKit/mac:
Reviewed by Anders Carlsson.
* WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient::setWebFrame):
Make it possible to construct a WebFrameLoaderClient with a null WebFrame*.
A WebFrame* is later hooked up with a call to setWebFrame().
* WebView/WebFrame.mm:
(+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
Customized this method to wrap the Page::mainFrame() instead of creating a
new Frame.
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
Add a WebFrameLoaderClient to the PageClients passed to Page().
Source/WebKit2:
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
This starts out with a null WebFrame* pointer now.
(WebKit::WebFrameLoaderClient::setWebFrame):
WebFrame hooks itself up through this as soon as it's constructed.
(WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
Tweak an out-of-date comment. The ref() we're balancing out comes from
WebFrame::create().
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createWithCoreMainFrame):
Rewrote createMainFrame() as createWithCoreMainFrame(). The new method wraps
an existing WebCore::Frame instead of creating a new one.
(WebKit::WebFrame::createSubframe):
Merged WebFrame::init() into here since the logic isn't shared with main
Frame creation anymore.
(WebKit::WebFrame::create):
(WebKit::WebFrame::WebFrame):
Call WebFrameLoaderClient::setWebFrame(this).
* WebProcess/WebPage/WebFrame.h:
WebFrame::m_frameLoaderClient is now an OwnPtr rather than an inline member.
This way it can be created before the WebFrame.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Set up a WebFrameLoaderClient and pass it to the Page constructor along with
the other PageClients.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154616
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 17:51:46 +0000 (17:51 +0000)]
[Windows] Unreviewed build fix.
* rendering/RenderMediaControls.cpp: Remove references to QuickTime controls
that are no longer part of WKSI.
(wkHitTestMediaUIPart):
(wkMeasureMediaUIPart):
(wkDrawMediaUIPart):
(wkDrawMediaSliderTrack):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154615
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 26 Aug 2013 17:48:49 +0000 (17:48 +0000)]
<https://webkit.org/b/106133> document.body.scrollTop & document.documentElement.scrollTop differ cross-browser
Patch by Gurpreet Kaur <gur.trio@gmail.com> on 2013-08-26
Reviewed by Darin Adler.
Source/WebCore:
Webkit always uses document.body.scrollTop whether quirks or
standard mode. Similiar behaviour is for document.body.scrollLeft.
As per the specification webkit should return document.body.scrollTop
for quirks mode and document.documentElement.scrollTop for standard mode.
Same for document.body.scrollLeft and document.documentElement.scrollLeft.
Tests: fast/dom/Element/scrollLeft-Quirks.html
fast/dom/Element/scrollLeft.html
fast/dom/Element/scrollTop-Quirks.html
fast/dom/Element/scrollTop.html
* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
If the element does not have any associated CSS layout box or the element
is the root element and the Document is in quirks mode return zero.
Else If the element is the root element return the value of scrollY
for scrollTop and scrollX for scrollLeft.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollLeft):
(WebCore::HTMLBodyElement::scrollTop):
If the element is the HTML body element, the Document is in quirks mode,
return the value of scrollY for scrollTop and scrollX for scrollLeft.
LayoutTests:
* fast/dom/Element/scrollLeft-Quirks-expected.txt: Added.
* fast/dom/Element/scrollLeft-Quirks.html: Added.
* fast/dom/Element/scrollLeft-expected.txt: Added.
* fast/dom/Element/scrollLeft.html: Added.
* fast/dom/Element/scrollTop-Quirks-expected.txt: Added.
* fast/dom/Element/scrollTop-Quirks.html: Added.
* fast/dom/Element/scrollTop-expected.txt: Added.
* fast/dom/Element/scrollTop.html: Added.
Added new tests for verifying our behavior for document.body.scrollTop/scrollLeft and
document.documentElement.scrollTop/scrollLeft for both Quirks as well as Standard mode.
* fast/css/zoom-body-scroll-expected.txt:
* fast/css/zoom-body-scroll.html:
* fast/events/mouse-cursor.html:
* http/tests/navigation/anchor-frames-expected.txt:
* http/tests/navigation/anchor-frames-gbk-expected.txt:
* http/tests/navigation/resources/frame-with-anchor-gbk.html:
* http/tests/navigation/resources/frame-with-anchor-same-origin.html:
* http/tests/navigation/resources/frame-with-anchor.html:
* platform/mac-wk2/tiled-drawing/resources/scroll-and-load-page.html:
* platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
* platform/win/fast/css/zoom-body-scroll-expected.txt:
Rebaselining existing tests as per the new behavior. The test cases are changed to use
quirks mode because it uses document.body.scrollTop/scrollLeft and as per the new code
document.body.scrollTop/scrollLeft will return correct value if document is in quirk mode
Also test cases have been modified so that it tests what it used to.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154614
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Mon, 26 Aug 2013 17:45:59 +0000 (17:45 +0000)]
REGRESSION (r154581): Some plugin tests failing in debug bots
https://bugs.webkit.org/show_bug.cgi?id=120315
Reviewed by Darin Adler.
We are hitting the new no-event-dispatch-while-iterating assertion.
Detaching deletes a plugin which modifies DOM while it dies.
* dom/Document.cpp:
(WebCore::Document::createRenderTree):
(WebCore::Document::detach):
Don't iterate at all. Document never has more than one Element child anyway.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154613
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
barraclough@apple.com [Mon, 26 Aug 2013 17:43:09 +0000 (17:43 +0000)]
RegExpMatchesArray should not call [[put]]
https://bugs.webkit.org/show_bug.cgi?id=120317
Reviewed by Oliver Hunt.
This will call accessors on the JSObject/JSArray prototypes - so adding an accessor or read-only
property called index or input to either of these prototypes will result in broken behavior.
Source/JavaScriptCore:
* runtime/RegExpMatchesArray.cpp:
(JSC::RegExpMatchesArray::reifyAllProperties):
- put -> putDirect
LayoutTests:
* fast/regex/lastIndex-expected.txt:
* fast/regex/script-tests/lastIndex.js:
- Added test
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154612
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Mon, 26 Aug 2013 17:33:45 +0000 (17:33 +0000)]
Building is so overrated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154611
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Mon, 26 Aug 2013 17:21:38 +0000 (17:21 +0000)]
Disable compression under MSVC for now
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154610
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 16:53:42 +0000 (16:53 +0000)]
[Windows] Updates to WKSI to get external builders working.
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib32/WebKitSystemInterface.lib:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154609
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Mon, 26 Aug 2013 16:28:16 +0000 (16:28 +0000)]
BUILD FIX (r154580): RenderObject::document() returns a reference
See: <https://webkit.org/b/120272>
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
(AXAttributeStringSetHeadingLevel):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154608
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 16:22:21 +0000 (16:22 +0000)]
[Windows] Build fix after r154541.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove reference
to deleted Element::pseudoElement(PseudoID), and add exports for new
beforePseudoElement() and afterPseudoElement().
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154607
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 16:13:57 +0000 (16:13 +0000)]
[Windows] Build fix after r154578. Return Vector<String>() instead
of ListHashSet<String>().
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154606
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 16:09:50 +0000 (16:09 +0000)]
[Windows] Build fix after r154580.
* rendering/RenderThemeWin.cpp: Mirror changes made for other ports now that
Frame is known to always be valid when in a render tree. This allows us to
get rid of some unneeded null checks.
(WebCore::RenderThemeWin::getThemeData):
(WebCore::RenderThemeWin::paintMenuList):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154605
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Mon, 26 Aug 2013 15:53:22 +0000 (15:53 +0000)]
[Windows] Build fix after r154554.
* page/AutoscrollController.cpp: Correct various places where pointers are now
references.
(WebCore::AutoscrollController::stopAutoscrollTimer):
(WebCore::AutoscrollController::startPanScrolling):
(WebCore::AutoscrollController::autoscrollTimerFired):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154604
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 15:09:22 +0000 (15:09 +0000)]
[GTK] Add WebKit2 API for isolated worlds
https://bugs.webkit.org/show_bug.cgi?id=103377
Reviewed by Anders Carlsson.
* GNUmakefile.list.am: Add new files to compilation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(testWebExtensionWindowObjectCleared):
(scriptDialogCallback):
(runJavaScriptInIsolatedWorldFinishedCallback):
(testWebExtensionIsolatedWorld):
(beforeAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(echoCallback):
(windowObjectCleared):
(getWebPage):
(methodCallCallback):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
(webkit_frame_get_javascript_context_for_script_world): New public
method to tget the JavaScript execution context for a given script
world.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
(scriptWorlds): Global WebKitScriptWorld map.
(_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
(webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
given injected bundle script world.
(webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
bundle script world wrapped by the given WebKitScriptWorld.
(webkitScriptWorldWindowObjectCleared): Emit
WebKitScriptWorld::window-object-cleared signal.
(webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
the given injected bundle script world.
(createDefaultScriptWorld): Create the default WebKitScriptWorld
wrapping the normal world.
(webkit_script_world_get_default): Return the default WebKitScriptWorld.
(webkit_script_world_new): Create a new isolated WebKitScriptWorld.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
(webkitWebPageCreate): Add implementation for callback
didClearWindowObjectForFrame in injected bundle loader client.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
Include WebKitScriptWorld.h.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154603
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 15:02:42 +0000 (15:02 +0000)]
[WebKit2] Offsets for WKBundlePageLoaderClient in APIClientTraits are wrong
https://bugs.webkit.org/show_bug.cgi?id=120268
Reviewed by Anders Carlsson.
* Shared/APIClientTraits.cpp: Use always the first member of every
version as the offset of the version.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154602
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 13:32:12 +0000 (13:32 +0000)]
[GTK] Include most of the WebKit2 unit tests into the build and testing
https://bugs.webkit.org/show_bug.cgi?id=120307
Reviewed by Philippe Normand.
There are still various unit test source files that are not being included into
the build. This patch includes most of these, only leaving out tests that do not
compile or test features that are not supported by the GTK port.
* Scripts/run-gtk-tests: Skip four newly-added tests that are failing or timing out.
(TestRunner):
* TestWebKitAPI/GNUmakefile.am:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154601
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 13:10:00 +0000 (13:10 +0000)]
[GTK] Allow to run tests without Xvfb in run-gtk-tests
https://bugs.webkit.org/show_bug.cgi?id=120298
Reviewed by Philippe Normand.
Add --no-xvfb command line option to run tests in the current
display.
* Scripts/run-gtk-tests:
(TestRunner._run_xvfb): Return early if option --no-xvfb has been
passed.
(TestRunner._setup_testing_environment): Use helper function
_run_xvfb to start Xvfb if needed.
(TestRunner._tear_down_testing_environment): Check Xvfb is
actually running before trying to terminate it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154600
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
kov@webkit.org [Mon, 26 Aug 2013 12:45:18 +0000 (12:45 +0000)]
[GTK L10N] Updated Brazilian Portuguese translation for WebKitGTK+
https://bugs.webkit.org/show_bug.cgi?id=120193
Patch by Enrico Nicoletto <liverig@gmail.com> on 2013-08-26
Reviewed by Gustavo Noronha Silva.
* pt_BR.po: Updated.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154599
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zarvai@inf.u-szeged.hu [Mon, 26 Aug 2013 11:59:52 +0000 (11:59 +0000)]
Adding Gabor Abraham to contributors.json.
Reviewed by Csaba Osztrogonác.
* Scripts/webkitpy/common/config/contributors.json:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154598
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 11:13:11 +0000 (11:13 +0000)]
Move DocumentTiming inside ENABLE(WEB_TIMING) guards.
<https://webkit.org/b/120281>
Reviewed by Anders Carlsson.
Looks like this struct is only used by other ENABLE(WEB_TIMING) code, so don't bother
filling it in if we're not building like that.
* dom/Document.cpp:
(WebCore::Document::setReadyState):
(WebCore::Document::finishedParsing):
* dom/Document.h:
* dom/DocumentTiming.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154597
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Mon, 26 Aug 2013 10:43:40 +0000 (10:43 +0000)]
Unreviewed, EFL gardening. EFL WK1 DRT doesn't support exif-orientation tests
* platform/efl-wk1/TestExpectations: Add fast/images/exif-orientation-composited.html as failure.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154596
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 10:36:03 +0000 (10:36 +0000)]
[GTK] Add support for passing test directories to run-gtk-tests
https://bugs.webkit.org/show_bug.cgi?id=120296
Reviewed by Philippe Normand.
* Scripts/run-gtk-tests:
(TestRunner._get_tests_from_dir): Helper function to return all
unit tests found in a given directory.
(TestRunner._get_tests): Check the given tests passed in the
command line, so that if a directory is found the tests contained
in the directory are added to the list of tests to run.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154595
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 10:31:35 +0000 (10:31 +0000)]
[GTK] Improve the stop/reload button implementation in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=120292
Reviewed by Philippe Normand.
- Use an instance member of BrowserWindow for the button widget
instead of a global variable.
- Use notify::is-loading to monitor the WebView load instead of
the estimated-load-progress property.
- Use webkit_web_view_is_loading() to check whether the view
is loading to change the button icon instead of a string
comparison of the gtk stock icon id.
- Use the right casts to fix compile warning.
* MiniBrowser/gtk/BrowserWindow.c:
(reloadOrStopCallback):
(webViewLoadProgressChanged):
(webViewIsLoadingChanged):
(browser_window_init):
(browserWindowConstructed):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154594
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Mon, 26 Aug 2013 10:07:28 +0000 (10:07 +0000)]
[Qt] Remove the fix in QWebPage::javaScriptConsoleMessage introduced by (r61433)
https://bugs.webkit.org/show_bug.cgi?id=119791
Source/WebKit/qt:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
* WidgetApi/qwebpage.cpp:
(QWebPage::javaScriptConsoleMessage): Removed hack specific to DRT, introduced by
(r61433).
Tools:
Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-26
Reviewed by Jocelyn Turcotte.
Load empty url to send onunload event to currently running page. onunload event is
mandatory for LayoutTests/plugins/open-and-close-window-with-plugin.html and
LayoutTests/plugins/geturlnotify-during-document-teardown.html.
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebPage::~WebPage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154593
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 08:43:51 +0000 (08:43 +0000)]
[GTK] Silence MiniBrowser compile warnings due to recent GTK+ deprecations
https://bugs.webkit.org/show_bug.cgi?id=120290
Reviewed by Philippe Normand.
* MiniBrowser/gtk/GNUmakefile.am: Add
-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6 compile option.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154592
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 08:04:40 +0000 (08:04 +0000)]
[GTK] Add missing initializer for pluginLoadPolicy in WKPageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=120289
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
(attachLoaderClientToView): Add initializer for pluginLoadPolicy
and rename the comment of the previous one as
pluginLoadPolicy_deprecatedForUseWithV2.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154591
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Mon, 26 Aug 2013 07:53:10 +0000 (07:53 +0000)]
[GTK] Add WillLoad test files to the TestWebKitAPI/TestWebKit2 program
https://bugs.webkit.org/show_bug.cgi?id=120288
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/GNUmakefile.am: Add the WillLoad.cpp build target that should be compiled
into the TestWebKit2 program. The InjectedBundle counterpart file is added to the build as well.
These unit tests are at the moment failing in debug configurations, so it would be nice to
have the GTK builds report these failures as well.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154590
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 07:47:55 +0000 (07:47 +0000)]
[GTK] webkitCredentialGetCredential returns a temporary in g_return_val_if_fail
https://bugs.webkit.org/show_bug.cgi?id=120287
Reviewed by Philippe Normand.
* UIProcess/API/gtk/WebKitCredential.cpp:
(webkitCredentialGetCredential): Use ASSERT() instead of
g_return_val_if_fail() since this is a private function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154589
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
carlosgc@webkit.org [Mon, 26 Aug 2013 07:45:16 +0000 (07:45 +0000)]
[GTK] Fix compile warning in WebKitDOMCustom
https://bugs.webkit.org/show_bug.cgi?id=120286
Reviewed by Philippe Normand.
* bindings/gobject/WebKitDOMCustom.cpp:
(webkit_dom_html_element_get_item_type): Add return 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154588
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Mon, 26 Aug 2013 06:20:42 +0000 (06:20 +0000)]
[EFL] EWebLauncher is executed as full screen with device pixel ratio
https://bugs.webkit.org/show_bug.cgi?id=120282
Reviewed by Gyuyoung Kim.
* EWebLauncher/main.c:
Use double instead of float for device_pixel_ratio which is passed to ECORE_GETOPT_VALUE_DOUBLE.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154587
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Mon, 26 Aug 2013 06:05:05 +0000 (06:05 +0000)]
JSHTMLFormElement::canGetItemsForName needlessly allocates a Vector
https://bugs.webkit.org/show_bug.cgi?id=120277
Reviewed by Sam Weinig.
Added HTMLFormElement::hasNamedElement and used it in JSHTMLFormElement::canGetItemsForName.
This required fixing a bug in HTMLFormElement::getNamedElements that the first call to getNamedElements
after replacing an element A with another element B of the same name caused it to erroneously append A
to namedItems via the aliases mapping. Because getNamedElements used to be always called in pairs, this
wrong behavior was never visible to the Web. Fixed the bug by not adding the old element to namedItem
when namedItem's size is 1.
Also renamed m_elementAliases to m_pastNamesMap along with related member functions.
No new tests are added since there should be no Web exposed behavioral change.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::canGetItemsForName):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::elementFromPastNamesMap):
(WebCore::HTMLFormElement::addElementToPastNamesMap):
(WebCore::HTMLFormElement::hasNamedElement):
(WebCore::HTMLFormElement::getNamedElements):
* html/HTMLFormElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154586
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 02:21:32 +0000 (02:21 +0000)]
RenderLayerBacking::renderer() should return a reference.
<https://webkit.org/b/120280>
Reviewed by Anders Carlsson.
It's just a forwarding call to RenderLayer::renderer() which already returns a reference.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154585
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Mon, 26 Aug 2013 02:08:33 +0000 (02:08 +0000)]
Add toSVGMissingGlyphElement(), and use it.
https://bugs.webkit.org/show_bug.cgi?id=120197
Reviewed by Andreas Kling.
As a step to clean-up static_cast<SVGXXX>, toSVGMissingGlyphElement() is added to clean-up
static_cast<SVGMissingGlyphElement*>.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::firstMissingGlyphElement):
(WebCore::SVGFontElement::ensureGlyphCache):
* svg/SVGMissingGlyphElement.h:
(WebCore::toSVGMissingGlyphElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154584
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Mon, 26 Aug 2013 01:02:34 +0000 (01:02 +0000)]
RenderLayer::renderer() should return a reference.
<https://webkit.org/b/120276>
Reviewed by Anders Carlsson.
RenderLayer is always created with a renderer, so make renderer() (and m_renderer) references.
Nuked an assortment of useless null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154583
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sun, 25 Aug 2013 21:43:39 +0000 (21:43 +0000)]
Improve srcset's layout tests
https://bugs.webkit.org/show_bug.cgi?id=120274
Moved srcset's tests to use js-test-pre, and output text with clear PASS/FAILED statements.
Added expected.txt files to the test directory, since there shouldn't be any platform variance in the results.
For some of the tests, added an equivalent 1x/2x test, to make sure the feature behaves on both DPRs.
Added preload tests on the "change-dynamically" tests, to make sure the 'src' resource is not loaded when it shouldn't.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-25
Reviewed by Andreas Kling.
* fast/hidpi/image-srcset-change-dynamically-from-js-1x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-1x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x-expected.txt: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js-2x.html: Added.
* fast/hidpi/image-srcset-change-dynamically-from-js.html: Removed.
* fast/hidpi/image-srcset-data-src-expected.txt: Added.
* fast/hidpi/image-srcset-data-src.html:
* fast/hidpi/image-srcset-data-srcset-expected.txt: Added.
* fast/hidpi/image-srcset-data-srcset.html:
* fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-correct-src.html:
* fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Added.
* fast/hidpi/image-srcset-invalid-inputs-except-one.html:
* fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Added.
* fast/hidpi/image-srcset-remove-dynamically-from-js.html:
* fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Added.
* fast/hidpi/image-srcset-same-alternative-for-both-attributes.html:
* fast/hidpi/image-srcset-simple-1x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-1x.html: Added.
* fast/hidpi/image-srcset-simple-2x-expected.txt: Added.
* fast/hidpi/image-srcset-simple-2x.html: Added.
* fast/hidpi/image-srcset-simple.html: Removed.
* fast/hidpi/image-srcset-src-selection-1x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-1x.html: Added.
* fast/hidpi/image-srcset-src-selection-2x-expected.txt: Added.
* fast/hidpi/image-srcset-src-selection-2x.html: Added.
* fast/hidpi/image-srcset-src-selection.html: Removed.
* fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Added.
* fast/hidpi/image-srcset-viewport-modifiers.html:
* platform/mac/fast/hidpi/image-srcset-change-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-data-srcset-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-correct-src-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-invalid-inputs-except-one-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-remove-dynamically-from-js-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-same-alternative-for-both-attributes-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-simple-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-src-selection-expected.txt: Removed.
* platform/mac/fast/hidpi/image-srcset-viewport-modifiers-expected.txt: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154582
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sun, 25 Aug 2013 21:30:10 +0000 (21:30 +0000)]
Element child and descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120248
Reviewed by Sam Weinig and Andreas Kling.
Add iterators for Element children and descendants.
To iterate over element children:
#include "ChildIterator.h"
for (auto it = elementChildren(this).begin(), end = elementChildren(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = childrenOfType<HTMLAreaElement>(this).begin(), end = childrenOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
To iteratate over element descendants in pre-order:
#include "DescendantIterator.h"
for (auto it = elementDescendants(this).begin(), end = elementDescendants(this).end(); it != end; ++it) {
Element& element = *it;
...
for (auto it = descendantsOfType<HTMLAreaElement>(this).begin(), end = descendantsOfType<HTMLAreaElement>(this).end(); it != end; ++it) {
HTMLAreaElement& area = *it;
...
The iterators assert against DOM mutations and event dispatch while iterating in debug builds.
They are compatible with C++11 range-based for loops. In the future we can use
for (auto& element : elementChildren(this))
...
etc.
The patch all uses the new iterators in a few places.
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityRenderObject.cpp:
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* dom/ChildIterator.h: Added.
(WebCore::ChildIterator::operator*):
(WebCore::ChildIterator::operator->):
(WebCore::::ChildIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::ChildIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementChildren):
(WebCore::childrenOfType):
* dom/DescendantIterator.h: Added.
(WebCore::DescendantIterator::operator*):
(WebCore::DescendantIterator::operator->):
(WebCore::::DescendantIterator):
(WebCore::::operator):
(WebCore::=):
(WebCore::::DescendantIteratorAdapter):
(WebCore::::begin):
(WebCore::::end):
(WebCore::elementDescendants):
(WebCore::descendantsOfType):
* dom/Document.cpp:
(WebCore::Document::buildAccessKeyMap):
(WebCore::Document::childrenChanged):
(WebCore::Document::attach):
(WebCore::Document::detach):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::cleanupUnstyledAppleStyleSpans):
* editing/markup.cpp:
(WebCore::completeURLs):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::mapMouseEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154581
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 25 Aug 2013 21:22:06 +0000 (21:22 +0000)]
RenderObject::document() should return a reference.
<https://webkit.org/b/120272>
Reviewed by Antti Koivisto.
There's always a Document. We were allocated in someone's arena, after all.
Various null checks and assertions neutralized.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154580
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 19:43:55 +0000 (19:43 +0000)]
BUILD FIX (r154578): Return Vector<String>() from Pasteboard::types() for iOS
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Return Vector<String>() instead of
ListHashSet<String>() after r154578.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154579
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 17:24:02 +0000 (17:24 +0000)]
Make JavaScript binding for Clipboard::types more normal
https://bugs.webkit.org/show_bug.cgi?id=120271
Reviewed by Anders Carlsson.
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::types): Make a simple custom binding. Only needed because
there is a special value, null, this can return.
* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Return Vector<String> instead of ListHashSet<String>.
* dom/Clipboard.h: Ditto.
* platform/Pasteboard.h: Ditto.
* platform/blackberry/PasteboardBlackBerry.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/efl/PasteboardEfl.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::types): Ditto.
* platform/qt/PasteboardQt.cpp:
(WebCore::Pasteboard::types): Ditto.
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::types): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154578
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 14:21:44 +0000 (14:21 +0000)]
Unreviewed rollout of r154571. Broke internal iOS build.
Reopened: No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame):
(WebCore::CachedFrame::destroy):
* page/Frame.cpp:
(WebCore::Frame::clearTimers):
* page/Frame.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154577
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:28:51 +0000 (10:28 +0000)]
No need for hasData in Clipboard
https://bugs.webkit.org/show_bug.cgi?id=120269
Reviewed by Andreas Kling.
This simple forwarder does not belong in the Clipboard class.
The drag code that uses it already works directly with Pasteboard.
* dom/Clipboard.cpp: Removed hasData.
* dom/Clipboard.h: Ditto.
* page/DragController.cpp:
(WebCore::DragController::startDrag): Call through the pasteboard.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154576
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:15:43 +0000 (10:15 +0000)]
Source/WebCore: No need for documentTypeString function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebCore.exp.in: Removed export of Frame::documentTypeString.
* editing/markup.cpp:
(WebCore::documentTypeString): Added. Replaces the old Frame member function.
Makes more sense to have this here since it is both called by and calls code
in this file; somehow this function was left behind.
(WebCore::createFullMarkup): Changed to call the new function.
* editing/markup.h: Added documentTypeString function. Has to be exported
because LegacyWebArchive uses it; might be worth fixing that later.
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create): Changed to call the new function.
(WebCore::LegacyWebArchive::createFromSelection): Ditto.
* page/Frame.cpp: Removed Frame::documentTypeString.
* page/Frame.h: Ditto.
Source/WebKit/mac: Frame should not have a documentTypeString member function
https://bugs.webkit.org/show_bug.cgi?id=120262
Reviewed by Andreas Kling.
* WebView/WebFrame.mm: Removed _stringWithDocumentTypeStringAndMarkupString:
internal method, which was not used anywhere in WebKit. Internal methods are
only for use within WebKit, as opposed to public and private methods that can
be used outside.
* WebView/WebFrameInternal.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154575
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 10:00:37 +0000 (10:00 +0000)]
Clipboard is in DOM directory, but ClipboardMac is in platform directory
https://bugs.webkit.org/show_bug.cgi?id=120267
Reviewed by Andreas Kling.
This file is almost gone; has just one function in it. Move it for now, and later
we can delete it entirely.
* WebCore.xcodeproj/project.pbxproj: Updated for new file location.
* dom/ClipboardMac.mm: Moved from Source/WebCore/platform/mac/ClipboardMac.mm.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154574
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:54:09 +0000 (09:54 +0000)]
No need for notifyChromeClientWheelEventHandlerCountChanged in Frame
https://bugs.webkit.org/show_bug.cgi?id=120264
Reviewed by Andreas Kling.
* dom/Document.cpp:
(WebCore::Document::createRenderTree): Renamed attach to this.
This made it practical to remove a comment that says the same thing and
also helps make the purpose of the function considerably more clear,
although the relationship to the attached and detach functions is now
less clear; should fix that soon.
(WebCore::pageWheelEventHandlerCountChanged): Added. Contains the code
from Frame::notifyChromeClientWheelEventHandlerCountChanged, minus some
assertions that were only needed because the function was passed a frame
rather than a page.
(WebCore::Document::didBecomeCurrentDocumentInFrame): Added. Contains
most of the code from Frame::setDocument. Looking at before and after,
we can see that most of the work is within the document class and matches
up with other code already in this class. Added FIXMEs about many problems
spotted in the code.
(WebCore::Document::topDocument): Added FIXME and tweaked formatting.
(WebCore::wheelEventHandlerCountChanged): Moved the call to the
pageWheelEventHandlerCountChanged in here from the two call sites.
Also added a FIXME.
(WebCore::Document::didAddWheelEventHandler): Removed the call to
notifyChromeClientWheelEventHandlerCountChanged, since that's now handled
inside wheelEventHandlerCountChanged.
(WebCore::Document::didRemoveWheelEventHandler): Ditto.
* dom/Document.h: Renamed attach to createRenderTree, made it private,
and added a new didBecomeCurrentDocumentInFrame function.
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::createRenderTree): Renamed from attach.
* loader/PlaceholderDocument.h: Did the rename and made the function a
private override.
* page/Frame.cpp:
(WebCore::Frame::setDocument): Moved most of this function out of here
into the new Document::didBecomeCurrentDocumentInFrame function.
Also deleted notifyChromeClientWheelEventHandlerCountChanged.
* page/Frame.h: Deleted notifyChromeClientWheelEventHandlerCountChanged.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154573
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:51:42 +0000 (09:51 +0000)]
No need for dispatchVisibilityStateChangeEvent function
https://bugs.webkit.org/show_bug.cgi?id=120261
Reviewed by Andreas Kling.
* dom/Document.cpp: Removed dispatchVisibilityStateChangeEvent.
* dom/Document.h: Ditto.
* page/Frame.cpp: Ditto.
* page/Frame.h: Ditto.
* page/Page.cpp:
(WebCore::Page::setVisibilityState): Put all the logic for dispatching the
visibility state change event. Nothing here requires any special information
about the internals of Frame or Document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154572
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 09:33:29 +0000 (09:33 +0000)]
No need for clearTimers function in Frame
https://bugs.webkit.org/show_bug.cgi?id=120265
Reviewed by Andreas Kling.
* history/CachedFrame.cpp:
(WebCore::clearTimers): Added. Moved here from Frame.
(WebCore::CachedFrame::CachedFrame): Call above function.
(WebCore::CachedFrame::destroy): Ditto.
* page/Frame.cpp: Removed the two clearTimers functions.
* page/Frame.h: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154571
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 25 Aug 2013 09:27:30 +0000 (09:27 +0000)]
[gdb] Remove the pretty printer for KURLGooglePrivate
https://bugs.webkit.org/show_bug.cgi?id=120263
Reviewed by Benjamin Poulain.
Remove the pretty printer for the WebCore::KURLGooglePrivate structure that
was usable inside the gdb debugger. The structure was remove from the codebase
along with the GoogleURL backend for KURL.
* gdb/webkit.py:
(JSCJSStringPrinter.to_string):
(add_pretty_printers):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154570
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 25 Aug 2013 08:02:51 +0000 (08:02 +0000)]
FloatTypedArrayAdaptor::toJSValue should almost certainly not use jsNumber() since that attempts int conversions
https://bugs.webkit.org/show_bug.cgi?id=120228
Source/JavaScriptCore:
Reviewed by Oliver Hunt.
It turns out that there were three problems:
- Using jsNumber() meant that we were converting doubles to integers and then
possibly back again whenever doing a set() between floating point arrays.
- Slow-path accesses to double typed arrays were slower than necessary because
of the to-int conversion attempt.
- The use of JSValue as an intermediate for converting between differen types
in typedArray.set() resulted in worse code than I had previously expected.
This patch solves the problem by using template double-dispatch to ensure that
that C++ compiler sees the simplest possible combination of casts between any
combination of typed array types, while still preserving JS and typed array
conversion semantics. Conversions are done as follows:
SourceAdaptor::convertTo<TargetAdaptor>(value)
Internally, convertTo() calls one of three possible methods on TargetAdaptor,
with one method for each of int32_t, uint32_t, and double. This means that the
C++ compiler will at worst see a widening cast to one of those types followed
by a narrowing conversion (not necessarily a cast - may have clamping or the
JS toInt32() function).
This change doesn't just affect typedArray.set(); it also affects slow-path
accesses to typed arrays as well. This patch also adds a bunch of new test
coverage.
This change is a ~50% speed-up on typedArray.set() involving floating point
types.
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* runtime/GenericTypedArrayView.h:
(JSC::GenericTypedArrayView::set):
* runtime/JSDataViewPrototype.cpp:
(JSC::setData):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
(JSC::JSGenericTypedArrayView::setIndexQuickly):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::setWithSpecificType):
(JSC::::set):
* runtime/ToNativeFromValue.h: Added.
(JSC::toNativeFromValue):
* runtime/TypedArrayAdaptors.h:
(JSC::IntegralTypedArrayAdaptor::toJSValue):
(JSC::IntegralTypedArrayAdaptor::toDouble):
(JSC::IntegralTypedArrayAdaptor::toNativeFromInt32):
(JSC::IntegralTypedArrayAdaptor::toNativeFromUint32):
(JSC::IntegralTypedArrayAdaptor::toNativeFromDouble):
(JSC::IntegralTypedArrayAdaptor::convertTo):
(JSC::FloatTypedArrayAdaptor::toJSValue):
(JSC::FloatTypedArrayAdaptor::toDouble):
(JSC::FloatTypedArrayAdaptor::toNativeFromInt32):
(JSC::FloatTypedArrayAdaptor::toNativeFromUint32):
(JSC::FloatTypedArrayAdaptor::toNativeFromDouble):
(JSC::FloatTypedArrayAdaptor::convertTo):
(JSC::Uint8ClampedAdaptor::toJSValue):
(JSC::Uint8ClampedAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::toNativeFromInt32):
(JSC::Uint8ClampedAdaptor::toNativeFromUint32):
(JSC::Uint8ClampedAdaptor::toNativeFromDouble):
(JSC::Uint8ClampedAdaptor::convertTo):
LayoutTests:
Reviewed by Oliver Hunt.
Add coverage for three things:
- Typed array accesses with corner-case values.
- Typed array set() (i.e. copy) between arrays of different types.
- Performance of typedArray.set() involving different types.
This required some changes to our test harnesses, since they previously
couldn't consistently do numerical array comparisons in a reliable way.
* fast/js/regress/Float32Array-to-Float64Array-set-expected.txt: Added.
* fast/js/regress/Float32Array-to-Float64Array-set.html: Added.
* fast/js/regress/Float64Array-to-Int16Array-set-expected.txt: Added.
* fast/js/regress/Float64Array-to-Int16Array-set.html: Added.
* fast/js/regress/Int16Array-to-Int32Array-set-expected.txt: Added.
* fast/js/regress/Int16Array-to-Int32Array-set.html: Added.
* fast/js/regress/script-tests/Float32Array-to-Float64Array-set.js: Added.
* fast/js/regress/script-tests/Float64Array-to-Int16Array-set.js: Added.
* fast/js/regress/script-tests/Int16Array-to-Int32Array-set.js: Added.
* fast/js/resources/js-test-pre.js:
(areNumbersEqual):
(areArraysEqual):
(isResultCorrect):
* fast/js/resources/standalone-pre.js:
(areNumbersEqual):
(areArraysEqual):
(isTypedArray):
(isResultCorrect):
(stringify):
(shouldBe):
* fast/js/script-tests/typed-array-access.js: Added.
(bitsToString):
(bitsToValue):
(valueToBits):
(roundTrip):
* fast/js/script-tests/typed-array-set-different-types.js: Added.
(MyRandom):
(.reference):
(.usingConstruct):
* fast/js/typed-array-access-expected.txt: Added.
* fast/js/typed-array-access.html: Added.
* fast/js/typed-array-set-different-types-expected.txt: Added.
* fast/js/typed-array-set-different-types.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154569
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Sun, 25 Aug 2013 07:20:47 +0000 (07:20 +0000)]
Unreviewed EFL gardening.
* platform/efl/TestExpectations:
Unskipped some accessibility tests which are already passed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154568
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 25 Aug 2013 07:06:47 +0000 (07:06 +0000)]
Unreviewed GTK build fix after r154565.
* UIProcess/API/gtk/tests/TestInspector.cpp: Include the Vector header.
* UIProcess/API/gtk/tests/TestResources.cpp: Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154567
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Sun, 25 Aug 2013 05:32:14 +0000 (05:32 +0000)]
Unreviewed build fix after r154560
* page/FrameTree.cpp:
(WebCore::FrameTree::scopedChild):
Use tree(). instead of tree()->.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154566
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:39:20 +0000 (04:39 +0000)]
Save three bytes per CStringBuffer object
https://bugs.webkit.org/show_bug.cgi?id=120040
Reviewed by Darin Adler.
Merge https://chromium.googlesource.com/chromium/blink/+/
894ae8eafdb64912aefd8f9c809f4ccda84f3b89
sizeof(CStringBuffer) was rounded up to 8 on account of struct size and
alignment rules. This is clearly not what was intended.
* wtf/text/CString.cpp:
(WTF::CStringBuffer::createUninitialized):
* wtf/text/CString.h:
(WTF::CStringBuffer::data):
(WTF::CStringBuffer::mutableData):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154565
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sun, 25 Aug 2013 04:33:16 +0000 (04:33 +0000)]
[Windows] Another attempt to fix the Windows bots. Need to retain older
QuickTime player features for external builders.
* win/include/WebKitSystemInterface/WebKitSystemInterface.h:
* win/lib32/WebKitSystemInterface.lib:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154564
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 25 Aug 2013 04:20:04 +0000 (04:20 +0000)]
Unreviewed, fix build-webkit --ftl-jit in the case that you have your own llvm directory. We need to
prune 'libgtest' and friends from the llvm build, since WebKit builds its own and none of the llvm
libraries depend on libgtest anyway.
* Scripts/copy-webkitlibraries-to-product-directory:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154563
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:19:43 +0000 (04:19 +0000)]
<https://webkit.org/b/120102> Inline SelectorQuery's execution traits
Reviewed by Sam Weinig.
For some reason, clang does not always inline the trait. The operations are so simple
that it shows up in profile.
Force the inlining to match the original speed.
* dom/SelectorQuery.cpp:
(WebCore::AllElementExtractorSelectorQueryTrait::appendOutputForElement):
(WebCore::SingleElementExtractorSelectorQueryTrait::appendOutputForElement):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154562
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
benjamin@webkit.org [Sun, 25 Aug 2013 04:17:06 +0000 (04:17 +0000)]
Remove a useless #include from StyledElement
https://bugs.webkit.org/show_bug.cgi?id=120245
Reviewed by Andreas Kling.
* dom/StyledElement.cpp:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154561
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 03:41:04 +0000 (03:41 +0000)]
Move Frame::inScope into FrameTree
https://bugs.webkit.org/show_bug.cgi?id=120257
Reviewed by Sam Weinig.
* page/Frame.cpp: Removed inScope.
* page/Frame.h: Ditto.
* page/FrameTree.cpp:
(WebCore::inScope): Moved it here.
(WebCore::FrameTree::scopedChild): Changed to call new function.
(WebCore::FrameTree::scopedChildCount): Ditto.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154560
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ddkilzer@apple.com [Sun, 25 Aug 2013 03:08:24 +0000 (03:08 +0000)]
BUILD FIX: Include HTMLPlugInImageElement.h for ENABLE(PLUGIN_PROXY_FOR_VIDEO)
Fixes the following build failure for iOS:
In file included from Source/WebCore/accessibility/AccessibilityAllInOne.cpp:28:
In file included from Source/WebCore/accessibility/AXObjectCache.cpp:42:
In file included from Source/WebCore/accessibility/AccessibilityMediaControls.h:36:
In file included from Source/WebCore/html/shadow/MediaControlElements.h:34:
In file included from Source/WebCore/html/shadow/MediaControlElementTypes.h:37:
Source/WebCore/html/HTMLMediaElement.h:324:23: error: unknown type name 'PluginCreationOption'
void updateWidget(PluginCreationOption);
^
* html/HTMLMediaElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154559
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 25 Aug 2013 02:28:06 +0000 (02:28 +0000)]
Frame::tree should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=120259
Reviewed by Andreas Kling.
Source/WebCore:
* page/Frame.h:
(WebCore::Frame::tree): Return a reference instead of a pointer.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::childFrameGetter):
(WebCore::indexGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
(WebCore::JSDOMWindow::setLocation):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::setJavaScriptPaused):
* dom/Document.cpp:
(WebCore::canAccessAncestor):
(WebCore::Document::adoptNode):
(WebCore::Document::canNavigate):
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):
(WebCore::Document::notifySeamlessChildDocumentsOfStylesheetUpdate):
(WebCore::Document::openSearchDescriptionURL):
(WebCore::Document::setDesignMode):
(WebCore::Document::parentDocument):
(WebCore::Document::initSecurityContext):
(WebCore::Document::initContentSecurityPolicy):
(WebCore::Document::requestFullScreenForElement):
(WebCore::Document::webkitExitFullscreen):
(WebCore::Document::didRemoveTouchEventHandler):
* dom/TreeScope.cpp:
(WebCore::focusedFrameOwnerElement):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::CachedFrameBase):
(WebCore::CachedFrameBase::restore):
(WebCore::CachedFrame::CachedFrame):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::hasFocus):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
* inspector/InspectorApplicationCacheAgent.cpp:
(WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
* inspector/InspectorCanvasAgent.cpp:
(WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
(WebCore::InspectorCanvasAgent::frameNavigated):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::documents):
* inspector/InspectorFileSystemAgent.cpp:
(WebCore::InspectorFileSystemAgent::assertScriptExecutionContextForOrigin):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::deleteCookie):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::findFrameWithSecurityOrigin):
(WebCore::InspectorPageAgent::buildObjectForFrame):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/PageRuntimeAgent.cpp:
(WebCore::PageRuntimeAgent::reportExecutionContextCreation):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::createDecoderIfNeeded):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::allChildrenAreComplete):
(WebCore::FrameLoader::allAncestorsAreComplete):
(WebCore::FrameLoader::loadURLIntoChildFrame):
(WebCore::FrameLoader::outgoingReferrer):
(WebCore::FrameLoader::updateFirstPartyForCookies):
(WebCore::FrameLoader::setFirstPartyForCookies):
(WebCore::FrameLoader::completed):
(WebCore::FrameLoader::started):
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):
(WebCore::FrameLoader::stopAllLoaders):
(WebCore::FrameLoader::commitProvisionalLoad):
(WebCore::FrameLoader::closeOldDataSources):
(WebCore::FrameLoader::prepareForCachedPageRestore):
(WebCore::FrameLoader::subframeIsLoading):
(WebCore::FrameLoader::subresourceCachePolicy):
(WebCore::FrameLoader::detachChildren):
(WebCore::FrameLoader::closeAndRemoveChild):
(WebCore::FrameLoader::checkLoadComplete):
(WebCore::FrameLoader::numPendingOrLoadingRequests):
(WebCore::FrameLoader::detachFromParent):
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::handleBeforeUnloadEvent):
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
(WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
(WebCore::FrameLoader::findFrameForNavigation):
(WebCore::FrameLoader::effectiveSandboxFlags):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveDocumentState):
(WebCore::HistoryController::saveDocumentAndScrollState):
(WebCore::HistoryController::restoreDocumentState):
(WebCore::HistoryController::goToItem):
(WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
(WebCore::HistoryController::recursiveUpdateForCommit):
(WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
(WebCore::HistoryController::initializeItem):
(WebCore::HistoryController::createItemTree):
(WebCore::HistoryController::recursiveSetProvisionalItem):
(WebCore::HistoryController::recursiveGoToItem):
(WebCore::HistoryController::currentFramesMatchItem):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::mustLockBackForwardList):
(WebCore::NavigationScheduler::scheduleFormSubmission):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::progressCompleted):
(WebCore::ProgressTracker::isMainLoadProgressing):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::checkInsecureContent):
* loader/icon/IconController.cpp:
(WebCore::IconController::urlsForTypes):
(WebCore::IconController::startLoader):
* page/Chrome.cpp:
(WebCore::canRunModalIfDuringPageDismissal):
(WebCore::Chrome::windowScreenDidChange):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::length):
(WebCore::DOMWindow::name):
(WebCore::DOMWindow::setName):
(WebCore::DOMWindow::parent):
(WebCore::DOMWindow::top):
(WebCore::DOMWindow::open):
* page/EventHandler.cpp:
(WebCore::EventHandler::scrollRecursively):
(WebCore::EventHandler::logicalScrollRecursively):
(WebCore::EventHandler::handleMouseMoveEvent):
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):
* page/Frame.cpp:
(WebCore::parentPageZoomFactor):
(WebCore::parentTextZoomFactor):
(WebCore::Frame::setPrinting):
(WebCore::Frame::shouldUsePrintingLayout):
(WebCore::Frame::dispatchVisibilityStateChangeEvent):
(WebCore::Frame::willDetachPage):
(WebCore::Frame::setPageAndTextZoomFactors):
(WebCore::Frame::deviceOrPageScaleFactorChanged):
(WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged):
(WebCore::Frame::isURLAllowed):
* page/FrameTree.cpp:
(WebCore::FrameTree::~FrameTree):
(WebCore::FrameTree::setName):
(WebCore::FrameTree::transferChild):
(WebCore::FrameTree::appendChild):
(WebCore::FrameTree::actuallyAppendChild):
(WebCore::FrameTree::removeChild):
(WebCore::FrameTree::uniqueChildName):
(WebCore::FrameTree::scopedChild):
(WebCore::FrameTree::scopedChildCount):
(WebCore::FrameTree::childCount):
(WebCore::FrameTree::child):
(WebCore::FrameTree::find):
(WebCore::FrameTree::isDescendantOf):
(WebCore::FrameTree::traverseNext):
(WebCore::FrameTree::traversePreviousWithWrap):
(WebCore::FrameTree::deepLastChild):
(WebCore::FrameTree::top):
(printFrames):
(showFrameTree):
* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):
(WebCore::FrameView::hasCompositedContentIncludingDescendants):
(WebCore::FrameView::hasCompositingAncestor):
(WebCore::FrameView::flushCompositingStateIncludingSubframes):
(WebCore::FrameView::updateCanBlitOnScrollRecursively):
(WebCore::FrameView::setIsOverlapped):
(WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
(WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
(WebCore::FrameView::serviceScriptedAnimations):
(WebCore::FrameView::updateBackgroundRecursively):
(WebCore::FrameView::parentFrameView):
(WebCore::FrameView::paintContentsForSnapshot):
(WebCore::FrameView::setTracksRepaints):
(WebCore::FrameView::notifyWidgetsInAllFrames):
* page/Location.cpp:
(WebCore::Location::ancestorOrigins):
* page/Page.cpp:
(WebCore::networkStateChanged):
(WebCore::Page::~Page):
(WebCore::Page::renderTreeSize):
(WebCore::Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment):
(WebCore::Page::setNeedsRecalcStyleInAllFrames):
(WebCore::Page::refreshPlugins):
(WebCore::Page::takeAnyMediaCanStartListener):
(WebCore::incrementFrame):
(WebCore::Page::setDefersLoading):
(WebCore::Page::setMediaVolume):
(WebCore::Page::setDeviceScaleFactor):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore::Page::didMoveOnscreen):
(WebCore::Page::willMoveOffscreen):
(WebCore::Page::setIsInWindow):
(WebCore::Page::suspendScriptedAnimations):
(WebCore::Page::resumeScriptedAnimations):
(WebCore::Page::userStyleSheetLocationChanged):
(WebCore::Page::allVisitedStateChanged):
(WebCore::Page::visitedStateChanged):
(WebCore::Page::setDebugger):
(WebCore::Page::setMemoryCacheClientCallsEnabled):
(WebCore::Page::setMinimumTimerInterval):
(WebCore::Page::setTimerAlignmentInterval):
(WebCore::Page::dnsPrefetchingStateChanged):
(WebCore::Page::collectPluginViews):
(WebCore::Page::storageBlockingStateChanged):
(WebCore::Page::privateBrowsingStateChanged):
(WebCore::Page::checkSubframeCountConsistency):
(WebCore::Page::suspendActiveDOMObjectsAndAnimations):
(WebCore::Page::resumeActiveDOMObjectsAndAnimations):
(WebCore::Page::captionPreferencesChanged):
* page/PageGroup.cpp:
(WebCore::PageGroup::invalidateInjectedStyleSheetCacheInAllFrames):
* page/PageGroupLoadDeferrer.cpp:
(WebCore::PageGroupLoadDeferrer::PageGroupLoadDeferrer):
(WebCore::PageGroupLoadDeferrer::~PageGroupLoadDeferrer):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::serializeFrame):
* page/PageThrottler.cpp:
(WebCore::PageThrottler::throttlePage):
(WebCore::PageThrottler::unthrottlePage):
* page/Settings.cpp:
(WebCore::setImageLoadingSettings):
(WebCore::Settings::setTextAutosizingFontScaleFactor):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::suspendAnimations):
(WebCore::AnimationControllerPrivate::resumeAnimations):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
(WebCore::Page::removeSchedulePair):
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
(WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
* plugins/PluginView.cpp:
(WebCore::PluginView::performRequest):
(WebCore::PluginView::load):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::targetFrame):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::currentScale):
(WebCore::SVGSVGElement::setCurrentScale):
* testing/Internals.cpp:
(WebCore::Internals::formControlStateOfPreviousHistoryItem):
(WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
(WebCore::Internals::numberOfScrollableAreas):
* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::hasNoStyleInformation):
Use tree(). instead of tree()->.
Source/WebKit/blackberry:
* Api/WebPage.cpp:
(BlackBerry::WebKit::closeURLRecursively):
(BlackBerry::WebKit::enableCrossSiteXHRRecursively):
(BlackBerry::WebKit::WebPagePrivate::setScreenOrientation):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::createFrame):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::convertPointToFrame):
(BlackBerry::WebKit::DOMSupport::incrementFrame):
Use tree(). instead of tree()->.
Source/WebKit/efl:
* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::clearFrameName):
(DumpRenderTreeSupportEfl::frameChildren):
(DumpRenderTreeSupportEfl::frameParent):
* ewk/ewk_frame.cpp:
(_ewk_frame_children_iterator_next):
(ewk_frame_child_find):
(ewk_frame_name_get):
(ewk_frame_child_add):
* ewk/ewk_view.cpp:
(ewk_view_frame_create):
Use tree(). instead of tree()->.
Source/WebKit/gtk:
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::getFrameChildren):
(DumpRenderTreeSupportGtk::clearMainFrameName):
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::createFrame):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_get_name):
(webkit_web_frame_get_parent):
(webkit_web_frame_find_frame):
* webkit/webkitwebview.cpp:
(webkit_web_view_set_highlight_text_matches):
Use tree(). instead of tree()->.
Source/WebKit/mac:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::performRequest):
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView loadPluginRequest:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(applyAppleDictionaryApplicationQuirkNonInlinePart):
(WebFrameLoaderClient::prepareForDataSourceReplacement):
(WebFrameLoaderClient::createFrame):
* WebView/WebFrame.mm:
(+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
(-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
(-[WebFrame _unmarkAllBadGrammar]):
(-[WebFrame _unmarkAllMisspellings]):
(-[WebFrame _atMostOneFrameHasSelection]):
(-[WebFrame _findFrameWithSelection]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame _isDescendantOfFrame:]):
(-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
(-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
(-[WebFrame name]):
(-[WebFrame findFrameNamed:]):
(-[WebFrame parentFrame]):
(-[WebFrame childFrames]):
* WebView/WebView.mm:
(-[WebView _attachScriptDebuggerToAllFrames]):
(-[WebView _detachScriptDebuggerFromAllFrames]):
(-[WebView _clearMainFrameName]):
(-[WebView _isUsingAcceleratedCompositing]):
(-[WebView _isSoftwareRenderable]):
(-[WebView setHostWindow:]):
(incrementFrame):
Use tree(). instead of tree()->.
Source/WebKit/qt:
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::clearFrameName):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(drtDescriptionSuitableForTestResult):
(WebCore::FrameLoaderClientQt::dispatchDidCommitLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFinishDocumentLoad):
(WebCore::FrameLoaderClientQt::postProgressStartedNotification):
(WebCore::FrameLoaderClientQt::didPerformFirstNavigation):
(WebCore::FrameLoaderClientQt::createFrame):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameData::QWebFrameData):
(QWebFrameAdapter::load):
(QWebFrameAdapter::uniqueName):
(QWebFrameAdapter::childFrames):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::findText):
Use tree(). instead of tree()->.
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createFrame):
* WebFrame.cpp:
(WebFrame::name):
(WebFrame::findFrameNamed):
(WebFrame::parentFrame):
(EnumChildFrames::EnumChildFrames):
(EnumChildFrames::Next):
(EnumChildFrames::Skip):
(EnumChildFrames::Reset):
(WebFrame::isDescendantOfFrame):
(WebFrame::unmarkAllMisspellings):
(WebFrame::unmarkAllBadGrammar):
* WebView.cpp:
(WebView::initWithFrame):
(incrementFrame):
(WebView::clearMainFrameName):
Use tree(). instead of tree()->.
Source/WebKit/wince:
* WebView.cpp:
(WebView::createFrame):
Use tree(). instead of tree()->.
Source/WebKit2:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createFrame):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithSpotlight):
* WebProcess/WebPage/FindController.cpp:
(WebKit::frameWithSelection):
(WebKit::FindController::rectsForTextMatches):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::init):
(WebKit::WebFrame::contentsAsString):
(WebKit::WebFrame::name):
(WebKit::WebFrame::childFrames):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearMainFrameName):
(WebKit::WebPage::setDrawsBackground):
(WebKit::WebPage::setDrawsTransparentBackground):
(WebKit::WebPage::setWindowResizerSize):
(WebKit::frameWithSelection):
(WebKit::WebPage::unmarkAllMisspellings):
(WebKit::WebPage::unmarkAllBadGrammar):
(WebKit::pageContainsAnyHorizontalScrollbars):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
Use tree(). instead of tree()->.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154558
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mitz@apple.com [Sun, 25 Aug 2013 01:53:55 +0000 (01:53 +0000)]
[mac] link against libz in a more civilized manner
https://bugs.webkit.org/show_bug.cgi?id=120258
Reviewed by Darin Adler.
* Configurations/JavaScriptCore.xcconfig: Removed “-lz” from OTHER_LDFLAGS_BASE.
* JavaScriptCore.xcodeproj/project.pbxproj: Added libz.dylib to the JavaScriptCore target’s
Link Binary With Libraries build phase.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154557
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 25 Aug 2013 00:07:47 +0000 (00:07 +0000)]
Merge Document::viewportSize() logic into RenderView::viewportSize().
<https://webkit.org/b/120254>
Reviewed by Darin Adler.
RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.
* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154556
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 24 Aug 2013 23:40:49 +0000 (23:40 +0000)]
RetainPtr lacks move constructor for case when argument is a RetainPtr of a different type
https://bugs.webkit.org/show_bug.cgi?id=120255
Reviewed by Andreas Kling.
Source/WTF:
* wtf/RetainPtr.h: Added missing move constructor, modeled on the other move constructor,
and the one from RetPtr.
Tools:
* TestWebKitAPI/Tests/WTF/ns/RetainPtr.mm: Added four tests covering move assignment and construction.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154555
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 22:50:46 +0000 (22:50 +0000)]
RenderObject::frame() should return a reference.
<https://webkit.org/b/120251>
Reviewed by Darin Adler.
There is now always a Frame, and we can get to it by walking this path:
RenderObject -> Document -> RenderView -> FrameView -> Frame
Removed the customary horde of null checks.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154554
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Sat, 24 Aug 2013 20:32:41 +0000 (20:32 +0000)]
Make the world build.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154553
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Sat, 24 Aug 2013 20:07:17 +0000 (20:07 +0000)]
REGRESSION(r154498): Crashes on EFL, GTK, Qt on release configurations
https://bugs.webkit.org/show_bug.cgi?id=120246
Reviewed by Antti Koivisto.
Undestroy all the platforms that don't use the global new overload
* wtf/Compression.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154552
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 24 Aug 2013 20:04:11 +0000 (20:04 +0000)]
Unreviewed, rolling out r154545.
http://trac.webkit.org/changeset/154545
https://bugs.webkit.org/show_bug.cgi?id=120252
Broke WebKit2 API tests (Requested by andersca on #webkit).
* GNUmakefile.list.am:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/tests/TestWebExtensions.cpp:
(beforeAll):
* UIProcess/API/gtk/tests/WebExtensionTest.cpp:
(methodCallCallback):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
(webkit_frame_get_javascript_global_context):
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Removed.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkitWebPageCreate):
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154551
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
joepeck@webkit.org [Sat, 24 Aug 2013 18:58:36 +0000 (18:58 +0000)]
Web Inspector: Breakpoints in the editors gutter should have a contextmenu
https://bugs.webkit.org/show_bug.cgi?id=120169
Reviewed by Timothy Hatcher.
Updated CodeMirror now has a gutterContextMenu event. Use that to give
breakpoint related context menus. Add, Edit, Enable/Disable, Delete, and
Reveal in Debugger Navigation Sidebar.
* Localizations/en.lproj/localizedStrings.js:
"Add Breakpoint", and "Reveal in Debugger Navigation Sidebar".
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
Show a context menu when clicking on the gutter for 0 breakpoints,
1 breakpoint, or >1 breakpoints. The only tricky handler is addBreakpoint,
since that must update the TextEditor for the new breakpoint info.
* UserInterface/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype._gutterContextMenu):
Send to delegate if the delegate implements textEditorGutterContextMenu.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154550
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 24 Aug 2013 18:27:32 +0000 (18:27 +0000)]
RenderLayer::compositor() should return a reference.
<https://webkit.org/b/120250>
Reviewed by Anders Carlsson.
It was already converting from a reference to a pointer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154549
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 24 Aug 2013 17:55:44 +0000 (17:55 +0000)]
Eliminate a useless comparison in srcset's candidate selection algorithm
https://bugs.webkit.org/show_bug.cgi?id=120235
Source/WebCore:
There is no point in comparing the last item in the candidates vector to the DPR, since it will be returned anyway. Therefore, the
iteration on the candidates vector now skips the last candidate.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-24
Reviewed by Andreas Kling.
* html/parser/HTMLParserIdioms.cpp:
(WebCore::bestFitSourceForImageAttributes):
LayoutTests:
Removed MIME types from the test's output, since they're irrelevant for the test, and make it fragile.
Patch by Yoav Weiss <yoav@yoav.ws> on 2013-08-24
Reviewed by Andreas Kling.
* fast/hidpi/image-srcset-fraction-expected.txt:
* fast/hidpi/image-srcset-fraction.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154548
268f45cc-cd09-0410-ab3c-
d52691b4dbfc