[EFL][WK2] Add popup menu support to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=108934

Reviewed by Kenneth Rohde Christiansen.

Implement popup menu support in MiniBrowser by handling popup_menu_show
and popup_menu_hide smart functions on the view and using the Ewk popup
menu API.

* MiniBrowser/efl/main.c:
(_Browser_Window):
(on_popup_menu_discarded):
(on_popup_menu_item_clicked):
(popup_menu_populate):
(on_popup_menu_show):
(on_popup_menu_hide):
(window_create): Use calloc() instead of malloc() to allocate memory for
Browser_Window. This makes sure all the structs members are initialized
to 0 (such as the new elm_popup_menu pointer).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r145277.
http://trac.webkit.org/changeset/145277
https://bugs.webkit.org/show_bug.cgi?id=112170

chromium-gpu and android testers are seeing failures/crashes
relating to this code (Requested by eseidel on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-12

* html/parser/BackgroundHTMLInputStream.cpp:
(WebCore::BackgroundHTMLInputStream::rewindTo):
* html/parser/BackgroundHTMLInputStream.h:
(BackgroundHTMLInputStream):
(Checkpoint):
* html/parser/BackgroundHTMLParser.cpp:
* html/parser/BackgroundHTMLParser.h:
(BackgroundHTMLParser):
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::pumpPendingSpeculations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Remove unused WebIOSurfaceLayer type
https://bugs.webkit.org/show_bug.cgi?id=111796

Patch by James Robinson <jamesr@chromium.org> on 2013-03-12
Reviewed by Adrienne Walker.

This has been dead code since http://trac.webkit.org/changeset/138223

* Platform.gypi:
* chromium/public/WebCompositorSupport.h:
(WebKit):
* chromium/public/WebIOSurfaceLayer.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Webkit unable to show gifs with applcation extension string shorter than 11 bytes
https://bugs.webkit.org/show_bug.cgi?id=110620

Patch by Viatcheslav Ostapenko <sl.ostapenko@samsung.com> on 2013-03-12
Reviewed by Laszlo Gombos.

Source/WebCore:

Use actual block size for gifs application extension string even if it is below 11 bytes
to be able to decode this kind of gifs.

Test: fast/images/gif-short-app-extension-string.html

* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::decodeInternal):

LayoutTests:

Test that webkit is able to decode gifs with short application extension string.

* fast/images/gif-short-app-extension-string-expected.png: Added.
* fast/images/gif-short-app-extension-string-expected.txt: Added.
* fast/images/gif-short-app-extension-string.html: Added.
* fast/images/resources/short-app-extension-string.gif: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac rebaseline.

Rubber-stamped by Simon Fraser.

* platform/mac/compositing/overflow/composited-scrolling-paint-phases-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Prevent text selection inside Colour and Date/Time input fields
https://bugs.webkit.org/show_bug.cgi?id=111733

Reviewed by Rob Buis.

PR 305194.

Skip rendering of selection if it is in a popup driven
input field.  This covers situations where EditorClientBlackBerry::shouldChangeSelectedRange
is either not called or focus is not complete when called.

Informally reviewed by Gen Mak.

* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
(WebKit):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Use lipo(1) rather than file(1) to list library architectures.
https://bugs.webkit.org/show_bug.cgi?id=111147

Parsing file(1) output can be fragile; this patch replaces a use of file(1) to get
the architecture list of a library with an invocation of lipo(1), which should be more
stable.

Reviewed by Nico Weber.

No new tests, since adjust_visibility.sh doesn't have a test.

* WebCore.gyp/mac/adjust_visibility.sh:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r145554.
http://trac.webkit.org/changeset/145554
https://bugs.webkit.org/show_bug.cgi?id=112182

Breaks several extension browser tests (see bug for details)
(Requested by jamesr on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-12

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
(GenerateDomainSafeFunctionGetter):
(GenerateImplementation):
(CreateCustomSignature):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::ConfigureV8Float64ArrayTemplate):
(WebCore::V8Float64Array::GetTemplate):
(WebCore::V8Float64Array::HasInstance):
* bindings/scripts/test/V8/V8Float64Array.h:
(V8Float64Array):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
(WebCore::ConfigureV8TestActiveDOMObjectTemplate):
(WebCore::V8TestActiveDOMObject::GetTemplate):
(WebCore::V8TestActiveDOMObject::HasInstance):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(V8TestActiveDOMObject):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::GetTemplate):
(WebCore::V8TestCustomNamedGetter::HasInstance):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(V8TestCustomNamedGetter):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::GetTemplate):
(WebCore::V8TestEventConstructor::HasInstance):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(V8TestEventConstructor):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::ConfigureV8TestEventTargetTemplate):
(WebCore::V8TestEventTarget::GetTemplate):
(WebCore::V8TestEventTarget::HasInstance):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(V8TestEventTarget):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::GetTemplate):
(WebCore::V8TestException::HasInstance):
* bindings/scripts/test/V8/V8TestException.h:
(V8TestException):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::ConfigureV8TestInterfaceTemplate):
(WebCore::V8TestInterface::GetTemplate):
(WebCore::V8TestInterface::HasInstance):
* bindings/scripts/test/V8/V8TestInterface.h:
(V8TestInterface):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::GetTemplate):
(WebCore::V8TestMediaQueryListListener::HasInstance):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(V8TestMediaQueryListListener):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::GetTemplate):
(WebCore::V8TestNamedConstructor::HasInstance):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(V8TestNamedConstructor):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::GetTemplate):
(WebCore::V8TestNode::HasInstance):
* bindings/scripts/test/V8/V8TestNode.h:
(V8TestNode):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::ConfigureV8TestObjTemplate):
(WebCore::V8TestObj::GetTemplate):
(WebCore::V8TestObj::HasInstance):
* bindings/scripts/test/V8/V8TestObj.h:
(V8TestObj):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
(WebCore::V8TestOverloadedConstructors::GetTemplate):
(WebCore::V8TestOverloadedConstructors::HasInstance):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
(V8TestOverloadedConstructors):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
(WebCore::V8TestSerializedScriptValueInterface::HasInstance):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(V8TestSerializedScriptValueInterface):
* bindings/scripts/test/V8/V8TestTypedefs.cpp:
(WebCore::ConfigureV8TestTypedefsTemplate):
(WebCore::V8TestTypedefs::GetTemplate):
(WebCore::V8TestTypedefs::HasInstance):
* bindings/scripts/test/V8/V8TestTypedefs.h:
(V8TestTypedefs):
* bindings/v8/V8AdaptorFunction.cpp:
(WebCore::V8AdaptorFunction::getTemplate):
* bindings/v8/V8GCController.cpp:
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage):
(WebCore::V8PerIsolateData::privateTemplate):
(WebCore::V8PerIsolateData::rawTemplate):
(WebCore::V8PerIsolateData::hasInstance):
* bindings/v8/V8PerIsolateData.h:
(WebCore::V8PerIsolateData::rawTemplateMap):
(WebCore::V8PerIsolateData::templateMap):
(V8PerIsolateData):
* bindings/v8/WrapperTypeInfo.h:
* bindings/v8/custom/V8LocationCustom.cpp:
(WebCore::V8Location::reloadAttrGetterCustom):
(WebCore::V8Location::replaceAttrGetterCustom):
(WebCore::V8Location::assignAttrGetterCustom):
* bindings/v8/custom/V8NodeListCustom.cpp:
(WebCore::V8NodeList::opaqueRootForGC):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some canvas tests only fail on Mac EWS
https://bugs.webkit.org/show_bug.cgi?id=112176

Reviewed by Simon Fraser.

Add Failure / Pass test expectations on tests that only fail on Mac EWS bots.

Ideally, we can figure out the root cause of this failure and fix that problem but we haven't been able
to do so. We also don't have a way of adding test expectations only on EWS bots we're out of luck here.

* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG generic array access cases should not be guarded by CheckStructure even of the profiling tells us that it could be
https://bugs.webkit.org/show_bug.cgi?id=112183

Reviewed by Oliver Hunt.
        
Slight speed-up on string-unpack-code.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::findAndRemoveUnnecessaryStructureCheck):
(FixupPhase):
(JSC::DFG::FixupPhase::checkArray):
(JSC::DFG::FixupPhase::blessArrayOperation):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make CheckedArithmetic slightly more sane
https://bugs.webkit.org/show_bug.cgi?id=112178

Reviewed by Geoffrey Garen.

Add an enum type for safeGet rather than using a bool,
and correctly handle unsigned * unsigned, when one value
is 0.

* wtf/CheckedArithmetic.h:
(WTF::ENUM_CLASS):
(WTF):
(WTF::operator+):
(WTF::operator-):
(WTF::operator*):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Improve logging in ResourceHandleMac.mm
        https://bugs.webkit.org/show_bug.cgi?id=112185

        Reviewed by Brady Eidson.

        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Removed an obsolete #if.
        (WebCore::ResourceHandle::receivedCredential):
        (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
        (WebCore::ResourceHandle::receivedCancellation):
        (-[WebCoreResourceHandleAsDelegate connection:didCancelAuthenticationChallenge:]): Added a FIXME.
        (-[WebCoreResourceHandleAsDelegate connection:canAuthenticateAgainstProtectionSpace:]):

        * platform/network/mac/ResourceResponseMac.mm: Removed an unneeded include.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup: Move loading complete function into callback, rather than global.
https://bugs.webkit.org/show_bug.cgi?id=112167

Reviewed by Dirk Pranke.

Stop calling global functions, pass in proper handler to Loader
constructor. Note that the callback is optional, as tests, and
some potential dashboards, do not need one.

* TestResultServer/static-dashboards/dashboard_base.js:
* TestResultServer/static-dashboards/loader.js:
(.):
* TestResultServer/static-dashboards/loader_unittests.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add more Checked<> tests
https://bugs.webkit.org/show_bug.cgi?id=112190

Reviewed by Geoffrey Garen.

Source/WTF:

Export the CheckedState enum type

* wtf/CheckedArithmetic.h:

Tools:

Tests!

* TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
(TestWebKitAPI):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac: Incorrect rendering of <audio> controls
https://bugs.webkit.org/show_bug.cgi?id=110913

Patch by Christian Biesinger <cbiesinger@chromium.org> on 2013-03-12
Reviewed by Tony Chang.

Source/WebCore:

Covered by existing tests under media/.

* css/mediaControls.css:
(audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
The timeline container and the timeline need min-width: 0 so that they can shrink if needed.
* css/mediaControlsQuickTime.css:
(audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
(audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
(audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
The timeline container also needs flex-start to ensure that it never overlaps
the play/rewind buttons. The current-time and remaining-time displays need min-width: 0 so that the hack
in RenderMediaControls.cpp works correctly - otherwise, RenderFlexibleBox tries to use the preferred width
of the time displays, which is wrong when they try to hide themselves.

LayoutTests:

* platform/mac/media/audio-controls-rendering-expected.txt:
* platform/mac/media/controls-after-reload-expected.txt:
* platform/mac/media/controls-strict-expected.txt:
* platform/mac/media/controls-styling-strict-expected.txt:
* platform/mac/media/controls-without-preload-expected.txt:
* platform/mac/media/video-controls-rendering-expected.txt:
* platform/mac/media/video-display-toggle-expected.txt:
* platform/mac/media/video-no-audio-expected.txt:
* platform/mac/media/video-playing-and-pause-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145588 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove WEBKIT_USING_V8 from the WebKit API
https://bugs.webkit.org/show_bug.cgi?id=112120

Reviewed by Tony Chang.

Chromium always uses V8. This macro has outlived it's usefulness. It's
now just noise.

* README:
* public/WebArrayBuffer.h:
(WebArrayBuffer):
* public/WebArrayBufferView.h:
(WebArrayBufferView):
* public/WebBindings.h:
(WebBindings):
* public/WebBlob.h:
(WebBlob):
* public/WebFrame.h:
(WebFrame):
* public/WebFrameClient.h:
* public/WebSerializedScriptValue.h:
(WebSerializedScriptValue):
* src/WebArrayBuffer.cpp:
(WebKit::WebArrayBuffer::createFromV8Value):
* src/WebArrayBufferView.cpp:
(WebKit::WebArrayBufferView::createFromV8Value):
* src/WebBindings.cpp:
(WebKit::WebBindings::toV8Value):
* src/WebBlob.cpp:
(WebKit::WebBlob::toV8Value):
* src/WebFrameImpl.cpp:
(WebKit::WebFrame::frameForContext):
* src/WebFrameImpl.h:
(WebFrameImpl):
* src/WebSerializedScriptValue.cpp:
(WebKit::WebSerializedScriptValue::serialize):
(WebKit::WebSerializedScriptValue::deserialize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove stray .gitmodules file
https://bugs.webkit.org/show_bug.cgi?id=112186

Reviewed by Tony Chang.

Apparently I imported this together with the jquery tests by mistake.

* jquery/resources/src/sizzle/.gitmodules: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145591 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Moved RunLoopTimer and SchedulePair to WTF
https://bugs.webkit.org/show_bug.cgi?id=112171

Reviewed by Oliver Hunt.

This will allow us to use timers in lower level primitives without
duplicating all the code.

../WebCore: 

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/DocumentLoader.h:
(WTF):
(WebCore):
(DocumentLoader):
* loader/MainResourceLoader.h:
* page/Page.h:
* platform/AutodrainedPool.h: Removed.
* platform/cf/RunLoopTimerCF.cpp: Removed.
* platform/cf/SchedulePair.cpp: Removed.
* platform/cf/SchedulePair.h: Removed.
* platform/mac/AutodrainedPool.mm: Removed.
* platform/mac/SchedulePairMac.mm: Removed.
* platform/network/NetworkingContext.h:
* platform/network/ResourceHandle.h:
(WTF):
(WebCore):
(ResourceHandle):
* platform/network/cf/FormDataStreamCFNet.cpp:
* platform/network/mac/ResourceHandleMac.mm:

../WebKit/mac: 

* WebCoreSupport/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext):

../WebKit2: 

* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext):

../WTF: 

* WTF.xcodeproj/project.pbxproj:
* wtf/AutodrainedPool.h: Copied from Source/WebCore/platform/AutodrainedPool.h.
(AutodrainedPool):
* wtf/AutodrainedPoolMac.mm: Copied from Source/WebCore/platform/mac/AutodrainedPool.mm.
* wtf/RunLoopTimer.h: Copied from Source/WebCore/platform/RunLoopTimer.h.
* wtf/RunLoopTimerCF.cpp: Copied from Source/WebCore/platform/cf/RunLoopTimerCF.cpp.
* wtf/SchedulePair.cpp: Copied from Source/WebCore/platform/cf/SchedulePair.cpp.
* wtf/SchedulePair.h: Copied from Source/WebCore/platform/cf/SchedulePair.h.
(SchedulePair):
* wtf/SchedulePairMac.mm: Copied from Source/WebCore/platform/mac/SchedulePairMac.mm.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145592 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add one more test expectation per bug 112176.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Harden JSStringJoiner
https://bugs.webkit.org/show_bug.cgi?id=112093

Reviewed by Filip Pizlo.

Harden JSStringJoiner, make it use our CheckedArithmetic
class to simplify everything.

* runtime/JSStringJoiner.cpp:
(JSC::JSStringJoiner::build):
* runtime/JSStringJoiner.h:
(JSStringJoiner):
(JSC::JSStringJoiner::JSStringJoiner):
(JSC::JSStringJoiner::append):

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