2011-08-29 Martin Robinson Reviewed by Andreas Kling. [GTK] r90148 did not apply to X11 platforms in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=63862 Correct the guard for an X11 specific piece of code. TARGET(X11) not defined for the GTK+ port. No new tests. This is covered by an existing test. * plugins/npapi.cpp: Correct the X11 guard. (NPN_InvalidateRect): 2011-08-29 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Untangle GtkAdjustments from WebCore https://bugs.webkit.org/show_bug.cgi?id=59821 Completely remove the ability for WebKit to set GtkAdjustments on ScrollViews and, consequently, Scrollbars. Handling adjustment updates can now be managed in WebKit. No new tests. This is covered by existing Scrollbar tests. * platform/ScrollView.cpp: platformInit and platformDestroy can now be shared between ScrollView.cpp and ScrollViewGtk.cpp. * platform/ScrollView.h: Remove unused methods. * platform/gtk/MainFrameScrollbarGtk.cpp: (MainFrameScrollbarGtk::create): No longer need to pass in the adjustment. (MainFrameScrollbarGtk::MainFrameScrollbarGtk): Update the comments here. * platform/gtk/MainFrameScrollbarGtk.h: Lots of code removal. * platform/gtk/ScrollViewGtk.cpp: Ditto. (WebCore::ScrollView::createScrollbar): Ditto. (WebCore::ScrollView::setScrollbarModes): Ditto. * plugins/gtk/PluginViewGtk.cpp: This file needs the GRefPtrGtk.h include now that it doesn't receive it transitively. 2011-06-30 Martin Robinson Reviewed by Anders Carlsson. [GTK] Crash observed with nspluginwrapper and flash https://bugs.webkit.org/show_bug.cgi?id=62249 Test: plugins/invalidate-rect-with-null-npp-argument.html * plugins/npapi.cpp: (NPN_InvalidateRect): Guard against null instances here. 2011-06-30 Martin Robinson Reviewed by Xan Lopez. [Freetype] Many tests report ERROR: Failed to get glyph page zero. https://bugs.webkit.org/show_bug.cgi?id=63498 Instead of conditionally instantiating the m_scaledFont member of FontPlatformData, always instantiate it. For times when the size is 0 and the instantiation would lead to a Cairo error, we use size 1 and just make operations which would fail conditional on the m_size > 0. No new tests. This change is covered by existing tests. We should observe no errors on the bots after landing. * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): Instead of looking at whether or not there is a scaled font to determine whether to draw, just look at the size. * platform/graphics/freetype/FontPlatformData.h: Remove the m_font member. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Always instantiate a scaled font member and remove references to m_font. If we are instantiating a scaled font for a 0 size font, instantiate a size 1 font, so that we can still use Cairo to query font properties. * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp: (WebCore::GlyphPage::fill): We can assume there is always a scaled font now. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): Ditto. (WebCore::SimpleFontData::createScaledFontData): Ditto. (WebCore::SimpleFontData::containsCharacters): Ditto. (WebCore::SimpleFontData::platformWidthForGlyph): Ditto. 2011-06-30 Andras Becsi Reviewed by Csaba Osztrogonác. make-hash-tools.pl: Perl 5.14 compatibility https://bugs.webkit.org/show_bug.cgi?id=61890 No new tests needed. * make-hash-tools.pl: Use if/elsif instead of switch/case. 2011-06-30 Martin Robinson Reviewed by Xan Lopez. [GTK] Windowless plugins sometimes crash with a BadMatch error https://bugs.webkit.org/show_bug.cgi?id=63020 Do not try to create an XPixmap with any of the dimensions as zero. * plugins/gtk/PluginViewGtk.cpp: (WebCore::PluginView::updatePluginWidget): Guard against and empty window rect before trying to create a windowless plugin pixmap. 2011-06-30 Joseph Pecoraro Reviewed by David Kilzer. JSLock ASSERT seen often when using the inspector for long periods of time. We should take the JSLock whenever we might allocate memory in the JavaScript Heap. JSC InjectedScriptHost::nodeAsScriptValue should take JSLock before possible JavaScript Allocations https://bugs.webkit.org/show_bug.cgi?id=58674 * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::InjectedScriptHost::nodeAsScriptValue): take the JSLock. 2011-06-30 Geoffrey Garen Reviewed by Oliver Hunt. Ensure that all compilation takes place within a dynamic global object scope https://bugs.webkit.org/show_bug.cgi?id=57054 * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): Updated for signature change. 2011-06-19 Martin Robinson Reviewed by Xan Lopez. [GTK] ASSERTION FAILED: it != gFontDataCache->end() in FontCache.cpp:318 https://bugs.webkit.org/show_bug.cgi?id=62942 Fix the == operator overload of the FreeType FontPlatformData to properly make the distinction between the hash table deleted value and the hash table empty value. No new tests. This is covered by existing tests, which should no longer hit assertions. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::operator==): Reorder the logic for determining if two FontPlatformData instances are equal. Do a pointer comparison on the Fontconfig patterns, instead of using FcPatternEqual. If the two Fontconfig patterns have different pointers they were created at different times and the overload should return false. 2011-06-20 ojab Reviewed by David Levin. Fix build with libpng-1.5.1 https://bugs.webkit.org/show_bug.cgi?id=59607 * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::readColorProfile): 2011-06-20 Thomas Klausner Reviewed by David Levin. png-1.5 fixes https://bugs.webkit.org/show_bug.cgi?id=54406 Fix compilation with png-1.5: struct members were hidden, and a new API to terminate data processing was added (especially for WebKit). Compilation fixes, so no new tests. * platform/image-decoders/png/PNGImageDecoder.cpp: (WebCore::PNGImageDecoder::headerAvailable): (WebCore::PNGImageDecoder::rowAvailable): 2011-06-20 Xan Lopez Reviewed by Martin Robinson. [GTK] Link explicitly with XRender on Linux/Unix https://bugs.webkit.org/show_bug.cgi?id=57558 * GNUmakefile.am: add XRender CFLAGS. 2011-06-04 Martin Robinson Reviewed by Xan Lopez. [GTK] fast/css/font-face-zero-hash-key.html is crashing on the bots https://bugs.webkit.org/show_bug.cgi?id=61693 Do not try to read the FT_Face from m_scaledFont if it m_scaledFont is null. A recent change fixing 0-pixel-size fonts means that m_scaledFont may now be null. No new tests. This change should cause fast/css/font-face-zero-hash-key.html to stop crashing. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Do a null check before accessing m_scaledFont. 2011-06-03 Martin Robinson Reviewed by Dirk Schulze. [GTK][Cairo] Twitter rendering breaks https://bugs.webkit.org/show_bug.cgi?id=60917 When instantiating a cairo_scaled_font_t font would pus the font in an error state, leave the m_scaledFont member of platform data as null. Rendering with scaled fonts in the error state can later lead to corrupted rendering. Due to this change, we must always null check cairo_scaled_font_t and the platform data now carries the cairo_font_face_t object with it, so that it can be accessed later if there is no cairo_scaled_font_t. Test: platform/gtk/fonts/zero-pixel-sized-fonts.html * platform/graphics/cairo/FontCairo.cpp: (WebCore::Font::drawGlyphs): If the scaled font is null, do not render. * platform/graphics/freetype/FontPlatformData.h: Now include the cairo_font_face_t. * platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::FontPlatformData): Initialize the new member. (WebCore::FontPlatformData::operator=): Carry over the new member. (WebCore::FontPlatformData::operator==): Check equality with the new member. (WebCore::FontPlatformData::initializeWithFontFace): If the initialization of m_scaledFont put the font into an error state, then just free it and return. (WebCore::FontPlatformData::hasCompatibleCharmap): The font always has a compatible charmap when the scaled font is null, because rendering is always a no-op and the font data never needs to be read. * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp: (WebCore::GlyphPage::fill): Don't read font data when the scaled font is null. * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): Return early when there's no scaled font. (WebCore::SimpleFontData::scaledFontData): Use the new m_font member. (WebCore::SimpleFontData::containsCharacters): Return early when there's no scaled font. (WebCore::SimpleFontData::platformWidthForGlyph): Ditto. 2011-04-28 Arno Renevier Reviewed by Gustavo Noronha Silva. [Soup] does not load css stylesheets without content-type https://bugs.webkit.org/show_bug.cgi?id=59697 When sniffing content type, do not replace http Content-Type header in soup message anymore, but keep sniffed content type in a separate variable. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::contentSniffedCallback): * platform/network/soup/ResourceResponse.h: (WebCore::ResourceResponse::sniffedContentType): (WebCore::ResourceResponse::setSniffedContentType): * platform/network/soup/ResourceResponseSoup.cpp: (WebCore::ResourceResponse::updateFromSoupMessage): 2011-05-26 Igor Oliveira Reviewed by Andreas Kling. drag-not-loaded-image.html test crashes when WebKit is built with debug option https://bugs.webkit.org/show_bug.cgi?id=61480 Checks if image has content before starting to drag. * page/DragController.cpp: (WebCore::DragController::startDrag): 2011-05-12 Adam Barth Reviewed by Darin Adler. REGRESSION (r65868): createContextualFragment does not work with