2010-03-27 Dmitry Gorbik Reviewed by Pavel Feldman. Fix the regression caused by r28078: a global variable definition masks a local one in an inspector console https://bugs.webkit.org/show_bug.cgi?id=32442 * inspector/front-end/InjectedScript.js: (injectedScriptConstructor): 2010-03-27 Dan Bernstein Reviewed by Darin Adler. REGRESSION (r56182): iWeb shadow drawn around image rectangle, not around opaque part of the image https://bugs.webkit.org/show_bug.cgi?id=36700 * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::createColor): Reverted to returning an RGB color value rather than an identifier for the transparent color. 2010-03-26 Joseph Pecoraro Reviewed by Pavel Feldman. Web Inspector: Converge Inspector ids to be long, not ints https://bugs.webkit.org/show_bug.cgi?id=36706 Part 1: Converge on `long` for callIds, nodeIds, and other Ids. * inspector/InspectorController.cpp: * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: * inspector/InspectorFrontend.cpp: * inspector/InspectorFrontend.h: 2010-03-27 Pavel Feldman Reviewed by Timothy Hatcher. Web Inspector: add layout test for styles panel. https://bugs.webkit.org/show_bug.cgi?id=36699 Test: inspector/elements-panel-styles.html * inspector/front-end/inspector.css: (#elements-content): (#elements-sidebar): * inspector/front-end/inspector.js: (WebInspector.displayNameForURL): * inspector/front-end/utilities.js: (String.prototype.trimURL): 2010-03-27 Mark Rowe Reviewed by Darin Adler. CSSPrimitiveValue::setFloatValue/setStringValue should throw an exception if passed an incorrect unit type. / Test: fast/dom/setPrimitiveValue-exceptions.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::setFloatValue): Throw an INVALID_ACCESS_ERR if either of our type or the passed-in type is not a numeric type. (WebCore::CSSPrimitiveValue::setStringValue): Throw an INVALID_ACCESS_ERR if either of our type or the passed-in type is not a string type. 2010-03-27 Robert Hogan Reviewed by nobody, fix typo in previous commit. Allow plugins implemented by the application, such as mimetype 'x-qt-plugin', when pluginsEnabled is false Fix parentheses typo in r56661. This happened while rebasing and was not present in the reviewed patch, so committing unreviewed. https://bugs.webkit.org/attachment.cgi?id=49515 * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): 2010-03-26 Robert Hogan Reviewed by Simon Hausmann. Allow plugins implemented by the application, such as mimetype 'x-qt-plugin', when pluginsEnabled is false. The purpose of disabling plugins is to prevent the execution of third-party code that may be untrustworthy. Qt plugins are implemented by the client rather than loaded from an external source, so the client should have the opportunity to consider them separately from other plugins. Add a function MimeTypeRegistry::isApplicationPluginMIMEType() that WebKit uses in conjunction with arePluginsEnabled() to determine if it should attempt to load a plugin. If isApplicationPluginMIMEType() returns true, WebKit will load the plugin even if arePluginsEnabled() is false. Currently, only Qt has application-implemented plugins: these use the mimetype 'x-qt-plugin' and 'x-qt-styled-widget'. This patch permits Qt clients' reimplementation of QWebPage::createPlugin() to decide whether or not to create a Qt plugin, even when arePluginsEnabled is false. For all platforms apart from Qt, isApplicationPluginMIMEType() returns false. https://bugs.webkit.org/show_bug.cgi?id=32196 Test: plugins/application-plugin-plugins-disabled.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::requestObject): * platform/MIMETypeRegistry.h: * platform/brew/MIMETypeRegistryBrew.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/gtk/MIMETypeRegistryGtk.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/haiku/MIMETypeRegistryHaiku.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/mac/MIMETypeRegistryMac.mm: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/qt/MIMETypeRegistryQt.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/win/MIMETypeRegistryWin.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/wince/MIMETypeRegistryWince.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): * platform/wx/MimeTypeRegistryWx.cpp: (WebCore::MIMETypeRegistry::isApplicationPluginMIMEType): 2010-03-27 Dan Bernstein Reviewed by Mark Rowe. Fix Acid3 text-shadow rendering regression introduced in r56597. * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): Revert to using the simple shadow logic for zero-blur shadows, except for color bitmap fonts. 2010-03-26 Daniel Bates Reviewed by Beth Dakin. https://bugs.webkit.org/show_bug.cgi?id=9268 As per sections 14.2 (http://www.w3.org/TR/CSS2/colors.html#background) and 17.5.1 (http://www.w3.org/TR/CSS2/tables.html#table-layers) of the CSS 2.1 spec., the background-image of a table-row should span the entire area of the table-row (i.e cover all the 's). Moreover, fixes background image painting with respect to row-groups, columns and column-groups (*). Currently, the background-image of a table row, row-group, and column-group is inherited by the table cells. This directly contradicts section 14.2. Instead, the background-image should cover the entire area of the table row, row-group, column, or column-group, respectively as described in section 17.5.1. (*) A follow up patch to compute the absolute content box of a column, and column-group is needed so that background image positioning for these table elements works. See bug #36104. Tests: fast/table/table-background.html fast/table/table-cell-border-draws-on-top-of-col-background.html fast/table/table-cell-border-draws-on-top-of-col-group-background.html fast/table/table-cell-border-draws-on-top-of-row-background.html fast/table/table-cell-border-draws-on-top-of-row-group-background.html fast/table/table-cell-overrides-row-background.html fast/table/table-col-background.html fast/table/table-col-group-background.html fast/table/table-col-group-col-span-background.html fast/table/table-col-group-span-background.html fast/table/table-col-span-background.html fast/table/table-row-background-left-50px.html fast/table/table-row-background-right-100percent.html fast/table/table-row-background-right-50px.html fast/table/table-row-background.html fast/table/table-row-group-background-positioned.html fast/table/table-row-group-background.html * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Modified to call RenderObject::adjustBackgroundImagePosition. * rendering/RenderBoxModelObject.h: * rendering/RenderObject.h: (WebCore::RenderObject::adjustBackgroundImagePosition): Added. * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::adjustBackgroundImagePosition): Added. * rendering/RenderTableCell.h: 2010-03-26 Laszlo Gombos Unreviewed, minor build fix. [Gtk] Guard defined but not used function Eliminate the "defined but not used" warning after r52684. No new tests as there is no new functionality. * platform/ContextMenu.cpp: 2010-03-26 Justin Schuh Reviewed by Adam Barth. Security: iFrame.src accepts JavaScript URL via nodeValue or textContent https://bugs.webkit.org/show_bug.cgi?id=36502 Overrode inherited nodeValue and textContent in Attr.idl so they proxy to value, which performs a security check. Test: http/tests/security/xss-DENIED-iframe-src-alias.html * bindings/js/JSAttrCustom.cpp: (WebCore::JSAttr::nodeValue): (WebCore::JSAttr::setNodeValue): (WebCore::JSAttr::textContent): (WebCore::JSAttr::setTextContent): * bindings/v8/custom/V8AttrCustom.cpp: (WebCore::V8Attr::nodeValueAccessorSetter): (WebCore::V8Attr::nodeValueAccessorGetter): (WebCore::V8Attr::textContentAccessorSetter): (WebCore::V8Attr::textContentAccessorGetter): * dom/Attr.idl: 2010-03-26 Eric Carlson https://bugs.webkit.org/show_bug.cgi?id=36681 "new Audio()" doesn't work with plug-in backed media engine. Don't require plug-in backed