WebKit-https.git
6 years agoUpdate cygwin downloader to search for packages in the right location.
roger_fong@apple.com [Thu, 12 Sep 2013 22:46:57 +0000 (22:46 +0000)]
Update cygwin downloader to search for packages in the right location.

* CygwinDownloader/cygwin-downloader.py:
* CygwinDownloader/cygwin-downloader.zip:

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

6 years ago<meter> element AXValue is listed as a writable value
commit-queue@webkit.org [Thu, 12 Sep 2013 22:41:43 +0000 (22:41 +0000)]
<meter> element AXValue is listed as a writable value
https://bugs.webkit.org/show_bug.cgi?id=117650

Patch by Samuel White <samuel_white@apple.com> on 2013-09-12
Reviewed by Chris Fleizach.

Source/WebCore:

No new tests, updated existing accessibility/meter-element.html test
to check writability. Changed meter element value to be unwritable.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::canSetValueAttribute):

LayoutTests:

Added writability check to meter element test.

* accessibility/meter-element.html:
* platform/mac/accessibility/meter-element-expected.txt:

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

6 years agoRolling out r155632
mhahnenberg@apple.com [Thu, 12 Sep 2013 22:39:16 +0000 (22:39 +0000)]
Rolling out r155632

Broke some tests.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper):
* heap/MarkedBlock.h:

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

6 years ago[Qt] SHOULD NEVER BE REACHED is touched WebCore::InputType::createStepRange
reni@webkit.org [Thu, 12 Sep 2013 22:09:25 +0000 (22:09 +0000)]
[Qt] SHOULD NEVER BE REACHED is touched WebCore::InputType::createStepRange
https://bugs.webkit.org/show_bug.cgi?id=121148

Reviewed by Kent Tamura.

Source/WebCore:

Non-steppable input types must not rendered as slider even if its webkit-apperance style
property is set to slider-vertical/horizontal.

Test: platform/qt/fast/forms/range/slider-crash-on-input.html

* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::paintSliderTrack):

LayoutTests:

Trying to render text input as slider-vertical. Expecting to run without crash.

* platform/qt/fast/forms/range/slider-crash-on-input.html: Added.
* platform/qt/platform/qt/fast/forms/range/slider-crash-on-input-expected.txt: Added.

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

6 years agoCanvas fillText and measureText handle ideographic spaces differently
ap@apple.com [Thu, 12 Sep 2013 21:40:04 +0000 (21:40 +0000)]
Canvas fillText and measureText handle ideographic spaces differently
https://bugs.webkit.org/show_bug.cgi?id=108881

Fixing the test:
1. Updated paths to js-test scripts.
2. Removed "meta charcode" - we don't need to specify a charset here, and it's
"charset", not "charcode" anyway.

* fast/canvas/canvas-measureText-ideographicSpace.html:

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

6 years agoSource/JavaScriptCore: Qt build fix. Add a return to make the compiler happy.
rniwa@webkit.org [Thu, 12 Sep 2013 21:04:17 +0000 (21:04 +0000)]
Source/JavaScriptCore: Qt build fix. Add a return to make the compiler happy.

* dfg/DFGGPRInfo.h:
(JSC::DFG::JSValueRegs::gpr):

Source/WebCore: Qt and Windows build fix.

* page/animation/CSSPropertyAnimation.cpp:

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

6 years agosvg/animations/smil-leak-*.svg tests are flaky
ap@apple.com [Thu, 12 Sep 2013 21:02:39 +0000 (21:02 +0000)]
svg/animations/smil-leak-*.svg tests are flaky
https://bugs.webkit.org/show_bug.cgi?id=114280

Reviewed by Tim Horton.

Moved garbage collection out of the function that touches nodes to be collected,
making sure that they are definitely not on the stack.

I could not reproduce locally, so this is a speculative fix.

* svg/animations/smil-leak-dynamically-added-element-instances.svg:
* svg/animations/smil-leak-element-instances-noBaseValRef.svg:
* svg/animations/smil-leak-element-instances.svg:
* svg/animations/smil-leak-elements.svg:

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

6 years agoEncapsulate globals in CSSPropertyAnimation.cpp
rniwa@webkit.org [Thu, 12 Sep 2013 20:52:13 +0000 (20:52 +0000)]
Encapsulate globals in CSSPropertyAnimation.cpp
https://bugs.webkit.org/show_bug.cgi?id=121205

Reviewed by Antti Koivisto.

Encapsulated the globals inside a newly added CSSPropertyAnimationWrapperMap. Also removed the circular
dependency from ShorthandPropertyWrapper's constructor to CSSPropertyAnimationWrapperMap::instance().
The circular dependency still exists in ensurePropertyMap but I'm going to remove it in the bug 121199.

* page/animation/CSSPropertyAnimation.cpp:
(WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper): Takes a Vector of longhand wrappers instead of
calling wrapperForProperty in the middle of constructing the very table. This circular dependency is now
encapsulated in CSSPropertyAnimationWrapperMap::ensurePropertyMap.
(WebCore::CSSPropertyAnimationWrapperMap::instance): Added.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForProperty): Renamed from WebCore::wrapperForProperty.
(WebCore::CSSPropertyAnimationWrapperMap::wrapperForIndex): Added.
(WebCore::CSSPropertyAnimationWrapperMap::size): Added.
(WebCore::CSSPropertyAnimationWrapperMap::addPropertyWrapper): Renamed from WebCore::addPropertyWrapper. Also
cleaned up boolean logics to use early exits instead of nested ifs.
(WebCore::CSSPropertyAnimationWrapperMap::addShorthandProperties): Renamed from WebCore::addShorthandProperties.
(WebCore::CSSPropertyAnimationWrapperMap::ensurePropertyMap): Renamed from WebCore::ensurePropertyMap.
Added an alias gPropertyWrappers for m_propertyWrappers; this aliasing will be removed in the bug 121199.
(WebCore::CSSPropertyAnimation::blendProperties):
(WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
(WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
(WebCore::CSSPropertyAnimation::propertiesEqual):
(WebCore::CSSPropertyAnimation::getPropertyAtIndex):
(WebCore::CSSPropertyAnimation::getNumProperties):
* page/animation/CSSPropertyAnimation.h:
* rendering/style/RenderStyle.h:

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

6 years agoFlaky Test: plugins/mouse-events.html
ap@apple.com [Thu, 12 Sep 2013 20:42:44 +0000 (20:42 +0000)]
Flaky Test: plugins/mouse-events.html
https://bugs.webkit.org/show_bug.cgi?id=116665

Reviewed by Anders Carlsson.

* plugins/mouse-events-expected.txt:
* plugins/mouse-events.html:
This test used async calls for events, and then usually logged responses while waiting
for a plg.eventLoggingEnabled setter synchronously. Depending on sync/async event
order is not reliable, especially with old WebKit1 plug-in IPC code.

* platform/mac-wk2/plugins/mouse-events-expected.txt: For some unclear reason,
focus works differently in WebKit2.

* platform/gtk/plugins/mouse-events-expected.txt: Removed.
* platform/qt/plugins/mouse-events-expected.txt: Removed.
* platform/win/plugins/mouse-events-expected.txt: Removed.
These results looked similar to new cross-platform ones, hopefully custom results
won't be needed any more.

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

6 years agoDFG::GenerationInfo init/fill methods shouldn't duplicate a bunch of logic
fpizlo@apple.com [Thu, 12 Sep 2013 20:40:03 +0000 (20:40 +0000)]
DFG::GenerationInfo init/fill methods shouldn't duplicate a bunch of logic
https://bugs.webkit.org/show_bug.cgi?id=121253

Reviewed by Oliver Hunt.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::initGPR):
(JSC::DFG::GenerationInfo::initInt32):
(JSC::DFG::GenerationInfo::initJSValue):
(JSC::DFG::GenerationInfo::initCell):
(JSC::DFG::GenerationInfo::initBoolean):
(JSC::DFG::GenerationInfo::initStorage):
(JSC::DFG::GenerationInfo::fillGPR):
(JSC::DFG::GenerationInfo::fillJSValue):
(JSC::DFG::GenerationInfo::fillCell):
(JSC::DFG::GenerationInfo::fillInt32):
(JSC::DFG::GenerationInfo::fillBoolean):
(JSC::DFG::GenerationInfo::fillStorage):

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

6 years agoUnreviewed, fix mispelling (Specualte -> Speculate) that I introduced in an
fpizlo@apple.com [Thu, 12 Sep 2013 20:13:28 +0000 (20:13 +0000)]
Unreviewed, fix mispelling (Specualte -> Speculate) that I introduced in an
earlier patch.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculateInt32Operand::gpr):
(JSC::DFG::SpeculateStrictInt32Operand::gpr):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Strict):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Strict):

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

6 years agoGPRTemporary's reuse constructor should be templatized to reduce code duplication...
fpizlo@apple.com [Thu, 12 Sep 2013 20:07:02 +0000 (20:07 +0000)]
GPRTemporary's reuse constructor should be templatized to reduce code duplication, and the bool to denote tag or payload should be replaced with an enum
https://bugs.webkit.org/show_bug.cgi?id=121250

Reviewed by Oliver Hunt.

* dfg/DFGGPRInfo.h:
(JSC::DFG::JSValueRegs::gpr):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::GPRTemporary::GPRTemporary):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileAdd):
(JSC::DFG::SpeculativeJIT::compileStringEquality):
(JSC::DFG::SpeculativeJIT::compileGetArgumentsLength):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::JSValueOperand::gpr):
(JSC::DFG::GPRTemporary::GPRTemporary):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNull):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileIntegerCompare):
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::compile):
* runtime/JSCJSValue.h:

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

6 years agoWeb Inspector: Do not try to parse incomplete HTTP requests
commit-queue@webkit.org [Thu, 12 Sep 2013 20:00:17 +0000 (20:00 +0000)]
Web Inspector: Do not try to parse incomplete HTTP requests
https://bugs.webkit.org/show_bug.cgi?id=121123

Patch by Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk> on 2013-09-12
Reviewed by Darin Adler.

When working on a patch for bug #121121 I found an issue with the InspectorServer where it would try
to parse an HTTP message before receiving the full message and thus fail connecting with the
chromedevtools plugin.

What happens is that the WebSocketServerConnection receives buffers on
WebSocketServerConnection::didReceiveSocketStreamData and calls
WebSocketServerConnection::readHTTPMessage which then checks if we have a valid request by calling
HTTPRequest::parseHTTPRequestFromBuffer. If the request is valid it tries to parse the message and
clears the buffer, otherwise it continues adding data to the internal buffer until we have a valid
request.

The problem is that currently HTTPRequest::parseHTTPRequestFromBuffer considers the request as valid
before receiving the full message. To solve this we should make the method check if the request
headers end with a blank line otherwise we consider the request as invalid (see also
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html).

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(sendIncompleteRequest):
(beforeAll):
Add GTK specific test to check if the inspector server replies to incomplete requests.
* UIProcess/InspectorServer/HTTPRequest.cpp:
(WebKit::HTTPRequest::parseHeaders):
Do not consider request valid if headers didn't end with a blank line.

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

6 years agoSharedBuffer::createNSData should return a RetainPtr<NSData>
andersca@apple.com [Thu, 12 Sep 2013 19:52:04 +0000 (19:52 +0000)]
SharedBuffer::createNSData should return a RetainPtr<NSData>
https://bugs.webkit.org/show_bug.cgi?id=121237

Reviewed by Darin Adler.

Source/WebCore:

This makes memory management cleared and fixes a leak in PDFDocumentImage::createPDFDocument.
We use a RetainPtr subclass as a stopgap measure to prevent code that does [buffer->createNSData() autorelease]
from compiling and crashing due to the NSData object being overreleased.

* loader/ResourceBuffer.h:
* loader/mac/ResourceBuffer.mm:
(WebCore::ResourceBuffer::createNSData):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::NSDataRetainPtr::NSDataRetainPtr):
* platform/graphics/mac/PDFDocumentImageMac.mm:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/mac/HTMLConverter.mm:
(-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
(fileWrapperForURL):
* platform/mac/PasteboardMac.mm:
(WebCore::fileWrapper):
(WebCore::Pasteboard::read):
(WebCore::documentFragmentWithRTF):
(WebCore::fragmentFromWebArchive):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::setBufferForType):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createNSData):

Source/WebKit/mac:

Update for WebCore changes. This also fixes a leak where we'd create an NSFileWrapper from NSData but never release the data.

* WebView/WebDataSource.mm:
(-[WebDataSource data]):
* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation documentSource]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
* WebView/WebResource.mm:
(-[WebResource encodeWithCoder:]):
(-[WebResource data]):

Source/WebKit2:

Update for WebCore changes.

* UIProcess/API/mac/WKView.mm:
(-[WKView writeSelectionToPasteboard:types:]):
(-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):

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

6 years agoBitmap's WordType should be a template parameter
mhahnenberg@apple.com [Thu, 12 Sep 2013 19:48:49 +0000 (19:48 +0000)]
Bitmap's WordType should be a template parameter
https://bugs.webkit.org/show_bug.cgi?id=121238

Reviewed by Darin Adler.

The code is written as if it already is. We just need to lift it out of the class.
This simplifies code that wants to load, for example, a single byte rather than an
entire 32-bit word.

* wtf/Bitmap.h:
(WTF::Bitmap::Bitmap):
(WTF::Bitmap::get):
(WTF::Bitmap::set):
(WTF::Bitmap::testAndSet):
(WTF::Bitmap::testAndClear):
(WTF::Bitmap::concurrentTestAndSet):
(WTF::Bitmap::concurrentTestAndClear):
(WTF::Bitmap::clear):
(WTF::Bitmap::clearAll):
(WTF::Bitmap::nextPossiblyUnset):
(WTF::Bitmap::findRunOfZeros):
(WTF::Bitmap::count):
(WTF::Bitmap::isEmpty):
(WTF::Bitmap::isFull):

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

6 years agoRemove more Timeline stuff we don't use
timothy@apple.com [Thu, 12 Sep 2013 19:48:04 +0000 (19:48 +0000)]
Remove more Timeline stuff we don't use
https://bugs.webkit.org/show_bug.cgi?id=121246

Reviewed by Joseph Pecoraro.

* inspector/InspectorController.cpp:
* inspector/InspectorController.h:
* inspector/InspectorDOMDebuggerAgent.cpp:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
* inspector/InspectorProfilerAgent.h:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
* inspector/InspectorTimelineAgent.h:

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

6 years ago[EFL] Get rid of layering violations in PasteboardEfl.cpp
darin@apple.com [Thu, 12 Sep 2013 19:23:15 +0000 (19:23 +0000)]
[EFL] Get rid of layering violations in PasteboardEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=121241

Patch by Christophe Dumez <ch.dumez@sisa.samsung.com> on 2013-09-12
Reviewed by Darin Adler.

Get rid of layering violations in PasteboardEfl.cpp. For now, just mimic
the Mac port to avoid divergences and leave port-specific functions
unimplemented as the EFL port does not support the pasteboard functionality
yet.

No new tests, no behavior change.

* PlatformEfl.cmake:
* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextWithPasteboard):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::copyURL):
(WebCore::Editor::copyImage):
* editing/Editor.h:
* editing/efl/EditorEfl.cpp: Added.
(WebCore::Editor::writeSelectionToPasteboard):
(WebCore::Editor::writeURLToPasteboard):
(WebCore::Editor::writeImageToPasteboard):
(WebCore::Editor::readPlainTextFromPasteboard):
(WebCore::Editor::pasteWithPasteboard):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* platform/Pasteboard.h:
* platform/efl/PasteboardEfl.cpp:

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

6 years ago[GTK] Unreviewed build fix after r155635.
berto@igalia.com [Thu, 12 Sep 2013 19:21:53 +0000 (19:21 +0000)]
[GTK] Unreviewed build fix after r155635.

Include DragData.h

* platform/gtk/PasteboardGtk.cpp:

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

6 years ago[Windows] Build fix after r155635.
bfulgham@apple.com [Thu, 12 Sep 2013 19:13:54 +0000 (19:13 +0000)]
[Windows] Build fix after r155635.

Rubber Stamped by Darin Adler.

* platform/Pasteboard.h: Add missing compile guards for Windows port.

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

6 years agoReorganize Pasteboard.h to make it easier to read, and express plan for future work
darin@apple.com [Thu, 12 Sep 2013 18:39:18 +0000 (18:39 +0000)]
Reorganize Pasteboard.h to make it easier to read, and express plan for future work
https://bugs.webkit.org/show_bug.cgi?id=121234

Reviewed by Anders Carlsson.

* platform/Pasteboard.h: Move Mac/iOS-specific pasteboard names to the bottom of the
file rather than putting them up with forward declarations before the class. Removed
unneeded forward class declarations. Changed #if statements about migration to the
more modern non-layering-violation API to list platforms not yet migrated, rather than
listing platforms that have migrated (Mac). Move conditional code down below the
uncondiditional code so it's easier to see what the class is doing. Move layering-
violation code down to the bottom too, so it's easier to see the future class without
having the design mistakes mixed in. Sort platform-specific sections in alphabetical
order instead of random order. Did the destructor in a cleaner way so the #if is out
of the way after the class rather than in the class. Removed WebSmartPastePboardType,
WebURLPboardType, and WebURLsWithTitlesPboard declarations, since they are only used
inside the PasteboardMac.mm source file.

* platform/ios/PasteboardIOS.mm: Aded a FIXME comment.
* platform/mac/PasteboardMac.mm: Made the constants for pasteboard types be actual
constants, rather than global variables.

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

6 years ago[curl] Use utf8 for headers in CurlDownload.
commit-queue@webkit.org [Thu, 12 Sep 2013 18:29:23 +0000 (18:29 +0000)]
[curl] Use utf8 for headers in CurlDownload.
https://bugs.webkit.org/show_bug.cgi?id=120413

Patch by Tamas Czene <tczene@inf.u-szeged.hu> on 2013-09-12
Reviewed by Brent Fulgham.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::headerCallback):

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

6 years ago[curl] Improve multipart response handling
galpeter@inf.u-szeged.hu [Thu, 12 Sep 2013 18:26:17 +0000 (18:26 +0000)]
[curl] Improve multipart response handling
https://bugs.webkit.org/show_bug.cgi?id=117735

Reviewed by Brent Fulgham.

The multipart/x-mixed-replace mime type in responses are ignored
with the curl network backend. To handle such responses the
MultipartHandle is introduced which will split the content using
the boundary specified by the mime type.

There are already existing tests (http/tests/multipart).

* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPHeader):
* platform/network/HTTPParsers.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/curl/MultipartHandle.cpp: Added.
(WebCore::MultipartHandle::extractBoundary):
(WebCore::MultipartHandle::matchForBoundary):
(WebCore::MultipartHandle::checkForBoundary):
(WebCore::MultipartHandle::parseHeadersIfPossible):
(WebCore::MultipartHandle::contentReceived):
(WebCore::MultipartHandle::processContent):
(WebCore::MultipartHandle::contentEnded):
(WebCore::MultipartHandle::didReceiveData):
(WebCore::MultipartHandle::didReceiveResponse):
* platform/network/curl/MultipartHandle.h: Added.
(WebCore::MultipartHandle::MultipartHandle):
(WebCore::MultipartHandle::~MultipartHandle):
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):

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

6 years agoMarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
mhahnenberg@apple.com [Thu, 12 Sep 2013 18:13:25 +0000 (18:13 +0000)]
MarkedBlocks shouldn't be put in Allocated state if they didn't produce a FreeList
https://bugs.webkit.org/show_bug.cgi?id=121236

Reviewed by Geoffrey Garen.

Right now, after a collection all MarkedBlocks are in the Marked block state. When lazy sweeping
happens, if a block returns an empty free list after being swept, we call didConsumeFreeList(),
which moves the block into the Allocated block state. This happens to both the block that was
just being allocated out of (i.e. m_currentBlock) as well as any blocks who are completely full.
We should distinguish between these two cases: m_currentBlock should transition to
Allocated (because we were just allocating out of it) and any subsequent block that returns an
empty free list should transition back to the Marked state. This will make the block state more
consistent with the actual state the block is in, and it will also allow us to speed up moving
all blocks to the Marked state during generational collection.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper):
* heap/MarkedBlock.h:
(JSC::MarkedBlock::didConsumeEmptyFreeList):

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

6 years agoRemove RenderApplet.
akling@apple.com [Thu, 12 Sep 2013 17:54:41 +0000 (17:54 +0000)]
Remove RenderApplet.
<https://webkit.org/b/121231>

Reviewed by Darin Adler.

Add a RenderEmbeddedObject::createForApplet(HTMLAppletElement&) and nuke
the RenderApplet class from orbit.

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

6 years ago[Windows] Build fix after r155621
bfulgham@apple.com [Thu, 12 Sep 2013 17:46:39 +0000 (17:46 +0000)]
[Windows] Build fix after r155621

Rubber-stamped by Anders Carlsson.

See also https://bugs.webkit.org/show_bug.cgi?id=121235 for
why this was necessary.

* css/MediaQueryEvaluator.cpp: Work around VS compiler bug.
* dom/make_names.pl: Ditto.
* loader/archive/ArchiveFactory.cpp: Ditto.
* rendering/svg/SVGPathData.cpp: Ditto.

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

6 years agoSharedBuffer::createCFData should return RetainPtr<CFDataRef>
andersca@apple.com [Thu, 12 Sep 2013 17:38:13 +0000 (17:38 +0000)]
SharedBuffer::createCFData should return RetainPtr<CFDataRef>
https://bugs.webkit.org/show_bug.cgi?id=121230

Reviewed by Darin Adler.

Source/WebCore:

* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::createCFData):
* loader/ResourceBuffer.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::create):
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::createCFData):
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::setData):
* platform/graphics/cg/PDFDocumentImage.cpp:
(WebCore::PDFDocumentImage::createPDFDocument):
* platform/graphics/mac/FontCustomPlatformData.cpp:
(WebCore::createFontCustomPlatformData):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::createCFData):

Source/WebKit2:

* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
* Shared/WebArchiveResource.cpp:
(WebKit::WebArchiveResource::data):

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

6 years agoMove LineInfo class into LineInfo.h
zoltan@webkit.org [Thu, 12 Sep 2013 16:57:55 +0000 (16:57 +0000)]
Move LineInfo class into LineInfo.h
https://bugs.webkit.org/show_bug.cgi?id=121191

Reviewed by David Hyatt.

No new tests, no behavior change.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LineInfo.h: Added.
(WebCore::LineInfo::LineInfo):
(WebCore::LineInfo::isFirstLine):
(WebCore::LineInfo::isLastLine):
(WebCore::LineInfo::isEmpty):
(WebCore::LineInfo::previousLineBrokeCleanly):
(WebCore::LineInfo::floatPaginationStrut):
(WebCore::LineInfo::runsFromLeadingWhitespace):
(WebCore::LineInfo::resetRunsFromLeadingWhitespace):
(WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
(WebCore::LineInfo::setFirstLine):
(WebCore::LineInfo::setLastLine):
(WebCore::LineInfo::setEmpty):
(WebCore::LineInfo::setPreviousLineBrokeCleanly):
(WebCore::LineInfo::setFloatPaginationStrut):
* rendering/RenderBlockLineLayout.cpp:

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

6 years ago[CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
bjonesbe@adobe.com [Thu, 12 Sep 2013 16:50:36 +0000 (16:50 +0000)]
[CSS Shapes] Remove unnecessarily complex template from ShapeInfo classes
https://bugs.webkit.org/show_bug.cgi?id=121213

Reviewed by Darin Adler.

These classes were trying to be way too clever, and as a result were
hard to read and hard to debug. Replace the complex templated method
calls with virtual methods to make these classes much easier to
understand and maintain.

No new tests, no behavior change.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
(WebCore::::computeSegmentsForLine):
* rendering/shapes/ShapeInfo.h:
* rendering/shapes/ShapeInsideInfo.cpp:
(WebCore::ShapeInsideInfo::getShapeValue):
* rendering/shapes/ShapeInsideInfo.h:
(WebCore::ShapeInsideInfo::computeSegmentsForLine):
(WebCore::ShapeInsideInfo::ShapeInsideInfo):
* rendering/shapes/ShapeOutsideInfo.cpp:
(WebCore::ShapeOutsideInfo::computeSegmentsForLine):
(WebCore::ShapeOutsideInfo::getShapeValue):
* rendering/shapes/ShapeOutsideInfo.h:
(WebCore::ShapeOutsideInfo::ShapeOutsideInfo):

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

6 years ago[CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
zoltan@webkit.org [Thu, 12 Sep 2013 16:49:39 +0000 (16:49 +0000)]
[CSS Shapes] Turn shape's logicalwidth/height into a LayoutSize
https://bugs.webkit.org/show_bug.cgi?id=121187

Reviewed by David Hyatt.

No new tests, no behavior change.

* rendering/shapes/ShapeInfo.cpp:
(WebCore::::computedShape):
* rendering/shapes/ShapeInfo.h:
(WebCore::ShapeInfo::setShapeSize):
(WebCore::ShapeInfo::shapeContainingBlockHeight):

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

6 years agoMove layering-violating code from Pasteboard::plainText into Editor (Mac only at...
darin@apple.com [Thu, 12 Sep 2013 16:47:45 +0000 (16:47 +0000)]
Move layering-violating code from Pasteboard::plainText into Editor (Mac only at first)
https://bugs.webkit.org/show_bug.cgi?id=121075

Reviewed by Anders Carlsson.

* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainTextWithPasteboard): Use readPlainTextFromPasteboard
for Mac. Also update to take a reference.
(WebCore::Editor::paste): Pass pasteboard as a reference.
(WebCore::Editor::pasteAsPlainText): Ditto.
* editing/Editor.h: Ditto.

* editing/mac/EditorMac.mm:
(WebCore::Editor::readSelectionFromPasteboard): Pass pasteboard as a reference.
(WebCore::Editor::readPlainTextFromPasteboard): Added. The declaration of this
was added (by mistake) in an earlier patch. This has code that used to be inside
Pasteboard::plainText.

* platform/Pasteboard.h: Added PasteboardPlainText. Reorganized functions in the
Pasteboard class and added some FIXMEs. Sorted platforms alphabetically and grouped
functions together and data members separate from them.

* platform/mac/DragDataMac.mm:
(WebCore::DragData::asPlainText): Updated to call readPlainTextFromPasteboard.
(WebCore::DragData::asURL): Tweaked style of unused parameter.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read): Renamed this from plainText, and refactored so that
the data goes out in the PasteboardPlainText structure.

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

6 years agoCSS Unit vw in border-width maps to 0px.
commit-queue@webkit.org [Thu, 12 Sep 2013 16:44:22 +0000 (16:44 +0000)]
CSS Unit vw in border-width maps to 0px.
https://bugs.webkit.org/show_bug.cgi?id=109229

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2013-09-12
Reviewed by Darin Adler.

Source/WebCore:

Border and outline properties were not applied incase
its values were given in vh/vw units.

Tests: fast/css/viewport-height-border.html
       fast/css/viewport-height-outline.html
       fast/css/viewport-width-border.html
       fast/css/viewport-width-outline.html

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeLengthDouble):
Added case CSS_VH and CSS_VW.
* css/CSSPrimitiveValue.h:
(WebCore::CSSPrimitiveValue::isViewportPercentageWidth):
(WebCore::CSSPrimitiveValue::isViewportPercentageHeight):
Added APIs to check the unit type(CSS_VW and CSS_VH).
* css/DeprecatedStyleBuilder.cpp:
(WebCore::ApplyPropertyComputeLength::applyValue):
Calculating the border values which has been specified
in vh/vw units.The vh/vw units are calcultated as percent
of viewport height and viewport width respectively.

LayoutTests:

* fast/css/viewport-height-border-expected.txt: Added.
* fast/css/viewport-height-border.html: Added.
* fast/css/viewport-height-outline-expected.txt: Added.
* fast/css/viewport-height-outline.html: Added.
* fast/css/viewport-width-border-expected.txt: Added.
* fast/css/viewport-width-border.html: Added.
* fast/css/viewport-width-outline-expected.txt: Added.
* fast/css/viewport-width-outline.html: Added.
Added new tests for verifying that border and outline properties are
applied when its values are given in vh/vw units.
* resources/js-test-pre.js:
(shouldNotBeEqualToString):
Added this API so that can compare two strings.Similiar to
shouldBeEqualToString.

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

6 years ago[Coordinated Graphics] Fix the build on MacOS 10.9
jocelyn.turcotte@digia.com [Thu, 12 Sep 2013 16:42:23 +0000 (16:42 +0000)]
[Coordinated Graphics] Fix the build on MacOS 10.9
https://bugs.webkit.org/show_bug.cgi?id=121225

Reviewed by Darin Adler.

* platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:

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

6 years agoChange debug hooks to pass sourceID and position info via the DebuggerCallFrame.
mark.lam@apple.com [Thu, 12 Sep 2013 16:27:55 +0000 (16:27 +0000)]
Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
https://bugs.webkit.org/show_bug.cgi?id=121214.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* debugger/Debugger.h:
* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::sourceId):
(JSC::DebuggerCallFrame::clear):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::line):
(JSC::DebuggerCallFrame::column):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
(JSC::Interpreter::unwind):
(JSC::Interpreter::debug):

Source/WebCore:

No new tests.

Also changed the Inspector's JavaScriptCallFrame to get the sourceID and
position info from its DebuggerCallFrame instead of caching those values.

* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::JavaScriptCallFrame):
* bindings/js/JavaScriptCallFrame.h:
(WebCore::JavaScriptCallFrame::create):
(WebCore::JavaScriptCallFrame::invalidate):
(WebCore::JavaScriptCallFrame::sourceID):
(WebCore::JavaScriptCallFrame::position):
(WebCore::JavaScriptCallFrame::line):
(WebCore::JavaScriptCallFrame::column):
(WebCore::JavaScriptCallFrame::update):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::createCallFrame):
(WebCore::ScriptDebugServer::updateCallFrameAndPauseIfNeeded):
(WebCore::ScriptDebugServer::callEvent):
(WebCore::ScriptDebugServer::atStatement):
(WebCore::ScriptDebugServer::returnEvent):
(WebCore::ScriptDebugServer::exception):
(WebCore::ScriptDebugServer::willExecuteProgram):
(WebCore::ScriptDebugServer::didExecuteProgram):
(WebCore::ScriptDebugServer::didReachBreakpoint):
* bindings/js/ScriptDebugServer.h:
* bindings/js/WorkerScriptDebugServer.cpp:
(WebCore::WorkerScriptDebugServer::willExecuteProgram):
* bindings/js/WorkerScriptDebugServer.h:

Source/WebKit/mac:

* webview/WebScriptDebugger.h:
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::WebScriptDebugger):
(WebScriptDebugger::callEvent):
(WebScriptDebugger::atStatement):
(WebScriptDebugger::returnEvent):
(WebScriptDebugger::exception):
(WebScriptDebugger::willExecuteProgram):
(WebScriptDebugger::didExecuteProgram):
(WebScriptDebugger::didReachBreakpoint):

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

6 years agoAdd rudimentary support for move-only types as values in HashMap
andersca@apple.com [Thu, 12 Sep 2013 16:13:47 +0000 (16:13 +0000)]
Add rudimentary support for move-only types as values in HashMap
https://bugs.webkit.org/show_bug.cgi?id=121226

Reviewed by Andreas Kling.

Source/WTF:

* wtf/HashMap.h:
Change a bunch of functions to so they can take both rvalue and lvalue references and use std::forward.

* wtf/HashTraits.h:
(WTF::KeyValuePair::KeyValuePair):
Change constructors to accept both lvalues and rvalues.

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
Add a HashMap<unsigned, MoveOnly> test.

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

6 years ago[GTK][WK1] Block accelerated compositing under non-X11 displays
zandobersek@gmail.com [Thu, 12 Sep 2013 16:02:39 +0000 (16:02 +0000)]
[GTK][WK1] Block accelerated compositing under non-X11 displays
https://bugs.webkit.org/show_bug.cgi?id=121165

Reviewed by Martin Robinson.

This is analogous to the changes in r154728 and r154729 that enforce disabling accelerated compositing
under Wayland displays and made the RedirectedXCompositeWindow use in WebKit2 limited only to the X11 displays.

* WebCoreSupport/AcceleratedCompositingContextGL.cpp: Remove two unnecessary header includes that also
introduce symbols that conflict with the symbols defined in the X headers. Include the <gdk/gdkx.h> header
if the GTK+ dependency can provide it.
(WebKit::AcceleratedCompositingContext::initialize): Only set up the RedirectedXCompositeWindow instance
if running under an X11 display.
(WebKit::AcceleratedCompositingContext::renderLayersToWindow): The removal of the unnecessary header
inclusions also removed the std::max() injection into the global scope. Using std::max directly instead.
(WebKit::AcceleratedCompositingContext::scheduleLayerFlush): Ditto.
* webkit/webkitwebview.cpp:
(updateAcceleratedCompositingSetting): A helper function that ensures the accelerated compositing feature
stays disabled under Wayland displays. It also prints out a warning message the first time the user tries
to enable accelerated compositing under Wayland displays, telling that the feature is not supported and
will remain disabled.
(webkit_web_view_update_settings): Call updateAcceleratedCompositingSetting() to enable the feature if possible.
(webkit_web_view_settings_notify): Ditto.

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

6 years ago[EFL] Changed expected results after turning on WTF_USE_TILED_BACKING_STORE (r133898)
commit-queue@webkit.org [Thu, 12 Sep 2013 15:55:35 +0000 (15:55 +0000)]
[EFL] Changed expected results after turning on WTF_USE_TILED_BACKING_STORE (r133898)
https://bugs.webkit.org/show_bug.cgi?id=121227

Unreviewed EFL gardening.

Patch by Krzysztof Wolanski <k.wolanski@samsung.com> on 2013-09-12

* platform/efl/TestExpectations:
* platform/efl/editing/selection/caret-ltr-2-expected.png:
* platform/efl/editing/selection/caret-ltr-2-expected.txt:
* platform/efl/editing/selection/caret-ltr-2-left-expected.png:
* platform/efl/editing/selection/caret-ltr-2-left-expected.txt:
* platform/efl/editing/selection/caret-ltr-expected.png:
* platform/efl/editing/selection/caret-ltr-expected.txt:
* platform/efl/editing/selection/caret-rtl-2-expected.png:
* platform/efl/editing/selection/caret-rtl-2-expected.txt:
* platform/efl/editing/selection/caret-rtl-expected.png:
* platform/efl/editing/selection/caret-rtl-expected.txt:

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

6 years ago[Win] TestWebKitAPI fails to link.
commit-queue@webkit.org [Thu, 12 Sep 2013 15:55:04 +0000 (15:55 +0000)]
[Win] TestWebKitAPI fails to link.
https://bugs.webkit.org/show_bug.cgi?id=121223

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-09-12
Reviewed by Brent Fulgham.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add required symbol.

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

6 years ago[WinCairo] Compile errors, missing include.
commit-queue@webkit.org [Thu, 12 Sep 2013 15:52:10 +0000 (15:52 +0000)]
[WinCairo] Compile errors, missing include.
https://bugs.webkit.org/show_bug.cgi?id=121222

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-09-12
Reviewed by Brent Fulgham.

* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp: Include required header.
* platform/win/DragImageCairoWin.cpp: Include required header.

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

6 years agoREGRESSION: Inline PDF that are cached fail to appear in iframe.
zalan@apple.com [Thu, 12 Sep 2013 15:46:54 +0000 (15:46 +0000)]
REGRESSION: Inline PDF that are cached fail to appear in iframe.
https://bugs.webkit.org/show_bug.cgi?id=75449

Reviewed by Darin Adler.

Make sure 'frame is from page cache' flag is set for subframes too.

WebFrameLoaderClient::m_frameCameFromPageCache == true forces plugins
to be loaded manually. It ensures that the plugin raw data is fetched again
while the containing frame is being restored from the page cache.
(Plugins get destroyed when the frame goes to page cache.)

Source/WebKit2:

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
This gets called only on the frame where the actual history navigation happens.
(WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
This gets called for all the restored frames.

LayoutTests:

* fast/history/history-back-while-pdf-in-pagecache-expected.html: Added.
* fast/history/history-back-while-pdf-in-pagecache.html: Added.
* fast/history/resources/history-back-for-pfd-test.html: Added.

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

6 years agoAuto GDB backtrace generation for EFL/GTK/Qt bots.
ossy@webkit.org [Thu, 12 Sep 2013 15:30:54 +0000 (15:30 +0000)]
Auto GDB backtrace generation for EFL/GTK/Qt bots.
https://bugs.webkit.org/show_bug.cgi?id=119338

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-12
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/port/efl.py:
(EflPort.check_sys_deps):
(EflPort):
(EflPort._get_crash_log):
* Scripts/webkitpy/port/efl_unittest.py:
(EflPortTest.test_show_results_html_file):
(EflPortTest):
(EflPortTest.test_get_crash_log):
* Scripts/webkitpy/port/gtk.py:
(GtkPort._get_crash_log):
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_get_crash_log):
* Scripts/webkitpy/port/linux_get_crash_log.py: Added.
(GDBCrashLogGenerator):
(GDBCrashLogGenerator.__init__):
(GDBCrashLogGenerator._get_gdb_output):
(GDBCrashLogGenerator.generate_crash_log):
(GDBCrashLogGenerator.generate_crash_log.match_filename):
* Scripts/webkitpy/port/linux_get_crash_log_unittest.py: Added.
(GDBCrashLogGeneratorTest):
(GDBCrashLogGeneratorTest.test_generate_crash_log):
(_mock_gdb_output):
* Scripts/webkitpy/port/qt.py:
(QtPort.default_child_processes):
(QtPort):
(QtPort._get_crash_log):
* Scripts/webkitpy/port/qt_unittest.py:
(QtPortTest.test_check_sys_deps):
(QtPortTest):
(QtPortTest.test_get_crash_log):

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

6 years agoAdd back c++11 features removed by buildfixes after all ports did the switch
ossy@webkit.org [Thu, 12 Sep 2013 15:28:14 +0000 (15:28 +0000)]
Add back c++11 features removed by buildfixes after all ports did the switch
https://bugs.webkit.org/show_bug.cgi?id=119266

Reviewed by Anders Carlsson.

* bytecode/GetByIdStatus.h:
(JSC::GetByIdStatus::GetByIdStatus):
* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::~Worklist):
* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::codeType):
(JSC::StackVisitor::Frame::functionName):
(JSC::StackVisitor::Frame::sourceURL):
(JSC::StackVisitor::Frame::print):

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

6 years agoUnreviewed. Moving myself to the commiters list.
galpeter@inf.u-szeged.hu [Thu, 12 Sep 2013 15:09:42 +0000 (15:09 +0000)]
Unreviewed. Moving myself to the commiters list.

* Scripts/webkitpy/common/config/contributors.json:

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

6 years ago[Qt] Unreviewed gardening. Rebase after r155253.
kadam@inf.u-szeged.hu [Thu, 12 Sep 2013 14:56:07 +0000 (14:56 +0000)]
[Qt] Unreviewed gardening. Rebase after r155253.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-09-12

* platform/qt-wk2/editing/style/style-boundary-005-expected.png: Added.
* platform/qt/editing/pasteboard/4989774-expected.png:
* platform/qt/editing/pasteboard/4989774-expected.txt:
* platform/qt/editing/pasteboard/paste-match-style-001-expected.png:
* platform/qt/editing/pasteboard/paste-match-style-001-expected.txt:
* platform/qt/editing/selection/caret-ltr-2-expected.png:
* platform/qt/editing/selection/caret-ltr-2-expected.txt:
* platform/qt/editing/selection/caret-ltr-2-left-expected.png:
* platform/qt/editing/selection/caret-ltr-2-left-expected.txt:
* platform/qt/editing/selection/caret-ltr-expected.png:
* platform/qt/editing/selection/caret-ltr-expected.txt:
* platform/qt/editing/selection/caret-ltr-right-expected.png:
* platform/qt/editing/selection/caret-ltr-right-expected.txt:
* platform/qt/editing/selection/caret-rtl-2-expected.png:
* platform/qt/editing/selection/caret-rtl-2-expected.txt:
* platform/qt/editing/selection/caret-rtl-2-left-expected.png:
* platform/qt/editing/selection/caret-rtl-2-left-expected.txt:
* platform/qt/editing/selection/caret-rtl-expected.png:
* platform/qt/editing/selection/caret-rtl-expected.txt:
* platform/qt/editing/selection/caret-rtl-right-expected.png:
* platform/qt/editing/selection/caret-rtl-right-expected.txt:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.png:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-backward-wrap-expected.txt:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.png:
* platform/qt/editing/selection/vertical-rl-ltr-extend-line-forward-wrap-expected.txt:
* platform/qt/editing/style/style-boundary-005-expected.png:
* platform/qt/editing/style/style-boundary-005-expected.txt:
* platform/qt/fast/forms/formmove3-expected.txt:
* platform/qt/fast/forms/input-align-image-expected.png:
* platform/qt/fast/forms/input-align-image-expected.txt:
* platform/qt/fast/forms/preserveFormDuringResidualStyle-expected.png:
* platform/qt/fast/forms/preserveFormDuringResidualStyle-expected.txt:
* platform/qt/fast/invalid/003-expected.png:
* platform/qt/fast/invalid/003-expected.txt:
* platform/qt/tables/mozilla/bugs/bug647-expected.png:
* platform/qt/tables/mozilla/bugs/bug647-expected.txt:

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

6 years ago[GTK] Add jhbuild-wayland.modules
changseok.oh@collabora.com [Thu, 12 Sep 2013 14:51:46 +0000 (14:51 +0000)]
[GTK] Add jhbuild-wayland.modules
https://bugs.webkit.org/show_bug.cgi?id=120455

Reviewed by Gustavo Noronha Silva.

Current versions of gtk+, gdk-pixbuf and glib don't fit the requirement for wayland support.
With this patch, you can build extra gtk+, gdk-pixbuf and glib through jhbuild with exporting
WEBKIT_EXTRA_MODULESETS.

* gtk/jhbuild-wayland.modules: Added.

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

6 years agoXMLSerializer.serializeToString() should throw exception for invalid node value.
vivek.vg@samsung.com [Thu, 12 Sep 2013 14:41:49 +0000 (14:41 +0000)]
XMLSerializer.serializeToString() should throw exception for invalid node value.
https://bugs.webkit.org/show_bug.cgi?id=121209

Reviewed by Darin Adler.

Source/WebCore:

FF and Opera 12 (pre blink/webkit) throw exception in case the node value is invalid.
Blink sends an empty string as the result of serializeToString operation with invalid node.
We should match with other browsers for throwing it as an exception.

Blink review URL: https://chromiumcodereview.appspot.com/23532055/

Test: fast/dom/xmlserializer-serialize-to-string-exception.html

* xml/XMLSerializer.cpp:
(WebCore::XMLSerializer::serializeToString):

LayoutTests:

* fast/dom/xmlserializer-serialize-to-string-exception-expected.txt: Added.
* fast/dom/xmlserializer-serialize-to-string-exception.html: Added.

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

6 years agoCrash in ScrollingStateStickyNode::updateConstraints
zalan@apple.com [Thu, 12 Sep 2013 14:27:43 +0000 (14:27 +0000)]
Crash in ScrollingStateStickyNode::updateConstraints
https://bugs.webkit.org/show_bug.cgi?id=119638

Reviewed by Simon Fraser.

Ensure when a scrolling state node is removed from the state tree,
we remove both the current node and all its children from the
associated m_stateNodeMap lookup table.

Source/WebCore:

Test: fast/css/sticky/multiple-layers-sticky-crash.html

* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::removeChild):
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
* page/scrolling/ScrollingStateNode.h:

LayoutTests:

* fast/css/sticky/multiple-layers-sticky-crash-expected.txt: Added.
* fast/css/sticky/multiple-layers-sticky-crash.html: Added.

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

6 years agoREGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
zalan@apple.com [Thu, 12 Sep 2013 14:03:21 +0000 (14:03 +0000)]
REGRESSION (r132516): Javascript menu text incorrectly disappearing and reappearing
https://bugs.webkit.org/show_bug.cgi?id=101047

Reviewed by Simon Fraser.

Compositing layers keep track of ancestors' clipping by constructing the RenderLayerBacking::m_ancestorClippingLayer.
It helps setting up the proper clipping context for the corresponding graphics layer.
When a RenderObject's clipping style changes, it needs to propagate this change not only
to the associated RenderLayer, but also to the descendants', if applicable.
Before r132516, it was mainly covered by initiating full style recalcs, which ensured that
style recalc on the descendant rendering tree took care of creating/destroying
RenderLayerBacking::m_ancestorClippingLayer at every compositing layer node. Without the full
recalc, the clipping of the compositing render layers and the corresponding render subtrees can get out of sync.
This patch updates the clipping context on the descendant subtree, when the clipping behaviour
changes on a render node.

Source/WebCore:

Tests: compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html
       compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateDescendantClippingContext):
(WebCore::RenderLayer::styleChanged):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
(WebCore::RenderLayerBacking::updateAncestorClippingLayer):
(WebCore::RenderLayerBacking::updateDescendantClippingLayer):
* rendering/RenderLayerBacking.h:

LayoutTests:

* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants-expected.txt: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants.html: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2-expected.txt: Added.
* compositing/overflow/clipping-behaviour-change-is-not-propagated-to-descendants2.html: Added.

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

6 years ago[GTK][WK2] a11y tests unconditionally launching a11y daemons
commit-queue@webkit.org [Thu, 12 Sep 2013 11:15:47 +0000 (11:15 +0000)]
[GTK][WK2] a11y tests unconditionally launching a11y daemons
https://bugs.webkit.org/show_bug.cgi?id=120299

Patch by Mario Sanchez Prada <mario.prada@samsung.com> on 2013-09-12
Reviewed by Carlos Garcia Campos.

Use the right variable name to store a reference to the at-spi2
bus launcher process, so we can be sure we are terminating it when
calling _tear_down_testing_environment().

* Scripts/run-gtk-tests:
(TestRunner._start_accessibility_daemons): Use _spi_bus_launcher
instead of _ally_bus_launcher.

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

6 years ago[GTK] run-gtk-tests option --skipped=ignore doesn't work when the entire suite is...
carlosgc@webkit.org [Thu, 12 Sep 2013 10:54:50 +0000 (10:54 +0000)]
[GTK] run-gtk-tests option --skipped=ignore doesn't work when the entire suite is skipped
https://bugs.webkit.org/show_bug.cgi?id=121218

Reviewed by Philippe Normand.

Skipping the entire suite was added to skip tests when they can't
be run because of the environment, for example to skip the a11y
tests when the at-spi daemons fail to start. This is no longer
true for all the cases, so we can disable the tests that are
impossible to run instead of skipping them.

* Scripts/run-gtk-tests:
(TestRunner.__init__): Initialize the skipped tests list.
(TestRunner._setup_testing_environment): Add
TestWebKitAccessibility path to the list of disabled tests when
at-spi daemon fail to start.
(TestRunner._should_run_test_program): Check first if the test
program is disabled and then whether it's skipped honoring the
skipped command line option.

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

6 years agoRemove home-brewed nullptr
mikhail.pozdnyakov@intel.com [Thu, 12 Sep 2013 10:42:08 +0000 (10:42 +0000)]
Remove home-brewed nullptr
https://bugs.webkit.org/show_bug.cgi?id=119624

Reviewed by Anders Carlsson.

The standard C++11 nullptr and std::nullptr_t type should be used now.

Source/JavaScriptCore:

* heap/PassWeak.h:
* heap/Weak.h:

Source/WebCore:

* bindings/js/JSDOMBinding.h:

Source/WebKit/efl:

* tests/UnitTestUtils/EWKTestView.cpp:

Source/WTF:

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/NullPtr.cpp: Removed.
* wtf/NullPtr.h: Removed.
* wtf/OwnArrayPtr.h:
* wtf/OwnPtr.h:
* wtf/PassOwnPtr.h:
* wtf/PassRefPtr.h:
* wtf/RetainPtr.h:
* wtf/win/GDIObject.h:

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

6 years ago<meter> element text value exposed as AXTitle; should be exposing AXValueDescription
commit-queue@webkit.org [Thu, 12 Sep 2013 10:24:52 +0000 (10:24 +0000)]
<meter> element text value exposed as AXTitle; should be exposing AXValueDescription
https://bugs.webkit.org/show_bug.cgi?id=117651

Patch by Samuel White <samuel_white@apple.com> on 2013-09-12
Reviewed by Mario Sanchez Prada.

Source/WebCore:

No new tests, updated accessibility/meter-element to handle platform specific output.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isMeter):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

Tools:

Prepended 'AXValueDescription: ' to valueDescription output and updated impacted tests.

* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::valueDescription):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::valueDescription):

LayoutTests:

Updated existing meter element test to cover platform specific output.

* accessibility/meter-element.html:
* platform/mac/accessibility/aria-valuetext-on-native-slider-expected.txt:
* platform/mac/accessibility/aria-valuetext-on-native-slider.html:
* platform/mac/accessibility/aria-valuetext.html:
* platform/mac/accessibility/meter-element-expected.txt: Renamed from LayoutTests/accessibility/meter-element-expected.txt.
* platform/mac/accessibility/spinbutton-valuedescription-expected.txt:
* platform/mac/accessibility/spinbutton-valuedescription.html:

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

6 years agoclass WeekInputType invokes wrong constructor
commit-queue@webkit.org [Thu, 12 Sep 2013 09:54:52 +0000 (09:54 +0000)]
class WeekInputType invokes wrong constructor
https://bugs.webkit.org/show_bug.cgi?id=120768

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-09-12
Reviewed by Andreas Kling.

Correcting wrong constuctor invocation.

* html/WeekInputType.h:
(WebCore::WeekInputType::WeekInputType):

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

6 years agoAX: Self-referencing aria-labelledby only uses contents.
commit-queue@webkit.org [Thu, 12 Sep 2013 09:51:25 +0000 (09:51 +0000)]
AX: Self-referencing aria-labelledby only uses contents.
https://bugs.webkit.org/show_bug.cgi?id=120814

Patch by Samuel White <samuel_white@apple.com> on 2013-09-12
Reviewed by Mario Sanchez Prada.

Source/WebCore:

Implemented additional 'Text Alternative Computation' steps documented at:
http://www.w3.org/WAI/PF/aria/complete#textalternativecomputation. This allows us to remove
our raw text node iteration that was previously forcing us to do our computation incorrectly.
Element content is now sourced using textUnderElement (step 2C of the computation).

Test: accessibility/self-referencing-aria-labelledby.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):

LayoutTests:

Test to verify that self-referencing aria-labelledby behavior works as expected.

* accessibility/self-referencing-aria-labelledby-expected.txt: Added.
* accessibility/self-referencing-aria-labelledby.html: Added.

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

6 years agoUnreviewed, rolling out r155597.
commit-queue@webkit.org [Thu, 12 Sep 2013 09:38:59 +0000 (09:38 +0000)]
Unreviewed, rolling out r155597.
http://trac.webkit.org/changeset/155597
https://bugs.webkit.org/show_bug.cgi?id=121220

broke windows build because there's no ews :( (Requested by
thorton on #webkit).

* WebCore.exp.in:
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::isBitmapImage):
* platform/graphics/BitmapImage.h:
(WebCore::BitmapImage::create):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h:
(WebCore::CrossfadeGeneratedImage::setContainerSize):
(WebCore::CrossfadeGeneratedImage::usesContainerSize):
(WebCore::CrossfadeGeneratedImage::hasRelativeWidth):
(WebCore::CrossfadeGeneratedImage::hasRelativeHeight):
(WebCore::CrossfadeGeneratedImage::size):
* platform/graphics/GeneratedImage.h:
(WebCore::GeneratedImage::hasSingleSecurityOrigin):
(WebCore::GeneratedImage::setContainerSize):
(WebCore::GeneratedImage::usesContainerSize):
(WebCore::GeneratedImage::hasRelativeWidth):
(WebCore::GeneratedImage::hasRelativeHeight):
(WebCore::GeneratedImage::size):
(WebCore::GeneratedImage::destroyDecodedData):
(WebCore::GeneratedImage::decodedSize):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
* svg/graphics/SVGImage.h:
(WebCore::SVGImage::isSVGImage):
(WebCore::SVGImage::usesContainerSize):
(WebCore::SVGImage::destroyDecodedData):
(WebCore::SVGImage::decodedSize):
* svg/graphics/SVGImageForContainer.h:
(WebCore::SVGImageForContainer::destroyDecodedData):
(WebCore::SVGImageForContainer::decodedSize):

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

6 years agoREGRESSION(r154781): accessibility/notification-listeners.html is failing
commit-queue@webkit.org [Thu, 12 Sep 2013 09:31:28 +0000 (09:31 +0000)]
REGRESSION(r154781): accessibility/notification-listeners.html is failing
https://bugs.webkit.org/show_bug.cgi?id=120669

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

Tools:

Fixed 4 problems that were causing notification-listeners.html to fail.

Notifications for AXFocusedUIElementChanged and AXValueChanged had to be
implemented in axObjectEventListener().

A notification for AXFocusedUIElementChanged was incorrectly sent when
the element lost focus.

Global notification was not dispatched if an element notification was
present in the HashMap.

connectAccessibilityCallbacks() was connecting signals to callbacks
multiple times because it was not checking if
disconnectAccessibilityCallbacks() had an early return if there were
active handlers.

* DumpRenderTree/atk/AccessibilityCallbacks.h: Modified
disconnectAccessibilityCallbacks() to inform if the callbacks were
successfully disconnected.
* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener): Implemented notifications for
AXFocusedUIElementChanged and AXValueChanged. Fixed the global
notification, which was not dispatched if an element notification
existed. Fixed the notification for AXFocusedUIElementChanged that was
incorrectly sent when the element lost focus. In addition, fixed a typo
where TRUE should be true.
(connectAccessibilityCallbacks): Added early return if
disconnectAccessibilityCallbacks() did not disconnect the callbacks.
(disconnectAccessibilityCallbacks): Added a return value to inform if
callbacks were successfully disconnected.

LayoutTests:

Updated the expectation for notification-listeners.html, which was
failing before this fix.

* platform/gtk/TestExpectations: Removed notification-listeners.html.
* platform/gtk/accessibility/notification-listeners-expected.txt:
Updated the expectation for notification-listeners.html. There is one
difference from the results on the Mac port, which was used as
reference. The element role for <select> is AXComboBox while on Mac
is AXPopUpButton.

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

6 years agoRenderWidget elements are always HTMLFrameOwnerElement subclasses.
akling@apple.com [Thu, 12 Sep 2013 09:12:29 +0000 (09:12 +0000)]
RenderWidget elements are always HTMLFrameOwnerElement subclasses.
<https://webkit.org/b/121217>

Reviewed by Antti Koivisto.

Make RenderWidget constructor take HTMLFrameOwnerElement* and update subclasses
with even tighter types where possible.

Also added RenderWidget::frameOwnerElement() and deleted element().
Removed a handful of unnecessary type checks that were exposed by this.

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

6 years agoApply OVERRIDE and FINAL to Image subclasses and clean them up
timothy_horton@apple.com [Thu, 12 Sep 2013 09:03:55 +0000 (09:03 +0000)]
Apply OVERRIDE and FINAL to Image subclasses and clean them up
https://bugs.webkit.org/show_bug.cgi?id=121086

Reviewed by Alexey Proskuryakov.

Everything other than the copious application of OVERRIDE and FINAL
is explicitly called out below.

* WebCore.exp.in:
Export the correct version of getCGImageRef for use by WebKit2.

* platform/graphics/BitmapImage.cpp:
* platform/graphics/BitmapImage.h:
Drive-by inline isBitmapImage.
Move create(HBITMAP) to be near the other create() functions.
Move all of the members and quite a few functions from protected to private.
Devirtualize frameCount().
Move notSolidColor() near the other solid color functions.

* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::CrossfadeGeneratedImage):
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
Use size() and setContainerSize() instead of directly accessing a
superclass' (now private, previously protected) members.

* platform/graphics/CrossfadeGeneratedImage.h:
* platform/graphics/GeneratedImage.h:
Make m_size private, I don't think we do protected members.

* platform/graphics/GeneratorGeneratedImage.h:
Make all the members private.

* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.h:

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

6 years agoCanvas fillText and measureText handle ideographic spaces differently
commit-queue@webkit.org [Thu, 12 Sep 2013 06:21:47 +0000 (06:21 +0000)]
Canvas fillText and measureText handle ideographic spaces differently
https://bugs.webkit.org/show_bug.cgi?id=108881

Patch by Rashmi Shyamasundar <rashmi.s2@samsung.com> on 2013-09-11
Reviewed by Darin Adler.

Source/WebCore:

According to spec for text preparation algorithm
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
all the space characters mentioned in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
should be replaced by U+0020 space character.
The canvas functions fillText and measureText should run the text preparation algorithm.
This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.

Tests: fast/canvas/canvas-measureText-ideographicSpace.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::shouldSpaceBeReplaced):
(WebCore::replaceCharacterInString):
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

LayoutTests:

According to the text preparation algorithm defined in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
all the spaces listed in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
should be replaced by +U0020 space character.
The below listed layout tests verify the conformance to above spec.
These tests are passing on Ubuntu-Firefox 23.0.

* fast/canvas/canvas-measureText-ideographicSpace-expected.txt: Added.
* fast/canvas/canvas-measureText-ideographicSpace.html: Added.

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

6 years agoRename initInteger() to initInt32()
fpizlo@apple.com [Thu, 12 Sep 2013 05:55:10 +0000 (05:55 +0000)]
Rename initInteger() to initInt32()

Rubber stamped by Mark Hahnenberg.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::initInt32):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::integerResult):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

6 years agoRename IntegerOperand to Int32Operand and fillInteger() to fillInt32().
fpizlo@apple.com [Thu, 12 Sep 2013 05:52:06 +0000 (05:52 +0000)]
Rename IntegerOperand to Int32Operand and fillInteger() to fillInt32().

Rubber stamped by Mark Hahnenberg.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::fillInt32):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::GPRTemporary::GPRTemporary):
(JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::Int32Operand::Int32Operand):
(JSC::DFG::Int32Operand::~Int32Operand):
(JSC::DFG::Int32Operand::gpr):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillInt32):
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillInt32):
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):

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

6 years agoFixupPhase should always call fixEdge() exactly once for every edge
fpizlo@apple.com [Thu, 12 Sep 2013 05:46:49 +0000 (05:46 +0000)]
FixupPhase should always call fixEdge() exactly once for every edge
https://bugs.webkit.org/show_bug.cgi?id=121211

Reviewed by Geoffrey Garen.

Previously we only call fixEdge() on edges that we want to make typed. UntypedUse
edges don't get fixEdge() called. This makes it difficult to add functionality in
fixEdge() that runs for UntypedUses. It's difficult to remember to call fixEdge()
for every edge that we don't want to turn into a typed edge; in an alternative
universe where we did this, it would mean that every case in FixupPhase would
have to make a fixEdge() call for *every* edge even ones that it doesn't want to
modify.

This patch takes a different path. fixEdge() must never be called explicitly with
UntypedUse. fixEdge() should be used to set the UseKind of edges. Consequently,
all that FixupPhase has to do is call fixEdge<UntypedUse>(edge) for every edge
that was still UntypedUse after we are done processing a node.

This is cheap and easy to implement and ought to be easy to maintain. We won't
have a need to call fixEdge<UntypedUse>(edge) explicitly, so depending on that is
only natural.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::observeUntypedEdge):
(JSC::DFG::FixupPhase::observeUseKindOnNode):

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

6 years agoFix Windows build.
akling@apple.com [Thu, 12 Sep 2013 05:36:36 +0000 (05:36 +0000)]
Fix Windows build.

* rendering/RenderingAllInOne.cpp:

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

6 years agoMerge RenderPart into RenderWidget.
akling@apple.com [Thu, 12 Sep 2013 05:21:14 +0000 (05:21 +0000)]
Merge RenderPart into RenderWidget.
<https://webkit.org/b/121200>

Reviewed by Anders Carlsson.

Remove the RenderPart class and move its functionality into RenderWidget.
It was acting as a pointless extra layer between RenderWidget and renderers
for embedded objects, frames and iframes.

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

6 years agoFixupPhase's setUseKindAndUnboxBlahbittyblah and fixDoubleEdge methods should be...
fpizlo@apple.com [Thu, 12 Sep 2013 04:48:13 +0000 (04:48 +0000)]
FixupPhase's setUseKindAndUnboxBlahbittyblah and fixDoubleEdge methods should be merged and given intuitive names
https://bugs.webkit.org/show_bug.cgi?id=121202

Reviewed by Geoffrey Garen.

Got rid of a method whose name was so descriptive that I couldn't ever remember
it. And despite the descriptive name, I always had to look at its implementation
to remind myself what it did, anyway.

Now that method is called fixEdge(). This is a good name because we're in a phase
called FixupPhase, and we call this fixEdge() method on pretty much every edge.
For the Int48 work, it makes more sense for this method to be a kind of hook into
which we can place various things: it's just a way of observing edges that need
attention.

As part of this refactoring, I also fold fixDoubleEdge into fixEdge. This makes
sense because previously it was never correct to call fixDoubleEdge with non-
double use kinds; and conversely it was never correct to call fixEdge with double
use kinds.

Also I found that isDouble() in DFGUseKind.h would return true for KnownInt32Use.
That's almost certainly wrong, and removing that behavior doesn't fail any tests.
I'm assuming that was just a bug.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::fixupToPrimitive):
(JSC::DFG::FixupPhase::fixupToString):
(JSC::DFG::FixupPhase::fixupSetLocalsInBlock):
(JSC::DFG::FixupPhase::fixEdge):
(JSC::DFG::FixupPhase::fixIntEdge):
(JSC::DFG::FixupPhase::attemptToMakeIntegerAdd):
(JSC::DFG::FixupPhase::convertToGetArrayLength):
(JSC::DFG::FixupPhase::attemptToMakeGetTypedArrayByteOffset):
* dfg/DFGUseKind.h:
(JSC::DFG::isDouble):

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

6 years agoRemoved some unused functions from the debugger interface
ggaren@apple.com [Thu, 12 Sep 2013 03:08:25 +0000 (03:08 +0000)]
Removed some unused functions from the debugger interface
https://bugs.webkit.org/show_bug.cgi?id=121194

Reviewed by Joseph Pecoraro.

We plan to use the "evaluate" API and debugger activation property access for all the features we need.

Source/WebCore:

* inspector/JavaScriptCallFrame.idl: These are the interfaces I removed.

* bindings/js/JSJavaScriptCallFrameCustom.cpp:
* inspector/InjectedScript.cpp:
* inspector/InjectedScript.h:
* inspector/InjectedScriptSource.js:
* inspector/Inspector.json:
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::setScriptSource):
* inspector/InspectorDebuggerAgent.h:
* inspector/JavaScriptCallFrame.idl:
* inspector/front-end/RemoteObject.js:
(WebInspector.RemoteObject.prototype.):
(WebInspector.RemoteObject.prototype.setPropertyValue): These files are mechanical removals of code that used
or implemented the interfaces I removed.

Source/WebInspectorUI:

* UserInterface/InspectorBackendCommands.js: Updated by script.

LayoutTests:

* inspector/debugger/debugger-change-variable-expected.txt: Removed.
* inspector/debugger/debugger-change-variable.html: Removed. This test was failing
because we don't support this API.

* platform/mac/inspector/console/command-line-api-expected.txt: This test changed line numbers
because I changed inspector .js files.

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

6 years agoTry to fix GCC builds.
andersca@apple.com [Thu, 12 Sep 2013 02:52:19 +0000 (02:52 +0000)]
Try to fix GCC builds.

* TestWebKitAPI/Tests/WTF/MoveOnly.h:

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

6 years agoTry to fix the build.
andersca@apple.com [Thu, 12 Sep 2013 02:26:48 +0000 (02:26 +0000)]
Try to fix the build.

Move MoveOnly.h to Tests/WTF and fix the broken Xcode project that caused me to add the header
file in the Tests/ directory in the first place.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props:
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/MoveOnly.h: Renamed from Tools/TestWebKitAPI/Tests/MoveOnly.h.

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

6 years agoFixed indentation in JSC Debugger header files.
mark.lam@apple.com [Thu, 12 Sep 2013 02:26:14 +0000 (02:26 +0000)]
Fixed indentation in JSC Debugger header files.
https://bugs.webkit.org/show_bug.cgi?id=121203.

Reviewed by Ryosuke Niwa.

* debugger/Debugger.h:
* debugger/DebuggerActivation.h:
(JSC::DebuggerActivation::create):
(JSC::DebuggerActivation::createStructure):
* debugger/DebuggerCallFrame.h:
(JSC::DebuggerCallFrame::DebuggerCallFrame):
(JSC::DebuggerCallFrame::callFrame):
(JSC::DebuggerCallFrame::dynamicGlobalObject):
(JSC::DebuggerCallFrame::scope):
(JSC::DebuggerCallFrame::exception):

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

6 years agoUse the new C++11 function declaration syntax throughout our hash collection classes
andersca@apple.com [Thu, 12 Sep 2013 02:16:57 +0000 (02:16 +0000)]
Use the new C++11 function declaration syntax throughout our hash collection classes
https://bugs.webkit.org/show_bug.cgi?id=121195

Reviewed by Andreas Kling.

* wtf/HashMap.h:
* wtf/HashSet.h:
* wtf/HashTable.h:

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

6 years agoDOMParser.parseFromString() should support creating HTML Document with mime-type...
vivek.vg@samsung.com [Thu, 12 Sep 2013 01:41:46 +0000 (01:41 +0000)]
DOMParser.parseFromString() should support creating HTML Document with mime-type text/html
https://bugs.webkit.org/show_bug.cgi?id=120826

Reviewed by Darin Adler.

Source/WebCore:

The specification http://domparsing.spec.whatwg.org/#the-domparser-interface for DOMParser.parseFromString()
allows the document creation if the mimeType is one of the supported types:
["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"]

Also script elements get marked unexecutable and the contents of noscript get parsed as markup.

blink review URL: https://codereview.chromium.org/23903014/

Test: fast/dom/domparser-parsefromstring-mimetype-support.html

* xml/DOMParser.cpp:
(WebCore::DOMParser::parseFromString):

LayoutTests:

* fast/dom/domparser-parsefromstring-mimetype-support-expected.txt: Added.
* fast/dom/domparser-parsefromstring-mimetype-support.html: Added.

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

6 years ago[CSS Shapes] Improve the performance of image valued shapes
hmuller@adobe.com [Thu, 12 Sep 2013 01:21:43 +0000 (01:21 +0000)]
[CSS Shapes] Improve the performance of image valued shapes
https://bugs.webkit.org/show_bug.cgi?id=120211

Reviewed by Alexandru Chiculita.

Replaced the implementation of RasterShapeIntervals with one based on the
new ShapeInterval<int> class. This eliminates the dependency the Region class
and delivers a 10X layout speedup for large image valued shapes.

This a just an implementation refactoring, no new tests were needed.

* rendering/shapes/RasterShape.cpp:
(WebCore::RasterShapeIntervals::appendInterval): Renamed this method, it was called addInterval().
(WebCore::shapeIntervalsContain):
(WebCore::RasterShapeIntervals::contains):
(WebCore::RasterShapeIntervals::getIntervalsInLine):
(WebCore::compareX1):
(WebCore::RasterShapeIntervals::firstIncludedIntervalY):
(WebCore::RasterShapeIntervals::getIncludedIntervals):
(WebCore::RasterShapeIntervals::getExcludedIntervals):
(WebCore::RasterShape::getExcludedIntervals):
(WebCore::RasterShape::getIncludedIntervals):
* rendering/shapes/RasterShape.h:
(WebCore::RasterShapeIntervals::RasterShapeIntervals): The constructor now takes a size argument which is used to allocate IntShapeIntervals storage.
(WebCore::RasterShapeIntervals::size):
(WebCore::RasterShapeIntervals::bounds):
(WebCore::RasterShapeIntervals::isEmpty):
(WebCore::RasterShapeIntervals::getIntervals):
* rendering/shapes/Shape.cpp:
(WebCore::Shape::createShape): Use appendInterval() instead of addInterval() (see above) and the new RasterShapeIntervals constructor.

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

6 years agoMake sure that layout is up-to-date when moving a WKView into a window, to avoid...
simon.fraser@apple.com [Thu, 12 Sep 2013 00:51:38 +0000 (00:51 +0000)]
Make sure that layout is up-to-date when moving a WKView into a window, to avoid !needsLayout() assertions in RenderView::paint()
https://bugs.webkit.org/show_bug.cgi?id=121196

Reviewed by Tim Horton.

When a WKView was moved into a window, it was possible for us to paint
without ensuring that layout is up-to-date. Fix this by having
WebPage::setIsInWindow() update layout if we are moving to a window.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setIsInWindow):

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

6 years ago[Windows] Build fix for MoveOnly
bfulgham@apple.com [Thu, 12 Sep 2013 00:40:15 +0000 (00:40 +0000)]
[Windows] Build fix for MoveOnly

* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props: Add
Tests to include search path.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props:
Ditto.

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

6 years agoAdd HashSet::take
andersca@apple.com [Thu, 12 Sep 2013 00:30:48 +0000 (00:30 +0000)]
Add HashSet::take
https://bugs.webkit.org/show_bug.cgi?id=121192

Reviewed by Darin Adler.

Source/WTF:

This is mostly done to see if we can use the new C++11 function declaration syntax,
and for parity with HashMap::take.

* wtf/HashMap.h:
* wtf/HashSet.h:

Tools:

Add a test for HashSet::take.

* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):

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

6 years ago[MediaStream API] Updating NavigatorUserMediaError to match the spec
eric.carlson@apple.com [Wed, 11 Sep 2013 23:46:44 +0000 (23:46 +0000)]
[MediaStream API] Updating NavigatorUserMediaError to match the spec
https://bugs.webkit.org/show_bug.cgi?id=120880

Reviewed by Darin Adler.

Merge https://chromium.googlesource.com/chromium/blink/+/f07305e49ddebaa166f5dee514bcc881a8efd341
by Tommy Widenflycht.

The Blink change did not have any test changes because they don't appear to have any tests
for NavigatorUserMediaError. I can't add tests now because the MediaStream feature isn't enabled
yet, so https://bugs.webkit.org/show_bug.cgi?id=121182 tracks adding tests.

* Modules/mediastream/NavigatorUserMediaError.h:
(WebCore::NavigatorUserMediaError::create):
(WebCore::NavigatorUserMediaError::name):
(WebCore::NavigatorUserMediaError::message):
(WebCore::NavigatorUserMediaError::constraintName):
(WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
* Modules/mediastream/NavigatorUserMediaError.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::fail):
(WebCore::UserMediaRequest::failConstraint):
* Modules/mediastream/UserMediaRequest.h:

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

6 years agoRemove needsDataFormatConversion because it is unused.
fpizlo@apple.com [Wed, 11 Sep 2013 23:46:31 +0000 (23:46 +0000)]
Remove needsDataFormatConversion because it is unused.

Rubber stamped by Mark Hahnenberg.

* bytecode/DataFormat.h:

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

6 years agoHashSet should work with move only types
andersca@apple.com [Wed, 11 Sep 2013 23:36:39 +0000 (23:36 +0000)]
HashSet should work with move only types
https://bugs.webkit.org/show_bug.cgi?id=121188

Reviewed by Geoffrey Garen.

Source/WTF:

* wtf/HashSet.h:
(WTF::HashSet::add):
Add a new rvalue reference overload and use std::move when calling HashTable::add.

* wtf/HashTable.h:
(WTF::IdentityHashTranslator::translate):
Change this to take an rvalue reference for the value so we can invoke the move assignment operator.

(WTF::HashTable::add):
Call the add member function template, using std::move to move the value.

(WTF::HashTable::add):
Add std::forward so we'll potentially move extra.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/MoveOnly.h: Added.
Move the MoveOnly class from Vector out into its own header.

* TestWebKitAPI/Tests/WTF/HashSet.cpp:
(TestWebKitAPI::TEST):
Add aHashSet<MoveOnly> test.

* TestWebKitAPI/Tests/WTF/Vector.cpp:
Include MoveOnly.h.

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

6 years agoRename fillSpeculateInt to fillSpeculateInt32.
fpizlo@apple.com [Wed, 11 Sep 2013 23:34:35 +0000 (23:34 +0000)]
Rename fillSpeculateInt to fillSpeculateInt32.

Rubber stamped by Mark Hahnenberg.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculateInt32Operand::gpr):
(JSC::DFG::SpeculateStrictInt32Operand::gpr):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Strict):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Strict):

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

6 years agoRename DataFormatInteger to DataFormatInt32.
fpizlo@apple.com [Wed, 11 Sep 2013 23:28:09 +0000 (23:28 +0000)]
Rename DataFormatInteger to DataFormatInt32.

Rubber stamped by Mark Hahnenberg.

* bytecode/DataFormat.h:
(JSC::dataFormatToString):
(JSC::needDataFormatConversion):
(JSC::isJSInt32):
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::inGPR):
(JSC::ValueRecovery::displacedInJSStack):
* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::initInteger):
(JSC::DFG::GenerationInfo::isJSInt32):
(JSC::DFG::GenerationInfo::fillInteger):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
(JSC::DFG::SpeculativeJIT::checkConsistency):
(JSC::DFG::SpeculativeJIT::checkGeneratedTypeForToInt32):
(JSC::DFG::SpeculativeJIT::compileValueToInt32):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::spill):
(JSC::DFG::SpeculativeJIT::integerResult):
(JSC::DFG::SpeculativeJIT::jsValueResult):
(JSC::DFG::SpeculativeJIT::isInteger):
(JSC::DFG::IntegerOperand::format):
(JSC::DFG::SpeculateInt32Operand::format):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillInteger):
(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntInternal):
(JSC::DFG::SpeculativeJIT::fillSpeculateIntStrict):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValueSource.h:
(JSC::DFG::dataFormatToValueSourceKind):
(JSC::DFG::valueSourceKindToDataFormat):

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

6 years agoFlaky Test: http/tests/inspector/inspect-element.html
joepeck@webkit.org [Wed, 11 Sep 2013 22:58:39 +0000 (22:58 +0000)]
Flaky Test: http/tests/inspector/inspect-element.html
https://bugs.webkit.org/show_bug.cgi?id=78869

Reviewed by Alexey Proskuryakov.

Add a check to fix flakiness when multiple inspector tests run. The
issue is with the old frontend, and does not affect the new frontend.

* http/tests/inspector/inspect-element.html:

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

6 years agoMediaStream API: Remove LocalMediaStream
commit-queue@webkit.org [Wed, 11 Sep 2013 22:32:26 +0000 (22:32 +0000)]
MediaStream API: Remove LocalMediaStream
https://bugs.webkit.org/show_bug.cgi?id=120875

blink merge: https://chromium.googlesource.com/chromium/blink/+/81643ee3fe048a64fa8931132e1294fa2c8e821a

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-11
Reviewed by Eric Carlson.

Source/WebCore:

Existing tests were updated.

* CMakeLists.txt:
* DerivedSources.make:
* GNUmakefile.list.am:
* Modules/mediastream/LocalMediaStream.cpp: Removed.
* Modules/mediastream/LocalMediaStream.h: Removed.
* Modules/mediastream/LocalMediaStream.idl: Removed.
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::stop):
* Modules/mediastream/MediaStream.h:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.h:
* Modules/mediastream/NavigatorUserMediaSuccessCallback.idl:
* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::succeed):
* Modules/mediastream/UserMediaRequest.h:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createMediaStreamSource):
* Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
* WebCore.xcodeproj/project.pbxproj:
* dom/EventTarget.h:
* dom/EventTargetFactory.in:
* platform/mediastream/MediaStreamDescriptor.h:

LayoutTests:

* fast/mediastream/LocalMediaStream-onended-expected.txt: Removed.
* fast/mediastream/LocalMediaStream-onended.html: Removed.
* fast/mediastream/MediaStream-onended-expected.txt:
* fast/mediastream/MediaStream-onended.html:

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

6 years agoRemove PlatformInstrumentation since we don't show decode or resize in the new Web...
timothy@apple.com [Wed, 11 Sep 2013 22:31:05 +0000 (22:31 +0000)]
Remove PlatformInstrumentation since we don't show decode or resize in the new Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=121181

Reviewed by Joseph Pecoraro.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.order:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willPaint):
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::pushCurrentRecord):
(WebCore::InspectorTimelineAgent::clearRecordStack):
* inspector/InspectorTimelineAgent.h:
* platform/PlatformInstrumentation.cpp: Removed.
* platform/PlatformInstrumentation.h: Removed.
* platform/image-decoders/bmp/BMPImageDecoder.cpp:
(WebCore::BMPImageDecoder::frameBufferAtIndex):
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameBufferAtIndex):
* platform/image-decoders/ico/ICOImageDecoder.cpp:
(WebCore::ICOImageDecoder::frameBufferAtIndex):
* platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
(WebCore::JPEGImageDecoder::frameBufferAtIndex):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::frameBufferAtIndex):
* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::frameBufferAtIndex):

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

6 years agoAvoid copying a hash table bucket when inserting causes a rehash
andersca@apple.com [Wed, 11 Sep 2013 22:27:23 +0000 (22:27 +0000)]
Avoid copying a hash table bucket when inserting causes a rehash
https://bugs.webkit.org/show_bug.cgi?id=121185

Reviewed by Darin Adler.

Allow rehashing to track a hash bucket and return the new pointer to it, thus avoiding
having to do a copy of a hash table bucket as well as an extra hash lookup.

* wtf/HashTable.h:

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

6 years agoSource/WebCore: [Windows] Avoid converting from IntSize->SIZE->IntSize.
bfulgham@apple.com [Wed, 11 Sep 2013 22:17:49 +0000 (22:17 +0000)]
Source/WebCore: [Windows] Avoid converting from IntSize->SIZE->IntSize.
https://bugs.webkit.org/show_bug.cgi?id=121180

Reviewed by Anders Carlsson.

* platform/graphics/BitmapImage.h: Take const IntSize* as
argument, rather than LPSIZE.
* platform/graphics/Image.h: Ditto.
(WebCore::Image::getHBITMAPOfSize):
* platform/graphics/win/ImageCGWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize): Use passed-in
IntSize, rather than converting from SIZE.
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::getHBITMAPOfSize): Ditto.

Source/WebKit: [Windows] Avoid converting from IntSize->SIZE->IntSize
https://bugs.webkit.org/show_bug.cgi?id=121180

Reviewed by Anders Carlsson.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Remove unused symbol export.

Source/WebKit/win: [Windows] Avoid converting from IntSize->SIZE->IntSize
https://bugs.webkit.org/show_bug.cgi?id=121180

Reviewed by Anders Carlsson.

* WebIconDatabase.cpp:
(WebIconDatabase::iconForURL): Guard against null SIZE argument.
This was dereferenced with checking before! Use IntSize arguments.
(WebIconDatabase::defaultIconWithSize): Used passed-in IntSize.
(createDIB): Take an IntSize argument.
(WebIconDatabase::getOrCreateSharedBitmap): Take IntSize argument.
(WebIconDatabase::getOrCreateDefaultIconBitmap): Ditto.
* WebIconDatabase.h: Update for IntSize arguments.
* WebView.cpp:
(WebView::dispatchDidReceiveIconFromWebFrame): Pass address of
IntSize directly, rather than casting to SIZE first.

Tools: [Windows] Avoid converting from IntSize->SIZE->IntSize
https://bugs.webkit.org/show_bug.cgi?id=121180

Reviewed by Anders Carlsson.

* TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
(TestWebKitAPI::TEST): Use IntSize instead of SIZE struct.

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

6 years agoUnreviewed debug build fix after r155567.
zoltan@webkit.org [Wed, 11 Sep 2013 22:08:45 +0000 (22:08 +0000)]
Unreviewed debug build fix after r155567.

* rendering/LineWidth.cpp:
(WebCore::LineWidth::LineWidth):

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

6 years agoREGRESSION (r155561): extract-localizable-strings can miss strings
mitz@apple.com [Wed, 11 Sep 2013 22:07:12 +0000 (22:07 +0000)]
REGRESSION (r155561): extract-localizable-strings can miss strings
https://bugs.webkit.org/show_bug.cgi?id=121184

Reviewed by Darin Adler.

* Scripts/extract-localizable-strings: Don’t discard lines if we are waiting for a closing
parenthesis or bracket.

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

6 years agoInt32ToDouble should be predicted SpecInt48 and predictions should have nothing to...
fpizlo@apple.com [Wed, 11 Sep 2013 21:49:47 +0000 (21:49 +0000)]
Int32ToDouble should be predicted SpecInt48 and predictions should have nothing to do with constant folding
https://bugs.webkit.org/show_bug.cgi?id=121141

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

Just changing Int32ToDouble to be predicted SpecInt48 breaks constant folding on that
node because of soooper old code that prevented constant folding on mismatched
predictions. Kill that code.

* dfg/DFGAbstractInterpreter.h:
(JSC::DFG::AbstractInterpreter::setConstant):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::::executeEffects):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::injectInt32ToDoubleNode):

LayoutTests:

Reviewed by Oliver Hunt.

Fixing this means that this test no longer recompiles.

* js/script-tests/dfg-constant-fold-misprediction.js:

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

6 years ago[Windows] Unreviewed build fix.
bfulgham@apple.com [Wed, 11 Sep 2013 21:40:59 +0000 (21:40 +0000)]
[Windows] Unreviewed build fix.

* wtf/win/GDIObject.h:
(WTF::GDIObject::GDIObject): I forgot to check in as part of
r155557 by using webkit-patch land in a sub-directory!

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

6 years agoMove LineWidth out of RenderBlockLineLayout
zoltan@webkit.org [Wed, 11 Sep 2013 21:29:37 +0000 (21:29 +0000)]
Move LineWidth out of RenderBlockLineLayout
https://bugs.webkit.org/show_bug.cgi?id=121107

Reviewed by David Hyatt.

Move LineWidth class and related code into LineWidth.{h,cpp}.

No new tests, no behavior change.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/LineWidth.cpp: Added.
(WebCore::LineWidth::applyOverhang):
(WebCore::LineWidth::fitBelowFloats):
* rendering/LineWidth.h: Added.
(WebCore::logicalHeightForLine):
(WebCore::LineWidth::LineWidth):
(WebCore::LineWidth::fitsOnLine):
(WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
(WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
(WebCore::LineWidth::currentWidth):
(WebCore::LineWidth::uncommittedWidth):
(WebCore::LineWidth::committedWidth):
(WebCore::LineWidth::availableWidth):
(WebCore::LineWidth::addUncommittedWidth):
(WebCore::LineWidth::commit):
(WebCore::LineWidth::setTrailingWhitespaceWidth):
(WebCore::LineWidth::shouldIndentText):
(WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
(WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
(WebCore::LineWidth::updateAvailableWidth):
(WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
* rendering/RenderBlockLineLayout.cpp:

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

6 years agoVariableAccessData::flushFormat() should be the universal way of deciding how to...
fpizlo@apple.com [Wed, 11 Sep 2013 21:24:34 +0000 (21:24 +0000)]
VariableAccessData::flushFormat() should be the universal way of deciding how to speculate on stores to locals and how locals are formatted
https://bugs.webkit.org/show_bug.cgi?id=121142

Reviewed by Geoffrey Garen.

Make everyone rely on VariableAccessData::flushFormat() instead of trying to
compute that information from scratch. The FTL already used flushFormat(), now
the DFG does, too.

* dfg/DFGArgumentPosition.h:
(JSC::DFG::ArgumentPosition::someVariable):
(JSC::DFG::ArgumentPosition::flushFormat):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupSetLocalsInBlock):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump):
* dfg/DFGInPlaceAbstractState.cpp:
(JSC::DFG::InPlaceAbstractState::mergeStateAtTail):
* dfg/DFGJITCompiler.h:
(JSC::DFG::JITCompiler::noticeOSREntry):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileInlineStart):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGValueSource.h:
(JSC::DFG::ValueSource::forFlushFormat):
* dfg/DFGVariableAccessDataDump.cpp:
(JSC::DFG::VariableAccessDataDump::dump):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileSetLocal):

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

6 years agoPartial Information Leakage in Hash Table implementations (PrivateName)
oliver@apple.com [Wed, 11 Sep 2013 21:22:00 +0000 (21:22 +0000)]
Partial Information Leakage in Hash Table implementations (PrivateName)
https://bugs.webkit.org/show_bug.cgi?id=120663

Reviewed by Michael Saboff.

Source/JavaScriptCore:

Undo change to the PropertyTable in my last patch, instead lets just
use a random value as the initial hash for unique strings.

* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::find):
(JSC::PropertyTable::findWithString):
(JSC::PropertyTable::rehash):

Source/WTF:

Unique strings now just generate a completely random value as their
hash, rather than using their this pointer.

* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):

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

6 years agoUnreviewed build correction.
bfulgham@apple.com [Wed, 11 Sep 2013 21:19:05 +0000 (21:19 +0000)]
Unreviewed build correction.

* WTF.vcxproj/copy-files.cmd: Touch file to force WTFGenerated
build to copy updated GDIObject.h header file on build machines.

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

6 years agoupdate-webkit-localizable-strings is at least 5.8x slower than it should be
mitz@apple.com [Wed, 11 Sep 2013 21:02:36 +0000 (21:02 +0000)]
update-webkit-localizable-strings is at least 5.8x slower than it should be
https://bugs.webkit.org/show_bug.cgi?id=121178

Reviewed by Darin Adler.

* Scripts/extract-localizable-strings: Quickly skip over lines that contain neither " nor /*.
Note that this does not change functionality, because the script already does not understand
the line continuation sequence (backslash followed by a newline).

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

6 years agoPartial Information Leakage in Hash Table implementations (PrivateName)
oliver@apple.com [Wed, 11 Sep 2013 20:56:31 +0000 (20:56 +0000)]
Partial Information Leakage in Hash Table implementations (PrivateName)
https://bugs.webkit.org/show_bug.cgi?id=120663

Reviewed by Michael Saboff.

These hashtables mix keys that are hashed on pointers or user controlled
data.  To prevent any potential information leak we mask the keys with
a per table entropy value.

* runtime/MapData.cpp:
(JSC::MapData::MapData):
(JSC::MapData::find):
(JSC::MapData::add):
(JSC::MapData::remove):
* runtime/MapData.h:
* runtime/PropertyMapHashTable.h:
(JSC::PropertyTable::find):
(JSC::PropertyTable::findWithString):
(JSC::PropertyTable::rehash):
* runtime/PropertyTable.cpp:
(JSC::PropertyTable::PropertyTable):

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

6 years agoHTMLEntityTable could use char to reduce binary size
rniwa@webkit.org [Wed, 11 Sep 2013 20:47:01 +0000 (20:47 +0000)]
HTMLEntityTable could use char to reduce binary size
https://bugs.webkit.org/show_bug.cgi?id=121176

Reviewed by Anders Carlsson.

Use LChar instead.

* html/parser/HTMLEntityParser.cpp:
(WebCore::HTMLEntityParser::consumeNamedEntity):
* html/parser/HTMLEntityTable.h:
(WebCore::HTMLEntityTableEntry::lastCharacter):
* html/parser/create-html-entity-table:

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

6 years agoMapData and WeakMapData don't need to be objects
commit-queue@webkit.org [Wed, 11 Sep 2013 20:34:09 +0000 (20:34 +0000)]
MapData and WeakMapData don't need to be objects
https://bugs.webkit.org/show_bug.cgi?id=121167

Patch by Sam Weinig <sam@webkit.org> on 2013-09-11
Reviewed by Geoffrey Garen.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::mapStructure):
Remove MapData and WeakMapData structures (they moved to VM with other non-object Structures).

* runtime/JSMap.cpp:
(JSC::JSMap::finishCreation):
* runtime/JSMap.h:
(JSC::JSMap::create):
* runtime/JSSet.cpp:
(JSC::JSSet::finishCreation):
* runtime/JSSet.h:
(JSC::JSSet::create):
* runtime/JSWeakMap.cpp:
(JSC::JSWeakMap::finishCreation):
* runtime/JSWeakMap.h:
(JSC::JSWeakMap::create):
Update to not pass a global object to the MapData or WeakMapData Structure.

* runtime/MapData.cpp:
(JSC::MapData::MapData):
* runtime/MapData.h:
(JSC::MapData::create):
(JSC::MapData::createStructure):
* runtime/WeakMapData.cpp:
(JSC::WeakMapData::WeakMapData):
(JSC::WeakMapData::set): Change to take a VM rather than a CallFrame, as that it all it needs.
* runtime/WeakMapData.h:
(JSC::WeakMapData::create):
(JSC::WeakMapData::createStructure):
Instead of inheriting from JSDestructibleObject, inherit from JSCell and mark self as needing destruction
and having an immortal structure.

* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
Add MapData and WeakMapData Structures.

* runtime/WeakMapPrototype.cpp:
(JSC::protoFuncWeakMapSet):
Pass a VM rather than an ExecState.

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

6 years ago[Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
bfulgham@apple.com [Wed, 11 Sep 2013 20:27:46 +0000 (20:27 +0000)]
[Windows] Revise GDI Create Functions to use GDIObject Smart Pointer.
https://bugs.webkit.org/show_bug.cgi?id=121100

Reviewed by Anders Carlsson.

* platform/graphics/FontPlatformData.h: Use GDIObject instead of bare pointer.
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::createGDIFont): No longer need to leak the pointer; use move semantic
to pass ownership to FontPlatformData.
(WebCore::FontCache::createFontPlatformData):
* platform/graphics/win/FontCustomPlatformData.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Use move operation.
* platform/graphics/win/FontCustomPlatformDataCairo.cpp:
(WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCGWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataCairoWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/FontPlatformDataWin.cpp:
(WebCore::FontPlatformData::FontPlatformData): Ditto.
* platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
(WebCore::GlyphPage::fill): Use HWndDC smart pointer instead of bare HDC.
* platform/graphics/win/SimpleFontDataWin.cpp:
(WebCore::SimpleFontData::platformCreateScaledFontData): Use move operation.
* platform/win/DragImageCGWin.cpp:
(WebCore::allocImage): Change to use GDIObject.
(WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
(WebCore::createDragImageFromImage): Ditto.
* platform/win/DragImageCairoWin.cpp:
(WebCore::allocImage): Change to use GDIObject.
(WebCore::scaleDragImage): Use smart pointers to avoid manual deallocs.
(WebCore::createDragImageFromImage): Ditto.
* platform/win/DragImageWin.cpp:
(WebCore::createDragImageForLink): Update for GDIObject.
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::PopupMenuWin): Switch to GDIObject.
(WebCore::PopupMenuWin::~PopupMenuWin): Remove uneeded deallocs.
(WebCore::PopupMenuWin::paint): Update for GDIObject.
* platform/win/PopupMenuWin.h: Use smart pointers instead of bare GDI objects.

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

6 years agoFix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
paroga@webkit.org [Wed, 11 Sep 2013 20:18:15 +0000 (20:18 +0000)]
Fix animations with !USE(ACCELERATED_COMPOSITING) after r147792.
https://bugs.webkit.org/show_bug.cgi?id=121159

Reviewed by Simon Fraser.

CSSPropertyAnimation::blendProperties() is available always
and needs to be called to make the animations work.

* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::animate):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::animate):

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

6 years agoMove all collapsing margin code out of RenderBlock and into RenderBlockFlow.
hyatt@apple.com [Wed, 11 Sep 2013 19:50:03 +0000 (19:50 +0000)]
Move all collapsing margin code out of RenderBlock and into RenderBlockFlow.
https://bugs.webkit.org/show_bug.cgi?id=121049

Reviewed by Dean Jackson.

This patch begins the migration of the rare data struct of RenderBlock into
RenderBlockFlow. During this process we will temporarily have rare data structs
in both places, but ultimately all of the members are going to move down into
RenderBlockFlow, and if any don't, they will get forced into a hash.

For this patch, the margin information is being shifted out of RenderBlock and into
RenderBlockFlow. Any functions that refer to MarginValues or to MarginInfo also got
moved down into RenderBlockFlow. Most of block child layout is now in RenderBlockFlow
after this patch.

Note that in many cases the code didn't simply move. There is some type tightening
that happened as well, i.e., places that look for RenderBlock can now look for
RenderBlockFlow instead and let RenderBlock execute the base RenderBox functions.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::setPaginationStrut):
(WebCore::RenderBlock::setPageLogicalOffset):
(WebCore::RenderBlock::setBreakAtLineToAvoidWidow):
* rendering/RenderBlock.h:
(WebCore::RenderBlock::setLineGridBox):
(WebCore::RenderBlock::setShapeInsideInfo):
(WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::MarginInfo::MarginInfo):
(WebCore::RenderBlockFlow::RenderBlockFlow):
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::adjustPositionedBlock):
(WebCore::RenderBlockFlow::adjustFloatingBlock):
(WebCore::RenderBlockFlow::marginValuesForChild):
(WebCore::RenderBlockFlow::collapseMargins):
(WebCore::RenderBlockFlow::clearFloatsIfNeeded):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::estimateLogicalTopPosition):
(WebCore::RenderBlockFlow::setCollapsedBottomMargin):
(WebCore::RenderBlockFlow::handleAfterSideOfBlock):
(WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
(WebCore::RenderBlockFlow::setMaxMarginAfterValues):
(WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
(WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
(WebCore::RenderBlockFlow::mustDiscardMarginBefore):
(WebCore::RenderBlockFlow::mustDiscardMarginAfter):
(WebCore::RenderBlockFlow::mustDiscardMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustDiscardMarginAfterForChild):
(WebCore::RenderBlockFlow::mustSeparateMarginBeforeForChild):
(WebCore::RenderBlockFlow::mustSeparateMarginAfterForChild):
(WebCore::inNormalFlow):
(WebCore::RenderBlockFlow::applyBeforeBreak):
(WebCore::RenderBlockFlow::applyAfterBreak):
(WebCore::RenderBlockFlow::adjustBlockChildForPagination):
* rendering/RenderBlockFlow.h:
(WebCore::RenderBlockFlow::MarginValues::MarginValues):
(WebCore::RenderBlockFlow::MarginValues::positiveMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::negativeMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::positiveMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::negativeMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::setPositiveMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::setNegativeMarginBefore):
(WebCore::RenderBlockFlow::MarginValues::setPositiveMarginAfter):
(WebCore::RenderBlockFlow::MarginValues::setNegativeMarginAfter):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::RenderBlockFlowRareData):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginBeforeDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginBeforeDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::positiveMarginAfterDefault):
(WebCore::RenderBlockFlow::RenderBlockFlowRareData::negativeMarginAfterDefault):
(WebCore::RenderBlockFlow::MarginInfo::setAtBeforeSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::setAtAfterSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::clearMargin):
(WebCore::RenderBlockFlow::MarginInfo::setHasMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setHasMarginAfterQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setDeterminedMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::setPositiveMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setNegativeMarginIfLarger):
(WebCore::RenderBlockFlow::MarginInfo::setMargin):
(WebCore::RenderBlockFlow::MarginInfo::setCanCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::setDiscardMargin):
(WebCore::RenderBlockFlow::MarginInfo::atBeforeSideOfBlock):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginBefore):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseWithMarginAfter):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginBeforeWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::canCollapseMarginAfterWithChildren):
(WebCore::RenderBlockFlow::MarginInfo::quirkContainer):
(WebCore::RenderBlockFlow::MarginInfo::determinedMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::hasMarginBeforeQuirk):
(WebCore::RenderBlockFlow::MarginInfo::hasMarginAfterQuirk):
(WebCore::RenderBlockFlow::MarginInfo::positiveMargin):
(WebCore::RenderBlockFlow::MarginInfo::negativeMargin):
(WebCore::RenderBlockFlow::MarginInfo::discardMargin):
(WebCore::RenderBlockFlow::MarginInfo::margin):
(WebCore::RenderBlockFlow::maxPositiveMarginBefore):
(WebCore::RenderBlockFlow::maxNegativeMarginBefore):
(WebCore::RenderBlockFlow::maxPositiveMarginAfter):
(WebCore::RenderBlockFlow::maxNegativeMarginAfter):
(WebCore::RenderBlockFlow::initMaxMarginValues):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::layout):

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

6 years agoFix nested unicode-bidi: isolate
commit-queue@webkit.org [Wed, 11 Sep 2013 19:23:58 +0000 (19:23 +0000)]
Fix nested unicode-bidi: isolate
https://bugs.webkit.org/show_bug.cgi?id=120504

Patch by Myles C. Maxfield <mmaxfield@apple.com> on 2013-09-11
Reviewed by Darin Adler.

Source/WebCore:

When we have a nested isolate renderer if the outer isolate has a text
and this text is not the first child, the isolated chain is not
rendered correctly. This happens because constructBidiRunsForSegment
uses always the first inner isolated renderer as isolated inline
container. This patch fixes the behavior described changing
containingIsolate to find the right isolated container.

Blink: https://chromium.googlesource.com/chromium/blink/+/840a57050eade39dd04dde0c6603e129b783151c
Tests: fast/text/international/unicode-bidi-isolate-nested-first-child-text.html
       fast/text/international/unicode-bidi-isolate-nested-simple.html

* rendering/InlineIterator.h:
(WebCore::containingIsolate):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRunsForSegment):

LayoutTests:

* fast/text/international/unicode-bidi-isolate-nested-first-child-text-expected.html: Added.
* fast/text/international/unicode-bidi-isolate-nested-first-child-text.html: Added.
* fast/text/international/unicode-bidi-isolate-nested-simple-expected.html: Added.
* fast/text/international/unicode-bidi-isolate-nested-simple.html: Added.

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