akling@apple.com [Mon, 7 Oct 2013 03:39:12 +0000 (03:39 +0000)]
Range constructors should take a Document&.
<https://webkit.org/b/122435>
Reviewed by Sam Weinig.
Source/WebCore:
Make all Range constructors take Document& instead of a PassRefPtr.
This removes one null check at every call site.
Also use a Ref<Document> for storage in Range.
Source/WTF:
Give Ref an assignment operator.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157018
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Mon, 7 Oct 2013 03:37:54 +0000 (03:37 +0000)]
jsc-layout-tests.yaml/js/script-tests/dfg-arguments-osr-exit.js.layout-dfg-eager-no-cjit fails in release mode on the bots
https://bugs.webkit.org/show_bug.cgi?id=122436
Unreviewed, green the bots by not running the eager variants of these tests.
Will unskip when I land the fix for https://bugs.webkit.org/show_bug.cgi?id=122418.
* js/script-tests/dfg-arguments-osr-exit-multiple-blocks-before-exit.js:
* js/script-tests/dfg-arguments-osr-exit-multiple-blocks.js:
* js/script-tests/dfg-arguments-osr-exit.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157017
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Mon, 7 Oct 2013 02:37:32 +0000 (02:37 +0000)]
Unreviewed, fix build on old Rubies.
* Scripts/run-jsc-stress-tests:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157016
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Mon, 7 Oct 2013 02:17:02 +0000 (02:17 +0000)]
Factor text paint style computation out from InlineTextBox
https://bugs.webkit.org/show_bug.cgi?id=122433
Reviewed by Andreas Kling.
Move it to TextPaintStyle.h/cpp. Other parts of the code may use it in the future.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157015
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Mon, 7 Oct 2013 02:14:52 +0000 (02:14 +0000)]
Unified test infrastructure via the jsc shell
https://bugs.webkit.org/show_bug.cgi?id=120696
Source/JavaScriptCore:
Reviewed by Oliver Hunt.
Add a mozilla-tests.yaml list. This is autogenerated by create-mozilla-js-test-list.
I think it's better to leave this checked in; we may even just edit it directly in
the future. Also generating it is not cheap.
Fix some low-hanging fruit bugs that I caught by introducing more test coverage.
- We were not emitting labels for CFA-unreachable blocks, which caused link errors.
It's possible for a CFA-unreachable block to be jumped to, if the thing that causes
it to be unreachable is a speculation in a Branch or peephole compare.
- The register allocation assertions didn't handle peephole branches correctly. Since
the peephole branch handling returns early from compile(), the clearBlahbittyBlah()
method wasn't being called.
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* tests/mozilla/mozilla-tests.yaml: Added.
Tools:
Reviewed by Oliver Hunt.
Make run-jsc-stress-tests smart enough to be able to handle different styles of test
output (silent or noisy) and different styles of test failure (just bad exit code,
text diff, filtering for some magical text, etc.). This allows me to get rid of the
layout-test-helper. It also allows me to switch all of the old Mozilla tests to
running in run-jsc-stress-tests.
Also removes all of the code paths that defended against not having shellwords. Just
install the shellwords gem if you want to run tests.
Also removes the non-parallel test running code. No reason for it to exist anymore.
This is a massive increase in test coverage. It uncovered bugs. I fixed two of them
as part of this patch, and left three more as new bugzillas.
* Scripts/create-mozilla-js-test-list: Added.
* Scripts/jsc-stress-test-helpers/check-mozilla-failure: Added.
* Scripts/jsc-stress-test-helpers/layout-test-helper: Removed.
* Scripts/run-javascriptcore-tests:
* Scripts/run-jsc-stress-tests:
LayoutTests:
Reviewed by Oliver Hunt.
Suppress running the no-cjit and dfg-eager variants of these tests because there are
still some hard bugs to fix; they were revealed by the increase in test coverage.
* js/script-tests/dfg-inline-arguments-capture-throw-exception.js:
* js/script-tests/dfg-uint32-to-number-in-middle-of-copy-propagation.js:
* js/script-tests/integer-division-neg2tothe32-by-neg1.js:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157014
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Mon, 7 Oct 2013 00:43:55 +0000 (00:43 +0000)]
[GTK] Get rid of use of deleteAllValues in GtkDragAndDropHelper
https://bugs.webkit.org/show_bug.cgi?id=122417
Reviewed by Andreas Kling.
* platform/gtk/GtkDragAndDropHelper.cpp: Removed unneeded typedefs.
(WebCore::GtkDragAndDropHelper::~GtkDragAndDropHelper): Removed call to
deleteAllValues.
(WebCore::GtkDragAndDropHelper::handleDragEnd): Use remove directly instead
of using find then remove. I believe this fixes a storage leak.
(WebCore::GtkDragAndDropHelper::handleGetDragData): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragLeaveLater): Remove the explicit
delete since remove will automatically delete.
(WebCore::GtkDragAndDropHelper::handleDragLeave): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragMotion): Use add instead of a
combination of find and set. Also user nullptr instead of 0.
(WebCore::GtkDragAndDropHelper::handleDragDataReceived): Use get instead of find.
(WebCore::GtkDragAndDropHelper::handleDragDrop): Use get instead of find.
* platform/gtk/GtkDragAndDropHelper.h: Use nullptr instead of 0. Change value
type of m_droppingContexts to be a std::unique_ptr.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157013
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 23:26:22 +0000 (23:26 +0000)]
Windows build fix attempt.
* page/win/DragControllerWin.cpp:
(WebCore::DragController::declareAndWriteDragImage):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157012
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sun, 6 Oct 2013 22:55:54 +0000 (22:55 +0000)]
Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371
Reviewed by Darin Adler.
RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.
This also requires some type tightening elsewhere in the code.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157011
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sun, 6 Oct 2013 22:28:35 +0000 (22:28 +0000)]
Don't try to dispatch resize events for SVG images
https://bugs.webkit.org/show_bug.cgi?id=122410
Reviewed by Darin Adler.
Tested by avoiding assertion in svg/custom/large-image-pattern-crash.html
* page/FrameView.cpp:
(WebCore::FrameView::sendResizeEventIfNeeded):
Bail out for SVG images. They have scripting disabled so the event wouldn't do anything anyway.
Use of FrameView mechanisms is just an implementation detail for SVG images, they are not
meant to act like real frames.
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
Switch to Element iterator. This will take NoEventDispatchAssertion verifying the change.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157010
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sun, 6 Oct 2013 22:07:48 +0000 (22:07 +0000)]
DoYouEvenBench: Make it work on Internet Explorer 11 Release Preview
https://bugs.webkit.org/show_bug.cgi?id=122406
Reviewed by Darin Adler.
On Internet Explorer 11, $(elem).closest('li').data('id') fails to find the containig li of elem once
the first item is marked complete or deleted until we get back to the event loop in the jQuery/TodoMVC.
Worked around this limitation by overriding app.getTodo to use each item's id computed in advance.
Also use $.text instead of execCommand('InsertText') in FlightJS/MailClient since Internet Explorer
doesn't support execCommand('InsertText'). Also select the recipient to avoid exceptions.
* DoYouEvenBench/benchmark.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157009
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 21:29:36 +0000 (21:29 +0000)]
Element ancestor iterator should have a first() for convenience.
<https://webkit.org/b/122425>
Reviewed by Antti Koivisto.
Added an easy way to get the first element ancestor of a certain type
and put it to use in a few places.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157008
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 21:07:29 +0000 (21:07 +0000)]
CTTE: FrameLoader::notifier() should return a reference.
<https://webkit.org/b/122424>
Reviewed by Anders Carlsson.
It was just returning the address of an inline member, so we should
use a reference instead. Also made the backpointer to Frame in
ResourceLoadNotifier a reference.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157007
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 20:53:25 +0000 (20:53 +0000)]
Avoid layout in window.scroll{Y,X} when at topmost/leftmost position.
<https://webkit.org/b/122423>
Reviewed by Antti Koivisto.
Add a fast path for these properties to skip synchronous layout when
we are just going to return 0 anyway.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::scrollX):
(WebCore::DOMWindow::scrollY):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157006
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sun, 6 Oct 2013 20:11:38 +0000 (20:11 +0000)]
Clean up ContentData
https://bugs.webkit.org/show_bug.cgi?id=122421
Reviewed by Andreas Kling.
Replace uses of OwnPtr with std::unique_ptr and get rid of the ContentData::create overloads.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
* rendering/style/ContentData.cpp:
(WebCore::ContentData::clone):
* rendering/style/ContentData.h:
(WebCore::ContentData::setNext):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::appendContent):
(WebCore::RenderStyle::setContent):
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareNonInheritedData.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157005
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sun, 6 Oct 2013 19:48:07 +0000 (19:48 +0000)]
Be a bit shouty about final classes while we look into why the bots don't like it.
* dom/Comment.h:
* dom/ProcessingInstruction.h:
* editing/markup.cpp:
* page/PageSerializer.cpp:
* workers/SharedWorker.h:
* workers/Worker.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157004
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sun, 6 Oct 2013 19:35:47 +0000 (19:35 +0000)]
Fix windows build.
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::fragmentFromCFHTML):
(WebCore::fragmentFromHTML):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeRangeToDataObject):
(WebCore::Pasteboard::writeSelection):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157003
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sun, 6 Oct 2013 19:18:54 +0000 (19:18 +0000)]
CTTE: Thread references through markup.h
https://bugs.webkit.org/show_bug.cgi?id=122403
Reviewed by Darin Adler and Andreas Kling.
Source/WebCore:
Highlights:
- Removed createFragmentFromMarkupWithContext(), it was unused.
- Moved createFragmentFromNodes() into its one caller (in WebKit/mac)
- Add a bunch more toFoo() overloads.
Source/WebKit/mac:
* DOM/WebDOMOperations.mm:
(-[DOMNode markupString]):
(-[DOMRange markupString]):
* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
(-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157002
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 6 Oct 2013 19:01:38 +0000 (19:01 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/Modules/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122281
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/Modules/.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/indexeddb/IDBVersionChangeEvent.idl:
* Modules/mediacontrols/MediaControlsHost.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBuffer.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediasource/WebKitMediaSource.idl:
* Modules/mediasource/WebKitSourceBuffer.idl:
* Modules/mediasource/WebKitSourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/proximity/DeviceProximityEvent.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechRecognitionResult.idl:
* Modules/speech/SpeechRecognitionResultList.idl:
* Modules/speech/SpeechSynthesis.idl:
* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PannerNode.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLResultSetRowList.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/SQLTransactionSync.idl:
* Modules/websockets/WebSocket.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157001
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 18:47:32 +0000 (18:47 +0000)]
Tighten AbstractWorker and subclasses a bit.
<https://webkit.org/b/122402>
Reviewed by Darin Adler.
- Make the Worker and SharedWorker classes final.
- Have constructors take ScriptExecutionContext by reference.
- Remove unnecessary AbstractWorker::contextDestroyed() override.
- Make eventTargetInterface() inline.
Inlining eventTargetInterface() is quite neat - since we only ever
call this on tightly typed pointers from generated code, combining
final and inline turns the virtual call into a compile-time constant.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157000
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 6 Oct 2013 18:18:48 +0000 (18:18 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/html/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122280
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/html/.
* html/DOMFormData.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLVideoElement.idl:
* html/MediaController.idl:
* html/RadioNodeList.idl:
* html/TimeRanges.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/EXTDrawBuffers.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLLoseContext.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackCueList.idl:
* html/track/TextTrackList.idl:
* html/track/TextTrackRegionList.idl:
* html/track/VideoTrackList.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156999
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 18:16:48 +0000 (18:16 +0000)]
Pass VM instead of ExecState to StringObject constructor.
<https://webkit.org/b/122395>
Reviewed by Sam Weinig.
StringObject() only uses the ExecState to find the VM.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156998
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 6 Oct 2013 18:10:48 +0000 (18:10 +0000)]
[WebIIDL] Annotate IDL interfaces under Source/WebCore/svg/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122279
Reviewed by Darin Adler.
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/svg/.
* svg/SVGAngle.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGColor.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDocument.idl:
* svg/SVGElement.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGException.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGGraphicsElement.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStringList.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156997
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sun, 6 Oct 2013 18:07:25 +0000 (18:07 +0000)]
[WebIDL] Annotate IDL interfaces under Source/WebCore/page/ with the OperationsNotDeletable attribute
https://bugs.webkit.org/show_bug.cgi?id=122278
Before changing the JSC bindings generator to enforce WebIDL operations to be configurable, all the
interfaces are being annotated with the OperationsNotDeletable attribute. The attribute currently
doesn't have any effect, but will keep the operations not configurable after the generator is modified
to preserve the original behavior. The attribute will be removed from each interface after checking
conformity with other browsers (in terms of configurability of operations of that interface) and the
WebKit's existing test suites.
This patch covers IDL interfaces under Source/WebCore/page/.
* page/Console.idl:
* page/Crypto.idl:
* page/DOMSecurityPolicy.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Navigator.idl:
* page/Performance.idl:
* page/PerformanceEntryList.idl:
* page/SpeechInputResultList.idl:
* page/WindowBase64.idl:
* page/WindowTimers.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156996
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mihnea@adobe.com [Sun, 6 Oct 2013 17:58:54 +0000 (17:58 +0000)]
[CSSRegions] Rename parsing tests to match current css properties
https://bugs.webkit.org/show_bug.cgi?id=122413
Reviewed by Sam Weinig.
Simple renaming of files, inline with the current stable version of properties.
* fast/regions/script-tests/webkit-flow-from-parsing.js: Renamed from LayoutTests/fast/regions/script-tests/content-webkit-from-flow-parsing.js.
* fast/regions/script-tests/webkit-flow-into-parsing.js: Renamed from LayoutTests/fast/regions/script-tests/webkit-flow-parsing.js.
* fast/regions/webkit-flow-from-parsing-expected.txt: Renamed from LayoutTests/fast/regions/content-webkit-from-flow-parsing-expected.txt.
* fast/regions/webkit-flow-from-parsing.html: Renamed from LayoutTests/fast/regions/content-webkit-from-flow-parsing.html.
* fast/regions/webkit-flow-into-parsing-expected.txt: Renamed from LayoutTests/fast/regions/webkit-flow-parsing-expected.txt.
* fast/regions/webkit-flow-into-parsing.html: Renamed from LayoutTests/fast/regions/webkit-flow-parsing.html.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156995
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 6 Oct 2013 17:52:59 +0000 (17:52 +0000)]
* rendering/RenderButton.cpp:
(WebCore::RenderButton::setupInnerStyle): Added a comment possibly relevant
to current failures seen on Windows bot.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156994
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sun, 6 Oct 2013 17:44:48 +0000 (17:44 +0000)]
Unreviewed, rolling out r156988.
http://trac.webkit.org/changeset/156988
https://bugs.webkit.org/show_bug.cgi?id=122415
Broke debug build (Requested by ap on #webkit).
* css/CSSCursorImageValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyCursor::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::styleShader):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssCursorImageValue):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156993
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 6 Oct 2013 17:41:48 +0000 (17:41 +0000)]
Try to fix the Windows build.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Removed export of non-existent Node::treeScope function returning
a TreeScope*. Probably will have to add an export to fix the next failure.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156992
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Sun, 6 Oct 2013 17:37:59 +0000 (17:37 +0000)]
Add *CSS* prefix to ShadowValue to generate toCSSShadowValue
https://bugs.webkit.org/show_bug.cgi?id=122409
Reviewed by Darin Adler.
To generate toCSSShadowValue(), we need to add *CSS* prefix to ShadowValue.
It is also to be sync with a naming rule of CSS child value.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::valueForShadow):
* css/CSSParser.cpp:
(WebCore::ShadowParseContext::commitValue):
* css/CSSShadowValue.cpp: Renamed from Source/WebCore/css/ShadowValue.cpp.
(WebCore::CSSShadowValue::CSSShadowValue):
(WebCore::CSSShadowValue::customCSSText):
(WebCore::CSSShadowValue::equals):
* css/CSSShadowValue.h: Renamed from Source/WebCore/css/ShadowValue.h.
(WebCore::CSSShadowValue::create):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
(WebCore::StyleResolver::createFilterOperations):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156991
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Sun, 6 Oct 2013 17:29:09 +0000 (17:29 +0000)]
Layout Test editing/spelling/context-menu-suggestions-multiword-selection.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=122414
* platform/mac/TestExpectations: Marked as such.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156990
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sun, 6 Oct 2013 17:15:26 +0000 (17:15 +0000)]
Remove unneeded ScriptGCEvent class
https://bugs.webkit.org/show_bug.cgi?id=122390
Reviewed by Anders Carlsson.
Source/ThirdParty:
* gtest/xcode/gtest.xcodeproj/project.pbxproj: Let Xcode update this file.
Not really part of this bug fix, but good to land anyway.
Source/WebCore:
* GNUmakefile.list.am: Removed ScriptGCEvent files.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.exp.in: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/ScriptGCEvent.cpp: Removed.
* bindings/js/ScriptGCEvent.h: Removed.
* inspector/InspectorMemoryAgent.cpp: Removed include.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start): Removed GC event listening.
Some day we might add it back, but for now it is dead code.
(WebCore::InspectorTimelineAgent::stop): Ditto.
(WebCore::usedHeapSize): Renamed from getUsedHeapSize and put the
implementation here instead of indirecting through ScriptGCEvent.
(WebCore::InspectorTimelineAgent::setDOMCounters): Updated for above changes.
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): Ditto.
(WebCore::InspectorTimelineAgent::pushCurrentRecord): Ditto.
* inspector/InspectorTimelineAgent.h: Removed include.
* inspector/ScriptGCEventListener.h: Removed.
* testing/MemoryInfo.h: Updated to get heap capacity and size directly
instead of going through ScriptGCEvent.
Source/WebKit:
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Replaced symbol from ScriptGCEvent with symbol from JSDOMWindowBase.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156989
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Sun, 6 Oct 2013 17:03:35 +0000 (17:03 +0000)]
Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
https://bugs.webkit.org/show_bug.cgi?id=122408
Reviewed by Darin Adler.
As a step to use toCSSFooValue, this patch generates toCSSFooValue() for CSSCursorImageValue,
CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue.
This will help to detect bad type cast.
No new tests, no behavior changes.
* css/CSSCursorImageValue.h:
* css/CSSTimingFunctionValue.h:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTimingFunction):
* css/CSSUnicodeRangeValue.h:
* css/CSSValue.cpp:
(WebCore::CSSValue::destroy):
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyCursor::applyValue):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleImage):
(WebCore::StyleResolver::styleShader):
* rendering/style/StylePendingImage.h:
(WebCore::StylePendingImage::cssCursorImageValue):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156988
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 08:37:29 +0000 (08:37 +0000)]
CTTE: Teach CompositeEditCommand that link Nodes are always Elements.
<https://webkit.org/b/122400>
Reviewed by Sam Weinig.
Make pushAnchorElementDown() take an Element& instead of a Node* and
tweak the surrounding code a tiny bit.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156987
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 08:37:02 +0000 (08:37 +0000)]
CTTE: Node::enclosingLinkEventParentOrSelf() should return an Element.
<https://webkit.org/b/122401>
Reviewed by Sam Weinig.
Only Elements are ever linked, so make enclosingLinkEventParentOrSelf()
return an Element* instead of a Node*. The only call site was already
doing toElement() on the return value without checking, so this makes
things look a bit nicer.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156986
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Sun, 6 Oct 2013 07:33:19 +0000 (07:33 +0000)]
Add *CSS* prefix to FontFeatureValue to generate toCSSFontFeatureValue(), and use it
https://bugs.webkit.org/show_bug.cgi?id=122204
Reviewed by Darin Adler.
*CSS* prefix needs to be added to FontFeatureValue class in order to generate toCSSFontFeatureValue().
static_cast<FontFeatureValue*> is changed with toCSSFontFeatureValue() by using this change.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontFeatureValue.cpp: Renamed from Source/WebCore/css/FontFeatureValue.cpp.
(WebCore::CSSFontFeatureValue::CSSFontFeatureValue):
(WebCore::CSSFontFeatureValue::customCSSText):
(WebCore::CSSFontFeatureValue::equals):
* css/CSSFontFeatureValue.h: Renamed from Source/WebCore/css/FontFeatureValue.h.
(WebCore::CSSFontFeatureValue::create):
(WebCore::CSSFontFeatureValue::tag):
(WebCore::CSSFontFeatureValue::value):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseFontFeatureTag):
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156985
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 6 Oct 2013 04:22:43 +0000 (04:22 +0000)]
Compress DFG stack layout
https://bugs.webkit.org/show_bug.cgi?id=122024
Reviewed by Oliver Hunt.
The DFG needs to be able to store things at a known offset from frame pointer so that
the runtime can read those things. Prior to this patch, the DFG would use the exact
offsets that the bytecode asked for, even in the case of inlining, where it would use
the callsite stack offset to shift all of the inlined function's variables over just as
they would have been if a bytecode interpreter had really made the call.
But this won't work once WebKit-LLVM integration is complete. LLVM has no notion of
storing things at a fixed offset from the frame pointer. We could try to hack LLVM to do
that, but it would seriously complicate LLVM's stack layout. But what we might be able
to do is have LLVM tell us (via an addressof intrinsic and a side-channel) where some
alloca landed relative to the frame pointer. Hence if the DFG can put all of its flushed
variables in a contiguous range that can be expressed to LLVM as a struct that we
alloca, then all of this can still work just fine.
Previously the flushed variables didn't fit in a contiguous range, but this patch makes
them contiguous by allowing the stack layout to be compressed.
What this really means is that there is now a distinction between where the DFG saw a
variable stored in bytecode and where it will actually store it in the resulting machine
code. Henceforth when the DFG says "local" or "virtual register" it means the variable
according to bytecode (with the stack offsetting for inlined code as before), but when
it says "machine local" or "machine virtual register" it means the actual place where it
will store things in the resulting machine code. All of the OSR exit, inlined arguments,
captured variables, and various stack unwinding machine now knows about all of this.
Note that the DFG's abstract interpretation still uses bytecode variables rather than
machine variables. Same for CSE and abstract heaps. This makes sense since it means that
we don't have to decide on machine variable allocation just to do those optimizations.
The decision of what a local's machine location becomes is deferred to very late in
compilation. We only need to assign machine locations to variables that must be stored
to the stack. It's now mandatory to run some kind of "stack layout phase" that makes the
decision and updates all data structures.
So far the way that this is being used is just to compress the DFG stack layout, which
is something that we should have done anyway, a long time ago. And the compression isn't
even that good - the current StackLayoutPhase just identifies local indices that are
unused in machine code and slides all other variables towards zero. This doesn't achieve
particularly good compression but it is better than nothing. Note that this phase makes
it seem like the bytecode-machine mapping is based on bytecode local indices; for
example if bytecode local 4 is mapped to machine local 3 then it always will be. That's
true for the current StackLayoutPhase but it _will not_ be true for all possible stack
layout phases and it would be incorrect to assume that it should be true. This is why
the current data structures have each VariableAccessData hold its own copy of the
machine virtual register, and also have each InlineCallFrame report their own machine
virtual registers for the various things. The DFG backend is likely to always use the
dumb StackLayoutPhase since it is very cheap to run, but the FTL backend is likely to
eventually get a better one, where we do some kind of constraint-based coloring: we
institute constraints where some VariableAccessData's must have the same indices as some
other ones, and also must be right next to some other ones; then we process all
VariableAccessData's and attempt to assign them machine locals while preserving those
constraints. This could lead to two VariableAccessDatas for the same bytecode local
ending up with different machine locals.
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::isCaptured):
(JSC::CodeBlock::framePointerOffsetToGetActivationRegisters):
(JSC::CodeBlock::machineSlowArguments):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::hasSlowArguments):
* bytecode/CodeOrigin.cpp:
(JSC::CodeOrigin::dump):
(JSC::InlineCallFrame::calleeForCallFrame):
(JSC::InlineCallFrame::dumpInContext):
* bytecode/CodeOrigin.h:
(JSC::InlineCallFrame::InlineCallFrame):
(JSC::InlineCallFrame::calleeConstant):
* bytecode/Operands.h:
(JSC::Operands::indexForOperand):
* dfg/DFGBasicBlock.cpp:
(JSC::DFG::BasicBlock::SSAData::SSAData):
* dfg/DFGBasicBlock.h:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::ByteCodeParser):
(JSC::DFG::ByteCodeParser::get):
(JSC::DFG::ByteCodeParser::getLocal):
(JSC::DFG::ByteCodeParser::flushDirect):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::parse):
* dfg/DFGCommon.h:
* dfg/DFGCommonData.h:
(JSC::DFG::CommonData::CommonData):
* dfg/DFGDesiredWriteBarriers.cpp:
(JSC::DFG::DesiredWriteBarrier::trigger):
* dfg/DFGDesiredWriteBarriers.h:
* dfg/DFGFlushLivenessAnalysisPhase.cpp:
(JSC::DFG::FlushLivenessAnalysisPhase::run):
(JSC::DFG::FlushLivenessAnalysisPhase::process):
(JSC::DFG::FlushLivenessAnalysisPhase::reportError):
* dfg/DFGFlushedAt.cpp: Added.
(JSC::DFG::FlushedAt::dump):
(JSC::DFG::FlushedAt::dumpInContext):
* dfg/DFGFlushedAt.h: Added.
(JSC::DFG::FlushedAt::FlushedAt):
(JSC::DFG::FlushedAt::operator!):
(JSC::DFG::FlushedAt::format):
(JSC::DFG::FlushedAt::virtualRegister):
(JSC::DFG::FlushedAt::operator==):
(JSC::DFG::FlushedAt::operator!=):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::Graph):
(JSC::DFG::Graph::dump):
* dfg/DFGGraph.h:
(JSC::DFG::Graph::bytecodeRegisterForArgument):
(JSC::DFG::Graph::argumentsRegisterFor):
(JSC::DFG::Graph::machineArgumentsRegisterFor):
(JSC::DFG::Graph::uncheckedArgumentsRegisterFor):
(JSC::DFG::Graph::activationRegister):
(JSC::DFG::Graph::uncheckedActivationRegister):
(JSC::DFG::Graph::machineActivationRegister):
(JSC::DFG::Graph::uncheckedMachineActivationRegister):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::noticeOSREntry):
* dfg/DFGNode.h:
(JSC::DFG::Node::convertToGetLocalUnlinked):
(JSC::DFG::Node::convertToGetLocal):
(JSC::DFG::Node::machineLocal):
(JSC::DFG::Node::hasUnlinkedMachineLocal):
(JSC::DFG::Node::setUnlinkedMachineLocal):
(JSC::DFG::Node::unlinkedMachineLocal):
(JSC::DFG::Node::hasInlineStartData):
(JSC::DFG::Node::inlineStartData):
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGOSREntry.h:
(JSC::DFG::OSREntryReshuffling::OSREntryReshuffling):
* dfg/DFGOSRExitCompiler64.cpp:
(JSC::DFG::OSRExitCompiler::compileExit):
* dfg/DFGOSRExitCompilerCommon.cpp:
(JSC::DFG::reifyInlinedCallFrames):
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* dfg/DFGScoreBoard.h:
(JSC::DFG::ScoreBoard::ScoreBoard):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInlineStart):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::createOSREntries):
(JSC::DFG::SpeculativeJIT::compileGetByValOnArguments):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::calleeFrameOffset):
(JSC::DFG::SpeculativeJIT::callFrameSlot):
(JSC::DFG::SpeculativeJIT::argumentSlot):
(JSC::DFG::SpeculativeJIT::callFrameTagSlot):
(JSC::DFG::SpeculativeJIT::callFramePayloadSlot):
(JSC::DFG::SpeculativeJIT::argumentTagSlot):
(JSC::DFG::SpeculativeJIT::argumentPayloadSlot):
(JSC::DFG::SpeculativeJIT::framePointerOffsetToGetActivationRegisters):
(JSC::DFG::SpeculativeJIT::callOperation):
(JSC::DFG::SpeculativeJIT::recordSetLocal):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStackLayoutPhase.cpp: Added.
(JSC::DFG::StackLayoutPhase::StackLayoutPhase):
(JSC::DFG::StackLayoutPhase::run):
(JSC::DFG::performStackLayout):
* dfg/DFGStackLayoutPhase.h: Added.
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* dfg/DFGVariableAccessData.h:
(JSC::DFG::VariableAccessData::machineLocal):
(JSC::DFG::VariableAccessData::flushedAt):
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* ftl/FTLExitValue.h:
(JSC::FTL::ExitValue::inJSStack):
(JSC::FTL::ExitValue::inJSStackAsInt32):
(JSC::FTL::ExitValue::inJSStackAsInt52):
(JSC::FTL::ExitValue::inJSStackAsDouble):
(JSC::FTL::ExitValue::virtualRegister):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetArgument):
(JSC::FTL::LowerDFGToLLVM::compileGetLocal):
(JSC::FTL::LowerDFGToLLVM::compileSetLocal):
(JSC::FTL::LowerDFGToLLVM::initializeOSRExitStateForBlock):
(JSC::FTL::LowerDFGToLLVM::emitOSRExitCall):
* ftl/FTLOSRExitCompiler.cpp:
(JSC::FTL::compileStub):
* ftl/FTLValueSource.cpp:
(JSC::FTL::ValueSource::dump):
* ftl/FTLValueSource.h:
(JSC::FTL::ValueSource::ValueSource):
(JSC::FTL::ValueSource::kind):
(JSC::FTL::ValueSource::operator!):
(JSC::FTL::ValueSource::node):
(JSC::FTL::ValueSource::virtualRegister):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::readInlinedFrame):
(JSC::StackVisitor::Frame::createArguments):
(JSC::StackVisitor::Frame::existingArguments):
* interpreter/StackVisitor.h:
* jit/AssemblyHelpers.h:
(JSC::AssemblyHelpers::addressFor):
(JSC::AssemblyHelpers::tagFor):
(JSC::AssemblyHelpers::payloadFor):
(JSC::AssemblyHelpers::offsetOfArgumentsIncludingThis):
* runtime/Arguments.cpp:
(JSC::Arguments::tearOff):
* runtime/Arguments.h:
(JSC::Arguments::allocateSlowArguments):
(JSC::Arguments::tryDeleteArgument):
(JSC::Arguments::isDeletedArgument):
(JSC::Arguments::isArgument):
(JSC::Arguments::argument):
(JSC::Arguments::finishCreation):
* runtime/JSActivation.h:
(JSC::JSActivation::create):
(JSC::JSActivation::JSActivation):
* runtime/JSFunction.cpp:
(JSC::RetrieveArgumentsFunctor::operator()):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156984
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sun, 6 Oct 2013 03:16:38 +0000 (03:16 +0000)]
run-jsc-stress-tests should be less verbose
https://bugs.webkit.org/show_bug.cgi?id=122397
Reviewed by Sam Weinig.
It now just prints something like:
965/1831 ....
Where the first number is the number of tests that completed, the second number is the
number of tests total, and the dots are the number of tests running right now - which is
useful towards the end when you're waiting for the last slow tests to finish.
It will also print out the output from failing tests and it will print a line for skipped
tests (to annoy you into getting them into a shape where they can be unskipped). For
example, for LayoutTests, it will print just the diff, if the test fails. It's cool.
* Scripts/run-jsc-stress-tests:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156983
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 02:32:32 +0000 (02:32 +0000)]
FrameSelection: Remove two unused member functions.
Rubber-stamped by Anders Carlsson.
- rootEditableElementOrTreeScopeRootNode()
- rootEditableElementRespectingShadowTree()
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156982
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sun, 6 Oct 2013 02:30:52 +0000 (02:30 +0000)]
CTTE: Node::treeScope() should return a reference.
<https://webkit.org/b/122399>
Reviewed by Superlative Sam.
Every Node belongs to a TreeScope. To enforce this, I've made
treeScope() return a TreeScope&, and setTreeScope() now takes a
TreeScope& so there is no way to clear it.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156981
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sun, 6 Oct 2013 01:08:17 +0000 (01:08 +0000)]
CTTE: Use references more for the Document parser
https://bugs.webkit.org/show_bug.cgi?id=122398
Reviewed by Andreas Kling.
Clarify the construction semantics of Document parsers.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156980
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dbates@webkit.org [Sun, 6 Oct 2013 00:34:04 +0000 (00:34 +0000)]
[iOS] Default initialize Settings::setFixedPositionCreatesStackingContext() to true
https://bugs.webkit.org/show_bug.cgi?id=122338
<rdar://problem/
14908151>
Reviewed by Darin Adler.
On iOS we always want an element with a fixed position to create a stacking context.
See <rdar://problem/9813262> for more details.
* page/Settings.cpp: Define constant defaultFixedPositionCreatesStackingContext to
be true when building for iOS and false otherwise.
* page/Settings.in: Initialize the setting fixedPositionCreatesStackingContext with
the value of the constant defaultFixedPositionCreatesStackingContext.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156979
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Sat, 5 Oct 2013 23:59:58 +0000 (23:59 +0000)]
CTTE: Pass DocumentWriter around as a reference
https://bugs.webkit.org/show_bug.cgi?id=122396
Reviewed by Andreas Kling.
../WebCore:
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeIfJavaScriptURL):
* dom/DecodedDataDocumentParser.cpp:
(WebCore::DecodedDataDocumentParser::appendBytes):
(WebCore::DecodedDataDocumentParser::flush):
* dom/DecodedDataDocumentParser.h:
* dom/DocumentParser.h:
* dom/RawDataDocumentParser.h:
(WebCore::RawDataDocumentParser::flush):
* html/ImageDocument.cpp:
(WebCore::ImageDocumentParser::appendBytes):
* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::appendBytes):
(WebCore::MediaDocument::replaceMediaElementTimerFired):
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocumentParser::appendBytes):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::overlayPage):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::writer):
* loader/DocumentWriter.cpp:
(WebCore::DocumentWriter::addData):
(WebCore::DocumentWriter::end):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::transitionToCommitted):
* loader/SinkDocument.cpp:
(WebCore::SinkDocumentParser::appendBytes):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
../WebKit/mac:
* WebView/WebFrame.mm:
(-[WebFrame _canProvideDocumentSource]):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156978
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 23:56:12 +0000 (23:56 +0000)]
FrameView: Remove code for disabling repaints.
<https://webkit.org/b/122393>
Reviewed by Sam Weinig.
Nobody uses this mode for anything so let's just remove it.
It was added back in r110469 to fix an issue with SVGImageCache
and its only user disappeard in the cache overhaul in r142765.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156977
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sat, 5 Oct 2013 23:53:54 +0000 (23:53 +0000)]
Allow skipping of run-jsc-stress-tests that are configured using yaml files
https://bugs.webkit.org/show_bug.cgi?id=122385
Tools:
Reviewed by Sam Wieinig.
Make tests run via YAML be able to do the parse-for-commands trick that allows
us to skip tests and do other custom per-test stuff.
* Scripts/jsc-stress-test-helpers/layout-test-helper:
* Scripts/run-jsc-stress-tests:
LayoutTests:
Reviewed by Sam Weinig.
The way that we "skip" tests is by having a custom command at the top using //@ notation,
and then use "//@ skip". But the machinery to do that also allows us to do things like
run tests in a no-concurrent-JIT mode - so I've also implemented that in this patch.
Use the skip machinery to skip large-expressions.js.
* js/script-tests/large-expressions.js:
* jsc-layout-tests.yaml:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156976
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 23:02:42 +0000 (23:02 +0000)]
Remove IFrameShimSupport, it was only used by dead ports.
Rubber-stamped by Anders Carlsson.
* plugins/IFrameShimSupport.cpp: Removed.
* plugins/IFrameShimSupport.h: Removed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156975
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 22:57:07 +0000 (22:57 +0000)]
Remove remaining Qt files.
Rubber-stamped by Anders Carlsson.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156974
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 21:57:23 +0000 (21:57 +0000)]
Try to fix the GTK+ build.
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::platformInitialize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156973
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 21:53:59 +0000 (21:53 +0000)]
Clean up MessageQueue.h
https://bugs.webkit.org/show_bug.cgi?id=122392
Reviewed by Andreas Kling.
Source/WebCore:
Update for changes to MessageQueue, mostly changing create functions to return std::unique_ptr.
I intentionally avoided using std::make_unique in a couple of places because I didn't want to make nested classes
public, and I believe that we can change some of this code to use std::function.
* Modules/webaudio/AsyncAudioDecoder.cpp:
(WebCore::AsyncAudioDecoder::decodeAsync):
(WebCore::AsyncAudioDecoder::runLoop):
(WebCore::AsyncAudioDecoder::DecodingTask::create):
* Modules/webaudio/AsyncAudioDecoder.h:
* Modules/webdatabase/Database.cpp:
(WebCore::Database::markAsDeletedAndClose):
(WebCore::Database::tableNames):
* Modules/webdatabase/DatabaseBackend.cpp:
(WebCore::DatabaseBackend::openAndVerifyVersion):
(WebCore::DatabaseBackend::scheduleTransaction):
(WebCore::DatabaseBackend::scheduleTransactionStep):
* Modules/webdatabase/DatabaseTask.h:
(WebCore::DatabaseBackend::DatabaseOpenTask::create):
(WebCore::DatabaseBackend::DatabaseCloseTask::create):
(WebCore::DatabaseBackend::DatabaseTransactionTask::create):
(WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
(WebCore::DatabaseThread::scheduleTask):
(WebCore::DatabaseThread::scheduleImmediateTask):
(WebCore::SameDatabasePredicate::operator()):
* Modules/webdatabase/DatabaseThread.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::create):
(WebCore::MessagePortChannel::tryGetMessageFromRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
* fileapi/FileThread.cpp:
(WebCore::FileThread::postTask):
(WebCore::SameInstancePredicate::operator()):
(WebCore::FileThread::runLoop):
* fileapi/FileThread.h:
* fileapi/FileThreadTask.h:
(WebCore::createFileThreadTask):
* storage/StorageThread.cpp:
(WebCore::StorageThread::threadEntryPoint):
(WebCore::StorageThread::dispatch):
(WebCore::StorageThread::terminate):
* workers/WorkerRunLoop.cpp:
(WebCore::ModePredicate::operator()):
(WebCore::WorkerRunLoop::runInMode):
(WebCore::WorkerRunLoop::runCleanupTasks):
(WebCore::WorkerRunLoop::Task::create):
* workers/WorkerRunLoop.h:
Source/WTF:
Make MessageQueue use std::unique_ptr and change findIf and removeIf to take const references.
* wtf/Deque.h:
Change findIf to take an rvalue reference.
* wtf/MessageQueue.h:
(WTF::::append):
(WTF::::appendAndKill):
(WTF::::appendAndCheckEmpty):
(WTF::::prepend):
(WTF::::removeIf):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156972
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Sat, 5 Oct 2013 19:27:35 +0000 (19:27 +0000)]
[WebGL] program should not be able to link if a bad shader is attached
https://bugs.webkit.org/show_bug.cgi?id=94036
Reviewed by Darin Adler.
If you attempt to link a program when bad shaders are attached, the
link should fail. WebGL also requires that the previously linked
program should remain intact. We were doing the former, but not
the latter.
Fix this by not calling glLinkProgram if we know we have bad
shaders, and synthesize a bad link status instead.
Test: WebGL conformance test conformance/programs/program-test.html
(found in LayoutTests/webgl)
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compileShader): Mark a shader as valid
if it compiled ok.
(WebCore::WebGLRenderingContext::linkProgram): Don't call into GraphicsContext3D::linkProgram
if we know that we don't have valid shaders.
* html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::WebGLShader): Initialize m_isValid.
* html/canvas/WebGLShader.h:
(WebCore::WebGLShader::isValid): New member variable getter and setter.
(WebCore::WebGLShader::setValid):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156971
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
dino@apple.com [Sat, 5 Oct 2013 19:21:04 +0000 (19:21 +0000)]
Undo texture unit code refactoring - it is ok to bind a texture to multiple locations
https://bugs.webkit.org/show_bug.cgi?id=122369
<rdar://problem/
15158465>
Reviewed by Darin Adler.
The optimisation in r152351 (http://webkit.org/b/117868) incorrectly
assumes that a texture cannot be bound to more than one location.
That's true only within the same program object. It's legal to
address TEXTURE_BINDING_2D and TEXTURE_BINDING_CUBE_MAP with the
same texture in different programs.
See https://github.com/KhronosGroup/WebGL/pull/391 for more information.
This change reverts the optimisation, but also does some minor
cleanup (0 -> nullptr, class -> struct).
Covered by the following Khronos WebGL 1.0.1 tests, which
now pass:
- conformance/more/functions/texImage2DHTML.html
- conformance/more/functions/texSubImage2D.html
- conformance/more/functions/texSubImage2DHTML.html
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::~WebGLRenderingContext):
(WebCore::WebGLRenderingContext::reshape):
(WebCore::WebGLRenderingContext::bindTexture):
(WebCore::WebGLRenderingContext::deleteTexture):
(WebCore::WebGLRenderingContext::getParameter):
(WebCore::WebGLRenderingContext::handleNPOTTextures):
(WebCore::WebGLRenderingContext::validateTextureBinding):
(WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
* html/canvas/WebGLRenderingContext.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 19:02:54 +0000 (19:02 +0000)]
Try to #define final to sealed when building with MSVC
https://bugs.webkit.org/show_bug.cgi?id=122386
Reviewed by Darin Adler.
* wtf/Compiler.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156969
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 18:59:00 +0000 (18:59 +0000)]
Remove createOwned
https://bugs.webkit.org/show_bug.cgi?id=122388
Reviewed by Darin Adler.
Source/JavaScriptCore:
* profiler/ProfilerDatabase.cpp:
(JSC::Profiler::Database::save):
Source/WebCore:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::~Document):
(WebCore::Document::createRenderTree):
(WebCore::Document::destroyRenderTree):
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:
* page/animation/AnimationController.cpp:
(WebCore::AnimationController::AnimationController):
* page/animation/AnimationController.h:
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
(WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
(WebCore::AudioTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
(WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
(WebCore::VideoTrackPrivateAVFObjC::setPlayerItemTrack):
* platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::applyClippingToContext):
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::applyResource):
* rendering/svg/RenderSVGResourceMasker.h:
Source/WebKit2:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setFindIndicator:fadeOut:animate:]):
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayCreate):
Source/WTF:
Since we're going with std::unique_ptr instead of OwnPtr, there's no need for makeOwned to exist.
Get rid of it and replace it with calls to std::make_unique.
* wtf/FilePrintStream.cpp:
(WTF::FilePrintStream::open):
* wtf/FilePrintStream.h:
* wtf/HashTable.h:
(WTF::::HashTable):
* wtf/ListHashSet.h:
(WTF::::ListHashSet):
* wtf/OwnPtr.h:
* wtf/Threading.cpp:
(WTF::compatEntryPoint):
(WTF::createThread):
* wtf/ThreadingPthreads.cpp:
(WTF::wtfThreadEntryPoint):
(WTF::createThreadInternal):
* wtf/unicode/Collator.h:
* wtf/unicode/CollatorDefault.cpp:
(WTF::Collator::userDefault):
* wtf/unicode/icu/CollatorICU.cpp:
(WTF::Collator::userDefault):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156968
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 5 Oct 2013 18:32:37 +0000 (18:32 +0000)]
Remove COMPILER_SUPPORTS(CXX_RVALUE_REFERENCES) since it's required now
https://bugs.webkit.org/show_bug.cgi?id=122387
Reviewed by Anders Carlsson.
Source/WebCore:
* html/canvas/CanvasStyle.h: Take out conditionals.
Source/WebKit2:
* UIProcess/API/cpp/WKRetainPtr.h: Take out conditionals.
Source/WTF:
* wtf/RefPtr.h:
* wtf/RetainPtr.h:
* wtf/Vector.h:
* wtf/text/AtomicString.h:
* wtf/text/WTFString.h:
Take out conditionals.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156967
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
zandobersek@gmail.com [Sat, 5 Oct 2013 18:31:23 +0000 (18:31 +0000)]
Unreviewed GTK build fix after r156946. The framePolicyFunction is an attribute
on the WebKitWebPolicyDecisionPrivate object.
* webkit/webkitwebpolicydecision.cpp:
(webkit_web_policy_decision_use):
(webkit_web_policy_decision_ignore):
(webkit_web_policy_decision_download):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156966
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 5 Oct 2013 18:22:39 +0000 (18:22 +0000)]
Add AtomicString::number and use it
https://bugs.webkit.org/show_bug.cgi?id=122384
Reviewed by Anders Carlsson.
Source/WebCore:
* css/CSSGrammar.y.in: Use AtomicString::number instead of String::number since
we are creating an AtomicString. This can save a memory allocation if the string
happens to already be in the atomic string table.
* dom/Element.cpp:
(WebCore::Element::setIntegralAttribute): Ditto.
(WebCore::Element::setUnsignedIntegralAttribute): Ditto.
* editing/BreakBlockquoteCommand.cpp:
(WebCore::BreakBlockquoteCommand::doApply): Ditto.
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::insertedInto): Use setIntegralAttribute instead of
a local homegrown equivalent.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::setHeight): Ditto.
(WebCore::HTMLCanvasElement::setWidth): Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::setTabIndex): Ditto.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setHeight): Ditto.
(WebCore::HTMLImageElement::setWidth): Ditto.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setMaxLength): Ditto.
(WebCore::HTMLInputElement::setSize): Same, but setUnsignedIntegralAttribute.
(WebCore::HTMLInputElement::setHeight): Ditto.
(WebCore::HTMLInputElement::setWidth): Ditto.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerSetSize): Ditto.
* html/HTMLMeterElement.cpp:
(WebCore::HTMLMeterElement::setMin): More of the same.
(WebCore::HTMLMeterElement::setMax): Ditto.
(WebCore::HTMLMeterElement::setValue): Ditto.
(WebCore::HTMLMeterElement::setLow): Ditto.
(WebCore::HTMLMeterElement::setHigh): Ditto.
(WebCore::HTMLMeterElement::setOptimum): Ditto.
* html/HTMLOListElement.cpp:
(WebCore::HTMLOListElement::setStart): Ditto.
* html/HTMLProgressElement.cpp:
(WebCore::HTMLProgressElement::setValue): Ditto.
(WebCore::HTMLProgressElement::setMax): Ditto.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute): Ditto.
(WebCore::HTMLSelectElement::setSize): Ditto.
* html/HTMLTableCellElement.cpp:
(WebCore::HTMLTableCellElement::setColSpan): Ditto.
(WebCore::HTMLTableCellElement::setRowSpan): Ditto.
* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::setSpan): Ditto.
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::setMaxLength): Ditto.
(WebCore::HTMLTextAreaElement::setCols): Ditto.
(WebCore::HTMLTextAreaElement::setRows): Ditto.
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTimelineElement::setDuration): Ditto.
Source/WTF:
* wtf/text/AtomicString.cpp:
(WTF::AtomicString::number): Added.
* wtf/text/AtomicString.h: Ditto.
* wtf/text/IntegerToStringConversion.h: Simplify includes, renamed ConversionTrait to
IntegerToStringConversionTrait. Changed String version to use String since we no longer
need to use PassRefPtr to efficiently handle return values. Replaced UnsignedIntegerTrait
with std::make_unsigned. Added AtomicString support. Use nullptr instead of 0.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156965
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 5 Oct 2013 18:04:40 +0000 (18:04 +0000)]
Cut down on use of String::number
https://bugs.webkit.org/show_bug.cgi?id=122382
Reviewed by Anders Carlsson.
Source/JavaScriptCore:
* API/JSCallbackObjectFunctions.h:
(JSC::JSCallbackObject::putByIndex): Use Identifier::from instead of calling
String::number and creating an identifier from that. Can save creating and then
destroying a string if an identifier already exists.
* runtime/Arguments.cpp:
(JSC::Arguments::getOwnPropertySlotByIndex): Ditto.
(JSC::Arguments::getOwnPropertyNames): Ditto.
(JSC::Arguments::putByIndex): Ditto.
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::getOwnPropertyNames): Ditto.
* runtime/StringObject.cpp:
(JSC::StringObject::getOwnPropertyNames): Ditto.
Source/WebCore:
* css/CSSGradientValue.cpp:
(WebCore::CSSLinearGradientValue::customCSSText): Use StringBuilder::appendNumber,
instead of creating a string and then appending it.
(WebCore::CSSRadialGradientValue::customCSSText): Ditto.
* css/CSSParser.cpp:
(WebCore::CSSParser::createKeyframe): Ditto.
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::createDeletionUI): Use ASCII literals instead of
converting numeric constants to strings at runtime with String::number.
(WebCore::DeleteButtonController::show): Ditto.
* svg/SVGNumberList.cpp:
(WebCore::SVGNumberList::valueAsString): Use StringBuilder::appendNumber.
* svg/SVGPointList.cpp:
(WebCore::SVGPointList::valueAsString): Ditto.
* svg/SVGRect.h: Ditto.
Source/WebKit2:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers): Use StringBuilder::appendNumber.
Source/WTF:
* wtf/DateMath.cpp:
(WTF::appendTwoDigitNumber): Added. Replaces twoDigitStringFromNumber, which returned a
String and also allocated a temporary string for any number 10 or higher.
(WTF::makeRFC2822DateString): Updated to use the new function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156964
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 17:45:38 +0000 (17:45 +0000)]
Test the waters and begin using lambdas
https://bugs.webkit.org/show_bug.cgi?id=121809
Reviewed by Andreas Kling.
Source/WebCore:
Use lambdas instead of static functions and function objects.
* css/MediaQuery.cpp:
(WebCore::MediaQuery::MediaQuery):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::deliverAllMutations):
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::sortedTrackListForMenu):
Source/WTF:
* wtf/ListDump.h:
(WTF::sortedListDump):
Use std::less instead of a custom lessThan function.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156963
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rego@igalia.com [Sat, 5 Oct 2013 17:07:25 +0000 (17:07 +0000)]
[CSS Regions] Layout Test for selecting text ignoring region content
https://bugs.webkit.org/show_bug.cgi?id=122353
Reviewed by Darin Adler.
Add new reftests for selecting text in texts wrapping a region, where
the region content is ignored. It compares the behavior (highlighted
text and selected content) in regions and absolute positions.
Absolute positioned elements do not fill the gaps on the right during
the selection, unlike regular elements. This is the reason why some
regular elements are floated in order to avoid such problems in the
reftests.
Provided layout tests for different writing models.
* fast/regions/resources/region-style.css: New CSS classes required for these tests.
* fast/regions/selection/selecting-text-ignoring-region-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-horiz-bt-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-horiz-bt.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-lr-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-lr.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-rl-expected.html: Added.
* fast/regions/selection/selecting-text-ignoring-region-vert-rl.html: Added.
* fast/regions/selection/selecting-text-ignoring-region.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156962
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
gyuyoung.kim@samsung.com [Sat, 5 Oct 2013 17:06:13 +0000 (17:06 +0000)]
Add *CSS* prefix to FontValue to generate toCSSFontValue()
https://bugs.webkit.org/show_bug.cgi?id=122201
Reviewed by Darin Adler.
*CSS* prefix needs to be added to FontValue class in order to generate toCSSFontValue().
static_cast<FontValue*> is changed with toCSSFontValue() by this change.
No new tests, no behavior changes.
* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSFontValue.cpp: Renamed from Source/WebCore/css/FontValue.cpp.
(WebCore::CSSFontValue::customCSSText):
(WebCore::CSSFontValue::equals):
* css/CSSFontValue.h: Renamed from Source/WebCore/css/FontValue.h.
(WebCore::CSSFontValue::create):
(WebCore::CSSFontValue::CSSFontValue):
* css/CSSParser.cpp:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156961
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 17:02:33 +0000 (17:02 +0000)]
Fix cut and paste errors.
* Configurations/WebKit2.xcconfig:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156960
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 16:55:05 +0000 (16:55 +0000)]
Add the rest of the std::function weak symbols in an attempt to fix the Lion build.
* Configurations/WebKit2.xcconfig:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156959
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sat, 5 Oct 2013 16:48:28 +0000 (16:48 +0000)]
Unreviewed, fix tests on older Rubies.
* Scripts/run-jsc-stress-tests:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156958
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 16:46:52 +0000 (16:46 +0000)]
Source/WebKit2: Another attempt at fixing the Lion build.
* Configurations/WebKit2.xcconfig:
Tools: Don't filter the weak symbols.
* Scripts/check-for-weak-vtables-and-externals:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156957
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 16:32:12 +0000 (16:32 +0000)]
Attempt to fix the Lion build.
* Configurations/WebKit2.xcconfig:
Try unexporting one of the weak symbols for now. If this succeeds, I'll add the rest.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156956
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sat, 5 Oct 2013 16:27:51 +0000 (16:27 +0000)]
Have run-javascriptcore-tests run JS LayoutTests using run-jsc-stress-tests so that it runs in parallel
https://bugs.webkit.org/show_bug.cgi?id=122376
Tools:
Reviewed by Mark Hahnenberg.
* Scripts/jsc-stress-test-helpers/layout-test-helper: Added.
* Scripts/run-javascriptcore-tests:
(printThingsFound):
* Scripts/run-jsc-stress-tests:
LayoutTests:
Reviewed by Mark Hahnenberg.
Add a yaml file describing which directories contain JS LayoutTests. run-jsc-stress-tests
will use this file.
* jsc-layout-tests.yaml: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156955
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Sat, 5 Oct 2013 15:55:28 +0000 (15:55 +0000)]
Unreviewed, rolling out r156952.
http://trac.webkit.org/changeset/156952
https://bugs.webkit.org/show_bug.cgi?id=122381
Made svg/custom/large-image-pattern-crash.html assert
(Requested by ap on #webkit).
* rendering/InlineBox.cpp:
(WebCore::InlineBox::paint):
* rendering/InlineBox.h:
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::paintBoxDecorations):
(WebCore::InlineFlowBox::paintMask):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
* rendering/PaintInfo.h:
(WebCore::PaintInfo::shouldPaintWithinRoot):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paint):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paint):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintMask):
* rendering/RenderBox.h:
* rendering/RenderElement.h:
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations):
* rendering/RenderFrameSet.cpp:
(WebCore::RenderFrameSet::paint):
* rendering/RenderLineBreak.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::paint):
* rendering/RenderObject.h:
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::paint):
(WebCore::RenderReplaced::shouldPaint):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintObject):
(WebCore::RenderTable::paintBoxDecorations):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
(WebCore::RenderTableCell::paintBoxDecorations):
* rendering/RenderTableCol.h:
* rendering/RenderText.h:
* rendering/RenderView.cpp:
(WebCore::RenderView::paint):
(WebCore::RenderView::paintBoxDecorations):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paintEllipsisBox):
(WebCore::RootInlineBox::paintCustomHighlight):
* rendering/svg/RenderSVGContainer.cpp:
(WebCore::RenderSVGContainer::paint):
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGResourceClipper.cpp:
(WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourceMasker.cpp:
(WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::createTileImage):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintSelectionBackground):
(WebCore::SVGInlineTextBox::paint):
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
* rendering/svg/SVGRenderingContext.h:
* svg/SVGUseElement.cpp:
(WebCore::SVGUseElement::rendererClipChild):
* svg/SVGUseElement.h:
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::platformApplySoftware):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156954
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 5 Oct 2013 15:01:59 +0000 (15:01 +0000)]
Need to check if some HTML child elements are HTMLUnknownElement
https://bugs.webkit.org/show_bug.cgi?id=120297
Reviewed by Andreas Kling.
Source/WebCore:
Test: fast/media/media-disable-crash.html
* dom/make_names.pl:
(printConstructorInterior): Added additional comments about the
wrapperOnlyIfMediaIsAvailable feature.
(printTypeHelpers): Added an isHTMLUnknownElement check to the check helper
functions for tags with the wrapperOnlyIfMediaIsAvailable feature.
(printWrapperFunctions): Instead of redoing the media player check and the
settings check, and possibly making a wrapper of the wrong type, call
isHTMUnknownElement, guaranteeing that the wrapper will match the element
it is wrapping.
* html/HTMLElement.h: Move HTMLElementTypeHelpers.h to the bottom of the
file so that functions from that file can be use the HTMLElement class and
other things defined in this file.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::paused): Added an assertion that made the regression
test reliably assert, rather than intermittently (for me, non-reproducibly) crash.
LayoutTests:
Based on a test written by Zan Dobersek <zdobersek@igalia.com>.
* fast/media/media-disable-crash-expected.txt: Added.
* fast/media/media-disable-crash.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156953
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
antti@apple.com [Sat, 5 Oct 2013 11:58:30 +0000 (11:58 +0000)]
Move paint() to RenderElement
https://bugs.webkit.org/show_bug.cgi?id=122371
Reviewed by Darin Adler.
RenderText does not paint itself (text is painted by line boxes). We can move paint() down
to RenderElement.
This also requires some type tightening elsewhere in the code.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156952
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 5 Oct 2013 09:41:19 +0000 (09:41 +0000)]
DoYouEvenBench: Add Facebook's React TodoMVC test case
https://bugs.webkit.org/show_bug.cgi?id=122379
Reviewed by Andreas Kling.
Add React/TodoMVC as a new test case. Somehow we beat Firefox on this one as well.
* DoYouEvenBench/benchmark.html:
* DoYouEvenBench/todomvc/labs: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower.json: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/LICENSE: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/README.md: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/director.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/director.min.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/director/build/ender.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/JSXTransformer.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/bower.json: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/react.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/react/react.min.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.css: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/base.js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/bower_components/todomvc-common/bg.png: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/index.html: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/app.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/footer.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/todoItem.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/js/utils.jsx: Added.
* DoYouEvenBench/todomvc/labs/architecture-examples/react/readme.md: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156951
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 5 Oct 2013 06:54:54 +0000 (06:54 +0000)]
Fix an assertion failure introduced in r156925.
Add HTMLImageElement to the document-wide map only if it's in the document.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156950
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Sat, 5 Oct 2013 06:40:44 +0000 (06:40 +0000)]
Don't preflight spell checker when calling -setContinuousSpellCheckingEnabled repeatedly
https://bugs.webkit.org/show_bug.cgi?id=122329
Reviewed by Darin Adler.
* WebView/WebView.mm: (-[WebView setContinuousSpellCheckingEnabled:]): Don't do any
work if preference didn't change (continuousSpellCheckingEnabled is a static that
starts with false).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156949
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
darin@apple.com [Sat, 5 Oct 2013 06:38:33 +0000 (06:38 +0000)]
text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
https://bugs.webkit.org/show_bug.cgi?id=21312
Reviewed by Ryosuke Niwa.
Source/WebCore:
Test: fast/text/text-transform-turkish-and-azeri.html
This patch covers text-transform: uppercase and text-transform: lowercase.
More changes will be needed to cover text-transform: capitalize.
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::patchNode): Use String::upper instead of String::makeUpper.
* page/EventHandler.cpp:
(WebCore::findDropZone): Use String::lower instead of String::makeLower.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use String::upper instead of String::makeUpper.
* platform/network/blackberry/rss/RSS10Parser.cpp: [Seriously, how is an RSS parser
part of WebKit's networking layer? Where are the tests that cover this? Seems wrong
to have this code in the project.]
(WebCore::RSS10Parser::parseXmlDoc): Use lower instead of makeLower.
(WebCore::RSS10Parser::parseItem): Ditto.
(WebCore::RSS10Parser::parseFeed): Ditto.
* platform/network/blackberry/rss/RSS20Parser.cpp:
(WebCore::RSS20Parser::parseXmlDoc): Ditto.
(WebCore::RSS20Parser::parseItem): Ditto.
(WebCore::RSS20Parser::parseFeed): Ditto.
(WebCore::RSS20Parser::parseEnclosure): Ditto.
* platform/network/blackberry/rss/RSSAtomParser.cpp:
(WebCore::RSSAtomParser::parseXmlDoc): Ditto.
(WebCore::RSSAtomParser::parseItem): Ditto.
(WebCore::RSSAtomParser::parseFeed): Ditto.
(WebCore::RSSAtomParser::parseLink): Ditto.
(WebCore::RSSAtomParser::parseContent): Ditto.
(WebCore::RSSAtomParser::parseAuthor): Ditto.
(WebCore::RSSAtomParser::parseCategory): Ditto.
* platform/text/win/LocaleWin.cpp:
(WebCore::convertLocaleNameToLCID): Use String::lower instead of String::makeLower.
* rendering/RenderText.cpp:
(WebCore::applyTextTransform): Use String::upper and String::lower instead of
String::makeUpper and String::makeLower, and also pass in the locale to each.
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Changed this so it doesn't call
upper just to return an already known string constant.
Source/WebKit/gtk:
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::doCommand): Use StringImpl::upper instead of
StringImpl::makeUpper.
Source/WTF:
* wtf/text/StringImpl.cpp:
(WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
(WTF::StringImpl::lower): Ditto.
* wtf/text/StringImpl.h: Ditto.
* wtf/text/WTFString.cpp:
(WTF::String::lower): Ditto.
(WTF::String::upper): Ditto.
* wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they
offer no advantages over the lower and upper functions. Also added a constructor that takes
a RefPtr<StringImpl> with move construction to help.
LayoutTests:
* fast/text/text-transform-turkish-and-azeri-expected.html: Added.
* fast/text/text-transform-turkish-and-azeri.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156948
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ap@apple.com [Sat, 5 Oct 2013 06:32:05 +0000 (06:32 +0000)]
Roll out r156930 and r156937, they caused 34 assertion failures on bots.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156947
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Sat, 5 Oct 2013 04:52:04 +0000 (04:52 +0000)]
FramePolicyFunction should be an std::function
https://bugs.webkit.org/show_bug.cgi?id=122362
Reviewed by Darin Adler.
Source/WebCore:
This makes policy callback handling simpler inside WebKit.
* loader/EmptyClients.cpp:
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
* loader/EmptyClients.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
* loader/FrameLoaderClient.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
(WebCore::PolicyChecker::checkNewWindowPolicy):
(WebCore::PolicyChecker::checkContentPolicy):
Source/WebKit/efl:
* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::callPolicyFunction):
(WebCore::FrameLoaderClientEfl::dispatchWillSubmitForm):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForResponse):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNewWindowAction):
(WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
* WebCoreSupport/FrameLoaderClientEfl.h:
Source/WebKit/gtk:
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::dispatchWillSubmitForm):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
* WebCoreSupport/FrameLoaderClientGtk.h:
* webkit/webkitwebpolicydecision.cpp:
(webkit_web_policy_decision_use):
(webkit_web_policy_decision_ignore):
(webkit_web_policy_decision_download):
Source/WebKit/mac:
* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
Source/WebKit/win:
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebFrameLoaderClient::dispatchWillSubmitForm):
(WebFrameLoaderClient::receivedPolicyDecision):
Source/WebKit2:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156946
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 04:48:33 +0000 (04:48 +0000)]
CTTE: IconController and IconLoader should have Frame& backpointer.
<https://webkit.org/b/122372>
Reviewed by Anders Carlsson.
Also slap IconLoader with FINAL glove.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156945
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
ryuan.choi@samsung.com [Sat, 5 Oct 2013 04:30:38 +0000 (04:30 +0000)]
Unreviewed EFL build fix after r156924
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::platformInitialize):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156944
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
fpizlo@apple.com [Sat, 5 Oct 2013 04:24:04 +0000 (04:24 +0000)]
It should be even easier to run and debug a failing JSC stress test
https://bugs.webkit.org/show_bug.cgi?id=122337
Reviewed by Oliver Hunt.
If a test fails, you can now just say:
sh WebKitBuild/Debug/jsc-stress-results/regress/script-tests/emscripten-cube2hash.js.ftl-eager-no-cjit
and get the reproduction. You don't have to set any environment variables like before.
Also if you want to debug the failing test you can now just say:
sh WebKitBuild/Debug/jsc-stress-results/regress/script-tests/emscripten-cube2hash.js.ftl-eager-no-cjit lldb --
Broadly, any arguments passed to the reproduction script are prepended to the command to
run the test. This is sort of quirky and won't work for some tests (for example the
profiler tests run a ruby script that runs some other stuff) but it'll work for most of
them and that's good enough for now.
* Scripts/run-jsc-stress-tests:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156943
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 03:50:42 +0000 (03:50 +0000)]
CTTE: RenderScrollbar DOM owner is always an Element.
<https://webkit.org/b/122348>
Reviewed by Antti Koivisto.
When RenderScrollbar is owned by a DOM node, it's always Element.
Tighten the code a bit with this knowledge.
Also marked the class FINAL and beat it with the OVERRIDE stick.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156942
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 03:34:51 +0000 (03:34 +0000)]
TypingCommand helpers should take Document&.
<https://webkit.org/b/122370>
Reviewed by Anders Carlsson.
Instead of taking a Document* and immediately asserting that it's
non-null, just take Document&.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156941
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 5 Oct 2013 02:59:02 +0000 (02:59 +0000)]
Use more references instead of pointers in DocumentOrderedMap
https://bugs.webkit.org/show_bug.cgi?id=122368
Reviewed by Andreas Kling.
Use AtomicStringImpl& instead of AtomicString* or AtomicString& to eliminate
assertions and nullity checks.
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::namedItemGetter):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
* bindings/js/JSHTMLDocumentCustom.cpp:
(WebCore::JSHTMLDocument::canGetItemsForName):
(WebCore::JSHTMLDocument::nameGetter):
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap):
(WebCore::Document::removeImageElementByLowercasedUsemap):
(WebCore::Document::imageElementByLowercasedUsemap):
* dom/Document.h:
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesId):
(WebCore::keyMatchesName):
(WebCore::keyMatchesMapName):
(WebCore::keyMatchesLowercasedMapName):
(WebCore::keyMatchesLowercasedUsemap):
(WebCore::keyMatchesLabelForAttribute):
(WebCore::keyMatchesWindowNamedItem):
(WebCore::keyMatchesDocumentNamedItem):
(WebCore::DocumentOrderedMap::add):
(WebCore::DocumentOrderedMap::remove):
(WebCore::DocumentOrderedMap::get):
(WebCore::DocumentOrderedMap::getElementById):
(WebCore::DocumentOrderedMap::getElementByName):
(WebCore::DocumentOrderedMap::getElementByMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedMapName):
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap):
(WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
(WebCore::DocumentOrderedMap::getElementByWindowNamedItem):
(WebCore::DocumentOrderedMap::getElementByDocumentNamedItem):
(WebCore::DocumentOrderedMap::getAllElementsById):
* dom/DocumentOrderedMap.h:
(WebCore::DocumentOrderedMap::containsSingle):
(WebCore::DocumentOrderedMap::contains):
(WebCore::DocumentOrderedMap::containsMultiple):
* dom/Element.cpp:
(WebCore::Element::updateNameForTreeScope):
(WebCore::Element::updateNameForDocument):
(WebCore::Element::updateIdForTreeScope):
(WebCore::Element::updateIdForDocument):
(WebCore::Element::updateLabel):
* dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* dom/IdTargetObserverRegistry.h:
(WebCore::IdTargetObserverRegistry::notifyObservers):
* dom/TreeScope.cpp:
(WebCore::TreeScope::getElementById):
(WebCore::TreeScope::getAllElementsById):
(WebCore::TreeScope::addElementById):
(WebCore::TreeScope::removeElementById):
(WebCore::TreeScope::getElementByName):
(WebCore::TreeScope::addElementByName):
(WebCore::TreeScope::removeElementByName):
(WebCore::TreeScope::addImageMap):
(WebCore::TreeScope::removeImageMap):
(WebCore::TreeScope::getImageMap):
(WebCore::TreeScope::addLabel):
(WebCore::TreeScope::removeLabel):
(WebCore::TreeScope::labelElementForId):
* dom/TreeScope.h:
(WebCore::TreeScope::hasElementWithId):
(WebCore::TreeScope::containsMultipleElementsWithId):
(WebCore::TreeScope::hasElementWithName):
(WebCore::TreeScope::containsMultipleElementsWithName):
* html/HTMLCollection.cpp:
(WebCore::HTMLCollection::namedItem):
* html/HTMLDocument.cpp:
(WebCore::HTMLDocument::addDocumentNamedItem):
(WebCore::HTMLDocument::removeDocumentNamedItem):
(WebCore::HTMLDocument::addWindowNamedItem):
(WebCore::HTMLDocument::removeWindowNamedItem):
* html/HTMLDocument.h:
(WebCore::HTMLDocument::documentNamedItem):
(WebCore::HTMLDocument::hasDocumentNamedItem):
(WebCore::HTMLDocument::documentNamedItemContainsMultipleElements):
(WebCore::HTMLDocument::windowNamedItem):
(WebCore::HTMLDocument::hasWindowNamedItem):
(WebCore::HTMLDocument::windowNamedItemContainsMultipleElements):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute):
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement):
(WebCore::HTMLMapElement::parseAttribute):
(WebCore::HTMLMapElement::insertedInto):
(WebCore::HTMLMapElement::removedFrom):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156940
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 02:06:33 +0000 (02:06 +0000)]
CTTE: PolicyChecker backpointer to Frame should be a reference.
<https://webkit.org/b/122354>
Reviewed by Anders Carlsson.
PolicyChecker is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156939
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 01:06:19 +0000 (01:06 +0000)]
Editor should use reference-getting document() internally.
<https://webkit.org/b/122364>
Reviewed by Darin Adler.
Instead of grabbing at Editor::m_frame.document(), use the nice
Editor::document() helper that always returns a Document&.
Calling Editor methods on a Frame's editor() while there is no
Document in the Frame is a programming error and this is covered
by an assertion in document().
This removes a bunch of null checks and enables further cleanup.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156938
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrobinson@webkit.org [Sat, 5 Oct 2013 01:03:44 +0000 (01:03 +0000)]
Try to fix the Windows build after r156930.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::paintCharacter): Use ceilf and floorf to avoid issues
with overload collisions and implicit casts of LayoutUnits.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156937
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mark.lam@apple.com [Sat, 5 Oct 2013 00:51:31 +0000 (00:51 +0000)]
Change ScriptDebugServer to use DebuggerCallFrame instead of JavaScriptCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121969.
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
DebuggerCallFrame now tracks whether it is valid instead of needing
JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
just before it pauses and calls back to its client, and then invalidates
it immediately when the callback returns. Every subsequent callback to
the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
it is needed i.e. when the client calls callerFrame(). Similarly,
JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
instead of the entire DebuggerCallFrame because that is all that is
needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.
* debugger/Debugger.cpp:
* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::callerFrame):
(JSC::DebuggerCallFrame::dynamicGlobalObject):
(JSC::DebuggerCallFrame::sourceId):
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::type):
(JSC::DebuggerCallFrame::thisValue):
(JSC::DebuggerCallFrame::evaluate):
(JSC::DebuggerCallFrame::evaluateWithCallFrame):
(JSC::DebuggerCallFrame::invalidate):
(JSC::DebuggerCallFrame::positionForCallFrame):
(JSC::DebuggerCallFrame::sourceIdForCallFrame):
(JSC::DebuggerCallFrame::thisValueForCallFrame):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::create):
(JSC::DebuggerCallFrame::exec):
(JSC::DebuggerCallFrame::line):
(JSC::DebuggerCallFrame::column):
(JSC::DebuggerCallFrame::position):
(JSC::DebuggerCallFrame::isValid):
* interpreter/StackVisitor.cpp:
Source/WebCore:
Tests: inspector-protocol/debugger/call-frame-function-name.html
inspector-protocol/debugger/call-frame-this-host.html
inspector-protocol/debugger/call-frame-this-nonstrict.html
inspector-protocol/debugger/call-frame-this-strict.html
1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
DebuggerCallFrame now tracks whether it is valid instead of needing
JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
just before it pauses and calls back to its client, and then invalidates
it immediately when the callback returns. Every subsequent callback to
the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
it is needed i.e. when the client calls callerFrame(). Similarly,
JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
instead of the entire DebuggerCallFrame because that is all that is
needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.
* bindings/js/JSJavaScriptCallFrameCustom.cpp:
(WebCore::JSJavaScriptCallFrame::thisObject):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
(WebCore::JavaScriptCallFrame::caller):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::functionName):
(WebCore::JavaScriptCallFrame::type):
(WebCore::JavaScriptCallFrame::scopeChain):
(WebCore::JavaScriptCallFrame::dynamicGlobalObject):
(WebCore::JavaScriptCallFrame::thisValue):
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::DebuggerCallFrameScope::DebuggerCallFrameScope):
(WebCore::DebuggerCallFrameScope::~DebuggerCallFrameScope):
(WebCore::ScriptDebugServer::ScriptDebugServer):
(WebCore::ScriptDebugServer::setBreakpoint):
(WebCore::ScriptDebugServer::removeBreakpoint):
(WebCore::ScriptDebugServer::hasBreakpoint):
(WebCore::ScriptDebugServer::evaluateBreakpointAction):
(WebCore::ScriptDebugServer::breakProgram):
(WebCore::ScriptDebugServer::stepOverStatement):
(WebCore::ScriptDebugServer::stepOutOfFunction):
(WebCore::ScriptDebugServer::currentDebuggerCallFrame):
(WebCore::ScriptDebugServer::dispatchDidPause):
(WebCore::ScriptDebugServer::updateCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::pauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
Source/WebKit/mac:
1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
DebuggerCallFrame now tracks whether it is valid instead of needing
JavaScriptCallFrame do it.
2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
just before it pauses and calls back to its client, and then invalidates
it immediately when the callback returns. Every subsequent callback to
the client will use a new instance of the DebuggerCallFrame.
3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
it "pauses".
4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
it is needed i.e. when the client calls callerFrame(). Similarly,
JavaScriptCallFrame only creates its caller when it's requested.
5. DebuggerCallFrame's line() and column() now returns a base-zero int.
6. WebScriptDebugDelegate now only caches the functionName of the frame
instead of the entire DebuggerCallFrame because that is all that is
needed.
7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.
* WebView/WebScriptDebugDelegate.mm:
(-[WebScriptCallFramePrivate dealloc]):
(-[WebScriptCallFrame _initWithGlobalObject:functionName:exceptionValue:JSC::]):
(-[WebScriptCallFrame functionName]):
(-[WebScriptCallFrame exception]):
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::exception):
LayoutTests:
* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):
* inspector-protocol/debugger/call-frame-function-name-expected.txt: Added.
* inspector-protocol/debugger/call-frame-function-name.html: Added.
* inspector-protocol/debugger/call-frame-this-host-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-host.html: Added.
* inspector-protocol/debugger/call-frame-this-nonstrict-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-nonstrict.html: Added.
* inspector-protocol/debugger/call-frame-this-strict-expected.txt: Added.
* inspector-protocol/debugger/call-frame-this-strict.html: Added.
* inspector/debugger/pause-in-internal-script-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156936
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sat, 5 Oct 2013 00:40:52 +0000 (00:40 +0000)]
Remove Qt definitions from Platform.h
https://bugs.webkit.org/show_bug.cgi?id=122349
Reviewed by Anders Carlsson.
* wtf/Platform.h: Remove unused PLATFORM(QT) stanzas from file.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156935
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sat, 5 Oct 2013 00:40:09 +0000 (00:40 +0000)]
Silence compiler warning when building 64-bit (on Windows)
Reviewed by Geoffrey Garen.
* jit/JSInterfaceJIT.h: Add a static cast for assignment.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156934
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Sat, 5 Oct 2013 00:35:16 +0000 (00:35 +0000)]
[Win] Turn off FastMalloc on Windows
https://bugs.webkit.org/show_bug.cgi?id=122352
Reviewed by Darin Adler.
* wtf/Platform.h: Enable USE_SYSTEM_MALLOC when building on
Windows to stick to the MSVCRT allocator/deallocator.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156933
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Sat, 5 Oct 2013 00:35:12 +0000 (00:35 +0000)]
Ref-ify more stack guards.
<https://webkit.org/b/122360>
Reviewed by Anders Carlsson.
Make another pass turning RefPtr<T> into Ref<T> where possible.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156932
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mikhail.pozdnyakov@intel.com [Sat, 5 Oct 2013 00:26:12 +0000 (00:26 +0000)]
Remove WTF smart pointers 'const_pointer_cast'
https://bugs.webkit.org/show_bug.cgi?id=122325
Reviewed by Darin Adler.
Removed WTF smart pointers 'const_pointer_cast' functions as:
- they were not used
- their implementation was wrong as they tried to cast to a different pointer type
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
* wtf/RefPtr.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156931
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
mrobinson@webkit.org [Sat, 5 Oct 2013 00:08:08 +0000 (00:08 +0000)]
[MathML] Remove RenderTree modification during layout and refactor the StretchyOp code
https://bugs.webkit.org/show_bug.cgi?id=121416
Source/WebCore:
Reviewed by David Hyatt.
Tests: mathml/presentation/mo-minus.html
mathml/presentation/mo-stacked-glyphs.html
mathml/presentation/mo-stretchy-vertical-bar.html
mathml/very-large-stretchy-operators.html
MathML stretched operators by both modifying the width of the operator
and adding children to the operator node in the render tree.
Instead we make the operator width equal to the widest glyph possible that we use
to represent the operator. Additionally instead of rendering stretchy glyphs via
stacked operator pieces in separate render tree nodes, keep only one node for the
glyph, and use a custom paint method to paint the stacked representation.
With this patch, rendering seems roughly equivalent on Mac and markedly better
on Linux.
* css/mathml.css:
Not sure what this line-height:0 was here for, but it caused bugs with the new code
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::attach):
(WebCore):
(WebCore::MathMLTextElement::childrenChanged):
Need to update the anonymous render tree below <mo> elements when their
children change or when the renderer is first attached.
* mathml/MathMLTextElement.h:
(MathMLTextElement):
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
Now that the preferred width doesn't depend on the height, we don't
need to override computePreferredLogicalWidths at all.
* rendering/mathml/RenderMathMLFenced.cpp:
(WebCore::RenderMathMLFenced::makeFences):
(WebCore::RenderMathMLFenced::styleDidChange):
Need to update the anonymous renderers for the anonymous RenderMathMLOperators.
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::expandedStretchHeight):
Store the non-expanded stretch height so that we can detect when the height
actually changed.
(WebCore::RenderMathMLOperator::stretchToHeight):
Only update the style on the anonymous render tree since this is called
from RenderMathMLRow::layout
(WebCore::RenderMathMLOperator::styleDidChange):
(WebCore::RenderMathMLOperator::glyphBoundsForCharacter): A helper to get glyph boundaries.
(WebCore::RenderMathMLOperator::glyphHeightForCharacter): Ditto for glyph width.
(WebCore::RenderMathMLOperator::advanceForCharacter): The advance is different from the width,
and we want the width of the operator to be the advance instead of the tight bounding width.
(WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Use the max of all possible glyphs
we can use to render this operator.
(WebCore::RenderMathMLOperator::updateFromElement): We add a child for rendering the non-scaled
version of the glyph.
(WebCore::RenderMathMLOperator::firstCharacterForStretching): Helper to figure out what character
is the character used for stretching operations.
(WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter): Helper to find an acceptable set
of glyph pieces for stretching characters.
(WebCore::RenderMathMLOperator::updateStyle): Resize the operator to the appropriate height and hide
the child if we are using the stretchy style.
(WebCore::RenderMathMLOperator::firstLineBoxBaseline):
(WebCore::RenderMathMLOperator::paintCharacter): Helper to paint a single character component of the
stretchy glyph.
(WebCore::RenderMathMLOperator::fillWithExtensionGlyph): Helper to paint the extender glue between
features of the stretchy glyph.
(WebCore::RenderMathMLOperator::paint): Properly paint stretchy glyphs.
* rendering/mathml/RenderMathMLOperator.h: Update method declarations.
LayoutTests:
Patch by Frédéric Wang <fred.wang@free.fr> on 2013-10-04
Reviewed by David Hyatt.
Add some reftests for stretchy operators.
* TestExpectations: The remaining MathML pixel tests are broken by this patch.
* LayoutTests/platform/gtk/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* mathml/presentation/mo-minus.html: Added.
* mathml/presentation/mo-stacked-glyphs-expected.html: Added.
* mathml/presentation/mo-stacked-glyphs.html: Added.
* mathml/presentation/mo-stretchy-vertical-bar-expected-mismatch.html: Added.
* mathml/presentation/mo-stretchy-vertical-bar.html: Added.
* mathml/very-large-stretchy-operators-expected.txt: Added.
* mathml/very-large-stretchy-operators.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156930
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Sat, 5 Oct 2013 00:00:03 +0000 (00:00 +0000)]
Build fix after r156925. It collided with r156903.
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::insertedInto):
(WebCore::HTMLImageElement::removedFrom):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156929
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 4 Oct 2013 23:58:37 +0000 (23:58 +0000)]
[Windows] Correct run-path when using 64-bit binaries.
Reviewed by David Kilzer.
* Scripts/webkitdirs.pm:
(determineConfigurationProductDir): If running in 64-bit mode, use the 'bin64'
directory. Otherwise use the existing 'bin32' directory.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156928
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 4 Oct 2013 23:47:57 +0000 (23:47 +0000)]
Clean out some FrameLoaderClient hooks that no ports were using.
<https://webkit.org/b/122356>
Reviewed by Anders Carlsson.
Removed the following hooks that were leftovers from dead ports:
- didExhaustMemoryAvailableForScript
- didNotAllowScript
- didNotAllowPlugins
- willCheckAndDispatchMessageEvent
- didChangeName
- dispatchWillInsertBody
- dispatchDidChangeResourcePriority
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156927
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
bfulgham@apple.com [Fri, 4 Oct 2013 23:34:28 +0000 (23:34 +0000)]
Teach webkitdirs.pm to honor the --64-bit flag
https://bugs.webkit.org/show_bug.cgi?id=122357
Reviewed by David Kilzer.
* Scripts/webkitdirs.pm:
(argumentsForConfiguration): Modify to check if --64-bit is supplied
by the user.
(findMatchingArguments): Added.
(hasArgument): Added.
(checkForArgumentAndRemoveFromArrayRef): Refactor to use the new
findMatchingArguments subroutine.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156926
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
rniwa@webkit.org [Fri, 4 Oct 2013 23:33:10 +0000 (23:33 +0000)]
FocusController::advanceFocus spends a lot of time in HTMLMapElement::imageElement
https://bugs.webkit.org/show_bug.cgi?id=122313
Reviewed by Andreas Kling.
The bug was caused by HTMLMapElement::imageElement traversing the entire document to look for
the image element associated with a given map element. Because HTMLCollection used to find the
image element is not cached, it traversed the entire document on every area element we visit,
resulting in O(n^2) behavior.
Fixed the bug by adding the name-to-image-element map on document to avoid the traversal in
HTMLMapElement::imageElement.
* dom/Document.cpp:
(WebCore::Document::addImageElementByLowercasedUsemap): Added.
(WebCore::Document::removeImageElementByLowercasedUsemap): Added.
(WebCore::Document::imageElementByLowercasedUsemap): Added.
* dom/Document.h: Added m_imagesByUsemap.
* dom/DocumentOrderedMap.cpp:
(WebCore::keyMatchesLowercasedUsemap): Added.
(WebCore::DocumentOrderedMap::getElementByLowercasedUsemap): Added.
* dom/DocumentOrderedMap.h:
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Update the name-to-usemap map. The code to parse
the usemap attribute and strip # was moved from HTMLMapElement::imageElement.
(WebCore::HTMLImageElement::insertedInto): Ditto.
(WebCore::HTMLImageElement::removedFrom): Ditto.
(WebCore::HTMLImageElement::matchesLowercasedUsemap): Added; called by DocumentOrderedMap.
* html/HTMLImageElement.h:
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement): Call Document::imageElementByUsemap instead of
looking through all image elements in the document.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156925
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
weinig@apple.com [Fri, 4 Oct 2013 23:25:55 +0000 (23:25 +0000)]
../WebCore: Unify rubberband control
https://bugs.webkit.org/show_bug.cgi?id=122341
Reviewed by Tim Horton.
- Consolidates the two ways we were passing state about whether
to rubber-band on a particular edge down to one.
* WebCore.exp.in:
* page/Page.cpp:
* page/Page.h:
* page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::isRubberBandInProgress):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):
(WebCore::ScrollingTree::setCanRubberBandState):
(WebCore::ScrollingTree::rubberBandsAtLeft):
(WebCore::ScrollingTree::rubberBandsAtRight):
(WebCore::ScrollingTree::rubberBandsAtBottom):
(WebCore::ScrollingTree::rubberBandsAtTop):
(WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
* page/scrolling/ScrollingTree.h:
* page/scrolling/mac/ScrollingCoordinatorMac.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):
../WebKit2: Unify rubber-band control
https://bugs.webkit.org/show_bug.cgi?id=122341
Reviewed by Tim Horton.
- Consolidates the two ways we were passing state about whether
to rubber-band on a particular edge down to one.
- Adds SPI to control whether you can rubber band on the left
or right edge.
- Add a linked-on-or-after check to control whether we use the
legacy implicit rubber band control based on back/forward.
* UIProcess/API/C/WKPage.cpp:
(WKPageRubberBandsAtLeft):
(WKPageSetRubberBandsAtLeft):
(WKPageRubberBandsAtRight):
(WKPageSetRubberBandsAtRight):
(WKPageRubberBandsAtBottom):
(WKPageSetRubberBandsAtBottom):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::rubberBandsAtLeft):
(WebKit::WebPageProxy::setRubberBandsAtLeft):
(WebKit::WebPageProxy::rubberBandsAtRight):
(WebKit::WebPageProxy::setRubberBandsAtRight):
(WebKit::WebPageProxy::rubberBandsAtTop):
(WebKit::WebPageProxy::setRubberBandsAtTop):
(WebKit::WebPageProxy::rubberBandsAtBottom):
(WebKit::WebPageProxy::setRubberBandsAtBottom):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::shouldUseLegacyImplicitRubberBandControl):
(WebKit::WebPageProxy::platformInitialize):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156924
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
graouts@apple.com [Fri, 4 Oct 2013 23:01:50 +0000 (23:01 +0000)]
Web Inspector: pressing the Cmd key over a CSS property should underline it immediately (jump to definition mode)
https://bugs.webkit.org/show_bug.cgi?id=119012
Reviewed by Joseph Pecoraro.
We add an "enabled" state to the tokenTrackingController to indicate that we're interested
in tracking hovered tokens. The tokenTrackingController is now only enabled in the
CSSStyleDeclarationTextEditor when the Cmd key is pressed and in the SourceCodeTextEditor
when either the Cmd key is pressed (NonSymbolTokens mode) or when the debugger is paused
(JavaScriptExpression mode).
The tokenTrackingController is now smarter about how it tracks mouse events when it's enabled,
tracking "mouseenter" and "mouseleave" events to enable tracking allowing immediate detection of
tokens being hovered or no longer being hovered even with quick mouse movements. Additioanlly,
using the new top-level mouse coordinates tracking, we can detect a hovered token as soon as
it's being enabled to provide instant feedback to the user.
This new top-level mouse coordinates tracking couple with tracking of modifier keys also fixes
http://webkit.org/b/119011.
* UserInterface/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype._updateJumpToSymbolTrackingMode):
Highlight the last known hovered candidate's range as soon as the Cmd key is pressed and enable
the tokenTrackingController if we're dealing with a non-read-only editor. When the Cmd key is
released, disable the tokenTrackingController.
* UserInterface/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController):
(WebInspector.CodeMirrorTokenTrackingController.prototype.get enabled):
(WebInspector.CodeMirrorTokenTrackingController.prototype.set enabled):
New enabled state for the tokenTrackingController which indicates whether it should be tracking
mouse events to track hovered tokens in the editor. Upon being enabled, the tokenTrackingController
looks up the mouse coordinates continuously tracked at the window level to check for a token
at the last known mouse coordinates in case we're already over a token that may be highlighted.
(WebInspector.CodeMirrorTokenTrackingController.prototype.highlightLastHoveredRange):
New public method allowing to highlight the last know candidate range, if any. This is used from
editor code when the Cmd key is pressed and we want to force the last know candidate to be
highlighted.
(WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking):
Make these two methods private now that they're automatically called by the "mouseenter" and
"mouseleave" event handling when we're in the "enabled" state. Additionally, the public
"tracking" property has been removed since it is no longer useful to the developer.
(WebInspector.CodeMirrorTokenTrackingController.prototype.handleEvent):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseEntered):
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseLeft):
New handlers for the "mouseenter" and "mouseleave" events enabling tracking of hovered tokens.
(WebInspector.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
(WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
Refactor _mouseMovedOverEditor() into two methods with the new _updateHoveredTokenInfo()
allowing to customize the mouse coordinates to be used since we may call
_updateHoveredTokenInfo() outside of the context of a mouse event (ie. a keypress event).
(WebInspector.CodeMirrorTokenTrackingController.prototype._windowLostFocus):
(WebInspector.CodeMirrorTokenTrackingController.prototype._resetTrackingStates):
New private method combining all the various states that need to be reset when tracking
is turned off, including the removal of the highlighted range if any. This is now called
when the window loses focus.
* UserInterface/Main.js:
(WebInspector.loaded):
(WebInspector._mouseMoved):
Add a new window-level "mousemove" event handler to always track mouse coordinates and key modifier
states. This ensures that we may have the most accurate information possible for key modifiers and
allow code to query the last recorded mouse position in situations where it wouldn't be possible
to have dealt with a mouse event, as is the case when the tokenTrackingController just started tracking.
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerEnabled):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
(WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
(WebInspector.SourceCodeTextEditor.prototype._enableJumpToSymbolTrackingModeSettings):
(WebInspector.SourceCodeTextEditor.prototype._disableJumpToSymbolTrackingModeSettings):
Update the "enabled" state on the tokenTrackingController when it may have changed based
on those two conditions: we should have either an active debugger call frame or the
Cmd key should have been pressed. This ensures we only track hovered tokens as needed.
(WebInspector.SourceCodeTextEditor.prototype._updateJumpToSymbolTrackingMode):
Highlight the last known hovered candidate's range as soon as the Cmd key is pressed.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156923
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
akling@apple.com [Fri, 4 Oct 2013 22:49:40 +0000 (22:49 +0000)]
CTTE: SubframeLoader backpointer to Frame should be a reference.
<https://webkit.org/b/122350>
Reviewed by Anders Carlsson.
SubframeLoader is tied to the lifetime of FrameLoader, which in turn
is tied to the lifetime of Frame.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156922
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
andersca@apple.com [Fri, 4 Oct 2013 22:46:15 +0000 (22:46 +0000)]
Remove some unneeded code from WidgetMac
https://bugs.webkit.org/show_bug.cgi?id=122355
Reviewed by Dan Bernstein.
Source/WebCore:
Remove code to manage the visible rect, it's not needed anymore.
* platform/Widget.h:
* platform/mac/WidgetMac.mm:
(WebCore::Widget::~Widget):
(WebCore::Widget::setFrameRect):
(WebCore::Widget::setPlatformWidget):
Source/WebKit/mac:
Remove code to handle the visible rect changing, it's not needed anymore since we always put Netscape plug-ins into their own layers now.
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156921
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
oliver@apple.com [Fri, 4 Oct 2013 22:45:37 +0000 (22:45 +0000)]
Update all the tests, and include new file.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156920
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
commit-queue@webkit.org [Fri, 4 Oct 2013 22:45:09 +0000 (22:45 +0000)]
FTL: Add support for ValueToInt32(bool(x))
https://bugs.webkit.org/show_bug.cgi?id=122346
Patch by Nadav Rotem <nrotem@apple.com> on 2013-10-04
Reviewed by Geoffrey Garen.
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileValueToInt32):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156919
268f45cc-cd09-0410-ab3c-
d52691b4dbfc