WebKit-https.git
8 years agoMove sudden termination symbols to the Mac-only section
ddkilzer@apple.com [Mon, 13 May 2013 06:25:22 +0000 (06:25 +0000)]
Move sudden termination symbols to the Mac-only section

* WebCore.exp.in: Move the sudden termination symbols to the
!PLATFORM(IOS) section for reals this time.

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

8 years ago Fix Mac build.
darin@apple.com [Mon, 13 May 2013 06:24:07 +0000 (06:24 +0000)]
    Fix Mac build.

        * platform/mac/PasteboardMac.mm: Add back include of ClipboardMac.h
        that was removed by accident a couple of patches back.

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

8 years ago[Mac] Moved files function from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 05:35:20 +0000 (05:35 +0000)]
[Mac] Moved files function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116008

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::files): Added. Moved the DOM-depdendent and
platform-independent part of the files function in ClipboardMac here.

* dom/Clipboard.h: Made files function non-virtual in non-legacy case.

* platform/Pasteboard.h: Removed static member function
absoluteURLsFromPasteboardFilenames since it can now be private to
PasteboardMac. Added member function readFilenames.

* platform/mac/ClipboardMac.h: Removed function member files and also
now-unused data member m_clipboardContents.

* platform/mac/ClipboardMac.mm: Removed files function.
(WebCore::ClipboardMac::ClipboardMac): Removed code to initialize
m_clipboardContents.

* platform/mac/PasteboardMac.mm:
(WebCore::absoluteURLsFromPasteboardFilenames): Changed from a static
member function to a file-local function.
(WebCore::absoluteURLsFromPasteboard): Changed to call the function
above in its new location.
(WebCore::Pasteboard::readFilenames): Added. Code from ClipboardMac,
minus the DOM-specific parts. Added a FIXME about the peculiar round
trip through NSURL this code takes.

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

8 years agoFix WebKit2 build.
andersca@apple.com [Mon, 13 May 2013 05:32:57 +0000 (05:32 +0000)]
Fix WebKit2 build.

* WebCore.exp.in:
Put WebCore::disableSuddenTermination and WebCore::enableSuddenTermination symbols in the right section.

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

8 years ago[Mac] Move types function from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 05:26:39 +0000 (05:26 +0000)]
[Mac] Move types function from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116007

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::types): Added. Calls through to Pasteboard
after doing checks needed at this level.

* dom/Clipboard.h: Made types function non-virtual in non-legacy case,
and removed non-helpful comment.

* platform/Pasteboard.h: Updated includes and comments at the top of
the file a bit. Removed static member function addHTMLClipboardTypesForCocoaType,
since it can now be private to PasteboardMac. Added member function types.

* platform/mac/ClipboardMac.h: Removed types function.
* platform/mac/ClipboardMac.mm: Ditto.

* platform/mac/PasteboardMac.mm:
(WebCore::addHTMLClipboardTypesForCocoaType): Made this a file-local
function instead of a static member function.
(WebCore::Pasteboard::types): Added. Moved from ClipboardMac.

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

8 years ago[Mac] Move setData from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 05:19:32 +0000 (05:19 +0000)]
[Mac] Move setData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116006

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::setData): Added. Calls through to Pasteboard
after doing checks needed at this level.

* dom/Clipboard.h: Made setData non-virtual in non-legacy case.

* platform/Pasteboard.h: Updated includes and forward declarations.
Removed static member function cocoaTypeFromHTMLClipboardType, since
it can now be private to PasteboardMac. Added static member function
addHTMLClipboardTypesForCocoaType, which is shared between the
ClipboardMac and PasteboardMac files for now. Added writeString.

* platform/mac/ClipboardMac.h: Removed setData.

* platform/mac/ClipboardMac.mm: Removed utiTypeFromCocoaType,
addHTMLClipboardTypesForCocoaType, and setData.
(WebCore::ClipboardMac::types): Call addHTMLClipboardTypesForCocoaType
as a Pasteboard static member function, for now.

* platform/mac/PasteboardMac.mm:
(WebCore::cocoaTypeFromHTMLClipboardType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::readString): Changed to call
cocoaTypeFromHTMLClipboardType as a file-local function, not a member
function (in fact, we didn't need to repeat the class name before, either,
so this is just removing something we didn't need).
(WebCore::utiTypeFromCocoaType): Added. Moved from ClipboardMac.
(WebCore::Pasteboard::addHTMLClipboardTypesForCocoaType): Ditto.
(WebCore::Pasteboard::writeString): Ditto.

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

8 years ago[Mac] Move getData from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 04:44:46 +0000 (04:44 +0000)]
[Mac] Move getData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116005

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Added a new boolean argument, forFileDrag,
to the constructor. Maybe we can find a better way to do this once we move
all the platforms over, but this boolean seems a good way to do it for now.
(WebCore::Clipboard::getData): Added. Calls through to Pasteboard after
doing the canReadData check, which is part of DOM rules, not the platform.
Also checks for the file drag case like the old ClipboardMac code did.

* dom/Clipboard.h: Made getData non-virtual in non-legacy case.

* platform/Pasteboard.h: Added a static member function named
absoluteURLsFromPasteboardFilenames, temporary so it can be shared between
ClipboardMac and PasteboardMac. Added a readString public function member,
and a m_changeCount data member. The type of m_changeCount is long since
that can always hold an NSInteger but yet is a type we can compile without
including the header file that defines NSInteger.

* platform/mac/ClipboardMac.h: Removed getData.
* platform/mac/ClipboardMac.mm: Removed getData.
(WebCore::ClipboardMac::ClipboardMac): Added code to pass in the new
forFileDrag boolean.
(WebCore::ClipboardMac::files): Call absoluteURLsFromPasteboardFilenames
as a static member function in Pasteboard since we moved it there.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::Pasteboard): Initialize the change count, so later
pasteboard operations can check it.
(WebCore::Pasteboard::absoluteURLsFromPasteboardFilenames): Added. Moved
here from ClipboardMac.
(WebCore::absoluteURLsFromPasteboard): Ditto.
(WebCore::Pasteboard::readString): Added. Moved here from ClipboardMac.

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

8 years agoStop including UnusedParam.h
andersca@apple.com [Mon, 13 May 2013 04:24:20 +0000 (04:24 +0000)]
Stop including UnusedParam.h
https://bugs.webkit.org/show_bug.cgi?id=116003

Reviewed by Sam Weinig.

UnusedParam.h is empty now so there's no need to include it anymore.

Source/JavaScriptCore:

* API/APICast.h:
* API/tests/JSNode.c:
* API/tests/JSNodeList.c:
* API/tests/minidom.c:
* API/tests/testapi.c:
* assembler/AbstractMacroAssembler.h:
* assembler/MacroAssemblerCodeRef.h:
* bytecode/CodeBlock.cpp:
* heap/HandleStack.h:
* interpreter/JSStackInlines.h:
* jit/CompactJITCodeMap.h:
* jit/ExecutableAllocator.h:
* parser/SourceProvider.h:
* runtime/DatePrototype.cpp:
* runtime/JSNotAnObject.cpp:
* runtime/JSSegmentedVariableObject.h:
* runtime/JSVariableObject.h:
* runtime/Options.cpp:
* runtime/PropertyOffset.h:

Source/WebCore:

* Modules/encryptedmedia/CDMPrivateAVFoundation.mm:
* Modules/indexeddb/IDBFactoryBackendImpl.cpp:
* Modules/indexeddb/IDBObjectStore.cpp:
* Modules/webdatabase/DatabaseServer.cpp:
* Modules/webdatabase/DatabaseThread.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/objc/DOMObject.mm:
* css/CSSCursorImageValue.cpp:
* css/DeprecatedStyleBuilder.cpp:
* dom/EventDispatcher.cpp:
* dom/Node.cpp:
* editing/AlternativeTextController.h:
* editing/Editor.cpp:
* html/HTMLPlugInElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/parser/HTMLConstructionSite.cpp:
* html/parser/HTMLTokenizer.cpp:
* html/track/InbandTextTrack.cpp:
* inspector/InspectorCanvasInstrumentation.h:
* inspector/InspectorConsoleInstrumentation.h:
* inspector/InspectorController.cpp:
* inspector/InspectorCounters.h:
* inspector/InspectorDatabaseInstrumentation.h:
* inspector/InspectorInstrumentation.h:
* loader/DocumentThreadableLoader.cpp:
* loader/PingLoader.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* loader/cache/CachedResourceLoader.cpp:
* loader/mac/DocumentLoaderMac.cpp:
* page/ChromeClient.h:
* page/Console.cpp:
* page/FrameView.cpp:
* page/PageConsole.cpp:
* page/animation/AnimationController.cpp:
* page/animation/ImplicitAnimation.cpp:
* page/animation/KeyframeAnimation.cpp:
* platform/LocalizedStrings.cpp:
* platform/ScrollAnimator.h:
* platform/ThreadGlobalData.cpp:
* platform/blackberry/AsyncFileSystemBlackBerry.cpp:
* platform/graphics/Font.cpp:
* platform/graphics/GlyphBuffer.h:
* platform/graphics/Gradient.cpp:
* platform/graphics/ShadowBlur.cpp:
* platform/graphics/SimpleFontData.cpp:
* platform/graphics/SimpleFontData.h:
* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
* platform/graphics/blackberry/GradientBlackBerry.cpp:
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
* platform/graphics/ca/mac/WebTileLayer.mm:
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/graphics/cg/ImageBufferCG.cpp:
* platform/graphics/cg/ImageSourceCG.cpp:
* platform/graphics/clutter/PlatformClutterAnimation.cpp:
* platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
* platform/graphics/gstreamer/GStreamerVersioning.cpp:
* platform/graphics/mac/GraphicsContext3DMac.mm:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/SimpleFontDataMac.mm:
* platform/graphics/mac/WebGLLayer.mm:
* platform/graphics/mac/WebLayer.mm:
* platform/graphics/mac/WebTiledLayer.mm:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/graphics/qt/GraphicsContext3DQt.cpp:
* platform/graphics/texmap/TextureMapper.h:
* platform/graphics/wince/ImageBufferWinCE.cpp:
* platform/mac/PasteboardMac.mm:
* platform/mac/ScrollAnimatorMac.mm:
* platform/mac/ScrollViewMac.mm:
* platform/mac/ScrollbarThemeMac.mm:
* platform/mac/SharedTimerMac.mm:
* platform/mac/WebCoreFullScreenPlaceholderView.mm:
* platform/mac/WebCoreObjCExtras.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebVideoFullscreenController.mm:
* platform/mac/WebVideoFullscreenHUDWindowController.mm:
* platform/mac/WebWindowAnimation.mm:
* platform/network/blackberry/CredentialStorageBlackBerry.cpp:
* platform/network/cf/ResourceErrorCF.cpp:
* platform/network/mac/CookieStorageMac.mm:
* platform/network/mac/ResourceHandleMac.mm:
* platform/network/win/ResourceHandleWin.cpp:
* platform/text/TextEncodingDetectorICU.cpp:
* rendering/RenderFlowThread.h:
* rendering/RenderImage.cpp:
* rendering/RenderLayer.cpp:
* rendering/RenderObject.cpp:
* rendering/RenderTreeAsText.cpp:
* rendering/svg/RenderSVGResourceClipper.cpp:
* rendering/svg/RenderSVGResourceFilter.cpp:
* rendering/svg/RenderSVGResourceGradient.cpp:
* rendering/svg/RenderSVGResourceMasker.cpp:
* rendering/svg/SVGRenderSupport.cpp:
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
* workers/WorkerContext.cpp:
* workers/WorkerScriptLoader.cpp:
* xml/XMLHttpRequest.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* ewk/ewk_js.cpp:
* ewk/ewk_security_origin.cpp:
* ewk/ewk_view.cpp:
* ewk/ewk_web_database.cpp:

Source/WebKit/gtk:

* webkit/webkitapplicationcache.cpp:

Source/WebKit/mac:

* Plugins/WebNetscapePluginEventHandlerCocoa.mm:
* WebView/WebDashboardRegion.mm:
* WebView/WebFullScreenController.mm:

Source/WebKit/win:

* WebSecurityOrigin.cpp:

Source/WebKit2:

* UIProcess/API/C/WKContext.cpp:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/efl/ewk_text_checker.cpp:
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
* UIProcess/mac/WKFullScreenWindowController.mm:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/ResourceCache/WebResourceCacheManager.cpp:

Source/WTF:

* wtf/Atomics.h:
* wtf/BoundsCheckedPointer.h:
* wtf/DateMath.h:
* wtf/FastMalloc.cpp:
* wtf/NumberOfCores.cpp:
* wtf/OSAllocator.h:
* wtf/OSAllocatorPosix.cpp:
* wtf/PageAllocation.h:
* wtf/RefCounted.h:
* wtf/TCSystemAlloc.cpp:
* wtf/ThreadingPthreads.cpp:
* wtf/Vector.h:
* wtf/dtoa/cached-powers.cc:
* wtf/dtoa/fixed-dtoa.cc:

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

8 years ago[Mac] Move clearAllData from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 03:51:12 +0000 (03:51 +0000)]
[Mac] Move clearAllData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116001

Reviewed by Andreas Kling.

* dom/Clipboard.cpp:
(WebCore::Clipboard::clearAllData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.

* dom/Clipboard.h: Made clearAllData non-virtual in non-legacy case.

* platform/mac/ClipboardMac.h: Removed clearAllData.
* platform/mac/ClipboardMac.mm: Ditto.

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

8 years agoMove UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
andersca@apple.com [Mon, 13 May 2013 02:56:24 +0000 (02:56 +0000)]
Move UNUSED_PARAM and UNUSED_LABEL macros to Compiler.h
https://bugs.webkit.org/show_bug.cgi?id=115997

Reviewed by Benjamin Poulain.

UnusedParam.h predates Compiler.h and the macros defined there should just go into Compiler.h

* wtf/Compiler.h:
(unusedParam):
* wtf/UnusedParam.h:

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

8 years ago[Mac] Move clearData from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 02:41:35 +0000 (02:41 +0000)]
[Mac] Move clearData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116000

Reviewed by Andreas Kling.

* dom/Clipboard.cpp:
(WebCore::Clipboard::clearData): Added. Calls through to Pasteboard after
doing the canWriteData check, which is part of DOM rules, not the platform.

* dom/Clipboard.h: Made clearData non-virtual in non-legacy case.

* platform/Pasteboard.h: Added an overload of the clear function that takes
a single type and clears only that type. Also temporarily exported the
cocoaTypeFromHTMLClipboardType function as a static member so it can be used
in both ClipboardMac and PasteboardMac during the transition.

* platform/mac/ClipboardMac.h: Removed clearData.
* platform/mac/ClipboardMac.mm: Removed clearData.
(WebCore::ClipboardMac::getData): Changed to call cocoaTypeFromHTMLClipboardType
as a Pasteboard class static member function.
(WebCore::ClipboardMac::setData): Ditto.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::cocoaTypeFromHTMLClipboardType): Moved here from
ClipboardMac.
(WebCore::Pasteboard::clear): Added. Moved here from ClipboardMac.

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

8 years ago[Mac] Move hasData from ClipboardMac to PasteboardMac
darin@apple.com [Mon, 13 May 2013 02:28:16 +0000 (02:28 +0000)]
[Mac] Move hasData from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=115999

Reviewed by Andreas Kling.

* dom/Clipboard.cpp:
(WebCore::Clipboard::hasData): Added. Calls through to Pasteboard.

* dom/Clipboard.h: Added LEGACY_VIRTUAL and LEGACY_PURE macros,
only for within this header file. These help us keep many functions
as pure virtual in the legacy style Clipboard class, but have them
be non-virtual in the normal/future style. Use LEGACY_VIRTUAL and
LEGACY_PURE to make the hasData member non-virtual.

* platform/Pasteboard.h: Added hasData, and added some blank lines and a FIXME.

* platform/mac/ClipboardMac.h: Removed hasData override.
* platform/mac/ClipboardMac.mm: Ditto.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::hasData): Added. Moved code here from ClipboardMac.

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

8 years agoBUILD FIX (r149971): sudden termination is a Mac-only concept
ddkilzer@apple.com [Mon, 13 May 2013 02:14:42 +0000 (02:14 +0000)]
BUILD FIX (r149971): sudden termination is a Mac-only concept

* WebCore.exp.in: Move sudden termination symbols to Mac-only
section.

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

8 years agoNode: Use FINAL instead of the non-virtual shadowing hack.
akling@apple.com [Mon, 13 May 2013 02:00:28 +0000 (02:00 +0000)]
Node: Use FINAL instead of the non-virtual shadowing hack.
<http://webkit.org/b/115995>

Reviewed by Anders Carlsson.

Decorate Element/Attr implementations of prefix/localName/namespaceURI getters with FINAL
so that call sites with a more specific pointer type than Node* can avoid the virtual dispatch.

* dom/Attr.h:
* dom/Element.h:
* dom/Node.cpp:
* dom/Node.h:

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

8 years agoREGRESSION (r149668): 4 reftest failures under fast/regions on GTK
ryuan.choi@samsung.com [Mon, 13 May 2013 01:31:50 +0000 (01:31 +0000)]
REGRESSION (r149668): 4 reftest failures under fast/regions on GTK
https://bugs.webkit.org/show_bug.cgi?id=115783

Unreviewed rebaseline. They were fixed after r149802.

* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:

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

8 years ago[Mac] Give every Clipboard an underlying Pasteboard
darin@apple.com [Mon, 13 May 2013 01:25:46 +0000 (01:25 +0000)]
[Mac] Give every Clipboard an underlying Pasteboard
https://bugs.webkit.org/show_bug.cgi?id=115979

Reviewed by Andreas Kling.

This is the first step in Clipboard and Pasteboard refactoring
to fix the overlap and many layering violations.

* dom/Clipboard.cpp:
(WebCore::Clipboard::Clipboard): Add an m_pasteboard data member,
Mac-only for now, but eventually for all platforms.
(WebCore::Clipboard::~Clipboard): No longer inline the destructor.

* dom/Clipboard.h: Add WTF_USE_LEGACY_STYLE_ABSTRACT_CLIPBOARD_CLASS
flag, currently true for all non-Mac platforms. Make the constructor
no longer inline. Added a PassOwnPtr<Pasteboard> argument to the
constructor and an OwnPtr<Pasteboard> data member.

* platform/Pasteboard.h: Added a create function to make it easy
to create a pasteboard given a pasteboard name.

* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Create a pasteboard and pass
it to the Clipboard constructor.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::create): Added.

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

8 years agoUnload event listeners should prevent Safari from insta-killing the web process on...
akling@apple.com [Sun, 12 May 2013 23:16:30 +0000 (23:16 +0000)]
Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
<http://webkit.org/b/115988>
<rdar://problem/13870943>

Reviewed by Anders Carlsson.

Source/WebCore:

Add two methods to Chrome (and ChromeClient):

    - enableSuddenTermination()
    - disableSuddenTermination()

..and call these from DOMWindow instead of the free global functions.

For WebKit1, it just calls the NSProcessInfo methods to keep behavior the same.
For WebKit2, the new methods plumb through the information to the UI process.

Also updated the DOMWindow logic to think in terms of per-DOMWindow sudden termination counters
instead of a process-global one, since that gets confusing in a WK2 world.
When a DOMWindow transitions between having/not having unload/beforeunload event listeners,
we send a notification to the Chrome.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* page/Chrome.h:
(WebCore::Chrome::enableSuddenTermination):
(WebCore::Chrome::disableSuddenTermination):
* page/ChromeClient.h:
(WebCore::ChromeClient::enableSuddenTermination):
(WebCore::ChromeClient::disableSuddenTermination):
* page/DOMWindow.cpp:
(WebCore::addUnloadEventListener):
(WebCore::removeUnloadEventListener):
(WebCore::removeAllUnloadEventListeners):
(WebCore::addBeforeUnloadEventListener):
(WebCore::removeBeforeUnloadEventListener):
(WebCore::removeAllBeforeUnloadEventListeners):
(WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
(WebCore::DOMWindow::dispatchAllPendingUnloadEvents):
(WebCore::DOMWindow::enableSuddenTermination):
(WebCore::DOMWindow::disableSuddenTermination):
* page/DOMWindow.h:
(DOMWindow):

Source/WebKit/mac:

* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::enableSuddenTermination):
(WebChromeClient::disableSuddenTermination):

Source/WebKit2:

Let WebCore control the UI process's suppression of the sudden termination mechanism.
This is implemented by having WebChromeClient push Enable/DisableSuddenTermination messages
over to the UI process where the appropriate NSProcessInfo calls are made.

We also use this information when deciding whether to insta-kill a web process when its last
page is closed. This mechanism is re-usable in WebCore to protect against sudden termination
by the UI process.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):
* UIProcess/WebProcessProxy.h:
(WebProcessProxy):
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::enableSuddenTermination):
(WebKit::WebChromeClient::disableSuddenTermination):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):

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

8 years agoRemove Complex.h from WTF
andersca@apple.com [Sun, 12 May 2013 21:27:43 +0000 (21:27 +0000)]
Remove Complex.h from WTF
https://bugs.webkit.org/show_bug.cgi?id=115989

Reviewed by Beth Dakin.

Source/WebCore:

Replace Complex declarations with std::complex<double>. Pass by value since the struct
is small enough to go into two registers on X86-64.

* Modules/webaudio/RealtimeAnalyser.cpp:
(WebCore::RealtimeAnalyser::doFFTAnalysis):
(WebCore::RealtimeAnalyser::getFloatFrequencyData):
(WebCore::RealtimeAnalyser::getByteFrequencyData):
(WebCore::RealtimeAnalyser::getByteTimeDomainData):
* platform/audio/Biquad.cpp:
(WebCore::Biquad::setZeroPolePairs):
(WebCore::Biquad::setAllpassPole):
(WebCore::Biquad::getFrequencyResponse):
* platform/audio/Biquad.h:
* platform/audio/FFTFrame.cpp:
(WebCore::FFTFrame::interpolateFrequencyComponents):
(WebCore::FFTFrame::extractAverageGroupDelay):
(WebCore::FFTFrame::addConstantGroupDelay):

Source/WTF:

Complex.h contains a typedef and a single function (that already has an equivalent in the STL).
The header is used by three files in WebCore, so just use std::complex<double> and std::polar directly.

* GNUmakefile.list.am:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/Complex.h: Removed.

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

8 years agoDropdowns on http://www.exploratorium.edu don't show anything
simon.fraser@apple.com [Sun, 12 May 2013 18:46:37 +0000 (18:46 +0000)]
Dropdowns on exploratorium.edu don't show anything
https://bugs.webkit.org/show_bug.cgi?id=115991

Source/WebCore:

Reviewed by Dan Bernstein.

We can't optimize away the backing store of a layer by saying that
it paints into a composited ancestor if its composited bounds are not contained
by that ancestor.

Test: compositing/backing/no-backing-for-clip-overhang.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Pass in our
previously computed composited bounds relative to our composited ancestor,
and its composited bounds.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore): If the ancestor's
composited bounds don't contain the layer's composited bounds, the layer
needs its own backing store.
* rendering/RenderLayerCompositor.h:

LayoutTests:

Reviewed by Dan Bernstein.

Layer tree dump test with an overflow:hidden that projects outside its
ancestor, and is forced to composite by a composited child.

* compositing/backing/no-backing-for-clip-overhang-expected.txt: Added.
* compositing/backing/no-backing-for-clip-overhang.html: Added.

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

8 years ago[GTK] Add a basic cmake build for WTF and JavaScriptCore
mrobinson@webkit.org [Sun, 12 May 2013 18:22:11 +0000 (18:22 +0000)]
[GTK] Add a basic cmake build for WTF and JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=115967

Reviewed by Laszlo Gombos.

.:

* CMakeLists.txt: Add GTK+ to the list of ports.
* Source/CMakeLists.txt: We do not try to build WebCoreTestSupport when WebCore is disabled.
* Source/cmake/FindGAIL3.cmake: Added.
* Source/cmake/FindGDK3.cmake: Added.
* Source/cmake/FindGStreamer.cmake: Use the passed in minimum version.
* Source/cmake/FindGTK3.cmake: Added.
* Source/cmake/FindXt.cmake: Added.
* Source/cmake/OptionsEfl.cmake: Pass in the minimum version.
* Source/cmake/OptionsGTK.cmake: Added.

Source/JavaScriptCore:

* PlatformGTK.cmake: Added.
* shell/PlatformGTK.cmake: Added.

Source/WTF:

* wtf/PlatformGTK.cmake: Added.

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

8 years agoUnreviewed, rolling out r149955.
commit-queue@webkit.org [Sun, 12 May 2013 18:12:29 +0000 (18:12 +0000)]
Unreviewed, rolling out r149955.
http://trac.webkit.org/changeset/149955
https://bugs.webkit.org/show_bug.cgi?id=115990

Broke lots of tests (Requested by smfr on #webkit).

Source/WebCore:

* WebCore.exp.in:
* rendering/InlineFlowBox.h:
* rendering/InlineTextBox.h:
(InlineTextBox):
* rendering/RenderApplet.h:
* rendering/RenderBR.h:
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::virtualContinuation):
(WebCore::RenderBlock::virtualChildren):
(WebCore::RenderBlock::isRenderBlock):
(WebCore::RenderBlock::isBlockFlow):
(WebCore::RenderBlock::isInlineBlockOrInlineTable):
(WebCore::RenderBlock::dirtyLinesFromChangedChild):
(WebCore::RenderBlock::collapsedMarginBefore):
(WebCore::RenderBlock::collapsedMarginAfter):
* rendering/RenderBox.h:
(WebCore::RenderBox::borderBoundingBox):
(RenderBox):
(WebCore::RenderBox::marginLogicalLeft):
(WebCore::RenderBox::marginLogicalRight):
* rendering/RenderBoxModelObject.h:
(WebCore::RenderBoxModelObject::isBoxModelObject):
* rendering/RenderButton.h:
* rendering/RenderCombineText.h:
* rendering/RenderCounter.h:
* rendering/RenderDeprecatedFlexibleBox.h:
* rendering/RenderDetailsMarker.h:
* rendering/RenderEmbeddedObject.h:
(RenderEmbeddedObject):
(WebCore::RenderEmbeddedObject::isEmbeddedObject):
(WebCore::RenderEmbeddedObject::virtualChildren):
* rendering/RenderFieldset.h:
* rendering/RenderFileUploadControl.h:
* rendering/RenderFlexibleBox.h:
* rendering/RenderFlowThread.h:
* rendering/RenderFrame.h:
* rendering/RenderFrameSet.h:
* rendering/RenderFullScreen.cpp:
* rendering/RenderFullScreen.h:
* rendering/RenderGrid.h:
* rendering/RenderHTMLCanvas.h:
* rendering/RenderIFrame.h:
* rendering/RenderImage.h:
(RenderImage):
(WebCore::RenderImage::isRenderImage):
* rendering/RenderInline.h:
(RenderInline):
(WebCore::RenderInline::virtualContinuation):
(WebCore::RenderInline::virtualChildren):
(WebCore::RenderInline::isRenderInline):
(WebCore::RenderInline::layout):
(WebCore::RenderInline::requiresLayer):
(WebCore::RenderInline::offsetWidth):
(WebCore::RenderInline::offsetHeight):
(WebCore::RenderInline::borderBoundingBox):
(WebCore::RenderInline::dirtyLinesFromChangedChild):
* rendering/RenderLayerModelObject.h:
* rendering/RenderListBox.h:
* rendering/RenderListItem.h:
* rendering/RenderListMarker.h:
* rendering/RenderMedia.h:
(WebCore::RenderMedia::virtualChildren):
(WebCore::RenderMedia::canHaveChildren):
(WebCore::RenderMedia::isMedia):
(WebCore::RenderMedia::isImage):
(WebCore::RenderMedia::requiresForcedStyleRecalcPropagation):
* rendering/RenderMediaControlElements.h:
* rendering/RenderMenuList.h:
* rendering/RenderMeter.h:
* rendering/RenderMultiColumnBlock.h:
* rendering/RenderMultiColumnFlowThread.h:
* rendering/RenderMultiColumnSet.h:
* rendering/RenderNamedFlowThread.h:
* rendering/RenderPart.h:
(RenderPart):
(WebCore::RenderPart::isRenderPart):
(WebCore::RenderPart::renderName):
* rendering/RenderProgress.h:
* rendering/RenderRegion.h:
(WebCore::RenderRegion::isRenderRegion):
* rendering/RenderRegionSet.h:
* rendering/RenderReplaced.h:
(RenderReplaced):
(WebCore::RenderReplaced::renderName):
* rendering/RenderReplica.h:
* rendering/RenderRuby.h:
* rendering/RenderRubyBase.h:
* rendering/RenderRubyRun.h:
* rendering/RenderRubyText.h:
* rendering/RenderScrollbarPart.h:
* rendering/RenderSearchField.h:
* rendering/RenderSlider.h:
* rendering/RenderSnapshottedPlugIn.h:
(RenderSnapshottedPlugIn):
* rendering/RenderTable.h:
(RenderTable):
(WebCore::RenderTable::renderName):
(WebCore::RenderTable::isTable):
(WebCore::RenderTable::avoidsFloats):
* rendering/RenderTableCaption.h:
* rendering/RenderTableCell.h:
* rendering/RenderTableCol.h:
* rendering/RenderTableRow.h:
* rendering/RenderTableSection.h:
* rendering/RenderText.h:
(RenderText):
(WebCore::RenderText::marginLeft):
(WebCore::RenderText::marginRight):
(WebCore::RenderText::styleWillChange):
(WebCore::RenderText::length):
(WebCore::RenderText::paint):
(WebCore::RenderText::layout):
* rendering/RenderTextControl.h:
(RenderTextControl):
(WebCore::RenderTextControl::renderName):
(WebCore::RenderTextControl::isTextControl):
(WebCore::RenderTextControl::avoidsFloats):
* rendering/RenderTextControlMultiLine.h:
* rendering/RenderTextControlSingleLine.h:
(RenderTextControlSingleLine):
(WebCore::RenderTextControlSingleLine::isTextField):
* rendering/RenderTextFragment.h:
* rendering/RenderTextTrackCue.h:
* rendering/RenderVideo.h:
* rendering/RenderView.h:
* rendering/RenderWidget.h:
(RenderWidget):
(WebCore::RenderWidget::isWidget):
* rendering/RenderWordBreak.h:
* rendering/RootInlineBox.h:
(RootInlineBox):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/svg/RenderSVGBlock.h:
(RenderSVGBlock):
* rendering/svg/RenderSVGContainer.h:
(WebCore::RenderSVGContainer::setNeedsBoundariesUpdate):
(WebCore::RenderSVGContainer::virtualChildren):
(WebCore::RenderSVGContainer::isSVGContainer):
(WebCore::RenderSVGContainer::renderName):
(RenderSVGContainer):
(WebCore::RenderSVGContainer::objectBoundingBox):
(WebCore::RenderSVGContainer::strokeBoundingBox):
(WebCore::RenderSVGContainer::repaintRectInLocalCoordinates):
* rendering/svg/RenderSVGEllipse.h:
* rendering/svg/RenderSVGForeignObject.h:
* rendering/svg/RenderSVGGradientStop.h:
* rendering/svg/RenderSVGHiddenContainer.h:
(WebCore::RenderSVGHiddenContainer::renderName):
(RenderSVGHiddenContainer):
(WebCore::RenderSVGHiddenContainer::isSVGHiddenContainer):
* rendering/svg/RenderSVGImage.h:
* rendering/svg/RenderSVGInline.h:
(WebCore::RenderSVGInline::renderName):
(WebCore::RenderSVGInline::requiresLayer):
(WebCore::RenderSVGInline::isSVGInline):
(RenderSVGInline):
* rendering/svg/RenderSVGInlineText.h:
* rendering/svg/RenderSVGModelObject.h:
(WebCore::RenderSVGModelObject::requiresLayer):
(RenderSVGModelObject):
* rendering/svg/RenderSVGPath.h:
* rendering/svg/RenderSVGRect.h:
* rendering/svg/RenderSVGResourceClipper.h:
* rendering/svg/RenderSVGResourceContainer.h:
(RenderSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::isSVGResourceContainer):
(WebCore::RenderSVGResourceContainer::toRenderSVGResourceContainer):
* rendering/svg/RenderSVGResourceFilter.h:
* rendering/svg/RenderSVGResourceFilterPrimitive.h:
* rendering/svg/RenderSVGResourceGradient.h:
(RenderSVGResourceGradient):
(WebCore::RenderSVGResourceGradient::resourceBoundingBox):
* rendering/svg/RenderSVGResourceLinearGradient.h:
* rendering/svg/RenderSVGResourceMarker.h:
* rendering/svg/RenderSVGResourceMasker.h:
* rendering/svg/RenderSVGResourcePattern.h:
* rendering/svg/RenderSVGResourceRadialGradient.h:
* rendering/svg/RenderSVGRoot.h:
* rendering/svg/RenderSVGShape.h:
(WebCore::RenderSVGShape::setNeedsBoundariesUpdate):
(WebCore::RenderSVGShape::setNeedsTransformUpdate):
(WebCore::RenderSVGShape::repaintRectInLocalCoordinates):
(WebCore::RenderSVGShape::localToParentTransform):
(WebCore::RenderSVGShape::localTransform):
(WebCore::RenderSVGShape::isSVGShape):
(RenderSVGShape):
(WebCore::RenderSVGShape::objectBoundingBox):
(WebCore::RenderSVGShape::strokeBoundingBox):
* rendering/svg/RenderSVGTSpan.h:
* rendering/svg/RenderSVGText.h:
* rendering/svg/RenderSVGTextPath.h:
* rendering/svg/RenderSVGTransformableContainer.h:
* rendering/svg/RenderSVGViewportContainer.h:

Tools:

* Scripts/webkitpy/port/mac.py:

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

8 years agoMove defines to platform
mrobinson@webkit.org [Sun, 12 May 2013 17:58:47 +0000 (17:58 +0000)]
Move defines to platform

[GTK] Move defines that will never be configured to Platform.h
https://bugs.webkit.org/show_bug.cgi?id=115965

Reviewed by Andreas Kling.

.:

* Source/autotools/SetupAutoconfHeader.m4: Move some unchanging defines to Platform.h.

Source/WTF:

* wtf/Platform.h: Add new defines that were previously in the autoconf header.

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

8 years agoSimplify AutodrainedPool
andersca@apple.com [Sun, 12 May 2013 17:50:58 +0000 (17:50 +0000)]
Simplify AutodrainedPool
https://bugs.webkit.org/show_bug.cgi?id=115986

Reviewed by Andreas Kling.

Source/WebCore:

Remove calls to AutodrainedPool::cycle as well as the iteration counter passed to the constructor.
Instead, just declare RAII pools where it seems necessary.

* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::databaseThread):
* fileapi/FileThread.cpp:
(WebCore::FileThread::runLoop):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::setIconDataForIconURL):
(WebCore::IconDatabase::performURLImport):
(WebCore::IconDatabase::readFromDatabase):

Source/WTF:

Remove the ability to cycle an AutodrainedPool, as well as the iteration count.
Creating and draining pools is fast enough now that we don't need to try to be clever about it.

* wtf/AutodrainedPool.h:
(AutodrainedPool):
(WTF::AutodrainedPool::AutodrainedPool):
* wtf/AutodrainedPoolMac.mm:
(WTF::AutodrainedPool::AutodrainedPool):

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

8 years ago <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.
ap@apple.com [Sun, 12 May 2013 17:47:29 +0000 (17:47 +0000)]
    <rdar://problem/13402976> Sandbox violations in com.nvidia.OpenGL on Lion.

        Reviewed by Dan Bernstein.

        * WebProcess/com.apple.WebProcess.sb.in: Silence the violations (on Lion only).

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

8 years agoMove RemoteMemoryReader into FastMalloc.cpp
andersca@apple.com [Sun, 12 May 2013 16:45:26 +0000 (16:45 +0000)]
Move RemoteMemoryReader into FastMalloc.cpp
https://bugs.webkit.org/show_bug.cgi?id=115985

Reviewed by Andreas Kling.

RemoteMemoryReader is only used in FastMalloc.cpp, and even had one of its member functions
implemented there, so move the entire class template there and remove MallocZoneSupport.h.

* GNUmakefile.list.am:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.vcxproj/WTF.vcxproj:
* WTF.vcxproj/WTF.vcxproj.filters:
* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/FastMalloc.cpp:
(WTF):
(PageHeapAllocator):
(WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
* wtf/MallocZoneSupport.h: Removed.

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

8 years agoApply FINAL to the Node hierarchy.
akling@apple.com [Sun, 12 May 2013 15:12:51 +0000 (15:12 +0000)]
Apply FINAL to the Node hierarchy.
<http://webkit.org/b/115984>

Mostly from Blink r149454 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149454>

A couple of the stable DOM/ microbenchmarks are perf positive on Linux clang:

    - CloneNodes time reduced from 162.4 to 156.5 ms.
    - CreateNodes time reduced from 113.9 to 104.9 ms.

* dom/: Beat things with the FINAL stick.
* html/: Ditto.
* svg/: Ditto.

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

8 years agoDevirtualize some things on Document.
akling@apple.com [Sun, 12 May 2013 14:23:09 +0000 (14:23 +0000)]
Devirtualize some things on Document.

From Blink r149967 by <esprehn@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=149967>

Several methods on Document are virtual but don't override a super class method
and don't need to be virtual. This patch devirtualizes:

    - createElementNS()
    - finishedParsing()
    - suspendScriptedAnimationControllerCallbacks()
    - resumeScriptedAnimationControllerCallbacks()

It also removes the suspend and resume callbacks from ScriptExecutionContext
since they didn't need to be there.

* dom/Document.h:
* dom/ScriptExecutionContext.h:

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

8 years agoRemove redundant call to removeAllEventListeners() in Document::open().
akling@apple.com [Sun, 12 May 2013 14:05:37 +0000 (14:05 +0000)]
Remove redundant call to removeAllEventListeners() in Document::open().

From Blink r150175 by <dcheng@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=150175>

Document::open() already calls Document::removeAllEventListeners(), which
removes the event listeners from the DOMWindow it's attached to, so
there's no need to do it manually here as well.

* dom/Document.cpp:
(WebCore::Document::open):

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

8 years agoRebaseline fast/js/global-constructors-attributes.html for mac-lion after r149920.
akling@apple.com [Sun, 12 May 2013 13:57:27 +0000 (13:57 +0000)]
Rebaseline fast/js/global-constructors-attributes.html for mac-lion after r149920.

* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:

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

8 years agoApply FINAL to the RenderObject hierarchy.
akling@apple.com [Sun, 12 May 2013 13:38:33 +0000 (13:38 +0000)]
Apply FINAL to the RenderObject hierarchy.
<http://webkit.org/b/115977>

Mostly from Blink r148795 by <cevans@chromium.org>
<http://src.chromium.org/viewvc/blink?view=revision&revision=148795>

* rendering/: Beat things with the FINAL stick.
* WebCore.exp.in: Export a now-needed symbol.

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

8 years ago[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
carlosgc@webkit.org [Sun, 12 May 2013 09:05:54 +0000 (09:05 +0000)]
[GTK] Remove unnecessary GTK_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115914

Reviewed by Martin Robinson.

Source/WebCore:

* platform/graphics/gtk/FullscreenVideoControllerGtk.cpp:
(WebCore::FullscreenVideoControllerGtk::hideHud):
(WebCore::FullscreenVideoControllerGtk::initializeWindow):
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:
* platform/gtk/WidgetRenderingContext.cpp:
(WebCore::WidgetRenderingContext::WidgetRenderingContext):
* plugins/gtk/gtk2xtbin.c:
(gtk_xtbin_realize):

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::contentsSizeChanged):
* WebCoreSupport/FrameLoaderClientGtk.cpp:
(WebKit::FrameLoaderClient::transitionToCommittedForNewPage):
* tests/testapplicationcache.c:
* tests/testatk.c:
* tests/testatkroles.c:
(main):
* tests/testcontextmenu.c:
* tests/testcopyandpaste.c:
(main):
* tests/testdomdocument.c:
* tests/testdomdomwindow.c:
* tests/testdomnode.c:
* tests/testdownload.c:
(main):
* tests/testfavicondatabase.c:
(main):
* tests/testglobals.c:
* tests/testhittestresult.c:
* tests/testhttpbackend.c:
(main):
* tests/testkeyevents.c:
(main):
* tests/testloading.c:
* tests/testmimehandling.c:
(main):
* tests/testnetworkrequest.c:
(main):
* tests/testnetworkresponse.c:
(main):
* tests/testwebbackforwardlist.c:
(main):
* tests/testwebdatasource.c:
(main):
* tests/testwebframe.c:
(main):
* tests/testwebhistoryitem.c:
(main):
* tests/testwebinspector.c:
(main):
* tests/testwebplugindatabase.c:
(main):
* tests/testwebresource.c:
(main):
* tests/testwebsettings.c:
(main):
* tests/testwebview.c:
* tests/testwindow.c:
(main):
* webkit/webkitwebview.cpp:
(webkit_web_view_realize):
(webkit_web_view_show_help):
(webkit_web_view_class_init):
(webkit_web_view_set_tooltip_text):

Source/WebKit2:

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseRealize):

Tools:

* GtkLauncher/main.c:
(createToolbar):
* MiniBrowser/gtk/BrowserWindow.c:
(_BrowserWindow):
(browserWindowSetStatusText):
(fullScreenMessageTimeoutCallback):
(webViewEnterFullScreen):
(webViewLeaveFullScreen):
(browserWindowFinalize):
(browserWindowConstructed):
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::continuousMouseScrollBy):

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

8 years ago[Windows] Unreviewed build fix after r149932
bfulgham@apple.com [Sun, 12 May 2013 06:15:52 +0000 (06:15 +0000)]
[Windows] Unreviewed build fix after r149932

Patch by Brent Fulgham <bfulgham@apple.com> on 2013-05-11

* make-export-file-generator: Don't attempt to import
(or use) non-existent cxxabi functions on Windows.

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

8 years agoAdd more info to compositing log channel output
simon.fraser@apple.com [Sun, 12 May 2013 05:39:14 +0000 (05:39 +0000)]
Add more info to compositing log channel output
https://bugs.webkit.org/show_bug.cgi?id=115978

Reviewed by Dean Jackson.

Add to compositing log channel output whether a layer paints
into its compositing ancestor.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):

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

8 years agoREGRESSION: Fixed background on ColterReed.com scrolls
simon.fraser@apple.com [Sun, 12 May 2013 04:54:04 +0000 (04:54 +0000)]
REGRESSION: Fixed background on ColterReed.com scrolls
https://bugs.webkit.org/show_bug.cgi?id=115951

Source/WebCore:

Reviewed by Beth Dakin.

The logic for painting the fixed root background into its own layer was
broken when the document element's layer was composited. This could be caused
by a negative z-index child of the body, or by an explicit compositing-causing
style on the <html>.

There were two issues. First, when painting the layer for the fixed root
background, we would simply short-circuit the fixed background paint in
RenderLayer::paintLayer(), when checking for a composited layer. We have
to continue to paint through the composited <html> layer to get the root
background in this case.

Secondly, RenderLayerBacking::paintIntoLayer() would only set the PaintLayerPaintingSkipRootBackground
flag if this RenderLayerBacking had a m_backgroundLayer. However, when the <html> is
composited, we need to skip painting the root layer for both the RenderView's backing,
and for the <html>'s backing. Checking whether there is *any* layer that paints
the fixed root background (i.e. checking compositor()->fixedRootBackgroundLayer())
is a simple way to fix this test.

Tests: platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html
       platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html

* rendering/RenderLayer.cpp:
(WebCore::paintForFixedRootBackground):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):

LayoutTests:

Reviewed by Beth Dakin.

Tests with a fixed background and two different ways of making the <html> composited.

* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html-expected.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-composited-html.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed-expected.html: Added.
* platform/mac-wk2/tiled-drawing/fixed-background/fixed-background-negative-z-index-fixed.html: Added.

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

8 years agoPossible crash when going Back while loading PDF
simon.fraser@apple.com [Sun, 12 May 2013 04:28:15 +0000 (04:28 +0000)]
Possible crash when going Back while loading PDF
https://bugs.webkit.org/show_bug.cgi?id=115972

Reviewed by Dan Bernstein.

It's possible for m_frame to be null when Document::findUnsafeParentScrollPropagationBoundary()
is called, so null-check currentFrame.

* dom/Document.cpp:
(WebCore::Document::findUnsafeParentScrollPropagationBoundary):

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

8 years ago <rdar://problem/13823864> TextCodecICU complains about ambiguous codec names...
ap@apple.com [Sun, 12 May 2013 00:53:25 +0000 (00:53 +0000)]
    <rdar://problem/13823864> TextCodecICU complains about ambiguous codec names with current ICU release
        https://bugs.webkit.org/show_bug.cgi?id=115953

        Reviewed by Darin Adler.

        Store and use canonical converter name to create converters.

        As a side effect, we now actually reuse cached converters - previously we would compare
        a standard encoding name to internal canonical one, which rarely match.

        * platform/text/TextCodecICU.h:
        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::create): Pass canonical ICU converter name to constructor.
        (WebCore::TextCodecICU::registerEncodingNames):
            - Updated terminology.
            - Added a comment that special cases should be kept in sync between registerEncodingNames
            and registerCodecs.
            - Moved maccyrillic alias to a correct section. It's not present in ICU even today.
            - Changed a few aliases to actually map to standard name, not to an overridden one
            (this doesn't change behavior since addToTextEncodingNameMap looks up canonical
            name, but is clearer).
        (WebCore::TextCodecICU::registerCodecs): Store a converter name to use with each
        canonical encoding name.
        (WebCore::TextCodecICU::TextCodecICU): Ditto.
        (WebCore::TextCodecICU::releaseICUConverter): Reset the converter to remove any
        leftover data.
        (WebCore::TextCodecICU::createICUConverter):
            - Compare converter name to converter name, not to another alias name.
            - Use proper string comparison instead of pointer comparison.
            - When creating a converter, assert that the name is not ambigous - canonical
            converter names should never be, otherwise there would be no way to create
            the converter without ambiguity.

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

8 years agoUnreviewed build fix after r149944.
rakuco@webkit.org [Sat, 11 May 2013 23:42:36 +0000 (23:42 +0000)]
Unreviewed build fix after r149944.

* Platform/CoreIPC/ArgumentEncoder.cpp: Include <sys/mman.h> for mmap(2).

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

8 years agoDon't pass malloced pointers as out-of-line data when sending Mach messages
andersca@apple.com [Sat, 11 May 2013 23:28:26 +0000 (23:28 +0000)]
Don't pass malloced pointers as out-of-line data when sending Mach messages
https://bugs.webkit.org/show_bug.cgi?id=115970
<rdar://problem/13144680>

Reviewed by Sam Weinig.

Give ArgumentEncoder an inline buffer of 512 bytes. If we need more than that, use mmap to allocate data
since that gives us fresh zero-filled memory that we can safely share.

* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::ArgumentEncoder::ArgumentEncoder):
Set up the buffer pointers to point to the inline buffer.

(CoreIPC::ArgumentEncoder::~ArgumentEncoder):
Unmap the buffer if necessary.

(CoreIPC::ArgumentEncoder::grow):
Grow the allocation exponentially, rounded up to the nearest page. This is a simplification from the
current strategy, but most messages are either tiny in which case they will fit inside the inline buffer,
or big in which case we'll end up doing less allocations + memory copying.

* Platform/CoreIPC/ArgumentEncoder.h:
(ArgumentEncoder):

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

8 years ago[Mac] The captions menu should not use a canned max-width and max-height
graouts@apple.com [Sat, 11 May 2013 21:42:44 +0000 (21:42 +0000)]
[Mac] The captions menu should not use a canned max-width and max-height
https://bugs.webkit.org/show_bug.cgi?id=115968

Reviewed by Eric Carlson.

Use more real estate to display the captions menu should the caption names
be long.

* css/mediaControlsQuickTime.css:
(video::-webkit-media-controls-closed-captions-container):
(video::-webkit-media-controls-closed-captions-track-list):
Make the captions menu scale to a max-width and max-height to allow 4px
above and below the menu, except on the right where it always aligns with
the captions icon in the media controller.
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControlsApple::createControls):
Move the captions menu element to be a child of the controls instead of
the panel such that it may scale relative to the controls when using %
CSS values.

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

8 years agoUnreviewed GTK build fix after r149904.
zandobersek@gmail.com [Sat, 11 May 2013 20:57:29 +0000 (20:57 +0000)]
Unreviewed GTK build fix after r149904.

* GNUmakefile.list.am: Adding missing build targets.

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

8 years agoBogus -webkit-columns value in fast/text/international/spaces-combined-in-vertical...
commit-queue@webkit.org [Sat, 11 May 2013 20:08:29 +0000 (20:08 +0000)]
Bogus -webkit-columns value in fast/text/international/spaces-combined-in-vertical-text.html
https://bugs.webkit.org/show_bug.cgi?id=115164

Patch by Xan Lopez <xlopez@igalia.com> on 2013-05-11
Reviewed by Rob Buis.

Remove bogus -webkit-columns property.

* fast/text/international/spaces-combined-in-vertical-text.html:

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

8 years agoUnreviewed, Fix WK2 EFL build after r149904.
ch.dumez@sisa.samsung.com [Sat, 11 May 2013 20:07:22 +0000 (20:07 +0000)]
Unreviewed, Fix WK2 EFL build after r149904.

Add new PluginInformation.cpp file to CMake.

* CMakeLists.txt:

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

8 years agoUnreviewed, fix WK2 EFL build after r149904.
ch.dumez@sisa.samsung.com [Sat, 11 May 2013 19:47:25 +0000 (19:47 +0000)]
Unreviewed, fix WK2 EFL build after r149904.

Add new WKPluginInformation.cpp file to CMake.

* CMakeLists.txt:

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

8 years agoDisallow a window to focus itself via javascript URLs or using target _self
jochen@chromium.org [Sat, 11 May 2013 19:09:01 +0000 (19:09 +0000)]
Disallow a window to focus itself via javascript URLs or using target _self
https://bugs.webkit.org/show_bug.cgi?id=115906

Reviewed by Geoffrey Garen.

Source/WebCore:

Test: fast/dom/Window/window-focus-self.html

* loader/FrameLoader.cpp:
(WebCore::createWindow):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus):

LayoutTests:

* fast/dom/Window/window-focus-self-expected.txt: Added.
* fast/dom/Window/window-focus-self.html: Added.
* platform/wk2/TestExpectations: test uses unimplemented setWindowIsKey.

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

8 years agoFix several style warnings in generated bindings
ch.dumez@sisa.samsung.com [Sat, 11 May 2013 19:07:55 +0000 (19:07 +0000)]
Fix several style warnings in generated bindings
https://bugs.webkit.org/show_bug.cgi?id=115961

Reviewed by Kentaro Hara.

Fix several style errors in the bindings generated under
Source/WebCore/bindings/scripts/test/

No new tests, no behavior change.

* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(WriteData):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateHeader):
* bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
* bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
* bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
* bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
* bindings/scripts/test/CPP/WebDOMTestException.cpp:
* bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
* bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
* bindings/scripts/test/CPP/WebDOMTestNode.cpp:
* bindings/scripts/test/CPP/WebDOMTestObj.cpp:
* bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
* bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
* bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp:
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::releaseImplIfNotNull):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::toJS):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::releaseImplIfNotNull):
* bindings/scripts/test/ObjC/DOMFloat64ArrayInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestActiveDOMObjectInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCallbackInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetterInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestEventTargetInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestExceptionInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListenerInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNamedConstructorInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestNodeInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestObjInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructorsInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterfaceInternal.h:
(WebCore):
* bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h:
(WebCore):

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

8 years agoWhen possible, terminate web processes immediately when closing their last page.
akling@apple.com [Sat, 11 May 2013 18:53:13 +0000 (18:53 +0000)]
When possible, terminate web processes immediately when closing their last page.
<http://webkit.org/b/115964>
<rdar://problem/13869266>

Reviewed by Geoffrey Garen.

When we're using a network process, there's no need for the UI process to wait for web processes
to clear resource caches and terminate nicely.

We can just kill them off right away in WebProcessProxy::removeWebPage() when the last page is closed.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):

    Terminate the child process immediately if possible.

* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::canTerminateChildProcess):
(WebKit::WebProcessProxy::shouldTerminate):

    Broke out the logic from the shouldTerminate() IPC message handler into a separate function
    so we can call it from removeWebPage().

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

8 years agoCrash when terminating a process that has not been fully launched
andersca@apple.com [Sat, 11 May 2013 18:00:40 +0000 (18:00 +0000)]
Crash when terminating a process that has not been fully launched
https://bugs.webkit.org/show_bug.cgi?id=115962
<rdar://problem/13660916>

Reviewed by Andreas Kling.

Source/WebKit2:

Handle terminating a process that has not been fully launched.

* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
If we have been invalidated, dispose the connection identifier.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::terminateProcess):
If we're still launching the process, invalidate so the client won't get an unexpected
didFinishLaunching callback.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
Check if webConnection() is null before calling it. (It will be null if the process isn't fully launched).

Tools:

Add TerminateTwice, a test that terminates a page, then reloads it and terminates it again
before the process has had a chance to be fully launched.

* TestWebKitAPI/GNUmakefile.am:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp: Added.
(TestWebKitAPI):
(TestWebKitAPI::didFinishLoadForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WebKit2.pro:

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

8 years agoMake it a build error to put invalid C++ symbol names in WebCore.exp.in
andersca@apple.com [Sat, 11 May 2013 16:09:43 +0000 (16:09 +0000)]
Make it a build error to put invalid C++ symbol names in WebCore.exp.in
https://bugs.webkit.org/show_bug.cgi?id=115958

Reviewed by Andreas Kling.

While invalid C++ symbols will eventually show up as a link error since the symbol won't be found,
this makes it easier to catch invalid symbols inside of #ifdefs.

* make-export-file-generator:
Try to demangle C++ symbols before printing them.

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

8 years agoBUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section
ddkilzer@apple.com [Sat, 11 May 2013 14:09:05 +0000 (14:09 +0000)]
BUILD FIX (r149718): Move exported symbol into ENABLE(FULLSCREEN_API) section

Fixes the following build failure when ENABLE(FULLSCREEN_API) is
off:

    Undefined symbols for architecture i386:
      "__ZNK7WebCore7Element25containsFullScreenElementEv", referenced from:
         -exported_symbol[s_list] command line option

* WebCore.exp.in: Move the symbol.

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

8 years agoUnreviewed, remove some lint accidentally left in r149929.
robert@webkit.org [Sat, 11 May 2013 12:14:17 +0000 (12:14 +0000)]
Unreviewed, remove some lint accidentally left in r149929.

* rendering/InlineFlowBox.cpp:
(WebCore::verticalAlignApplies):

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

8 years agoText flow broken in elements with vertical align top/bottom and inline elements talle...
robert@webkit.org [Sat, 11 May 2013 12:08:57 +0000 (12:08 +0000)]
Text flow broken in elements with vertical align top/bottom and inline elements taller than line-height
https://bugs.webkit.org/show_bug.cgi?id=111974

Source/WebCore:

Reviewed by Ryosuke Niwa.

Per http://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align 'vertical-align' only applies to inline and table-cell
elements.

Test: fast/css/vertical-align-block-elements.html

* rendering/InlineFlowBox.cpp:
(WebCore::isTextInBlockElement):
(WebCore):
(WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
(WebCore::InlineFlowBox::computeLogicalBoxHeights):
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):

LayoutTests:

Reviewed by Ryosuke Niwa.

* editing/execCommand/query-command-state-expected.txt:
* editing/execCommand/script-tests/query-command-state.js: Remove invalid tests, vertical-align does not apply to
  div elements.
(runTests):
* fast/css/vertical-align-block-elements-expected.html: Added.
* fast/css/vertical-align-block-elements.html: Added.

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

8 years agoMake CanvasStyle a plain object instead of an RefCounted object
benjamin@webkit.org [Sat, 11 May 2013 08:36:42 +0000 (08:36 +0000)]
Make CanvasStyle a plain object instead of an RefCounted object
https://bugs.webkit.org/show_bug.cgi?id=115775

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-11
Reviewed by Andreas Kling.

CanvasStyle is just 2 words wide. We do not gain anything from allocating
it on the heap. Change the object to be just a type and some data.

* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::toJS):
(WebCore::toHTMLCanvasStyle):
* html/HTMLCanvasElement.cpp:
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::State::State):
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::setStrokeColor):
(WebCore::CanvasRenderingContext2D::setFillColor):
(WebCore::CanvasRenderingContext2D::fullCanvasCompositedFill):
(WebCore::CanvasRenderingContext2D::drawTextInternal):
* html/canvas/CanvasRenderingContext2D.h:
(WebCore::CanvasRenderingContext2D::strokeStyle):
(CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::fillStyle):
(State):
* html/canvas/CanvasStyle.cpp:
(WebCore::CanvasStyle::CanvasStyle):
(WebCore::CanvasStyle::createFromString):
(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
(WebCore::CanvasStyle::isEquivalentColor):
(WebCore):
(WebCore::CanvasStyle::operator=):
(WebCore::CanvasStyle::applyStrokeColor):
(WebCore::CanvasStyle::applyFillColor):
* html/canvas/CanvasStyle.h:
(CanvasStyle):
(WebCore::CanvasStyle::isValid):
(WebCore::CanvasStyle::CanvasStyle):
(WebCore):
(WebCore::CanvasStyle::operator=):

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

8 years agoGradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
benjamin@webkit.org [Sat, 11 May 2013 07:56:09 +0000 (07:56 +0000)]
Gradient::platformGradient: Vector reserveCapacity -> reserveInitialCapacity
https://bugs.webkit.org/show_bug.cgi?id=115779

Reviewed by Andreas Kling.

* platform/graphics/cg/GradientCG.cpp:
(WebCore::Gradient::platformGradient): Clang is surprisingly smart at removing
all the branches of this function. Remove two more with reserveInitialCapacity.

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

8 years agoRemove irrelevant blogs from Planet WebKit
benjamin@webkit.org [Sat, 11 May 2013 07:47:44 +0000 (07:47 +0000)]
Remove irrelevant blogs from Planet WebKit
https://bugs.webkit.org/show_bug.cgi?id=115620

Reviewed by Ryosuke Niwa.

* config.ini:

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

8 years ago <rdar://problem/13666412> Clean up some edge cases of URL parsing.
ap@apple.com [Sat, 11 May 2013 05:51:04 +0000 (05:51 +0000)]
    <rdar://problem/13666412> Clean up some edge cases of URL parsing.
        https://bugs.webkit.org/show_bug.cgi?id=104919

        Reviewed by Darin Adler.

WebCore:
        * page/SecurityOrigin.cpp:
        (WebCore::schemeRequiresHost):
        (WebCore::shouldTreatAsUniqueOrigin):
        Updated function name and comments (host is not the same as authority). We still
        need this check - KURL can still produce http URLs with an empty host (even as this
        patch reduces the number of such cases). So can Gecko and current draft of URL
        Standard.
        It would be good to have a guarantee that such useless URLs can not come out of
        URL parser, as relying on downstream code re-parsing the URL correctly would be fragile.

        * platform/KURL.cpp:
        (WebCore::hostPortIsEmptyButCredentialsArePresent): Updated an argument name for
        correctness.
        (WebCore::KURL::parse):
        1. Reverted behavior changes from <http://trac.webkit.org/changeset/82181> - I could
        find no reason to allow "@" in hostnames, and having a URL like this re-parsed by
        a different parser would likely produce different results. It's better to just treat
        these edge case URLs as invalid.
        2. When hostname component is a lone colon, preserve it in parsed URL string,
        as otherwise path would get pushed in its place when re-parsing.
        3. When authority component is a lone colon, don't forget to "//" after scheme, too.
        4. Added some assertions about contents of authority component, to catch potential
        mis-parsing earlier.

LayoutTests:
        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js:
        * fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt:
        Updated expectations of one sub-test. We previously tried to keep the test passing
        as is (see bug 57291), but I couldn't find any reason to prefer the old behavior.

        * fast/url/host-expected.txt:
        * fast/url/host.html:
        Updated one subtest to new results, which match at least Gecko (original of the
        test actually claims that all browsers including Safari already do what we'll do now).

        * fast/url/segments-userinfo-vs-host-expected.txt: Added.
        * fast/url/segments-userinfo-vs-host.html: Added.
        Added a number of tests, with detailed explanations of the differences with Firefox,
        and with rationales.

        * http/tests/uri/username-with-no-hostname-expected.txt: Removed.
        * http/tests/uri/username-with-no-hostname.html-disabled: Removed.
        * platform/win/http/tests/uri/username-with-no-hostname-expected.txt: Removed.
        This test has been disabled for a long time, and being an end-to-end test for
        invalid URL handling, it would be difficult to make work again. We have multiple
        parsing tests for URLs like this.

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

8 years ago Make TextCodecICU not depend on TextEncoding
ap@apple.com [Sat, 11 May 2013 05:45:45 +0000 (05:45 +0000)]
    Make TextCodecICU not depend on TextEncoding
        https://bugs.webkit.org/show_bug.cgi?id=115848

        Reviewed by Darin Adler.

        * platform/text/TextCodecICU.cpp:
        (WebCore::TextCodecICU::create):
        (WebCore::TextCodecICU::TextCodecICU):
        (WebCore::TextCodecICU::createICUConverter):
        (WebCore::TextCodecICU::decode):
        (WebCore::TextCodecICU::encode):
        * platform/text/TextCodecICU.h:
        Use a plain encoding string in platform encoder wrapper, not a higher level concept.

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

8 years agoWeb Inspector: Implement WK2 version of WebInspectorFrontendClient::save
commit-queue@webkit.org [Sat, 11 May 2013 05:03:10 +0000 (05:03 +0000)]
Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
https://bugs.webkit.org/show_bug.cgi?id=115564

Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-05-10
Reviewed by Benjamin Poulain.

Source/WebKit/mac:

Clean up save() and append() implementations.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorFrontendClient::save):
(WebInspectorFrontendClient::append):

Source/WebKit2:

Implement InspectorFrontendHost's save() and append() methods for
Mac WebKit2. Add canSave() for all ports.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::save):
(WebKit):
(WebKit::WebInspectorProxy::append):
* UIProcess/WebInspectorProxy.h:
(WebInspectorProxy):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* UIProcess/qt/WebInspectorProxyQt.cpp:
(WebKit::WebInspectorProxy::platformSave):
(WebKit):
(WebKit::WebInspectorProxy::platformAppend):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::canSave):
(WebKit):
(WebKit::WebInspectorFrontendClient::save):
(WebKit::WebInspectorFrontendClient::append):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
(WebInspectorFrontendClient):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::save):
(WebKit):
(WebKit::WebInspector::append):
(WebKit::WebInspector::didSave):
(WebKit::WebInspector::didAppend):
* WebProcess/WebPage/WebInspector.h:
(WebInspector):
* WebProcess/WebPage/WebInspector.messages.in:
* WebProcess/WebPage/efl/WebInspectorEfl.cpp:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/mac/WebInspectorMac.mm:
(WebKit::WebInspector::canSave):
(WebKit):
* WebProcess/WebPage/qt/WebInspectorQt.cpp:
(WebKit::WebInspector::canSave):
(WebKit):

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

8 years agoRemove Mac OS X Leopard (10.5) support
l.gombos@samsung.com [Sat, 11 May 2013 01:59:15 +0000 (01:59 +0000)]
Remove Mac OS X Leopard (10.5) support
https://bugs.webkit.org/show_bug.cgi?id=107964

Reviewed by Ryosuke Niwa.

Removed the code for 10.5 and removed if-def for 10.6.

Source/WebCore:

No new tests, covered by existing tests.

* platform/LocalizedStrings.cpp:
(WebCore::contextMenuItemTagLookUpInDictionary):
* platform/graphics/cg/GraphicsContextCG.cpp:
* platform/mac/EmptyProtocolDefinitions.h:
* platform/mac/NSScrollerImpDetails.h:
* platform/mac/WebCoreSystemInterface.h:
* platform/text/mac/HyphenationMac.mm:

Source/WebKit/mac:

* DefaultDelegates/WebDefaultContextMenuDelegate.mm:
* Misc/WebKitErrors.m:
(-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
* WebCoreSupport/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* WebView/WebClipView.mm:
(-[WebClipView _immediateScrollToPoint:]):
* WebView/WebFrameView.mm:
(-[WebFrameView initWithFrame:]):
* WebView/WebView.mm:

Tools:

* DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
(convertMIMEType):
(createXMLStringFromWebArchiveData):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::authenticateSession):
(TestRunner::setTextDirection):
* WebKitTestRunner/cf/WebArchiveDumpSupport.cpp:
(convertMIMEType):
(createXMLStringFromWebArchiveData):

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

8 years agoRemove USE(OS_RANDOMNESS)
l.gombos@samsung.com [Sat, 11 May 2013 01:27:03 +0000 (01:27 +0000)]
Remove USE(OS_RANDOMNESS)
https://bugs.webkit.org/show_bug.cgi?id=108095

Reviewed by Darin Adler.

Remove the USE(OS_RANDOMNESS) guard as it is turned on for all
ports.

Source/JavaScriptCore:

* jit/JIT.cpp:
(JSC::JIT::JIT):

Source/WebCore:

No new tests as this is covered by existing tests.

* page/Crypto.cpp:
(WebCore::Crypto::getRandomValues):
* platform/UUID.cpp:
(WebCore::createCanonicalUUIDString):

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataUseFeatures.in:

Source/WTF:

* wtf/CryptographicallyRandomNumber.cpp:
(WTF::cryptographicallyRandomValues):
* wtf/CryptographicallyRandomNumber.h:
* wtf/OSRandomSource.cpp:
(WTF::cryptographicallyRandomValuesFromOS):
* wtf/OSRandomSource.h:
* wtf/Platform.h:
* wtf/RandomNumber.cpp:
(WTF::randomNumber):
* wtf/RandomNumber.h:
* wtf/RandomNumberSeed.h:
(WTF::initializeRandomNumberGenerator):

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

8 years agoRemove [NoInterfaceObject] from several WebAudio IDL interfaces
ch.dumez@sisa.samsung.com [Sat, 11 May 2013 01:24:49 +0000 (01:24 +0000)]
Remove [NoInterfaceObject] from several WebAudio IDL interfaces
https://bugs.webkit.org/show_bug.cgi?id=115894

Reviewed by Darin Adler.

Source/WebCore:

Several WebAudio IDL interfaces had [NoInterfaceObject] extended attribute set,
meaning that there was no corresponding attribute on the global window object.
This behavior is not according to the specification:
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html

This patch removes the [NoInterfaceObject] extended attribute where needed to
match the specification.

No new tests, already covered by existing tests.

* Modules/webaudio/AnalyserNode.idl:
* Modules/webaudio/AudioBuffer.idl:
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioDestinationNode.idl:
* Modules/webaudio/AudioListener.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webaudio/AudioParam.idl:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/ChannelMergerNode.idl:
* Modules/webaudio/ChannelSplitterNode.idl:
* Modules/webaudio/ConvolverNode.idl:
* Modules/webaudio/DelayNode.idl:
* Modules/webaudio/DynamicsCompressorNode.idl:
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/MediaElementAudioSourceNode.idl:
* Modules/webaudio/MediaStreamAudioDestinationNode.idl:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/ScriptProcessorNode.idl:
* Modules/webaudio/WaveShaperNode.idl:
* Modules/webaudio/WaveTable.idl:

LayoutTests:

Rebaseline fast/js/global-constructors-attributes.html now that more
global constructors are exposed.

* fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-expected.txt:

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

8 years agoCopy WKPluginInformation.h header to the WebKit2 Framework private headers.
commit-queue@webkit.org [Sat, 11 May 2013 01:23:19 +0000 (01:23 +0000)]
Copy WKPluginInformation.h header to the WebKit2 Framework private headers.
https://bugs.webkit.org/show_bug.cgi?id=115940

Patch by Remy Demarest <rdemarest@apple.com> on 2013-05-10
Reviewed by Darin Adler.

* WebKit2.xcodeproj/project.pbxproj:
Move WKPluginInformation.h file from the framework's Project Headers to
Private Headers.

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

8 years agoREGRESSION (r145680): No box shadow rendered on element with positioned child that...
simon.fraser@apple.com [Sat, 11 May 2013 00:59:25 +0000 (00:59 +0000)]
REGRESSION (r145680): No box shadow rendered on element with positioned child that obscures it
https://bugs.webkit.org/show_bug.cgi?id=115840

Source/WebCore:

Reviewed by Antti Koivisto.

In r107836, we moved some box-shadow painting into the paintFillLayer code for performance.
However, in r145680 we started to skip background painting when we know the background is
obscured. This broke shadow painting in some cases.

Fix by always painting the background fill layers if we know that they will also
paint the shadow.

Test: fast/box-shadow/box-shadow-obscured-backgrounds.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintBackground):

LayoutTests:

Reviewed by Antti Koivisto.

* fast/box-shadow/box-shadow-obscured-backgrounds-expected.html: Added.
* fast/box-shadow/box-shadow-obscured-backgrounds.html: Added.

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

8 years ago[Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.
zarvai@inf.u-szeged.hu [Sat, 11 May 2013 00:52:02 +0000 (00:52 +0000)]
[Qt][Mac] Unreviewed. Roll out the fix attempt in r149912.

* Target.pri:

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

8 years ago[Windows] Allow VS2010 Build to use VS2005 Support Libraries
bfulgham@apple.com [Sat, 11 May 2013 00:46:16 +0000 (00:46 +0000)]
[Windows] Allow VS2010 Build to use VS2005 Support Libraries
https://bugs.webkit.org/show_bug.cgi?id=115935

Reviewed by Jer Noble.

* WinLauncher/WinLauncher.vcxproj/WinLauncher.exe.manifest: Added.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj: Add reference
to the new manifest file.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters: Ditto.

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

8 years agoREGRESSION (r143626): Element shows as garbage in image gallery
simon.fraser@apple.com [Sat, 11 May 2013 00:32:05 +0000 (00:32 +0000)]
REGRESSION (r143626): Element shows as garbage in image gallery
https://bugs.webkit.org/show_bug.cgi?id=115946

Source/WebCore:

Reviewed by Antti Koivisto.

RenderLayer::backgroundIsKnownToBeOpaqueInRect() used hasVisibleContent()
to check whether the layer's content was hidden via the visibility property.
However, this assumed that a passing hasVisibleContent() check meant that the
entire area was covered by the renderers and layers checked layer.

This is not always true. It's possible to have a visibility:hidden layer
with a non-covering visbility:visible child, or even a single RenderText
child that happens to have visibility:visible style. In these situations,
hasVisibleContent() returns true but the entire area is not painted.

So we have to fall back to on a more conservative check using the
visibility style, which will give is a reliable answer for the current layer.

Tests: compositing/contents-opaque/hidden-with-visible-child.html
       compositing/contents-opaque/hidden-with-visible-text.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Antti Koivisto.

Test that dumps layers for a visibility:hidden element with a child text node,
and with a visibility:visible child. The resulting compositing layer should
not be marked as opaque.

* compositing/contents-opaque/hidden-with-visible-child-expected.txt: Added.
* compositing/contents-opaque/hidden-with-visible-child.html: Added.
* compositing/contents-opaque/hidden-with-visible-text-expected.txt: Added.
* compositing/contents-opaque/hidden-with-visible-text.html: Added.

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

8 years agoGarbage down left side of nytimes.com page (if subscriber)
simon.fraser@apple.com [Sat, 11 May 2013 00:31:59 +0000 (00:31 +0000)]
Garbage down left side of nytimes.com page (if subscriber)
https://bugs.webkit.org/show_bug.cgi?id=115839

Source/WebCore:

Reviewed by Antti Koivisto.

RenderLayer::backgroundIsKnownToBeOpaqueInRect() would incorrectly return true
for layers where the given rect wasn't contained in the background rect, but
where some child layer obscured the rect, even though clipping hid part
of that child layer.

So bail from RenderLayer::backgroundIsKnownToBeOpaqueInRect() if we have
any overflow clipping. This could be enhanced in future to test whether child
layers obscure the clipping rect, but that would be more expensive.

Test: compositing/contents-opaque/overflow-hidden-child-layers.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):

LayoutTests:

Reviewed by Antti Koivisto.

* compositing/contents-opaque/overflow-hidden-child-layers-expected.txt: Added.
* compositing/contents-opaque/overflow-hidden-child-layers.html: Added.

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

8 years agoFix AppleConnect issues for WiFi interfaces
commit-queue@webkit.org [Fri, 10 May 2013 23:42:07 +0000 (23:42 +0000)]
Fix AppleConnect issues for WiFi interfaces
<rdar://problem/13776227&13776240&13776281>
https://bugs.webkit.org/show_bug.cgi?id=115932

Patch by Simon Cooper <scooper@apple.com> on 2013-05-10
Reviewed by Alexey Proskuryakov.

Add support for WiFi interfaces for the AppleConnect plugin.
Remove the FIXME.

* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:

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

8 years ago[Qt][Mac] Unreviewed speculative build fix after r149904.
zarvai@inf.u-szeged.hu [Fri, 10 May 2013 23:36:19 +0000 (23:36 +0000)]
[Qt][Mac] Unreviewed speculative build fix after r149904.

* Target.pri:

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

8 years agoRename StructureCheckHoistingPhase to TypeCheckHoistingPhase
mhahnenberg@apple.com [Fri, 10 May 2013 23:15:07 +0000 (23:15 +0000)]
Rename StructureCheckHoistingPhase to TypeCheckHoistingPhase
https://bugs.webkit.org/show_bug.cgi?id=115938

We're going to add some more types of check hoisting soon, so let's have the right name here.

Rubber stamped by Filip Pizlo.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* dfg/DFGStructureCheckHoistingPhase.cpp: Removed.
* dfg/DFGStructureCheckHoistingPhase.h: Removed.
* dfg/DFGTypeCheckHoistingPhase.cpp: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.cpp.
(JSC::DFG::TypeCheckHoistingPhase::TypeCheckHoistingPhase):
(JSC::DFG::performTypeCheckHoisting):
* dfg/DFGTypeCheckHoistingPhase.h: Copied from Source/JavaScriptCore/dfg/DFGStructureCheckHoistingPhase.h.

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

8 years ago[Qt] Unreviewed buildfix after r149904.
zarvai@inf.u-szeged.hu [Fri, 10 May 2013 22:50:47 +0000 (22:50 +0000)]
[Qt] Unreviewed buildfix after r149904.

* Target.pri:

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

8 years agoFix some compiler warnings (miscellaneous)
zhajiang@rim.com [Fri, 10 May 2013 21:28:14 +0000 (21:28 +0000)]
Fix some compiler warnings (miscellaneous)
https://bugs.webkit.org/show_bug.cgi?id=80790

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-05-10.
Reviewed by Rob Buis.

Source/WebKit/blackberry:

Fix the following warnings for BlackBerry:
BackingStore.cpp:852:60: warning: suggest parentheses around '&&' within
'||' [-Wparentheses].
WebPage.cpp:2858:40: warning: suggest parentheses around assignment used
as truth value [-Wparentheses].
WebPage.cpp:2880:42: warning: suggest parentheses around assignment used
as truth value [-Wparentheses]

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::updateTilesAfterBackingStoreRectChange):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::adjustRectOffsetForFrameOffset):
(BlackBerry::WebKit::WebPagePrivate::blockZoomRectForNode):

Tools:

Fix the following warnings for BlackBerry:
DumpRenderTree.cpp:357:42: warning: suggest parentheses around assignment
used as truth value [-Wparentheses].

* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):

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

8 years agoIn-band captions not visible immediately after track mode change
eric.carlson@apple.com [Fri, 10 May 2013 21:11:51 +0000 (21:11 +0000)]
In-band captions not visible immediately after track mode change
https://bugs.webkit.org/show_bug.cgi?id=115922

Reviewed by Dean Jackson.

Source/WebCore:

Test: media/track/track-in-band-mode.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::textTrackModeChanged): Add cues for all loaded tracks, regardless
    of track type.

LayoutTests:

* media/track/track-in-band-mode-expected.txt: Added.
* media/track/track-in-band-mode.html: Added.

* platform/efl/TestExpectations: Skip new test.
* platform/gtk/TestExpectations: Ditto.
* platform/mac/TestExpectations: Ditto.
* platform/qt/TestExpectations: Ditto.
* platform/win/TestExpectations: Ditto.

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

8 years agoWeb Inspector: determine the resource type in InspectorResourceAgent::willSendRequest.
timothy@apple.com [Fri, 10 May 2013 20:54:54 +0000 (20:54 +0000)]
Web Inspector: determine the resource type in InspectorResourceAgent::willSendRequest.

This allows the Network timeline and Resources sidebar to filter Resources earlier,
before the server sends a response. Useful for long polling (comet) XHRs.

https://webkit.org/b/74935
rdar://problem/13726105

Reviewed by Joseph Pecoraro.

* inspector/Inspector.json:
(Network.requestWillBeSent): Added.
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendRequest): Send the type if it isn't Other along in requestWillBeSent.
(WebCore::InspectorResourceAgent::didReceiveResponse): Don't determine the type here anymore. Clear the CachedResource
if isNotModified like the old code path did by not setting cachedResource if !isNotModified.

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

8 years agoUnify plug-in information dictionaries
weinig@apple.com [Fri, 10 May 2013 20:46:12 +0000 (20:46 +0000)]
Unify plug-in information dictionaries
<rdar://problem/13852080>
https://bugs.webkit.org/show_bug.cgi?id=115891

Reviewed by Anders Carlsson.

This unifies the plug-in information dictionaries vended by WKContextCopyPlugInInfoForBundleIdentifier
and WKContextGetInfoForInstalledPlugIns with those from the WKPageLoaderClient and WKPageUIClient.

All the old keys will continue to work, but have been deprecated in favor of new keys defined in
WKPluginInformation.h

* Shared/API/c/WKPluginInformation.cpp: Added.
* Shared/API/c/WKPluginInformation.h: Added.
Export new keys as SPI.

* Shared/Plugins/Netscape/PluginInformation.h: Added.
* Shared/Plugins/Netscape/PluginInformation.cpp: Added.
(WebKit::pluginInformationBundleIdentifierKey):
(WebKit::pluginInformationBundleVersionKey):
(WebKit::pluginInformationPathKey):
(WebKit::pluginInformationDisplayNameKey):
(WebKit::pluginInformationDefaultLoadPolicyKey):
(WebKit::pluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WebKit::pluginInformationHasSandboxProfileKey):
(WebKit::pluginInformationFrameURLKey):
(WebKit::pluginInformationMIMETypeKey):
(WebKit::pluginInformationPageURLKey):
(WebKit::pluginInformationPluginspageAttributeURLKey):
(WebKit::pluginInformationPluginURLKey):
Add new keys.

(WebKit::pluginModuleInformation):
(WebKit::createPluginInformationDictionary):
Add creation functions to simplify multiple sites.

* Shared/Plugins/Netscape/mac/PluginInformationMac.mm: Added.
(WebKit::platformPluginModuleInformation):
Add platform specific data to the dictionary.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationBundleIdentifierKey):
(WKPageGetPluginInformationBundleVersionKey):
(WKPageGetPluginInformationDisplayNameKey):
(WKPageGetPluginInformationFrameURLKey):
(WKPageGetPluginInformationMIMETypeKey):
(WKPageGetPluginInformationPageURLKey):
(WKPageGetPluginInformationPluginspageAttributeURLKey):
(WKPageGetPluginInformationPluginURLKey):
* UIProcess/API/C/WKPage.h:
Deprecate the old keys.

* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextCopyPlugInInfoForBundleIdentifier):
(WKContextGetInfoForInstalledPlugIns):
Simplify by using the new createPluginInformationDictionary functions.

(WKPlugInInfoPathKey):
(WKPlugInInfoBundleIdentifierKey):
(WKPlugInInfoVersionKey):
(WKPlugInInfoLoadPolicyKey):
(WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey):
(WKPlugInInfoIsSandboxedKey):
Deprecate the old keys.

* UIProcess/WebLoaderClient.cpp:
(WebKit::WebLoaderClient::didFailToInitializePlugin):
(WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
(WebKit::WebLoaderClient::pluginLoadPolicy):
* UIProcess/WebLoaderClient.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::unavailablePluginButtonClicked):
* UIProcess/WebUIClient.h:
Optimize for the most recent callback type which takes a dictionary,
and pull out the necessary bits from it for deprecated callbacks as necessary.

* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
(WebKit::WebPageProxy::unavailablePluginButtonClicked):
(WebKit::WebPageProxy::didFailToInitializePlugin):
(WebKit::WebPageProxy::didBlockInsecurePluginVersion):
Use createPluginInformationDictionary() consistently, to get consistent results for callbacks.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

8 years agoWeb Inspector: implement runOpenPanel callback for WebKit2 inspector
commit-queue@webkit.org [Fri, 10 May 2013 20:35:04 +0000 (20:35 +0000)]
Web Inspector: implement runOpenPanel callback for WebKit2 inspector
https://bugs.webkit.org/show_bug.cgi?id=115865

Patch by Brian J. Burg <burg@cs.washington.edu> on 2013-05-10
Reviewed by Sam Weinig.

* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::inspectorWindow):
Add an accessor for m_inspectorWindow.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::runOpenPanel):
Show the open panel dialog when requested.

(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Register the callback when the inspector page is created.

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

8 years ago[WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
commit-queue@webkit.org [Fri, 10 May 2013 20:34:16 +0000 (20:34 +0000)]
[WK2][CoordinatedGraphics] WKViewSetThemePath is EFL specific
https://bugs.webkit.org/show_bug.cgi?id=115928

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2013-05-10
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

WKViewSetThemePath was moved to WKViewEfl.h since it is EFL specific.

* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/C/efl/WKViewEfl.cpp:
(WKViewSetThemePath):
* UIProcess/API/C/efl/WKViewEfl.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/CoordinatedGraphics/WebView.h:
(WebView):
* UIProcess/efl/ViewClientEfl.cpp:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::setThemePath):
* UIProcess/efl/WebViewEfl.h:
(WebViewEfl):

Tools:

WKViewSetThemePath was moved to WKViewEfl.h.

* TestWebKitAPI/efl/PlatformWebView.cpp:

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

8 years agoUnreviewed mac-lion rebaselines.
roger_fong@apple.com [Fri, 10 May 2013 19:24:07 +0000 (19:24 +0000)]
Unreviewed mac-lion rebaselines.

* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:

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

8 years ago[CMake] Consolidate list of files to build for WebCore plugin support
l.gombos@samsung.com [Fri, 10 May 2013 19:10:01 +0000 (19:10 +0000)]
[CMake] Consolidate list of files to build for WebCore plugin support
https://bugs.webkit.org/show_bug.cgi?id=104429

Reviewed by Rob Buis.

Move the common files to support plugins and the logic for disabling
plugins) to CMakeLists.txt from PlatformXXX.cmake.

No new tests as there is no new functionality.

* CMakeLists.txt:
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:

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

8 years agoREGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous...
robert@webkit.org [Fri, 10 May 2013 19:02:56 +0000 (19:02 +0000)]
REGRESSION(r148121): Empty Span does not get a linebox when it's in an anonymous block
https://bugs.webkit.org/show_bug.cgi?id=115818

Reviewed by David Hyatt.

Source/WebCore:

r148121 only worried about split inlines inside anonymous blocks - it ought to have
catered for empty inlines, with no continuations, inside a single solitary anonymous block too.

Test: fast/inline/anonymous-block-with-empty-inline.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::hasInlineDirectionBordersPaddingOrMargin):

LayoutTests:

* fast/inline/anonymous-block-with-empty-inline-expected.txt: Added.
* fast/inline/anonymous-block-with-empty-inline.html: Added.

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

8 years ago[GTK] Remove unnecessary includes in WidgetGtk.cpp
zandobersek@gmail.com [Fri, 10 May 2013 18:39:53 +0000 (18:39 +0000)]
[GTK] Remove unnecessary includes in WidgetGtk.cpp
https://bugs.webkit.org/show_bug.cgi?id=115912

Reviewed by Andreas Kling.

No new tests - no new functionality.

* platform/gtk/WidgetGtk.cpp: Remove the unnecessary includes of the Chrome.h, Frame.h, FrameView.h,
Page.h and RenderObject.h headers as the included declarations are not used anywhere. ScrollView.h is
included instead as it is required and was previously included by one of the removed header inclusions.

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

8 years ago[Cairo] Remove the unnecessary ImageData.h include in ImageBufferCairo.cpp
zandobersek@gmail.com [Fri, 10 May 2013 18:38:54 +0000 (18:38 +0000)]
[Cairo] Remove the unnecessary ImageData.h include in ImageBufferCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115911

Reviewed by Carlos Garcia Campos.

No new tests - no new functionality.

* platform/graphics/cairo/ImageBufferCairo.cpp: Remove the ImageData.h include
as the included declarations are not used anywhere.

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

8 years ago[Cairo] Remove the unnecessary CSSParser.h include in GradientCairo.cpp
zandobersek@gmail.com [Fri, 10 May 2013 18:37:57 +0000 (18:37 +0000)]
[Cairo] Remove the unnecessary CSSParser.h include in GradientCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=115910

Reviewed by Laszlo Gombos.

No new tests - no new functionality.

* platform/graphics/cairo/GradientCairo.cpp: Remove the CSSParser.h include
as the included declarations are not used anywhere.

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

8 years agoInclude tab character as a word end for kerning
dino@apple.com [Fri, 10 May 2013 18:20:28 +0000 (18:20 +0000)]
Include tab character as a word end for kerning
https://bugs.webkit.org/show_bug.cgi?id=115915
<rdar://problem/13861491>

Reviewed by Enrica Casucci.

This is a follow-up to https://bugs.webkit.org/show_bug.cgi?id=112507
which only looked for a space character as a word end. It should
look for tab characters too.

Source/WebCore:

Test: fast/text/word-space-with-kerning-4.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun): Look for '\t'.

LayoutTests:

* fast/text/word-space-with-kerning-4-expected.html: Added.
* fast/text/word-space-with-kerning-4.html: Added.

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

8 years agoI accidentally the Java testing.
akling@apple.com [Fri, 10 May 2013 17:48:09 +0000 (17:48 +0000)]
I accidentally the Java testing.

* Scripts/webkitpy/port/mac.py:

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

8 years agoRemove EventTracer
andersca@apple.com [Fri, 10 May 2013 17:39:28 +0000 (17:39 +0000)]
Remove EventTracer
https://bugs.webkit.org/show_bug.cgi?id=115916

Reviewed by Sam Weinig.

EventTracer is dead code, remove it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/EventTracer.cpp: Removed.
* platform/EventTracer.h: Removed.

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

8 years ago[GTK] Generated files are regenerated always
zandobersek@gmail.com [Fri, 10 May 2013 17:36:29 +0000 (17:36 +0000)]
[GTK] Generated files are regenerated always
https://bugs.webkit.org/show_bug.cgi?id=115908

Reviewed by Carlos Garcia Campos.

No new tests - no change in functionality.

* GNUmakefile.am: Don't treat the window constructors IDL file as a dependency of the JavaScriptCore bindings.
The file is generated during the IDL preprocessing, and the JSC bindings already depend on that step through
the idl_supplemental_dependencies file. Because of that the window constructors IDL file has a phony target
which seems to confuse the bindings generation rule into thinking that a complete regeration of the bindings is required.

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

8 years agoCaching of generated images in CSS should be smarter.
akling@apple.com [Fri, 10 May 2013 17:34:36 +0000 (17:34 +0000)]
Caching of generated images in CSS should be smarter.
<http://webkit.org/b/115902>
<rdar://problem/13542727>

Reviewed by Antti Koivisto.

Add an IntSize => GeneratorGeneratedImage cache at the CSSImageGeneratorValue level.

CSSGradientValue is currently the only CSSImageGeneratorValue subclass that makes use of the cache.
Generated images are kept for 3 seconds after last use.

The main problem with the previous approach was that background renderers (e.g <body>, <tr>, etc)
would be passed to multiple CSSImageGeneratorValue::getImage() calls with different sizes requested
for each of the descendent renderers that inherit their background from the same parent.
The cache wasn't smart enough for this, it just thought the background renderer was changing size
a lot, and would regenerate the image over and over.

We already had caching of intermediate image buffers for GeneratorGeneratedImage::drawPattern().
This removes the eviction timer from that cache so that the intermediate images can live a bit longer.

(WebCore::CSSImageGeneratorValue::cachedImageForSize):
(WebCore::CSSImageGeneratorValue::saveCachedImageForSize):

    Renamed from getImage() and putImage().

(WebCore::CSSImageGeneratorValue::evictCachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::CachedGeneratedImage):
(WebCore::CSSImageGeneratorValue::CachedGeneratedImage::evictionTimerFired):

    Let the CachedGeneratedImage throw itself out from cache when the timer fires.

* css/CSSImageGeneratorValue.h:
(CachedGeneratedImage):

    Exactly what it sounds like. These go into CSSImageGeneratorValue::m_images with the size
    as the hash key.

* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::~GeneratorGeneratedImage):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):

    Keep the intermediate image for drawPattern() until destruction instead of dropping it on
    a timer. These objects are now evicted by the CSSImageGeneratorValue's image cache
    after 3 seconds of disuse rather than kept for the lifetime of the renderer.

* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::canvasChanged):
(WebCore::CSSCanvasValue::canvasResized):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::crossfadeChanged):
* rendering/style/StyleGeneratedImage.cpp:
(WebCore::StyleGeneratedImage::addClient):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::addClient):
(WebCore::CSSImageGeneratorValue::removeClient):

    CSSImageGeneratorValue::m_clients is now a HashCountedSet<RenderObject*>, tweak accordingly.

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

8 years agoREGRESSION (r149439): Video turns blank upon entering full screen for the first time
jer.noble@apple.com [Fri, 10 May 2013 17:20:59 +0000 (17:20 +0000)]
REGRESSION (r149439): Video turns blank upon entering full screen for the first time
https://bugs.webkit.org/show_bug.cgi?id=115617

Reviewed by Eric Carlson.

Partially revert the change introduced in r149439 for OS X 10.8 and previous. On these
platforms, create a window with a NSZeroSize initial frame, which fixes the "blank"
first-full screen behavior.

* UIProcess/API/mac/WKView.mm:
(-[WKView createFullScreenWindow]):

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

8 years ago[WK2] Make the WebSoupRequestManager a supplement to the WebProcess
zandobersek@gmail.com [Fri, 10 May 2013 17:16:54 +0000 (17:16 +0000)]
[WK2] Make the WebSoupRequestManager a supplement to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=115717

Reviewed by Andreas Kling.

WebSoupRequestManager should inherit from WebProcessSupplement and should be used as such
by the WebProcess. This removes the need for the m_soupRequestManager member variable in
the WebProcess class and brings the WebSoupRequestManager in line with other manager classes
of which instances are controlled by the WebProcess class.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add  the WebSoupRequestManager as a supplement.
* WebProcess/WebProcess.h:
(WebProcess): Remove the m_soupRequestManager member variable and its getter method.
* WebProcess/soup/WebKitSoupRequestGeneric.cpp:
(webkitSoupRequestGenericSendAsync): Access the WebSoupRequestManager as a supplement.
(webkitSoupRequestGenericSendFinish): Ditto.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformInitializeWebProcess): Access the WebSoupRequestManager as a supplement.
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::supplementName): Specify the supplement's name.
* WebProcess/soup/WebSoupRequestManager.h:
(WebSoupRequestManager): Inherit from the WebProcessSupplement interface.

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

8 years ago[GTK] Module Cairo fails to build under jhbuild
commit-queue@webkit.org [Fri, 10 May 2013 17:04:33 +0000 (17:04 +0000)]
[GTK] Module Cairo fails to build under jhbuild
https://bugs.webkit.org/show_bug.cgi?id=115854

Patch by Brian Holt <brian.holt@samsung.com> on 2013-05-10
Reviewed by Martin Robinson.

Make cairo depend on glib in jhbuild.modules.

* gtk/jhbuild.modules:

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

8 years agoRemove MemoryUsageSupport class
andersca@apple.com [Fri, 10 May 2013 17:03:47 +0000 (17:03 +0000)]
Remove MemoryUsageSupport class
https://bugs.webkit.org/show_bug.cgi?id=115913

Reviewed by Andreas Kling.

MemoryUsageSupport was just used by a single call site in InspectorTimelineAgent,
and the function called always returns zero on all platforms! Remove it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorMemoryAgent.cpp:
* inspector/InspectorTimelineAgent.cpp:
(WebCore):
(WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
* platform/MemoryUsageSupport.cpp: Removed.
* platform/MemoryUsageSupport.h: Removed.
* platform/qt/MemoryUsageSupportQt.cpp: Removed.

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

8 years agoREGRESSION (r149652): Videos do not play on cnn.com, just black box
rniwa@webkit.org [Fri, 10 May 2013 16:38:21 +0000 (16:38 +0000)]
REGRESSION (r149652): Videos do not play on cnn.com, just black box
https://bugs.webkit.org/show_bug.cgi?id=115887

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by window and document named item maps counting the same element twice
when it has the same id and name attribute values. Fixed the bug by avoiding to add or remove
an element per id and name attribute updates when it had already been added or removed by
name and id attribute updates respectively.

We do this by checking whether the other attribute affects the element's precense in window
and document named item maps and avoiding to add or remove the attribute when they do and
the other attribute is present in updateId and updateName.

Consider a scenario when an object element has id "foo", and name attribute is about to be also
set to "foo". If the id attribute doesn't affect element's presense in window or document
named item maps, we're done. If it does, then the maps already have this element so we don't
want to add it again. Conversely, if the element already has id and name attributes set to
"foo", and we're moving the id attribute, then we want to remove the element from the maps only
if the id doesn't affect the presence of the element in the maps.

Unfortuntely, this logic doesn't work when we're inserting or removing an element on its entirely
because updateId and updateName are called when both id and name attributes are present so skip
this step (AlwaysUpdateHTMLDocumentNamedItemMaps) for the id attribute to break the symmetry.

Test: fast/dom/HTMLDocument/image-with-same-id-and-name.html
      fast/dom/HTMLDocument/object-with-same-id-and-name.html

* dom/Element.cpp:
(WebCore::Element::insertedInto): Call updateId and updateName with
AlwaysUpdateHTMLDocumentNamedItemMaps.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::updateName): Don't add or remove this element if the id attribute has already
done so except when we're inserting, removing, or cloning an element.
(WebCore::Element::updateId): Ditto for the name attribute.
(WebCore::Element::cloneAttributesFromElement): Added a comment and assert that we never call this
function when this element is in the document. We can't update window and documemt named item
maps here because image element's id attribute value, for example, is present in the document's
named item map if it has a name attribute. Since this function calls updateId and updateName
before updating attributes, this check is going to fail in DocumentNameCollection's
nodeMatchesIfIdAttributeMatch and bad things will happen.

* dom/Element.h:

* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::swapInNodePreservingAttributesAndChildren): Clone children and attributes before
inserting the swapped span to avoid hitting the assertion in cloneAttributesFromElement we added.

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

* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):

LayoutTests:

Add regression tests.

* fast/dom/HTMLDocument/image-with-same-id-and-name-expected.txt: Added.
* fast/dom/HTMLDocument/image-with-same-id-and-name.html: Added.
* fast/dom/HTMLDocument/object-with-same-id-and-name-expected.txt: Added.
* fast/dom/HTMLDocument/object-with-same-id-and-name.html: Added.

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

8 years agoDon't trust character widths for internal OS X fonts in form controls
dino@apple.com [Fri, 10 May 2013 16:18:31 +0000 (16:18 +0000)]
Don't trust character widths for internal OS X fonts in form controls
https://bugs.webkit.org/show_bug.cgi?id=115883
<rdar://problem/13817757>

Reviewed by Darin Adler.

We ignore the character width for a bunch of fonts when predicting
the width of a form control. Some of the internal fonts in OS X are
not in the ignored list. Rather than add them, simply test for
fonts whose family begins with a period character ".".

* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hasValidAvgCharWidth): Return false for
    any family that starts with "."

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

8 years ago[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
carlosgc@webkit.org [Fri, 10 May 2013 16:11:20 +0000 (16:11 +0000)]
[GTK] Remove unnecessary GLIB_CHECK_VERSION #ifdefs
https://bugs.webkit.org/show_bug.cgi?id=115904

Reviewed by Martin Robinson.

Source/WebCore:

* bindings/gobject/WebKitDOMEventTarget.cpp:
* platform/gtk/GtkVersioning.c:
* platform/gtk/GtkVersioning.h:

Source/WebKit2:

* UIProcess/API/gtk/tests/TestInspectorServer.cpp:
(startTestServerMonitor):
* UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
(startTestServerMonitor):

Source/WTF:

* wtf/gobject/GRefPtr.cpp:

Tools:

* ImageDiff/gtk/ImageDiff.cpp:
(main):

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

8 years agoUnreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.
zarvai@inf.u-szeged.hu [Fri, 10 May 2013 16:01:35 +0000 (16:01 +0000)]
Unreviewed. Fix the ENABLE(SHARED_WORKERS) build after r149864.

* workers/SharedWorkerThread.cpp: include "SecurityOrigin.h"

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

8 years agoAdd my new address to contributors.json. (Unreviewed)
kbalazs@webkit.org [Fri, 10 May 2013 15:27:25 +0000 (15:27 +0000)]
Add my new address to contributors.json. (Unreviewed)

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

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

8 years agoFix build after r149864.
csaavedra@igalia.com [Fri, 10 May 2013 14:05:17 +0000 (14:05 +0000)]
Fix build after r149864.

Unreviewed build fix.

* loader/ThreadableLoader.h: include <wtf/text/AtomicString.h>
when building with RESOURCE_TIMING enabled.

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

8 years agoUnreviewed. Move myself to the reviewers list.
ch.dumez@sisa.samsung.com [Fri, 10 May 2013 13:19:58 +0000 (13:19 +0000)]
Unreviewed. Move myself to the reviewers list.

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

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

8 years agoUnreviewed EFL gardening.
ch.dumez@sisa.samsung.com [Fri, 10 May 2013 13:16:40 +0000 (13:16 +0000)]
Unreviewed EFL gardening.

Rebaseline fast/dom/Range/getClientRects.html for EFL port.
Skip accessibility/poorly-formed-aria-table.html introduced in
r149858 but failing on EFL port.

* platform/efl/TestExpectations:
* platform/efl/fast/dom/Range/getClientRects-expected.txt:

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

8 years agoFix build.
andersca@apple.com [Fri, 10 May 2013 13:00:02 +0000 (13:00 +0000)]
Fix build.

* bindings/js/ScriptController.cpp:

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