2011-09-18 Dan Bernstein Allow Core Text to choose the fallback font for rendering a combining character sequence Fixes Decomposed text is displayed incorrectly when Verdana is specified https://bugs.webkit.org/show_bug.cgi?id=68287 Reviewed by Dave Hyatt. Test: platform/mac/fast/text/combining-character-sequence-fallback.html * WebCore.xcodeproj/project.pbxproj: Compile ComplexTextControllerCoreText.cpp as Objective-C++. I am going to rename this file in a followup patch. * platform/graphics/Font.h: Declared fontDataForCombiningCharacterSequence(). * platform/graphics/SimpleFontData.h: Declared canRenderCombiningCharacterSequence() and added a member variable to cache the results of calling this function. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::offsetForPosition): Fixed a typo in a comment. (WebCore::advanceByCombiningCharacterSequence): Added this helper function, which iterates over characters until the end of a sequence of combining characters, zero-width joiners and zero-width non-joiners. A single base characater followed by such a (possibly-empty) sequence is known as a combining character sequence. This stretches the definition a little because the base character may be a combining character as well. Returns false if an invalid UTF-16 sequence is encountered, true otherwise. (WebCore::ComplexTextController::collectComplexTextRuns): - Replaced the glyphData and nextGlyphData variables each with a pair of variables, a SimpleFontData* and a boolean indicating whether a character mapped to the missing glyph. This clarifies that this function does not use glyph IDs. - Renamed the local variable newC to uppercaseCharacter. - Changed to use advanceByCombiningCharacterSequence(). - Changed to use Font::fontDataForCombiningCharacterSequence() instead of Font::glyphDataForCharacter(). If there are combining marks and none of the fonts in the fallback list can render the sequence alone, use the systemFallbackFontData() constant to indicate to collectComplexTextRunsForCharactersCoreText() to allow Core Text to perform its own fallback. - Stopped checking isSmallCaps against nextIsSmallCaps. It was redundant, since the small caps FontData differs from the normal variant. (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Moved the common logic to handle the 0 fontData case from the ATSUI and Core Text continuations of this function into this function. * platform/graphics/mac/ComplexTextController.h: (WebCore::ComplexTextController::systemFallbackFontData): Added. This constant is used to indicate to collectComplexTextRunsForCharactersCoreText() that it should allow Core Text to perform its own font fallback. * platform/graphics/mac/ComplexTextControllerATSUI.cpp: (WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI): Handle systemFallbackFontData() by using the primary font data. * platform/graphics/mac/ComplexTextControllerCoreText.cpp: (-[CascadeList initWithFont:WebCore::character:]): Added. (-[CascadeList count]): Added. (-[CascadeList objectAtIndex:]): Added. Returns an entry from a cascade list of CTFontDescriptorRef objects based on the font’s fallback list for the character. The list is initialized lazily. (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Handle systemFallbackFontData() by allowing Core Text to perform font fallback, starting with a cascade list based on the font’s fallback list and possibly continuing with system fallback. * platform/graphics/mac/FontMac.mm: (WebCore::Font::fontDataForCombiningCharacterSequence): Added. If the sequence is only a base character, calls through to glyphDataForCharacter(). Otherwise, iterates over the font’s fallback list for the base character (and the system fallback font for that character), returning the first font that can render the sequence, or 0 if there is none. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::provideStringAndAttributes): Added this Core Text callback. (WebCore::SimpleFontData::canRenderCombiningCharacterSequence): Added. Checks if Core Text can render the sequence using only this font. Caches the result. 2011-09-17 Mihai Parparita FrameLoaderClient BackForwardList-related methods are unsued https://bugs.webkit.org/show_bug.cgi?id=68293 Reviewed by Darin Adler. Remove FrameLoaderClient methods that were added by r51629, since only the old (since-deleted) Android port needed them. * history/BackForwardListImpl.cpp: (WebCore::BackForwardListImpl::addItem): (WebCore::BackForwardListImpl::goBack): (WebCore::BackForwardListImpl::goForward): (WebCore::BackForwardListImpl::goToItem): (WebCore::BackForwardListImpl::setCapacity): * loader/EmptyClients.h: * loader/FrameLoaderClient.h: 2011-09-17 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68307 Crash in border image cssText. Make sure to null check all the components, since they're all optional now. Reviewed by Sam Weinig. Added fast/borders/border-image-slice-omission.html * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::cssText): 2011-09-17 Aaron Boodman Rework script context creation/release notifications https://bugs.webkit.org/show_bug.cgi?id=67828 Reviewed by Adam Barth. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::disposeContextHandles): (WebCore::V8DOMWindowShell::initContextIfNeeded): * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): (WebCore::V8IsolatedContext::destroy): * bindings/v8/V8IsolatedContext.h: * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::didCreateScriptContext): (WebCore::EmptyFrameLoaderClient::willReleaseScriptContext): * loader/FrameLoaderClient.h: 2011-09-17 Ilya Tikhonovsky Web Inspector: file open dialog appears when user clicks on the timeline bar in timeline panel. https://bugs.webkit.org/show_bug.cgi?id=68312 Reviewed by Pavel Feldman. * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._createFileSelector): 2011-09-17 Jeff Miller Build fix after r95372. * dom/DOMAllInOne.cpp: #include "EventListenerMap.cpp" 2011-09-17 Deepak Sherveghar Override supportsFocus() for HTMLMediaElement. https://bugs.webkit.org/show_bug.cgi?id=67190 Reviewed by Antonio Gomes. Tests: fast/events/media-element-focus-tab.html fast/spatial-navigation/snav-media-elements.html Return true from supportsFocus() if control's attribute is present or a tabindex is specified. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::supportsFocus): * html/HTMLMediaElement.h: 2011-09-16 Adam Barth Rename ENABLE(LEVELDB) to USE(LEVELDB) https://bugs.webkit.org/show_bug.cgi?id=68290 Reviewed by Darin Adler. LEVELDB is a library that can be used to implemented INDEXED_DATABASE, which means it should be a USE not an ENABLE. * CMakeLists.txt: * WebCore.gyp/WebCore.gyp: * platform/leveldb/LevelDBComparator.h: * platform/leveldb/LevelDBDatabase.cpp: * platform/leveldb/LevelDBDatabase.h: * platform/leveldb/LevelDBIterator.h: * platform/leveldb/LevelDBSlice.h: * platform/leveldb/LevelDBTransaction.cpp: * platform/leveldb/LevelDBTransaction.h: * platform/leveldb/LevelDBWriteBatch.cpp: * platform/leveldb/LevelDBWriteBatch.h: * storage/IDBFactoryBackendImpl.cpp: (WebCore::IDBFactoryBackendImpl::open): (WebCore::IDBFactoryBackendImpl::migrateFromSQLiteToLevelDB): * storage/IDBLevelDBBackingStore.cpp: * storage/IDBLevelDBBackingStore.h: * storage/IDBLevelDBCoding.cpp: * storage/IDBLevelDBCoding.h: 2011-09-16 Andreas Kling Reduce EventTarget memory usage by deferring hash map allocation until there are listeners for more than 1 event type. http://webkit.org/b/68105 Reviewed by Darin Adler. Introduce an EventListenerMap class which manages a map of event types that have one or more listeners connected. When there is only one event type, it's stored directly on the EventListenerMap internally, and when more are added it moves to a hash map. It only goes back from the hash map if all the listeners are removed at once (i.e clear() is called.) * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Adding files. * WebCore.exp.in: Export EventListenerMap::contains() for WebKit/mac. * dom/EventListenerMap.cpp: Added. (WebCore::EventListenerMap::EventListenerMap): (WebCore::EventListenerMap::~EventListenerMap): (WebCore::EventListenerMap::isEmpty): (WebCore::EventListenerMap::contains): (WebCore::EventListenerMap::clear): (WebCore::EventListenerMap::eventTypes): (WebCore::addListenerToVector): (WebCore::EventListenerMap::add): (WebCore::removeListenerFromVector): (WebCore::EventListenerMap::remove): (WebCore::EventListenerMap::find): (WebCore::removeFirstListenerCreatedFromMarkup): (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup): (WebCore::copyListenersNotCreatedFromMarkupToTarget): (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget): (WebCore::EventListenerIterator::EventListenerIterator): (WebCore::EventListenerIterator::nextListener): * dom/EventListenerMap.h: Added. * dom/EventTarget.cpp: (WebCore::EventTargetData::~EventTargetData): (WebCore::EventTarget::addEventListener): (WebCore::EventTarget::removeEventListener): (WebCore::EventTarget::fireEventListeners): (WebCore::EventTarget::getEventListeners): (WebCore::EventTarget::removeAllEventListeners): * dom/EventTarget.h: (WebCore::EventTarget::visitJSEventListeners): Use EventListenerIterator to visit listeners. (JSC specific.) * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getEventListenersForNode): Call EventListenerMap::eventTypes() go get the list of event types currently listened for. * dom/Node.cpp: (WebCore::Node::removeEventListener): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::transferEventListenersToShadowTree): Move implementations of SVG-specific hacks into EventListenerMap and call them from here. 2011-09-16 Jeremy Apthorp and James Kozianski Don't detach elements from the render tree when entering fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=66531 This prevents plugin instances from being destroyed and reinstantiated when entering fullscreen mode. Reviewed by James Robinson. Test: plugins/fullscreen-plugins-dont-reload.html * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): (RenderFullScreen::wrapRenderer): (RenderFullScreen::unwrapRenderer): * rendering/RenderFullScreen.h: 2011-09-16 Jochen Eisinger Rename FrameLoaderClient::allowImages to FrameLoaderClient::allowImage and include the image URL as parameter https://bugs.webkit.org/show_bug.cgi?id=68071 This will allow embedders to block images based on where the image is loaded from, instead of just blocking all images in a given frame. Reviewed by Adam Barth. * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::appendBytes): * loader/FrameLoaderClient.h: (WebCore::FrameLoaderClient::allowImage): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestImage): 2011-09-16 Tom Sepez Make XSSAuditor truncate inline snippets at a reasonable length before comparison respecting boundaries of multiply urlencoded sequences. https://bugs.webkit.org/show_bug.cgi?id=68092 Reviewed by Adam Barth. Test: http/tests/security/xssAuditor/property-escape-long.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::filterTokenAfterScriptStartTag): (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected): (WebCore::XSSAuditor::eraseAttributeIfInjected): (WebCore::XSSAuditor::decodedSnippetForAttribute): (WebCore::XSSAuditor::isContainedInRequest): * html/parser/XSSAuditor.h: 2011-09-16 Shawn Singh Remove m_contentsDirty from LayerChromium because it is redundant with m_dirtyRect. https://bugs.webkit.org/show_bug.cgi?id=68213 Reviewed by James Robinson. Code cleanup towards unit testing. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::setNeedsDisplay): (WebCore::LayerChromium::resetNeedsDisplay): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): 2011-09-16 Dmitry Lomov https://bugs.webkit.org/show_bug.cgi?id=66714 Add webkitPostMessage to allow for adding transferable support. This adds webkitPostMessage, currently identical to postMessage, which would later be a vehicle for adding transferable support for messaging. Based on patch by Luke Zarko. Reviewed by David Levin. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::webkitPostMessage): * bindings/js/JSDedicatedWorkerContextCustom.cpp: (WebCore::JSDedicatedWorkerContext::webkitPostMessage): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::webkitInitMessageEvent): * bindings/js/JSMessagePortCustom.cpp: (WebCore::JSMessagePort::webkitPostMessage): * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorker::postMessage): (WebCore::JSWorker::webkitPostMessage): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DOMWindow::postMessageCallback): (WebCore::V8DOMWindow::webkitPostMessageCallback): * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8DedicatedWorkerContext::postMessageCallback): (WebCore::V8DedicatedWorkerContext::webkitPostMessageCallback): * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::initMessageEventCallback): (WebCore::V8MessageEvent::webkitInitMessageEventCallback): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8MessagePort::postMessageCallback): (WebCore::V8MessagePort::webkitPostMessageCallback): * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::handlePostMessageCallback): (WebCore::V8Worker::postMessageCallback): (WebCore::V8Worker::webkitPostMessageCallback): * dom/MessageEvent.idl: * dom/MessagePort.idl: * page/DOMWindow.idl: * workers/DedicatedWorkerContext.idl: * workers/Worker.idl: 2011-09-16 Alexei Svitkine Chromium: Fix repaint of rubber-band overhang area under composited path https://bugs.webkit.org/show_bug.cgi?id=68246 I accidently removed these two lines from the last patch on: https://bugs.webkit.org/show_bug.cgi?id=66969 Reviewed by James Robinson. Test: platform/chromium-gpu/compositing/rubberbanding/transform-overhang-size-change.html * platform/ScrollView.cpp: (WebCore::ScrollView::scrollContents): 2011-09-16 Peter Beverloo Depend on harfbuzz for OS=Android as well https://bugs.webkit.org/show_bug.cgi?id=68239 Like GTK, Android depends on harfbuzz as well, so reflect that in the project file. Furthermore, fix a compile error in PopupListBox.cpp by explicitly including ctype.h, as isspace otherwise won't be declared. Reviewed by Steve Block. * WebCore.gyp/WebCore.gyp: * platform/chromium/PopupListBox.cpp: 2011-09-16 Tony Chang Rename flex-align values to match the spec https://bugs.webkit.org/show_bug.cgi?id=67741 Reviewed by Ojan Vafai. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexAlign): * css/CSSValueKeywords.in: * rendering/style/RenderStyleConstants.h: 2011-09-16 Kentaro Hara Implement an ErrorEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68148 Reviewed by Sam Weinig. The spec for the ErrorEvent constructor is here: http://dev.w3.org/html5/workers/#errorevent Test: fast/events/constructors/error-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the ErrorEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for ErrorEvent. * dom/ErrorEvent.cpp: (WebCore::ErrorEventInit::ErrorEventInit): (WebCore::ErrorEvent::ErrorEvent): (WebCore::ErrorEvent::initErrorEvent): (WebCore::ErrorEvent::isErrorEvent): * dom/ErrorEvent.h: Added a definition for ErrorEventInit. (WebCore::ErrorEvent::create): (WebCore::ErrorEvent::message): (WebCore::ErrorEvent::filename): (WebCore::ErrorEvent::lineno): * dom/ErrorEvent.idl: Makes ErrorEvent constructible. 2011-09-16 Kentaro Hara Overhangs a ruby by no more than half the width of the neighboring text. https://bugs.webkit.org/show_bug.cgi?id=62684 Reviewed by Dan Bernstein. Assume two rubies between which a narrow text exists, like "xxxxxxxlyyyyyyy". In order to avoid the two rubies overlapping with each other, this patch overhangs the ruby by no more than half the ruby font size and no more than half the width of the neighboring text. Tests: fast/ruby/overhang-horizontal-no-overlap1.html fast/ruby/overhang-horizontal-no-overlap2.html fast/ruby/overhang-vertical-no-overlap1.html fast/ruby/overhang-vertical-no-overlap2.html * rendering/RenderRubyRun.cpp: (WebCore::RenderRubyRun::getOverhang): Calculates the width of ruby overhanging. 2011-09-16 Sheriff Bot Unreviewed, rolling out r95304. http://trac.webkit.org/changeset/95304 https://bugs.webkit.org/show_bug.cgi?id=68299 Broke GTK+ builds. It pulls derived headers into main.c (Requested by rniwa on #webkit). * bindings/scripts/CodeGeneratorGObject.pm: (): * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Shawn Singh Re-named isRootLayer to isNonCompositedContent because that is what the flag actually means. https://bugs.webkit.org/show_bug.cgi?id=68214 Reviewed by James Robinson. Code cleanup towards unit testing. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setIsNonCompositedContent): (WebCore::LayerChromium::isNonCompositedContent): * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::NonCompositedContentHost): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::setIsNonCompositedContent): (WebCore::CCLayerImpl::isNonCompositedContent): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-09-16 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by Sam Weinig. Add a new setting to control whether the mock scrollbar theme is used. This is a global setting, so that it can be set without having to access a specific Settings object. * page/Settings.h: (WebCore::Settings::setMockScrollbarsEnabled): (WebCore::Settings::mockScrollbarsEnabled): 2011-09-16 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. If the area of intersection between the fill and the canvas is empty the canvas is completely cleared and a temporary buffer is not used. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Darin Adler. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-16 Shawn Singh Remove default NULL argument in LayerChromium::create(). https://bugs.webkit.org/show_bug.cgi?id=68211 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: 2011-09-16 Adrienne Walker [chromium] Move quad drawing code from LayerChromium to LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=68272 Reviewed by James Robinson. All the OpenGL code is in LayerRendererChromium and the CCLayerImpl tree, so move the static drawTexturedQuad/toGLMatrix functions to LayerRendererChromium, where they really belong. Just moving code around. Tested by existing compositor tests. * platform/graphics/chromium/LayerChromium.cpp: * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::toGLMatrix): (WebCore::LayerRendererChromium::drawTexturedQuad): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): 2011-09-16 Shawn Singh Fixed const correctness on accessors in LayerChromium https://bugs.webkit.org/show_bug.cgi?id=68210 Reviewed by James Robinson. Code cleanup related to creating unit testing. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::replicaLayer): 2011-09-14 Ryosuke Niwa Deleting line break before h1 converts h1 to span https://bugs.webkit.org/show_bug.cgi?id=45784 Reviewed by Kenneth Rohde Christiansen. Fixed the bug by treating h1 and other elements that retain structure like Mail blockquote. We already had a logic to overriding styles of merged paragraphs by Mail blockquote so just extend this logic for h1-h6, pre, etc... Tests: editing/deleting/merge-paragraph-from-address.html editing/deleting/merge-paragraph-from-h6-with-style.html editing/deleting/merge-paragraph-from-h6.html editing/deleting/merge-paragraph-from-listing.html editing/deleting/merge-paragraph-into-h1-with-style.html editing/deleting/merge-paragraph-into-h1.html editing/deleting/merge-paragraph-into-pre.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): * editing/markup.cpp: (WebCore::isBlockNodeToRetainAppearance): Extracted from ancestorToRetainStructureAndAppearance. (WebCore::StyledMarkupAccumulator::serializeNodes): (WebCore::ancestorToRetainStructureAndAppearance): * editing/markup.h: 2011-09-16 Max Perepelitsyn Set but not used variables cleanup (gcc 4.6) https://bugs.webkit.org/show_bug.cgi?id=68157 Reviewed by Darin Adler. * platform/audio/ReverbConvolverStage.cpp: (WebCore::ReverbConvolverStage::process): * rendering/RenderMediaControlsChromium.cpp: (WebCore::paintMediaButton): 2011-09-16 Geoffrey Garen Removed undetectable style.filter. Reviewed by Sam Weinig. This feature was added in http://trac.webkit.org/changeset/15557 to support housingmaps.com. But housingmaps.com no longer needs this hack, we don't know of other websites that need it, and we don't know of any other browsers that have implemented this feature. * ForwardingHeaders/runtime/StringObjectThatMasqueradesAsUndefined.h: Removed. * WebCore.order: * bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::JSCSSStyleDeclaration::nameGetter): 2011-09-16 Adam Barth Update JSC results to account for intrinsics change. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 2011-09-16 Sheriff Bot Unreviewed, rolling out r95312. http://trac.webkit.org/changeset/95312 https://bugs.webkit.org/show_bug.cgi?id=68277 It's innocent, innocent I tell you! (Requested by jamesr_ on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95309. http://trac.webkit.org/changeset/95309 https://bugs.webkit.org/show_bug.cgi?id=68271 Broke many chromium gpu tests. (Requested by dave_levin on #webkit). * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Filip Pizlo DFG JIT should inline Math.abs https://bugs.webkit.org/show_bug.cgi?id=68227 Reviewed by Oliver Hunt. Added JavaScriptCore/dfg to include path path. Changed the bindings scripts to handle the presence of intrinsics. * CMakeLists.txt: * bindings/scripts/CodeGeneratorJS.pm: (GenerateHashTable): 2011-09-16 Iain Merrick [chromium] Fix CCLayerTreeHostTest https://bugs.webkit.org/show_bug.cgi?id=67418 This is a minimal set of changes to get CCLayerTreeHostTest compiling, running and passing with USE_THREADED_COMPOSITING enabled. Reviewed by James Robinson. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): 2011-09-16 Sheriff Bot Unreviewed, rolling out r95227. http://trac.webkit.org/changeset/95227 https://bugs.webkit.org/show_bug.cgi?id=68262 Broke a bunch of SVG tests (Requested by andersca on #webkit). * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformContentsSize): * platform/wx/ScrollViewWx.cpp: (WebCore::ScrollView::platformContentsSize): 2011-09-16 James Simonsen Fix HTML5 parser's adoption agency algorithm to reparent correctly https://bugs.webkit.org/show_bug.cgi?id=68147 Reviewed by Eric Seidel. * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::callTheAdoptionAgency): 2011-09-16 Adam Barth CodeGeneratorGObject should use C++ style comments for ENABLE guards https://bugs.webkit.org/show_bug.cgi?id=68256 Reviewed by Darin Adler. This patch should have not behavioral effect. It just cleans up the GObject code generator to use C++-style comments for ENABLE guards and to use the usual comment style for license blocks. * bindings/scripts/CodeGeneratorGObject.pm: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/GObject/WebKitDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h: * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: (webkit_dom_test_obj_conditional_method1): (webkit_dom_test_obj_conditional_method2): (webkit_dom_test_obj_conditional_method3): (webkit_dom_test_obj_get_conditional_attr1): (webkit_dom_test_obj_set_conditional_attr1): (webkit_dom_test_obj_get_conditional_attr2): (webkit_dom_test_obj_set_conditional_attr2): (webkit_dom_test_obj_get_conditional_attr3): (webkit_dom_test_obj_set_conditional_attr3): (webkit_dom_test_obj_set_property): (webkit_dom_test_obj_get_property): (webkit_dom_test_obj_class_init): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h: * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h: 2011-09-16 Csaba Osztrogonác [Qt] REGRESSION(r95091) It made many tests flakey https://bugs.webkit.org/show_bug.cgi?id=68232 Unreviewed rolling out r95091 and followup patches. * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): * inspector/InspectorTimelineAgent.cpp: * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-16 Abhishek Arya cachedFont not getting updated for inline SVG text. https://bugs.webkit.org/show_bug.cgi?id=68060 Reviewed by Nikolas Zimmermann. The cached scaledFont needs to be updated on every style set call. It is not similar to m_style which can get derived from parent's style and hence will get automatically updated on ancestor's style change. This is required, otherwise we will maintain stale font list in cached scaledFont when custom fonts are retired on Document::recalcStyle. Test: svg/text/text-style-recalc-crash.html * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::styleDidChange): (WebCore::RenderSVGInlineText::setStyle): * rendering/svg/RenderSVGInlineText.h: 2011-09-16 Antti Koivisto REGRESSION (r95052): SelectorChecker identifier filter not working https://bugs.webkit.org/show_bug.cgi?id=68244 Reviewed by Dan Bernstein. Missing &. * css/SelectorChecker.cpp: (WebCore::collectDescendantSelectorIdentifierHashes): 2011-09-16 Csaba Osztrogonác Unreviewed typo fix after r95271. * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: 2011-09-16 Andrey Kosyakov Web Inspector: [Extensions API] support extensions for remote inspector front-end https://bugs.webkit.org/show_bug.cgi?id=67840 Reviewed by Pavel Feldman. - Merge ExtensionCommon.js into ExtensionAPI.js - refactor building of extension API for better reuse - expose interface for extension registration * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ExtensionAPI.js: (defineCommonExtensionSymbols): (buildExtensionAPIInjectedScript): * inspector/front-end/ExtensionCommon.js: * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer.prototype._addExtensions): (WebInspector.ExtensionServer.prototype._addExtension): (WebInspector.ExtensionServer.prototype._buildExtensionAPIScript): (WebInspector.ExtensionServer.prototype._onWindowMessage): (WebInspector.ExtensionServer.prototype._registerExtension): (WebInspector.ExtensionServer.prototype._expandResourcePath): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-16 Ilya Tikhonovsky Web Inspector: change WebInspector.currentPanel getter/setter to functions. https://bugs.webkit.org/show_bug.cgi?id=68242 This is necessary for the panel switching performance tests. Reviewed by Pavel Feldman. * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.show.animationFinished): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.switchToAndFocus): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.showAnchorLocation): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/SearchController.js: (WebInspector.SearchController.prototype.updateSearchMatchesCount): (WebInspector.SearchController.prototype.updateCurrentMatchIndex): (WebInspector.SearchController.prototype.updateSearchLabel): (WebInspector.SearchController.prototype.handleShortcut): (WebInspector.SearchController.prototype._performSearch): * inspector/front-end/Toolbar.js: (WebInspector.Toolbar.createPanelToolbarItem.onToolbarItemClicked): (WebInspector.Toolbar.createPanelToolbarItem): * inspector/front-end/inspector.js: (WebInspector.currentPanel): (WebInspector._updateFocusedNode): (WebInspector.windowResize): (WebInspector.documentKeyDown): (WebInspector.documentCanCopy): (WebInspector.documentCopy): (WebInspector.showPanel): (WebInspector.startUserInitiatedDebugging): (WebInspector.inspect): (WebInspector._showAnchorLocationInPanel): (WebInspector._toolbarItemClicked): (WebInspector.PanelHistory.prototype.goBack): (WebInspector.PanelHistory.prototype.goForward): 2011-09-15 Pavel Feldman Web Inspector: rename Console.clearConsoleMessages to Console.clearMessages, brush up console domain doc. https://bugs.webkit.org/show_bug.cgi?id=68165 Reviewed by Yury Semikhatsky. * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::clearConsoleMessages): * inspector/Inspector.json: * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::clearMessages): * inspector/InspectorConsoleAgent.h: * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel.prototype.requestClearMessages): 2011-09-16 Alejandro G. Castro Fix GTK build after r95245. * GNUmakefile.list.am: 2011-09-16 Leo Yang [Qt] Crash when dragging google maps. https://bugs.webkit.org/show_bug.cgi?id=68223 The custom image for a cursor might not be ready when WebKit trying to use it to construct the cursor in Qt porting. This patch is using arrow image to substitute the unready custom image. Reviewed by Adam Barth. Test: fast/css/crash-on-custom-cursor-when-loading.html * platform/qt/CursorQt.cpp: (WebCore::createCustomCursor): (WebCore::Cursor::ensurePlatformCursor): 2011-09-15 Adam Barth Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE) https://bugs.webkit.org/show_bug.cgi?id=68205 Reviewed by Eric Seidel. As discussed on webkit-dev. * CMakeLists.txt: * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * GNUmakefile.list.am: * UseJSC.cmake: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSCustomSQLStatementErrorCallback.cpp: * bindings/js/JSDOMBinding.cpp: (WebCore::setDOMException): * bindings/js/JSExceptionBase.cpp: (WebCore::toExceptionBase): * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::databaseId): * bindings/js/JSSQLResultSetRowListCustom.cpp: * bindings/js/JSSQLTransactionCustom.cpp: * bindings/js/JSSQLTransactionSyncCustom.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.cpp: * bindings/scripts/test/CPP/WebDOMTestCallback.h: * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.cpp: * bindings/scripts/test/JS/JSTestCallback.h: * bindings/scripts/test/ObjC/DOMTestCallback.mm: * bindings/scripts/test/TestCallback.idl: * bindings/scripts/test/V8/V8TestCallback.cpp: * bindings/scripts/test/V8/V8TestCallback.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::setDOMException): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::databaseIdCallback): * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: * bindings/v8/custom/V8SQLTransactionCustom.cpp: * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp: * dom/Document.cpp: * dom/Document.h: * dom/ExceptionCode.cpp: (WebCore::getExceptionCodeDescription): * dom/ExceptionCode.h: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::ScriptExecutionContext): (WebCore::ScriptExecutionContext::~ScriptExecutionContext): * dom/ScriptExecutionContext.h: * features.pri: * history/PageCache.cpp: (WebCore::logCanCacheFrameDecision): (WebCore::PageCache::canCachePageContainingThisFrame): * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::disconnect): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::init): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::restoreInspectorStateFromCookie): * inspector/InspectorController.h: * inspector/InspectorDatabaseAgent.cpp: * inspector/InspectorDatabaseInstrumentation.h: * inspector/InspectorDatabaseResource.cpp: * inspector/InspectorDatabaseResource.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didCommitLoadImpl): * inspector/InspectorInstrumentation.h: * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::InstrumentingAgents): * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): (WebCore::WorkerInspectorController::connectFrontend): * loader/EmptyClients.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): * page/ChromeClient.h: * page/DOMWindow.cpp: * page/DOMWindow.h: * page/DOMWindow.idl: * platform/sql/SQLiteAuthorizer.cpp: * platform/sql/SQLiteDatabase.cpp: * platform/sql/SQLiteFileSystem.cpp: * platform/sql/SQLiteStatement.cpp: * platform/sql/SQLiteTransaction.cpp: * storage/AbstractDatabase.cpp: * storage/AbstractDatabase.h: * storage/ChangeVersionWrapper.cpp: * storage/ChangeVersionWrapper.h: * storage/Database.cpp: * storage/Database.h: * storage/Database.idl: * storage/DatabaseAuthorizer.cpp: * storage/DatabaseCallback.h: * storage/DatabaseCallback.idl: * storage/DatabaseDetails.h: * storage/DatabaseSync.cpp: * storage/DatabaseSync.h: * storage/DatabaseSync.idl: * storage/DatabaseTask.cpp: * storage/DatabaseTask.h: * storage/DatabaseThread.cpp: * storage/DatabaseThread.h: * storage/DatabaseTracker.cpp: * storage/DatabaseTracker.h: * storage/DatabaseTrackerClient.h: * storage/OriginQuotaManager.cpp: * storage/OriginQuotaManager.h: * storage/OriginUsageRecord.cpp: * storage/OriginUsageRecord.h: * storage/SQLCallbackWrapper.h: * storage/SQLError.h: * storage/SQLError.idl: * storage/SQLException.h: * storage/SQLException.idl: * storage/SQLResultSet.cpp: * storage/SQLResultSet.h: * storage/SQLResultSet.idl: * storage/SQLResultSetRowList.cpp: * storage/SQLResultSetRowList.h: * storage/SQLResultSetRowList.idl: * storage/SQLStatement.cpp: * storage/SQLStatement.h: * storage/SQLStatementCallback.h: * storage/SQLStatementCallback.idl: * storage/SQLStatementErrorCallback.h: * storage/SQLStatementErrorCallback.idl: * storage/SQLStatementSync.cpp: * storage/SQLStatementSync.h: * storage/SQLTransaction.cpp: * storage/SQLTransaction.h: * storage/SQLTransaction.idl: * storage/SQLTransactionCallback.h: * storage/SQLTransactionCallback.idl: * storage/SQLTransactionClient.cpp: * storage/SQLTransactionClient.h: * storage/SQLTransactionCoordinator.cpp: * storage/SQLTransactionCoordinator.h: * storage/SQLTransactionErrorCallback.h: * storage/SQLTransactionErrorCallback.idl: * storage/SQLTransactionSync.cpp: * storage/SQLTransactionSync.h: * storage/SQLTransactionSync.idl: * storage/SQLTransactionSyncCallback.h: * storage/SQLTransactionSyncCallback.idl: * storage/chromium/DatabaseObserver.h: * storage/chromium/DatabaseTrackerChromium.cpp: * storage/chromium/QuotaTracker.cpp: * storage/chromium/QuotaTracker.h: * storage/chromium/SQLTransactionClientChromium.cpp: * workers/WorkerContext.cpp: * workers/WorkerContext.h: * workers/WorkerContext.idl: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownStartTask::performTask): (WebCore::WorkerThread::stop): 2011-09-15 Alexandru Chiculita [CSSRegions] Regions should not slice line box rendering https://bugs.webkit.org/show_bug.cgi?id=66198 Created a new LayoutState constructor for the RenderFlowThread. It will set m_isPaginated to true and force a pageHeight if 1. The actual pageHeight is not used, because pageLogicalHeightForOffset will actually redirect the call to RenderFlowThread. Removed some of the duplicate code that calculated the page logical offset. Added new methods like logicalPageOffset, pageLogicalHeightForOffset, pageRemainingLogicalHeightForOffset. There are still some issues related to incremental layout and different region widths. Those issues will be addressed in different patches. Reviewed by David Hyatt. Tests: fast/regions/text-region-breaks.html fast/regions/text-region-split-horizontal-bt.html fast/regions/text-region-split-vertical-rl.html fast/regions/text-region-split-vertical.html fast/regions/text-region-split.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/LayoutState.h: (WebCore::LayoutState::LayoutState): (WebCore::LayoutState::isPaginated): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionNewFloats): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::nextPageLogicalTopExcludingBoundaryPoint): (WebCore::RenderBlock::nextPageLogicalTopIncludingBoundaryPoint): (WebCore::inNormalFlow): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::logicalPageOffset): (WebCore::RenderBlock::pageLogicalHeightForOffset): (WebCore::RenderBlock::pageRemainingLogicalHeightForOffset): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::regionLogicalHeightForLine): (WebCore::RenderFlowThread::regionRemainingLogicalHeightForLine): * rendering/RenderFlowThread.h: * rendering/RenderView.cpp: (WebCore::RenderView::pushLayoutState): * rendering/RenderView.h: (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): (WebCore::LayoutStateMaintainer::push): 2011-09-15 Kentaro Hara Implement a PopStateEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67977 Reviewed by Sam Weinig. Test: fast/events/constructors/pop-state-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PopStateEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PopStateEvent. * dom/PopStateEvent.cpp: (WebCore::PopStateEventInit::PopStateEventInit): (WebCore::PopStateEvent::PopStateEvent): (WebCore::PopStateEvent::create): * dom/PopStateEvent.h: Added a definition for PopStateEventInit. * dom/PopStateEvent.idl: Makes PopStateEvent constructible. 2011-09-15 Mihai Parparita Fragment navigations should interrupt a provisional load of a different document https://bugs.webkit.org/show_bug.cgi?id=64556 Reviewed by Adam Barth. Tests: http/tests/history/back-with-fragment-change.php http/tests/navigation/navigation-interrupted-by-fragment.html * loader/FrameLoader.cpp: Stop provisional load if a fragment commits. * loader/HistoryController.cpp: Don't commit the wrong provisional item. 2011-09-15 Adrienne Walker [chromium] Add temporary diagnostics for LayerTreeHost::commitTo crash https://bugs.webkit.org/show_bug.cgi?id=68204 Reviewed by James Robinson. Add CRASH calls to determine which assumptions are being violated. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): 2011-09-15 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (7/7) https://bugs.webkit.org/show_bug.cgi?id=68122 Reviewed by Geoffrey Garen. No new tests. Completed the seventh and final level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This consists of moving the finishCreation() method call into the create methods of the sixth level of the hierarchy as was done in previous patches. The special cases for JSAudioConstructor, JSOptionConstructor, and JSImageConstructor were also lumped in and given finishCreation() methods that are called in their create methods because we are at the end and want to avoid a trivial patch just for moving their finishCreation() methods from their constructor to their create method. * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): (WebCore::JSAudioConstructor::finishCreation): * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::create): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): * bindings/js/JSImageConstructor.cpp: (WebCore::JSImageConstructor::JSImageConstructor): (WebCore::JSImageConstructor::finishCreation): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::create): * bindings/js/JSOptionConstructor.cpp: (WebCore::JSOptionConstructor::JSOptionConstructor): (WebCore::JSOptionConstructor::finishCreation): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::create): * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): The bindings generation script was also changed to move the finishCreation() call into the create methods for descendants of JSWorkerContextBase and JSDOMWindowBase because those base classes had it removed from their constructors. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::create): 2011-09-15 Kentaro Hara A single line must not be split into two pages. https://bugs.webkit.org/show_bug.cgi?id=65005 Reviewed by David Hyatt. When the document width of a page is overflowed, the last line of the page can be split into the next page. This is the regression caused by r88737. r88737 tried to fix rounding errors in rendering calculations by expanding and shrinking a page using one common method, resizePageRectsKeepingRatio(), but overlooked the case where a document width gets overflowed. This patch fixes the problem by also using resizePageRectsKeepingRatio() for the case where the document width gets overflowed. Test: printing/single-line-must-not-be-split-into-two-pages.html * WebCore.exp.in: Updated the signature of forceLayoutForPagination(). * page/Frame.cpp: (WebCore::Frame::setPrinting): Added a new argument |originalPageSize|, which is an original page size before being expanded or shrunk. * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::forceLayoutForPagination): Uses resizePageRectsKeepingRatio() in the case where the document width gets overflowed. * page/FrameView.h: * page/PrintContext.cpp: (WebCore::PrintContext::begin): Passes an original page size to setPrinting(). (WebCore::PrintContext::end): Ditto. 2011-09-15 Sheriff Bot Unreviewed, rolling out r95243 and r95246. http://trac.webkit.org/changeset/95243 http://trac.webkit.org/changeset/95246 https://bugs.webkit.org/show_bug.cgi?id=68202 Broke the Windows build (Requested by smfr on #webkit). * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform/win/StructuredExceptionHandlerSupressor.h: Removed. 2011-09-15 Simon Fraser Attempt to fix Windows build after r95243. * WebCore.vcproj/WebCore.vcproj: 2011-09-15 Simon Fraser Make custom scrollbar theme for use in DRT, to reduce pixel differences between platforms https://bugs.webkit.org/show_bug.cgi?id=68134 Reviewed by James Robinson. Add new scrollbar theme, called ScrollbarThemeMock, for use in layout tests. The mock scrollbar simply draws a light gray box in the track, with a dark gray box for the thumb. Add ScrollbarThemeMock files to the build on all platforms. It isn't hooked up yet. * CMakeLists.txt: * CMakeListsEfl.txt: * CMakeListsWinCE.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarTheme::nativeTheme): * platform/mock/ScrollbarThemeMock.cpp: Added. (WebCore::ScrollbarThemeMock::trackRect): (WebCore::ScrollbarThemeMock::scrollbarThickness): (WebCore::ScrollbarThemeMock::paintTrackBackground): (WebCore::ScrollbarThemeMock::paintThumb): * platform/mock/ScrollbarThemeMock.h: Added. (WebCore::ScrollbarThemeMock::hasButtons): (WebCore::ScrollbarThemeMock::hasThumb): (WebCore::ScrollbarThemeMock::backButtonRect): (WebCore::ScrollbarThemeMock::forwardButtonRect): 2011-09-15 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67884 Delete button icon does not properly update when the device resolution changes dynamically -and corresponding- Reviewed by Darin Adler. In DeleteButtonController::deviceScaleFactorChanged(), if the delete button is currently showing, hide it and re-show it, forcing it to re-create the deletion UI. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::deviceScaleFactorChanged): * editing/DeleteButtonController.h: * editing/Editor.cpp: (WebCore::Editor::deviceScaleFactorChanged): * editing/Editor.h: Iterate through all of the frames and propagate the deviceScaleFactorChange() message to Editor. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): 2011-09-15 Chris Marrin Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction https://bugs.webkit.org/show_bug.cgi?id=67510 Reviewed by Adam Roben. Another fix to take care of one last crash when running pause-crash.html. CACF can't deal with null valueFunctions, so avoid setting it when it doesn't exist. This also adds logic to the Windows Hook in LayerChangesFlusher to prevent it from catching the null pointer exception generated by the pause-crash.html test before this bug was fixed. Windows was ignoring the exception, so the testcase would appear to succeed, even though it should have crashed. * WebCore.vcproj/WebCore.vcproj: * platform/graphics/ca/win/LayerChangesFlusher.cpp: (WebCore::LayerChangesFlusher::hookCallback): * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::copy): * platform\win\StructuredExceptionHandlerSupressor.h: New file to encapsulate the exception handling supression. 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=27579 Make sure that the border shorthand also resets border-image. Reviewed by Beth Dakin. Added fast/borders/border-image-reset-by-border-shorthand.html. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): 2011-09-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=50072 Make overflow clipping to border-radius work across layers. This patch makes painting work but does not attempt to fix hit testing. It also doesn't work when a composited layer is clipped by a non-composited ancestor. Add a new ClipRect class (used by ClipRects and RenderLayer) that is basically just tracking a rect and a border radius taint. At the time we set a clip, if the rectangle is listed as also being clipped by a radius, then we walk up the layer tree and push those inner border rounded rect clips for any overflow areas in the containing block chain. Reviewed by Beth Dakin. Added new tests in fast/clip. * rendering/RenderBox.cpp: (WebCore::RenderBox::pushContentsClip): * rendering/RenderLayer.cpp: (WebCore::inContainingBlockChain): (WebCore::RenderLayer::clipToRect): (WebCore::RenderLayer::restoreClip): (WebCore::RenderLayer::paintLayer): (WebCore::RenderLayer::hitTestLayer): (WebCore::RenderLayer::calculateClipRects): (WebCore::RenderLayer::backgroundClipRect): (WebCore::RenderLayer::calculateRects): (WebCore::RenderLayer::childrenClipRect): (WebCore::RenderLayer::selfClipRect): * rendering/RenderLayer.h: (WebCore::ClipRect::ClipRect): (WebCore::ClipRect::rect): (WebCore::ClipRect::setRect): (WebCore::ClipRect::hasRadius): (WebCore::ClipRect::setHasRadius): (WebCore::ClipRect::operator==): (WebCore::ClipRect::intersect): (WebCore::ClipRect::move): (WebCore::ClipRect::isEmpty): (WebCore::ClipRect::intersects): (WebCore::intersection): (WebCore::ClipRects::overflowClipRect): (WebCore::ClipRects::setOverflowClipRect): (WebCore::ClipRects::fixedClipRect): (WebCore::ClipRects::setFixedClipRect): (WebCore::ClipRects::posClipRect): (WebCore::ClipRects::setPosClipRect): * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateCompositedBounds): (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): (WebCore::RenderLayerBacking::paintIntoLayer): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::addToOverlapMap): (WebCore::RenderLayerCompositor::clippedByAncestor): * rendering/RenderTreeAsText.cpp: (WebCore::writeLayers): 2011-09-15 Julien Chaffraix Crash in RenderBox::paintMaskImages due to a mask without an associated image https://bugs.webkit.org/show_bug.cgi?id=50151 Reviewed by Simon Fraser. Test: fast/css/empty-webkit-mask-crash.html The crash stems from the fact that FillLayer::hasImage would walk over the linked list of FillLayers and return true if one had an image. This means that hasImage() is true does not mean that image() is non-NULL on all FillLayers. * rendering/RenderBox.cpp: (WebCore::RenderBox::paintMaskImages): Simplify the logic by doing the hasImage() check up-front and properly check image() for each FillLayers. This has the nice benefit of changing the complexity from O(n^2) to O(n), which was what the code expected anyway. 2011-09-15 Eric Seidel Remove ENABLE(SVG_AS_IMAGE) since all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68182 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * loader/cache/CachedImage.cpp: (WebCore::CachedImage::createImage): 2011-09-15 Andy Estes Having an empty listener to beforeload events changes the behavior of other scripts https://bugs.webkit.org/show_bug.cgi?id=45586 Reviewed by Darin Adler. Test: fast/dom/beforeload/cached-image-before-load.html When loading a cached image after a beforeload handler has been installed on the document, ImageLoader would dispatch both the beforeload and load events asynchronously in such a way that caused load to fire first. Since a side effect of firing the beforeload event is to wire up the CachedImage to its associated RenderImage object, this work was not done by the time load fired, and scripts that queried renderer-dependent attributes of the image in an onload handler would get bogus values in return. Fix this by ensuring load fires after beforeload in the cached image case. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Call setClient() after dispatching beforeload, since setClient() will dispatch the load event if the image is cached. 2011-09-15 Anders Carlsson Remove ScrollView::platformContentsSize https://bugs.webkit.org/show_bug.cgi?id=68188 Reviewed by Darin Adler. Since ScrollView keeps track of the contents size in ScrollView::m_contentsSize, we never have to ask the underlying platform scroll view for contents size since it should always just be equal to m_contentsSize. * platform/ScrollView.cpp: (WebCore::ScrollView::contentsSize): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: * platform/wx/ScrollViewWx.cpp: 2011-09-15 Jon Lee Submitting a form with target=_blank works only once https://bugs.webkit.org/show_bug.cgi?id=28633 Reviewed by Andy Estes. Test: fast/forms/submit-to-blank-multiple-times.html The call to reset the multiple form submission bool is pushed down from the mouseDown handler to handleMousePressEvent(), to include WK2 coverage, similar to keyEvent. * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::keyEvent): clarified old FIXME comment. Both key events and mouse events may submit a form multiple times, but the call to reset the handler should probably be in another abstraction layer. * page/mac/EventHandlerMac.mm: (WebCore::EventHandler::mouseDown): 2011-09-15 Peter Rybin XMLDocumentParserQt.cpp incorrectly converts 0-based number into 1-based number https://bugs.webkit.org/show_bug.cgi?id=63540 ZeroBasedNumber/OneBasedNumber are used in more places, inconsistency in xml parser is fixed. Reviewed by Adam Barth. * bindings/js/ScriptController.cpp: (WebCore::ScriptController::eventHandlerLineNumber): * dom/ScriptableDocumentParser.h: * dom/StyleElement.cpp: (WebCore::StyleElement::StyleElement): * dom/ViewportArguments.cpp: (WebCore::parserLineNumber): * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::lineNumber): * html/parser/HTMLDocumentParser.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::buildInitiatorObject): * svg/SVGDocumentExtensions.cpp: (WebCore::parserLineNumber): * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::lineNumber): * xml/parser/NewXMLDocumentParser.h: * xml/parser/XMLDocumentParser.cpp: (WebCore::XMLDocumentParser::pushCurrentNode): * xml/parser/XMLDocumentParser.h: * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::PendingCallbacks::appendErrorCallback): (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::startElementNs): (WebCore::XMLDocumentParser::error): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): * xml/parser/XMLDocumentParserQt.cpp: (WebCore::XMLDocumentParser::doWrite): (WebCore::XMLDocumentParser::doEnd): (WebCore::XMLDocumentParser::lineNumber): (WebCore::XMLDocumentParser::columnNumber): (WebCore::XMLDocumentParser::textPosition): (WebCore::XMLDocumentParser::parse): (WebCore::XMLDocumentParser::parseStartElement): 2011-09-15 Peter Kasting Fix WebCore.gypi after r95130. Unreviewed, build fix. * WebCore.gypi: 2011-09-15 Eric Seidel Remove ENABLE_SVG_ANIMATION as all major ports have it on by default https://bugs.webkit.org/show_bug.cgi?id=68022 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: * page/DOMWindow.idl: * svg/svgtags.in: 2011-09-15 Matthew Delaney REGRESSION (Safari 5.1-r95043): Incorrect box-shadow offset https://bugs.webkit.org/show_bug.cgi?id=68041 Reviewed by Dan Bernstein. Test: fast/box-shadow/no-blur-multiple-offsets.html * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): Add hack back in for Lion if context is not accelerated. 2011-09-15 James Simonsen Ref protect HTMLObjectElement and HTMLEmbedElement while requesting plugins https://bugs.webkit.org/show_bug.cgi?id=68014 Reviewed by Adam Barth. Test: plugins/destroy-during-npp-new.html under valgrind plugins/destroy-during-npp-new-object-with-fallback-content.html under valgrind * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): 2011-09-15 Sam Weinig Experiment with removing ability to call a collection (except document.all) https://bugs.webkit.org/show_bug.cgi?id=67579 Reviewed by Anders Carlsson. At the request of the public-script-coord mailing list (specifically Brendan Eich, see http://lists.w3.org/Archives/Public/public-script-coord/2011JulSep/0360.html), this patch removes the ability to call a collection (either a NodeList or HTMLCollection, but not an HTMLAllCollection) as function, a syntax that we adopted to emulate IE. It is being landed to find out if there are any sites relying on this behavior of WebKit, or, if it is only used in IE only paths. If we find sites are breaking, it should be rolled out and we should inform the public-script-coord mailing list. * bindings/js/JSHTMLAllCollectionCustom.cpp: Update comment. * bindings/js/JSHTMLCollectionCustom.cpp: * bindings/js/JSNodeListCustom.cpp: Remove custom call code. * bindings/scripts/CodeGeneratorV8.pm: Add support for V8CustomCall. * dom/NodeList.idl: * html/HTMLCollection.idl: Remove CustomCall. 2011-09-15 Andreas Kling CanvasRenderingContext2D::State copy ctor should use initializer list. https://bugs.webkit.org/show_bug.cgi?id=68152 Reviewed by Darin Adler. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::State::State): 2011-09-15 Andreas Kling Don't bother calculating dirty rect for accelerated 2D canvases. https://bugs.webkit.org/show_bug.cgi?id=68158 Reviewed by Kenneth Rohde Christiansen. For accelerated CanvasRenderingContext2D, didDraw() simply calls out to RenderLayer::contentChanged(). Move this to the top of didDraw() so we don't waste time calculating a precise dirty rect. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::didDraw): 2011-09-15 Brian Salomon [Skia/Chrome] Cleanup unneeded code now that GrGLInterface is used to set GL ctx per GL call. https://bugs.webkit.org/show_bug.cgi?id=68096 Reviewed by Stephen White. This change removes PlatformContextSkia::makeGrContextCurrent now that GrGLInterface is used to set the context on every Skia GL call. Tested by every canvas layout test. * platform/graphics/chromium/FontLinux.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::drawGlyphs): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::clip): (WebCore::GraphicsContext::drawConvexPolygon): (WebCore::GraphicsContext::drawEllipse): (WebCore::GraphicsContext::drawFocusRing): (WebCore::GraphicsContext::drawLine): (WebCore::GraphicsContext::drawLineForTextChecking): (WebCore::GraphicsContext::drawLineForText): (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): (WebCore::GraphicsContext::fillRoundedRect): (WebCore::GraphicsContext::strokeArc): (WebCore::GraphicsContext::strokePath): (WebCore::GraphicsContext::strokeRect): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): (WebCore::ImageBuffer::~ImageBuffer): (WebCore::ImageBuffer::copyImage): (WebCore::ImageBuffer::draw): (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageSkia.cpp: (WebCore::BitmapImage::draw): (WebCore::BitmapImageSingleFrameSkia::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::paintSkiaText): 2011-09-15 Peter Beverloo [Chromium] Make sure that the ARM NEON files build with -marm https://bugs.webkit.org/show_bug.cgi?id=68088 Simply adding the -marm cflag for OS=Android compiles results in it being overridden by an -mthumb cflag later in the project generating process. Therefore we should explicitly exclude -mthumb. Reviewed by Tony Gentilcore. * WebCore.gyp/WebCore.gyp: 2011-09-15 Keishi Hattori [chromium] Build fix: Remove use of GraphicsContext::setIsAcceleratedContext r95174 introduced GraphicsContext::setIsAcceleratedContext into Skia code and caused chromium builds to fail. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-09-15 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. ThreadableWebSocketChannelClientWrapper is derived from ThreadSafeRefCounted. It may be destroyed on different threads, which will affect String's refcounting. Therefore, classes derived from ThreadSafeRefCounted must not have a String member variable. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. Note that String constructor taking an empty vector returns a null string, not an empty string. We want an empty string in that case, so I had to add special-case handling for an empty vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-14 Matthew Delaney Use isAcceleratedContext() on the GraphicsContext instead of flags in ImageBuffer https://bugs.webkit.org/show_bug.cgi?id=68137 Reviewed by Simon Fraser. No new tests. No change in behavior. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::isAccelerated): Have all just query the context directly. (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): just use isAccelerated directly * platform/graphics/ImageBuffer.h: * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::ImageBuffer): Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::copyNativeImage): Update the check. Same for all below... (WebCore::ImageBuffer::drawPattern): (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putUnmultipliedImageData): (WebCore::ImageBuffer::putPremultipliedImageData): * platform/graphics/skia/ImageBufferSkia.cpp: Set isAcceleratedContext on the GraphicsContext instead of carrying the bit around on the ImageBuffer itself. (WebCore::ImageBuffer::ImageBuffer): Remove m_acceleratesRendering flag and getter. 2011-09-14 Jeffrey Pfau libxml2 fragment parser loses prefix namespaces https://bugs.webkit.org/show_bug.cgi?id=66423 This makes the loop over the elements outside of the context actually update the element it's processing. Reviewed by Eric Seidel. Test: fast/parser/innerhtml-with-prefixed-elements.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-09-14 Nate Chapin [V8] Null-check the v8::Context in V8DOMWindowShell:namedItemAdded() before using it. Also, add some logging to figure out how we're getting into this bad state. https://bugs.webkit.org/show_bug.cgi?id=68099 Reviewed by Adam Barth. No new tests, no known repro. * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::namedItemAdded): 2011-09-14 Patrick Gansterer Replace ENABLE_XHR_RESPONSE_BLOB preprocessor statements in IDL files with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=64960 Reviewed by Ryosuke Niwa. * xml/XMLHttpRequest.idl: 2011-09-14 Alexei Svitkine Chromium: Add a layer for rubber-band overhang painting to the hardware path. https://bugs.webkit.org/show_bug.cgi?id=66969 Also, add layout tests for rubber-band overhang drawing for compositing path. Reviewed by James Robinson. * page/FrameView.cpp: (WebCore::FrameView::layerForOverhangAreas): * page/FrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::scrollContents): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.h: (WebCore::ScrollableArea::layerForOverhangAreas): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::frameViewDidChangeSize): (WebCore::RenderLayerCompositor::paintContents): (WebCore::RenderLayerCompositor::updateOverflowControlsLayers): (WebCore::RenderLayerCompositor::destroyRootLayer): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::layerForOverhangAreas): 2011-09-14 Antoine Labour Remove the dependency on GraphicsLayer from CCLayerTreeHost. Move root layer management into the NonCompositedContentHost. Have WebViewImpl create a NonCompositedContentHost explicitly. https://bugs.webkit.org/show_bug.cgi?id=67883 Reviewed by James Robinson. Covered by compositing/ layout tests. * platform/graphics/chromium/NonCompositedContentHost.cpp: (WebCore::NonCompositedContentHost::setRootLayer): (WebCore::NonCompositedContentHost::setViewport): (WebCore::NonCompositedContentHost::setVisible): (WebCore::NonCompositedContentHost::clearRenderSurfacesRecursive): (WebCore::NonCompositedContentHost::invalidateRect): * platform/graphics/chromium/NonCompositedContentHost.h: (WebCore::NonCompositedContentHost::topLevelRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::create): (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::CCLayerTreeHost::paintLayerContents): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): 2011-09-14 Henrik Grunell MediaStream API: Change PeerConnection constructor name to webkitPeerConnection https://bugs.webkit.org/show_bug.cgi?id=67843 Reviewed by Tony Gentilcore. Tests for the MediaStream API will be provided by the bug 56587, pending enough landed code. * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitPeerConnectionEnabled): * page/DOMWindow.idl: 2011-09-14 John Bauman Make sure to GC decoded images that are only used with WebGL https://bugs.webkit.org/show_bug.cgi?id=67899 Reviewed by James Robinson. Tell CachedImage that the WebGL image was drawn so WebGL-only content will have decoded images collected. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::extractImageData): 2011-09-14 Antoine Labour Added a pure virtual class CCLayerDelegate which helps to isolate the chromium compositor from the rest of WebCore, and aids unit testing by being easily mockable. The compositor layers no longer directly see instances of GraphicsLayerChromium, instead they use this interface. https://bugs.webkit.org/show_bug.cgi?id=67750 Reviewed by James Robinson. No new tests: changes already covered by existing compositing layout tests. * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::create): (WebCore::ContentLayerPainter::paint): (WebCore::ContentLayerPainter::ContentLayerPainter): (WebCore::ContentLayerChromium::create): (WebCore::ContentLayerChromium::ContentLayerChromium): (WebCore::ContentLayerChromium::drawsContent): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::getDrawsContent): (WebCore::GraphicsLayerChromium::getPreserves3D): (WebCore::GraphicsLayerChromium::paintingGoesToWindow): (WebCore::GraphicsLayerChromium::doPaintGraphicsLayerContents): (WebCore::GraphicsLayerChromium::notifySyncRequired): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::create): (WebCore::ImageLayerChromium::ImageLayerChromium): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::create): (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::CCLayerDelegate::~CCLayerDelegate): (WebCore::LayerChromium::preserves3D): (WebCore::LayerChromium::setOwner): * platform/graphics/chromium/PluginLayerChromium.cpp: (WebCore::PluginLayerChromium::create): (WebCore::PluginLayerChromium::PluginLayerChromium): * platform/graphics/chromium/PluginLayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::create): (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::create): (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-09-14 Anders Carlsson Try to fix GTK+ build. * GNUmakefile.list.am: 2011-09-14 James Robinson [chromium] LayerRendererChromium shouldn't be RefCounted https://bugs.webkit.org/show_bug.cgi?id=68121 Reviewed by Kenneth Russell. LayerRendererChromium is owned exclusively by CCLayerTreeHostImpl, so there's no reason to have it be refcounted. Making it an OwnPtr<> makes the lifecycle for these objects much cleaner and reduces the chance of introducing accidental reference cycles. This also removes the LayerRendererChromium pointers from CCLayerImpls since it only needed at draw time. Covered by compositing/ tests. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): (WebCore::CCLayerImpl::draw): (WebCore::CCLayerImpl::bindContentsTexture): (WebCore::CCLayerImpl::drawDebugBorder): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::cleanupResources): (WebCore::CCRenderSurface::prepareContentsTexture): (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-14 Anders Carlsson Get rid of WebCoreViewFactory and its WebViewFactory subclass https://bugs.webkit.org/show_bug.cgi?id=68124 Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * editing/mac/FrameSelectionMac.mm: * page/mac/FrameMac.mm: * page/mac/WebCoreViewFactory.h: Removed. * page/mac/WebCoreViewFactory.m: Removed. 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=52736 Tiles were not being properly centered within border image sides for the "repeat" keyword. This patch fixes the buggy math behind the pattern tiling to actually get the initial phases correct. Reviewed by Sam Weinig. Added new tests in fast/borders and updated broken existing tests. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): 2011-09-14 Anders Carlsson Remove DocTypeStrings.gperf https://bugs.webkit.org/show_bug.cgi?id=68119 Reviewed by Sam Weinig. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * WebCore.gyp/WebCore.gyp: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/DocTypeStrings.gperf: Removed. * make-hash-tools.pl: * platform/HashTools.h: 2011-09-14 Chris Rogers Address lifetime issues in OfflineAudioDestinationNode (take 2) https://bugs.webkit.org/show_bug.cgi?id=68111 Reviewed by Kenneth Russell. No new tests. This fixes existing layout tests. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::startRendering): (WebCore::OfflineAudioDestinationNode::render): 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68103 Centered portions of border images don't render correctly. Make the tile scale factor have to be explicitly passed in and modify paintNinePieceImage to compute it for all sides. The attempts to implicitly compute the scale for the pattern based off the source and destination rects just don't work, since the center image rects don't provide the right information to be able to infer the scale factor. Reviewed by Sam Weinig. Reset all the existing fast/borders pixel results to Lion for these changes. * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawTiledImage): * platform/graphics/GraphicsContext.h: * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): 2011-09-14 Anders Carlsson Get rid of ResourceHandle::bufferedData() https://bugs.webkit.org/show_bug.cgi?id=68112 Reviewed by David Hyatt. ResourceHandle::bufferedData() was only implemented on Mac, and the support in the underlying NSURLConnection class hasn't been there for several OS releases. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::resourceData): (WebCore::ResourceLoader::addData): * platform/network/ResourceHandle.h: * platform/network/cf/ResourceHandleCFNet.cpp: * platform/network/curl/ResourceHandleCurl.cpp: * platform/network/mac/ResourceHandleMac.mm: * platform/network/qt/ResourceHandleQt.cpp: * platform/network/soup/ResourceHandleSoup.cpp: * platform/network/win/ResourceHandleWin.cpp: 2011-09-14 Mark Hahnenberg REGRESSION: r95108 broke Qt Linux tests https://bugs.webkit.org/show_bug.cgi?id=68104 Reviewed by Csaba Osztrogonác. No new tests. Build fix for Qt tests broken in r95108. * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: 2011-09-14 James Robinson [skia] fast/canvas/setWidthResetAfterForcedRender is flaky https://bugs.webkit.org/show_bug.cgi?id=67955 Reviewed by Stephen White. When destroying an ImageBuffer due to a canvas resize, we weren't clearing the texture ID on the layer, resulting in future compositor draw calls binding an invalid texture. This results in the test failing and possibly drawing from a bad texture. Covered by fast/canvas/setWidthResetAfterForcedRender.html in the GPU configuration. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::drawsContent) * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-14 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. I missed a couple uses of SVG_USE in my previous patch. * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/SVGUseElement.h: 2011-09-14 Mark Hahnenberg Unzip initialization lists and constructors in JSCell hierarchy (6/7) https://bugs.webkit.org/show_bug.cgi?id=67692 Reviewed by Geoffrey Garen. No new tests. Completed the sixth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the fifth level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument): (WebCore::DOMConstructorWithDocument::finishCreation): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::JSDOMWindowBase): (WebCore::JSDOMWindowBase::finishCreation): * bindings/js/JSDOMWindowBase.h: * bindings/js/JSWorkerContextBase.cpp: (WebCore::JSWorkerContextBase::JSWorkerContextBase): (WebCore::JSWorkerContextBase::finishCreation): * bindings/js/JSWorkerContextBase.h: * bindings/scripts/CodeGeneratorJS.pm: Added a finishCreation declaration and Moved the finishCreation call into the create method for all classes except for subclasses of JSWorkerContextBase and JSDOMWindowBase because those classes are on the next level, and it's easier to do all of these classes in one fell swoop rather than level by level. (GenerateHeader): Added the implementation of the finishCreation method for the classes described above. (GenerateImplementation): Also added the finishCreation calls to the autogenerated DOM constructor classes. (GenerateConstructorDeclaration): (GenerateConstructorDefinition): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::create): (WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor): (WebCore::JSTestInterfaceConstructor::finishCreation): (WebCore::JSTestInterface::JSTestInterface): (WebCore::JSTestInterface::finishCreation): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::create): (WebCore::JSTestInterfacePrototype::create): (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::create): (WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor): (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation): (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): (WebCore::JSTestMediaQueryListListener::finishCreation): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::create): (WebCore::JSTestMediaQueryListListenerPrototype::create): (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::create): (WebCore::JSTestObjConstructor::JSTestObjConstructor): (WebCore::JSTestObjConstructor::finishCreation): (WebCore::JSTestObj::JSTestObj): (WebCore::JSTestObj::finishCreation): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::create): (WebCore::JSTestObjPrototype::create): (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::create): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor): (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation): (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): (WebCore::JSTestSerializedScriptValueInterface::finishCreation): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): (JSC::Bindings::CRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::JavaRuntimeMethod): (JavaRuntimeMethod::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::ObjCRuntimeMethod): (ObjCRuntimeMethod::finishCreation): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::create): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::create): (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeMetaMethod::finishCreation): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): (JSC::Bindings::QtRuntimeConnectionMethod::finishCreation): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: (JSC::RuntimeMethod::create): 2011-09-13 Eric Seidel Remove ENABLE_SVG_USE as is required by HTML5 https://bugs.webkit.org/show_bug.cgi?id=68019 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * features.pri: 2011-09-14 Eric Carlson MediaPlayerPrivateAVFoundationObjC's "periodic time observer" is unnecessary https://bugs.webkit.org/show_bug.cgi?id=68056 MediaPlayerPrivateAVFoundationObjC creates a "periodic time observer" not because it wants periodic callbacks, but because a time observer also fires whenever a seek completes. This is no longer necessary because it now uses but AVPlayerItem's -seekToTime:toleranceBefore:toleranceAfter:completionHandler to seek, so seek completions are always notified. Reviewed by Darin Adler. No new tests, code removed is tested by existing tests. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): 2011-09-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=68054 Return an image scale factor as well as an Image* from CachedImage::brokenImage() Reviewed by Darin Adler. CachedImage::brokenImage() now returns a pair where the float represents the image's scale factor. This is important because currently, the broken image will either be only 1x or 2x, but a deviceScaleFactor could theoretically be something different (1.5, 3, etc). So it is not safe to assume that the image's scale factor is equivalent to the deviceScaleFactor, and hardcoding 2 for now is lame. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-14 James Robinson [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-14 Mike Reed query SystemParametersInfo for GDI font smoothing settings https://bugs.webkit.org/show_bug.cgi?id=68080 Reviewed by Stephen White. No new tests. fixes antialiasing issues based on User settings * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::getDefaultGDITextFlags): (WebCore::setupPaintForFont): 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68050 Regressions in some layout tests from making border/mask/reflection nine-piece-image parsing match the spec, which allows any of the pieces to be omitted and to also be specifiable in any order. When the higher level code suddenly allowed the image slices to be omitted, the fixup for legacy compatibility for reflections and masks in the parseBorderImageSlice function no longer happened because that function no longer got called. The fix is to properly set the defaults to include the "fill" keyword, so the fixup is applied to the NinePieceImages you create before you ever map anything in from the rules. This also has the side effect of fixing -webkit-max-box-image-slice to actually dump as "0 fill" instead of just "0", which is the correct initial value for this property. Reviewed by Adam Roben. * css/CSSParser.cpp: (WebCore::CSSParser::parseBorderImageSlice): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): * inspector/InspectorInstrumentation.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): * page/Frame.h: 2011-09-14 Pavel Feldman Not reviewed: rolling out r95089. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDestroyedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::didCommitLoad): (WebCore::InspectorInstrumentation::frameDestroyed): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): (WebCore::InspectorPageAgent::frameDestroyed): * inspector/InspectorPageAgent.h: * page/Frame.cpp: (WebCore::Frame::~Frame): 2011-09-14 Ilya Tikhonovsky Web Inspector: requestAnimationFrame callbacks don't show up in the timeline panel. https://bugs.webkit.org/show_bug.cgi?id=67986 Reviewed by Pavel Feldman. Test: inspector/timeline/timeline-animation-frame.html * English.lproj/localizedStrings.js: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::callFunctionWithoutFrame): (WebCore::V8Proxy::instrumentedCallFunction): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8CustomVoidCallback.cpp: (WebCore::invokeCallback): * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::cancelCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallbackImpl): (WebCore::InspectorInstrumentation::willFireAnimationFrameEventImpl): (WebCore::InspectorInstrumentation::didFireAnimationFrameEventImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willCallFunction): (WebCore::InspectorInstrumentation::didRegisterAnimationFrameCallback): (WebCore::InspectorInstrumentation::didCancelAnimationFrameCallback): (WebCore::InspectorInstrumentation::willFireAnimationFrameEvent): (WebCore::InspectorInstrumentation::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didRegisterAnimationFrameCallback): (WebCore::InspectorTimelineAgent::didCancelAnimationFrameCallback): (WebCore::InspectorTimelineAgent::willFireAnimationFrameEvent): (WebCore::InspectorTimelineAgent::didFireAnimationFrameEvent): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createAnimationFrameCallbackData): * inspector/TimelineRecordFactory.h: * inspector/front-end/TimelineAgent.js: * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype.get _recordStyles): (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): (WebInspector.TimelinePanel.prototype._clearPanel): (WebInspector.TimelinePanel.FormattedRecord): (WebInspector.TimelinePanel.FormattedRecord.prototype._generatePopupContent): (WebInspector.TimelinePanel.FormattedRecord.prototype._getRecordDetails): 2011-09-13 Pavel Feldman Web Inspector: InspectorInstrumentation::frameDestroyed is called after m_page has been reset. https://bugs.webkit.org/show_bug.cgi?id=67997 We should not instrument frameDestroyed event from within Frame's destructor since frame's m_page pointer is likely to be 0 by that time and appropriate instrumenting agent won't be found. As a result, stale frame with its id end up in the inspector. This change wipes out frame binding from the inspector upon detach rather than destroy + adds an assertion into the inspector agents lookup with 0 page. Reviewed by Tony Gentilcore. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::frameDetachedImpl): (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::frameWindowDiscarded): (WebCore::InspectorInstrumentation::domContentLoadedEventFired): (WebCore::InspectorInstrumentation::loadEventFired): (WebCore::InspectorInstrumentation::frameDetached): (WebCore::InspectorInstrumentation::didCommitLoad): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::frameDetached): * inspector/InspectorPageAgent.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::detachFromParent): * page/Frame.cpp: (WebCore::Frame::~Frame): (WebCore::Frame::detachFromPage): (WebCore::Frame::transferChildFrameToNewDocument): * page/Frame.h: 2011-09-14 Sheriff Bot Unreviewed, rolling out r95080. http://trac.webkit.org/changeset/95080 https://bugs.webkit.org/show_bug.cgi?id=68070 It caused some 2d.composite.uncovered tests fail (Requested by rgabor on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-13 Pavel Feldman Web Inspector: [v8] building call frame info for location-less internal script function crashes. https://bugs.webkit.org/show_bug.cgi?id=67991 Reviewed by Yury Semikhatsky. Test: inspector/debugger/debugger-pause-in-internal.html * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::currentCallFrame): 2011-09-14 Ben Wells Large canvas fills should not crash or create unnecessarily large image buffers https://bugs.webkit.org/show_bug.cgi?id=67988 When using source-in, destination-in, source-out, or destination-atop a temporary buffer is created. This buffer only needs to be big enough to cover the intersection of the path and the canvas. This change also adds some null checks for failures to create contexts or buffers. Reviewed by Stephen White. Test: fast/canvas/canvas-large-fills.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): 2011-09-14 Kentaro Hara Implement a PageTransitionEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=68048 Reviewed by Sam Weinig. The spec for the PageTransitionEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#pagetransitionevent Test: fast/events/constructors/page-transition-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the PageTransitionEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for PageTransitionEvent. * dom/PageTransitionEvent.cpp: (WebCore::PageTransitionEventInit::PageTransitionEventInit): (WebCore::PageTransitionEvent::PageTransitionEvent): (WebCore::PageTransitionEvent::initPageTransitionEvent): * dom/PageTransitionEvent.h: Added a definition for PageTransitionEventInit. (WebCore::PageTransitionEvent::create): (WebCore::PageTransitionEvent::isPageTransitionEvent): (WebCore::PageTransitionEvent::persisted): * dom/PageTransitionEvent.idl: Makes PageTransitionEvent constructible. 2011-09-13 Sheriff Bot Unreviewed, rolling out r95058. http://trac.webkit.org/changeset/95058 https://bugs.webkit.org/show_bug.cgi?id=68058 It made css3/calc/regression-62276.html crash (Requested by Ossy on #webkit). * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowBreak): (WebCore::BorderImageParseContext::allowWidth): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::allowRepeat): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: 2011-09-13 Abhishek Arya Crash in RenderScrollbarPart::imageChanged. https://bugs.webkit.org/show_bug.cgi?id=68009 Reviewed by Simon Fraser. When a custom scrollbar is removed from its FrameView, its destruction can be delayed because of RefPtr maintained in EventHandler class (m_lastScrollbarUnderMouse). Upon removal, we delete all the scrollbar parts so that they don't link back to scrollbar. However, because of the delay, we can have a call to updateScrollbarPart which recreates it. When scrollbar is getting destroyed, we just check to see if there are remaining scrollbar parts and if yes, we destroy them. Test: scrollbars/scrollbar-part-created-with-no-parent-crash.html * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::~RenderScrollbar): 2011-09-13 Adam Klein Fix cssText property of counter-valued CSSPrimitiveValue and avoid uninitialized read https://bugs.webkit.org/show_bug.cgi?id=68021 Reviewed by Tony Chang. Reported by valgrind in http://crbug.com/60653. Besides fixing the uninitialized read, add support for outputting the list separator for counters() calls and the list-style name. Test: fast/css/counters/counter-cssText.html * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): 2011-09-13 Kenichi Ishibashi WebFont followed tiny monospace text displays weird https://bugs.webkit.org/show_bug.cgi?id=67996 Reviewed by Darin Adler. Always call wkSetCGFontRenderingMode() in Font::drawGlyphs() so that the rendering mode is set correctly. Test: platform/mac/fast/text/webfont-after-tiny-monospace-text.html * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): 2011-09-13 Tom Sepez Fix XSS auditor bypass when inline handlers contain comments. https://bugs.webkit.org/show_bug.cgi?id=27895 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/property-escape-comment.html http/tests/security/xssAuditor/property-escape-entity.html http/tests/security/xssAuditor/property-escape-quote.html * html/parser/XSSAuditor.cpp: (WebCore::XSSAuditor::snippetForAttribute): 2011-09-13 Kentaro Hara Implement a HashChangeEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67969 Reviewed by Nate Chapin. Test: fast/events/constructors/hash-change-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the HashChangeEvent constructor. * dom/HashChangeEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-13 Jeremy Apthorp Fix crash when an iframe element is removed during a transition to fullscreen. https://bugs.webkit.org/show_bug.cgi?id=67960 Reviewed by Adam Barth. Test: fullscreen/full-screen-remove-ancestor-during-transition.html * dom/Document.cpp: (WebCore::Document::~Document): Clear the list of elements to which we need to send a fullscreenchange event. 2011-09-13 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=68040 Make sure border image sub-properties can be specified in any order. Reviewed by Beth Dakin. New tests in fast/borders. * css/CSSParser.cpp: (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::canAdvance): (WebCore::BorderImageParseContext::setCanAdvance): (WebCore::BorderImageParseContext::allowCommit): (WebCore::BorderImageParseContext::allowImage): (WebCore::BorderImageParseContext::allowImageSlice): (WebCore::BorderImageParseContext::allowSlash): (WebCore::BorderImageParseContext::requireWidth): (WebCore::BorderImageParseContext::requireOutset): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::CSSParser::parseBorderImageQuad): * css/CSSParserValues.h: (WebCore::CSSParserValueList::previous): 2011-09-13 Jeff Miller WebCore::Cursor::ensurePlatformCursor() should always set a valid platform cursor on Windows https://bugs.webkit.org/show_bug.cgi?id=68043 Make sure we set a valid platform cursor in the Cursor::NoDrop case, and add a default clause that uses the arrow cursor in case another cursor type is added in the future and we forget to update ensurePlatformCursor(). Reviewed by Anders Carlsson. * platform/win/CursorWin.cpp: (WebCore::Cursor::ensurePlatformCursor): Always set a valid platform cursor. 2011-09-12 Jon Honeycutt MSAA: WebKit reports the document state as disabled https://bugs.webkit.org/show_bug.cgi?id=67974 Reviewed by Brian Weinstein. Test: platform/win/accessibility/document-enabled-state.html * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::isEnabled): This object backs the AccessibleDocument on Windows - always return true for its enabled state. 2011-08-11 Cris Neckar Fixes several bugs when adding CounterNodes to a tree which can cause asymetrical relationships. https://bugs.webkit.org/show_bug.cgi?id=65996 Reviewed by Eric Seidel. Test: fast/css/counters/counter-reparent-table-children-crash.html * rendering/CounterNode.cpp: (WebCore::CounterNode::insertAfter): * rendering/RenderCounter.cpp: (WebCore::findPlaceForCounter): (WebCore::makeCounterNode): 2011-09-13 Beth Dakin Adding a comment I forgot to add before. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Antti Koivisto Move identifier filter from CSSStyleSelector to SelectorChecker https://bugs.webkit.org/show_bug.cgi?id=68025 Reviewed by Sam Weinig. This is a more logical place for this code. It also makes CSSStyleSelector slightly less bloated. It will make it possible to use fastRejectSelector for querySelectorAll in the future. * css/CSSStyleSelector.cpp: (WebCore::loadViewSourceStyle): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::RuleData::RuleData): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::pushParent): (WebCore::CSSStyleSelector::popParent): * css/SelectorChecker.cpp: (WebCore::collectElementIdentifierHashes): (WebCore::SelectorChecker::pushParentStackFrame): (WebCore::SelectorChecker::popParentStackFrame): (WebCore::SelectorChecker::pushParent): (WebCore::SelectorChecker::popParent): (WebCore::collectDescendantSelectorIdentifierHashes): (WebCore::SelectorChecker::collectIdentifierHashes): * css/SelectorChecker.h: (WebCore::SelectorChecker::parentStackIsConsistent): (WebCore::SelectorChecker::ParentStackFrame::ParentStackFrame): (WebCore::SelectorChecker::fastRejectSelector): 2011-09-13 Kiyoto Tamura For compatibility, execCommand should support deprecated 'useCSS' alias for 'styleWithCSS' https://bugs.webkit.org/show_bug.cgi?id=36683 Reviewed by Ryosuke Niwa. In addition to supporting the deprecated 'useCSS', 'styleWithCSS' now accepts any argument other than the boolean false or the case-insensitive string "false". This is per http://aryeh.name/spec/editing/editing.html#the-stylewithcss-command Tests: editing/execCommand/style-with-css.html editing/execCommand/use-css.html * editing/EditorCommand.cpp: (WebCore::executeStyleWithCSS): (WebCore::executeUseCSS): (WebCore::createCommandMap): 2011-09-13 Anders Carlsson Disable C++ exceptions when building with clang https://bugs.webkit.org/show_bug.cgi?id=68031 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: 2011-09-13 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=67885 Outline for the high-resolution broken image icon draws at 2x -and corresponding- Reviewed by Dan Bernstein. Scaled the image size to account for the deviceScaleFactor. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-13 Tim Horton REGRESSION (64275): Shape pattern-image fill turns black https://bugs.webkit.org/show_bug.cgi?id=51061 Reviewed by Simon Fraser. When destroying a resource, register clients who are losing their resource as having pending resources, so they can be resolved in the case a resource with that id is re-registered. Test: svg/custom/pending-resource-after-removal.xhtml * rendering/svg/SVGResourcesCache.cpp: (WebCore::SVGResourcesCache::resourceDestroyed): * svg/SVGStyledElement.h: (WebCore::toSVGStyledElement): Added. 2011-09-13 Eric Seidel Remove ENABLE_SVG_FOREIGN_OBJECT as it is a required part of HTML5 https://bugs.webkit.org/show_bug.cgi?id=68018 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * GNUmakefile.am: * WebCore.exp.in: * dom/DOMImplementation.cpp: (WebCore::isSVG10Feature): (WebCore::isSVG11Feature): * dom/Text.cpp: (WebCore::Text::createRenderer): * features.pri: * page/DOMWindow.idl: * rendering/svg/RenderSVGForeignObject.cpp: * rendering/svg/RenderSVGForeignObject.h: * svg/SVGAnimateMotionElement.cpp: (WebCore::SVGAnimateMotionElement::hasValidAttributeType): * svg/SVGForeignObjectElement.cpp: * svg/SVGForeignObjectElement.h: * svg/SVGForeignObjectElement.idl: * svg/SVGLocatable.cpp: (WebCore::isViewportElement): * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::isOutermostSVG): * svg/SVGUseElement.cpp: (WebCore::isDisallowedElement): (WebCore::SVGUseElement::associateInstancesWithShadowTreeElements): * svg/svgtags.in: 2011-09-13 Joseph Pecoraro CRASH under WebCore::ArchiveResourceCollection::addAllResources loading WebArchive https://bugs.webkit.org/show_bug.cgi?id=67983 Reviewed by Darin Adler. Null mimetypes are okay for subresources, but as previously discovered in bug 41082 they were required for main resources. Here we ensure that they are required for main resources, but we allow null mimetypes for subresources. To fix a crash for bad input we never add a null ArchiveResource to the Archive's subresource collection. It is useless and causes crashes whenever someone iterates the Archive's subresource collection. Test: webarchive/loading/test-loading-archive-subresource-null-mimetype.html * loader/archive/cf/LegacyWebArchive.cpp: (WebCore::LegacyWebArchive::createResource): Allow a null mimetype, just type check from the dictionary. (WebCore::LegacyWebArchive::extract): Require a mimetype for the main resource. Do not add null subresources to the subresource list. 2011-09-13 Mihai Parparita [Chromium] Remove javascript_engine from WebCore.gyp https://bugs.webkit.org/show_bug.cgi?id=68001 Reviewed by Tony Chang. Remove javascript_engine GYP variable (similar to the removal done on the Chromium side with http://crrev.com/100692) * WebCore.gyp/WebCore.gyp: 2011-09-12 Ryosuke Niwa [CSS3 Backgrounds and Borders] Add unprefixed border-image shorthand. https://bugs.webkit.org/show_bug.cgi?id=67970 Reviewed by David Hyatt. Also update CSSStyleSelector.cpp to support border-image to suppress assertion in fast/borders/border-image-omit-right-slice.html * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): 2011-09-13 Xianzhu Wang Reviewed by Darin Adler. Webkit wraps between hyphen-minus and numeric characters https://bugs.webkit.org/show_bug.cgi?id=20677 Disallow wrapping between a hyphen-minus and a digit if the hyphen-minus is not directly after a digit or a letter. Test: fast/text/line-breaks-after-hyphen-before-number.html * rendering/break_lines.cpp: (WebCore::asciiLineBreakTable): Disabled line-breaking after '-' and before '.', '0'-'9'. Note: the change for '0'-'9' doesn't really matter because the case is handled hard-coded in shouldBreakAfter(). (WebCore::shouldBreakAfter): Changed line-breaking behavior after '-'. (WebCore::nextBreakablePosition): Passes lastLastCh to shouldBreakAfter. 2011-09-13 Erik Wright platform/graphics/gtk/FontGtk.cpp was renamed to platform/graphics/pango/FontPango.cpp . Reflect this change in WebCore.gypi to fix a Chromium build breakage. https://bugs.webkit.org/show_bug.cgi?id=68000 Reviewed by Tony Gentilcore. No change in functionality, thus no new tests. * WebCore.gypi: 2011-09-10 Mikhail Naganov Web Inspector: Profiler: Fix overlapping data in function names column. https://bugs.webkit.org/show_bug.cgi?id=67896 Reviewed by Pavel Feldman. * inspector/front-end/ProfileDataGridTree.js: (WebInspector.ProfileDataGridNode.prototype.createCell): * inspector/front-end/dataGrid.css: (.data-grid table.data): (.data-grid td): 2011-09-13 Sheriff Bot Unreviewed, rolling out r95025. http://trac.webkit.org/changeset/95025 https://bugs.webkit.org/show_bug.cgi?id=68005 Test failed on Snow Leopard bots. (Requested by yutak_home on #webkit). * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Yuta Kitamura ThreadableWebSocketChannelClientWrapper shouldn't have a String in it. https://bugs.webkit.org/show_bug.cgi?id=67908 Reviewed by David Levin. Replace a String member variable in ThreadableWebSocketChannelClientWrapper with Vector. No change in functionality, thus no new tests. WebSocket worker tests (tests under http/tests/websocket/tests/{hixie76,hybi}/workers/) should keep passing. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol): Create a String from Vector. (WebCore::ThreadableWebSocketChannelClientWrapper::setSubprotocol): Copy the content of the given String into Vector. * websockets/ThreadableWebSocketChannelClientWrapper.h: 2011-09-13 Fumitoshi Ukai Unreviewed, build fix. CSSPropertyBorderImage was added in r94989, but not yet added in WebCore::CSSStyleSelector::applyProperty CSSStyleSelector.cpp:2481: warning: enumeration value 'CSSPropertyBorderImage' not handled in switch * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): 2011-09-12 Shinya Kawanaka Crashes in WebCore::InsertListCommand::unlistifyParagraph. https://bugs.webkit.org/show_bug.cgi?id=67918 Reviewed by Ryosuke Niwa. execCommand("InsertUnorderedList") was crashing if the parent node of the target is a kind of list element and it is not contenteditable. This patch checks the parent node is contenteditable. Test: editing/execCommand/insert-list-in-noneditable-list-parent.html * editing/htmlediting.cpp: (WebCore::enclosingListChild): Checks the parent node is contenteditable. 2011-09-12 Sheriff Bot Unreviewed, rolling out r94975. http://trac.webkit.org/changeset/94975 https://bugs.webkit.org/show_bug.cgi?id=67984 crash in PrerenderBrowserTest.PrerenderHTML5VideoJs (Requested by ukai on #webkit). * platform/graphics/chromium/CanvasLayerChromium.h: (WebCore::CanvasLayerChromium::layerTypeAsString): * platform/graphics/chromium/ContentLayerChromium.h: (WebCore::ContentLayerChromium::layerTypeAsString): * platform/graphics/chromium/ImageLayerChromium.h: (WebCore::ImageLayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::layerTreeAsText): (WebCore::writeIndent): (WebCore::LayerChromium::dumpLayer): (WebCore::LayerChromium::dumpLayerProperties): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTypeAsString): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::close): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::owner): (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::rootLayerImpl): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::contentsTextureManager): * platform/graphics/chromium/ManagedTexture.cpp: (WebCore::ManagedTexture::bindTexture): (WebCore::ManagedTexture::framebufferTexture2D): * platform/graphics/chromium/PluginLayerChromium.h: (WebCore::PluginLayerChromium::layerTypeAsString): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::name): (WebCore::writeIndent): (WebCore::RenderSurfaceChromium::dumpSurface): * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::deleteEvictedTextures): (WebCore::TextureManager::removeTexture): (WebCore::TextureManager::allocateTexture): (WebCore::TextureManager::requestTexture): * platform/graphics/chromium/TextureManager.h: (WebCore::TextureManager::setAssociatedContextDebugOnly): (WebCore::TextureManager::associatedContextDebugOnly): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::writeIndent): (WebCore::TiledLayerChromium::dumpLayerProperties): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.h: (WebCore::VideoLayerChromium::layerTypeAsString): * platform/graphics/chromium/WebGLLayerChromium.h: (WebCore::WebGLLayerChromium::layerTypeAsString): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: * platform/graphics/chromium/cc/CCCanvasLayerImpl.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: * platform/graphics/chromium/cc/CCPluginLayerImpl.h: * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::contentsTextureManager): (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::contentsTextureManager): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::dumpLayerProperties): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-09-12 Joseph Pecoraro Possible ASSERT(!storageTracker) in Lazily Initialized StorageTracker https://bugs.webkit.org/show_bug.cgi?id=67957 Reviewed by Darin Adler. The storageTracker singleton may already have been created through StorageTracker::tracker before initializeTracker gets called. Update the ASSERT in this case to check that there is no client for the tracker. No test, this depends on how the port initializes the tracker. * storage/StorageTracker.cpp: (WebCore::StorageTracker::initializeTracker): 2011-09-12 Adam Klein Fix out-of-bounds access in Gradient::sortStopsIfNecessary https://bugs.webkit.org/show_bug.cgi?id=67958 Reviewed by Darin Adler. Reported by Valgrind in http://crbug.com/77049. The errant code was added as an optimization in r67804. This patch reverts that one, as all parties agree that the optimization doesn't seem worthwhile, and there clearly aren't any tests covering the special case. No new tests, as existing tests should cover the remaining call to |std::stable_sort|. * platform/graphics/Gradient.cpp: (WebCore::Gradient::sortStopsIfNecessary): 2011-09-12 Jacky Jiang Setting document.title doesn't affect contents of title tag of XHTML documents https://bugs.webkit.org/show_bug.cgi?id=57537 Reviewed by Alexey Proskuryakov. Update the contents of the tag of XHTML documents when setting document.title. Test: fast/dom/title-content-set-innerText-get.xhtml * dom/Document.cpp: (WebCore::Document::setTitle): 2011-09-12 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Initialize m_unmodifiedText in PlatformKeyboardEventEfl. https://bugs.webkit.org/show_bug.cgi?id=67038 Reviewed by Kenneth Rohde Christiansen. Since most of the time it will return the same thing as text(), we initialize it the same way we initialize m_text. The other case (what would have been generated if no modifiers were pressed) should be covered by this as well. As this method is used when handling access keys, tests such as fast/events/access-key-self-destruct.html should now pass. No new tests, as this fixes a problem uncovered by the existing ones. * platform/efl/PlatformKeyboardEventEfl.cpp: (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [EFL] Add GraphicsContext3DEfl for WebGL and accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=62709 Add GraphicsContext3D implementation for EFL port. GraphicsContext3D delegates to GraphicsContext3DInternal. * platform/graphics/efl/GraphicsContext3DEfl.cpp: Added. (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::isGLES2Compliant): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFunc): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearColor): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::cullFace): (WebCore::GraphicsContext3D::depthFunc): (WebCore::GraphicsContext3D::depthMask): (WebCore::GraphicsContext3D::depthRange): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disable): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::drawArrays): (WebCore::GraphicsContext3D::drawElements): (WebCore::GraphicsContext3D::enable): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::finish): (WebCore::GraphicsContext3D::flush): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::frontFace): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getContextAttributes): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getFloatv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::hint): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isEnabled): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::scissor): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFunc): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMask): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOp): (WebCore::GraphicsContext3D::stencilOpSeparate): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform4i): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::vertexAttrib1f): (WebCore::GraphicsContext3D::vertexAttrib1fv): (WebCore::GraphicsContext3D::vertexAttrib2f): (WebCore::GraphicsContext3D::vertexAttrib2fv): (WebCore::GraphicsContext3D::vertexAttrib3f): (WebCore::GraphicsContext3D::vertexAttrib3fv): (WebCore::GraphicsContext3D::vertexAttrib4f): (WebCore::GraphicsContext3D::vertexAttrib4fv): (WebCore::GraphicsContext3D::vertexAttribPointer): (WebCore::GraphicsContext3D::viewport): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::markContextChanged): (WebCore::GraphicsContext3D::markLayerComposited): (WebCore::GraphicsContext3D::layerComposited): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::paintRenderingResultsToImageData): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): (WebCore::GraphicsContext3D::deleteTexture): (WebCore::GraphicsContext3D::synthesizeGLError): (WebCore::GraphicsContext3D::getExtensions): (WebCore::GraphicsContext3D::getInternalFramebufferSize): (WebCore::GraphicsContext3D::setContextLostCallback): (WebCore::GraphicsContext3D::getImageData): 2011-09-12 Hyowon Kim <hw1008.kim@samsung.com> Reviewed by Eric Seidel. [CMAKE] Remove platform/graphics/opengl/*OpenGL.cpp files in CMakeLists.txt https://bugs.webkit.org/show_bug.cgi?id=62707 No change in fuctionality so no new tests. Bug 62376 makes all ports use GraphicsContext3DOpenGL and Extensions3DOpenGL when enabling WebGL. However, some ports already have their own GC3D implementation. In QT and chromium, for example, GC3D delegates to GC3DInternal. So, it would be better to allow each port to decide whether or not to include files in platform/graphics/opengl. * CMakeLists.txt: 2011-09-12 Dan Bernstein <mitz@apple.com> <rdar://problem/10054615> Floats in ruby text intrude into the base Reviewed by Darin Adler. Test: fast/ruby/float-overhang-from-ruby-text.html * rendering/RenderRubyText.cpp: (WebCore::RenderRubyText::avoidsFloats): Added. Returns true. This ensures that RenderBlock::clearFloats() will not consider ruby text as having intruding floats. * rendering/RenderRubyText.h: 2011-09-12 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67970 Add unprefixed border-image property. Reviewed by Beth Dakin. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: 2011-09-12 Ryosuke Niwa <rniwa@webkit.org> REGRESSION: Moving up doesn't work in some cases https://bugs.webkit.org/show_bug.cgi?id=67522 Reviewed by Eric Seidel. The bug was caused by previousLinePosition's attempting to obtain the last root line box using a position at minCaretOffset (which is, in practice, located at the beginning of wrapped lines). Fix the bug by calling maxCaretOffset instead. Because isCandidate returns false at (br, 1), use the positionBeforeNode for br elements. Test: editing/selection/move-up-into-wrapped-line.html * editing/visible_units.cpp: (WebCore::previousLinePosition): 2011-09-12 David Levin <levin@chromium.org> Make the ThreadSafeRefCounted support in CrossThreadCopier work for T*. https://bugs.webkit.org/show_bug.cgi?id=67947 Reviewed by Adam Barth. The changes are tested by compiling and added compile asserts to do some verification as well. * platform/CrossThreadCopier.cpp: Added some compile asserts to verify various match and non-matches for CrossThreadCopier. * platform/CrossThreadCopier.h: Added a typedef to convert T* to T, just like the typedef's to remove RefPtr and PassRefPtr. Added a compile assert to verify that only one of the typedef did anything. (CrossThreadCopierBase<false, true, T>::copy): Remove "get" as it is unnecessary. It shouldn't have been here (PassRefPtr and RefPtr easily and sometimes more efficiently convert to PassRefPtr without get). Also, a raw pointer doesn't have a get() method. 2011-09-12 Chris Rogers <crogers@google.com> Address lifetime issues in OfflineAudioDestinationNode https://bugs.webkit.org/show_bug.cgi?id=67949 Reviewed by Kenneth Russell. No new tests. This does not change JavaScript API. * webaudio/OfflineAudioDestinationNode.cpp: (WebCore::OfflineAudioDestinationNode::~OfflineAudioDestinationNode): (WebCore::OfflineAudioDestinationNode::render): (WebCore::OfflineAudioDestinationNode::notifyCompleteDispatch): 2011-09-12 Jeff Timanus <twiz@chromium.org> [chromium] Prevent a crash when tearing down an ImageBuffer that was not successfully initialized. https://bugs.webkit.org/show_bug.cgi?id=67944 Reviewed by Stephen White. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-09-12 Michael Saboff <msaboff@apple.com> Update RegExp and related classes to use 8 bit strings when available https://bugs.webkit.org/show_bug.cgi?id=67337 Updated call to match to use UString& instead of UChar*. Reviewed by Gavin Barraclough. No new tests, Covered by existing tests. * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::match): 2011-09-12 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67898 REGRESSION(r94900): fast/images/support-broken-image-delegate.html fails on Mac Reviewed by Simon Fraser. New function willPaintBrokenImage() returns true when there has been an error loading the image and the broken image icon will be used in its place. This is necessary since it is possible to have an error loading an image and to NOT use the broken image icon. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::willPaintBrokenImage): * loader/cache/CachedImage.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] Move contents texture manager from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67440 Reviewed by Kenneth Russell. This moves the contents TextureManager over to the CCLayerTreeHost, where it belongs, and adds in a commit path to make sure that textures are deleted even if the page is not visible. This move also removed the need for LayerRendererChromium's CCLayerTreeHost pointer, so I removed that as well. That meant moving the layerTreeAsText() logic over to the CCLayerImpl side, which is where it really belonged anyway. Covered by existing compositing/ tests and platform/chromium/compositor/lost-compositor-context-with-rendersurface.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::releaseRenderSurfaceTextures): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setContentsTextureMemoryUseBytes): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): (WebCore::TextureManager::lowLimitBytes): * platform/graphics/chromium/TextureManager.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::deleteContentsTextures): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setVisible): * platform/graphics/chromium/cc/CCProxy.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setNeedsCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::setNeedsCommit): (WebCore::CCThreadProxy::setNeedsCommitOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: 2011-09-12 Chris Rogers <crogers@google.com> DelayNode delay buffer is not correctly wrapping around https://bugs.webkit.org/show_bug.cgi?id=67872 Reviewed by Kenneth Russell. Test: webaudio/delaynode.html * webaudio/DelayDSPKernel.cpp: (WebCore::DelayDSPKernel::process): 2011-09-12 Arko Saha <arko@motorola.com> Selectstart is not fired when selection was created by arrow keys. https://bugs.webkit.org/show_bug.cgi?id=60430 Reviewed by Ryosuke Niwa. Fire selectstart when a user starts extending the selection using arrow key. Fixed by Arko Saha <arko@motorola.com> and Kaustubh Atrawalkar <kaustubh@motorola.com> Tests: fast/events/selectstart-by-arrow-keys-prevent-default.html fast/events/selectstart-by-arrow-keys.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::modify): (WebCore::FrameSelection::shouldChangeSelection): (WebCore::FrameSelection::dispatchSelectStart): * editing/FrameSelection.h: 2011-09-12 James Robinson <jamesr@chromium.org> [chromium] REGRESSION(94353): Compositor textures and resources leaked when tab closed that is not last tab in the process https://bugs.webkit.org/show_bug.cgi?id=67816 Reviewed by Kenneth Russell. We lack infrastructure to construct an automated test for this today. To test manually, open up a composited page (like the poster circle), duplicate the tab many times, close all the duplicates, and verify that the memory use returns to the single tab level. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::setLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::clearRenderSurfacesRecursive): (WebCore::CCLayerTreeHost::setRootLayer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-09-12 Kentaro Hara <haraken@google.com> Implement a HashChangeEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67924 Reviewed by Sam Weinig. The spec for the HashChangeEvent constructor is here: http://www.whatwg.org/specs/web-apps/current-work/#hashchangeevent Test: fast/events/constructors/hash-change-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the HashChangeEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for HashChangeEvent. * dom/HashChangeEvent.h: Added a definition for HashChangeEventInit. (WebCore::HashChangeEventInit::HashChangeEventInit): (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): * dom/HashChangeEvent.idl: Makes HashChangeEvent constructible. 2011-09-12 Mike Reed <reed@google.com> [skia] remove dead code, no functionality change https://bugs.webkit.org/show_bug.cgi?id=67844 Reviewed by Kenneth Russell. No new tests. just removing dead-code, existing tests apply * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::Font::drawGlyphs): 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: Runtime.callFunctionOn does not accept arguments that evaluate to false. https://bugs.webkit.org/show_bug.cgi?id=67934 Reviewed by Tony Gentilcore. * inspector/InjectedScriptSource.js: 2011-09-12 Pavel Feldman <pfeldman@google.com> Web Inspector: event dividers do not update timeline boundaries. https://bugs.webkit.org/show_bug.cgi?id=67932 * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._onLoadEventFired): (WebInspector.NetworkLogView.prototype._domContentLoadedEventFired): (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkTimeCalculator.prototype.updateBoundariesForEventTime): 2011-09-12 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67922 Reviewed by Adam Barth. Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/v8/custom/V8EventConstructors.cpp: Added the WebKitAnimationEvent constructor. * dom/WebKitAnimationEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-12 Andreas Kling <kling@webkit.org> Shrink CanvasGradient for builds without ENABLE(DASHBOARD_SUPPORT). https://bugs.webkit.org/show_bug.cgi?id=67916 Reviewed by Kenneth Rohde Christiansen. * html/canvas/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): (WebCore::CanvasGradient::addColorStop): * html/canvas/CanvasGradient.h: 2011-09-12 Shinya Kawanaka <shinyak@google.com> Characters beyond U+10000 should be deleted by one pressing delete key. https://bugs.webkit.org/show_bug.cgi?id=40351 Reviewed by Kent Tamura. If a character is the trail part of unicode surrogate pair, the lead part of it should also be deleted. Also, If in MacOSX, the deletion should honor Mac's behavior. Test: editing/deleting/delete-surrogatepair.html * rendering/RenderText.cpp: (WebCore::RenderText::previousOffsetForBackwardDeletion): Added if-macro to support chromium on mac, and added trail part check for unicode character. 2011-09-11 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67800 Reviewed by Sam Weinig. Test: fast/events/constructors/progress-event-constructor.html * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Replaced UnsignedLongLongMax with std::numeric_limits<unsigned long long>::max(). * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyValue): Returns an unsigned long long value corresponding to a given key. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Added the ProgressEvent constructor. * dom/ProgressEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-11 Dimitri Glazkov <dglazkov@chromium.org> REGRESSION (r87351): toggling display of lots (thousands) of elements with display:none is very slow https://bugs.webkit.org/show_bug.cgi?id=67581 Reviewed by Darin Adler. Test: perf/show-hide-table-rows.html * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Moved style-creating code into createRendererIfNeeded, renamed to createRenderer. (WebCore::NodeRendererFactory::createRendererIfNeeded): Re-arrange code to avoid unnecessary creation of renderers. 2011-09-11 Jeremy Moskovich <jeremy@chromium.org> [Chromium] Change OOP Font loading code to use CGFont*() APIs. https://bugs.webkit.org/show_bug.cgi?id=66935 This change is necessary due a bug in ATSFontDeactivate() on 10.7. See crbug.com/93191 for details. Reviewed by Eric Seidel. No new tests - covered by existing tests. * platform/chromium/PlatformBridge.h: * platform/graphics/chromium/CrossProcessFontLoading.h: * platform/graphics/chromium/CrossProcessFontLoading.mm: (WebCore::MemoryActivatedFont::create): (WebCore::MemoryActivatedFont::MemoryActivatedFont): (WebCore::MemoryActivatedFont::~MemoryActivatedFont): 2011-09-09 Oliver Hunt <oliver@apple.com> Remove support for anonymous storage from jsobjects https://bugs.webkit.org/show_bug.cgi?id=67881 Reviewed by Sam Weinig. Remove all use of anonymous slots, this required modifying bindings generation to add member variables for cached attributes, and override visitChildren with the necessary logic to mark those new members. I added bindings generation tests for these values. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): (WebCore::JSMessageEvent::initMessageEvent): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::jsTestObjCachedAttribute1): (WebCore::jsTestObjCachedAttribute2): (WebCore::JSTestObj::visitChildren): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::TestObjInternal::cachedAttribute1AttrGetter): (WebCore::TestObjInternal::cachedAttribute2AttrGetter): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-01 Filip Pizlo <fpizlo@apple.com> The executable allocator makes it difficult to free individual chunks of executable memory https://bugs.webkit.org/show_bug.cgi?id=66363 Reviewed by Oliver Hunt. Introduced a best-fit, balanced-tree based allocator. The allocator required a balanced tree that does not allocate memory and that permits the removal of individual nodes directly (as opposed to by key); neither AVLTree nor WebCore's PODRedBlackTree supported this. Changed all references to executable code to use a reference counted handle. No new layout tests because behavior is not changed. New API unit tests: Tests/WTF/RedBlackTree.cpp Tests/WTF/MetaAllocator.cpp * ForwardingHeaders/wtf/MetaAllocatorHandle.h: Added. 2011-09-10 Sam Weinig <sam@webkit.org> Add isInterruptedExecutionException and isTerminatedExecutionException predicates https://bugs.webkit.org/show_bug.cgi?id=67892 Reviewed by Andy "First Time Reviewer" Estes. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): Use the new predicates instead of probing the ClassInfo directly. 2011-09-10 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. MSW build fixes. * config.h: 2011-09-09 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67861 Implement border-image-outset (and the mask equivalents). Reviewed by Beth Dakin. Added new tests in fast/borders and fast/reflections. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Add m_outset field to CSSBorderImageValue and teach it how to dump the field as part of cssText(). * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageQuad): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for border-image-outset and -webkit-mask-box-image-outset. Refactor the code so that border-image-width and border-image-outset use a common function. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowOutset): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderOutset): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Teach the border image parsing code about outsets. This code will soon be replaced by true shorthand parsing code, but for now keep it working and add outset support to it. (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): (WebCore::CSSParser::parseBorderImageQuad): (WebCore::CSSParser::parseBorderImageWidth): (WebCore::CSSParser::parseBorderImageOutset): * css/CSSParser.h: Refactor the border-image-width code so that it can be shared by border-image-outset, since they are extremely similar. * css/CSSPropertyNames.in: Add the new properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageQuad): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Refactor the code so that width/outset share common mapping functions. Add support for outset. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addToLine): (WebCore::InlineFlowBox::addBoxShadowVisualOverflow): (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow): (WebCore::InlineFlowBox::computeOverflow): Add new functions for computing the visual overflow caused by border outsets. Fix bugs in the shadow overflow code as well. (WebCore::clipRectForNinePieceImageStrip): (WebCore::InlineFlowBox::paintBoxDecorations): (WebCore::InlineFlowBox::paintMask): * rendering/InlineFlowBox.h: Make sure the clip rect pushed when painting one piece of a split inline strip is expanded to include the border and mask outsets. Always include the block direction expansion, and conditionally include the inline direction expansion based off includeLogicalLeftEdge()/includeLogicalRightEdge(). clipRectForNinePieceImageStrip is a common function shared by masks and border images that does this work. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::computeOverflow): * rendering/RenderBox.cpp: (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::addBoxShadowAndBorderOverflow): * rendering/RenderBox.h: Rename addShadowOverflow to addBoxShadowAndBorderOverflow. Have it compute both shadow and border image outset overflow. Fix bugs with shadow overflow computation. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): Change painting to apply the outsets to inflate the border image drawing area. * rendering/RenderEmbeddedObject.cpp: (WebCore::RenderEmbeddedObject::layout): * rendering/RenderIFrame.cpp: (WebCore::RenderIFrame::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateRects): Patched to no longer apply box-shadow to overflow clip areas when inflating the intersection area for the layer bounds. Instead we generically apply all visual overflow so that border image outsets will also be included. This fixes https://bugs.webkit.org/show_bug.cgi?id=37467. * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::layout): Patched to call the renamed addBoxShadowAndBorderOverflow function instead of addShadowOverflow. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::outset): (WebCore::NinePieceImage::setOutset): (WebCore::NinePieceImage::computeOutset): (WebCore::NinePieceImage::copyOutsetFrom): Add the outset field to NinePieceImage along with some helpers for manipulating outsets. * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::getImageOutsets): (WebCore::RenderStyle::getImageHorizontalOutsets): (WebCore::RenderStyle::getImageVerticalOutsets): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hasBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageOutsets): (WebCore::InheritedFlags::getBorderImageHorizontalOutsets): (WebCore::InheritedFlags::getBorderImageVerticalOutsets): (WebCore::InheritedFlags::getBorderImageInlineDirectionOutsets): (WebCore::InheritedFlags::getBorderImageBlockDirectionOutsets): (WebCore::InheritedFlags::getImageInlineDirectionOutsets): (WebCore::InheritedFlags::getImageBlockDirectionOutsets): Helpers for outset computation used by painting and overflow functions. 2011-09-10 Dan Bernstein <mitz@apple.com> Actually prevent unnecessary casts to MediaControls*. Reviewed by Oliver Hunt. * html/shadow/MediaControls.h: 2011-09-10 Ryosuke Niwa <rniwa@webkit.org> Remove printf added by r94900. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Chris Marrin <cmarrin@apple.com> requestAnimationFrame doesn't throttle on Mac https://bugs.webkit.org/show_bug.cgi?id=67171 Reviewed by Simon Fraser. Changed requestAnimationFrame to use a Timer in ScriptedAnimationController on Mac, rather than runLoopObservers. The Timer is throttled to fire no faster than every 15ms. It is behind a WTF_USE_REQUEST_ANIMATION_FRAME_TIMER flag and can be used by any implementation, but currently it is only enabled by PLATFORM(MAC). * dom/ScriptedAnimationController.cpp: (WebCore::ScriptedAnimationController::ScriptedAnimationController): (WebCore::ScriptedAnimationController::resume): (WebCore::ScriptedAnimationController::registerCallback): (WebCore::ScriptedAnimationController::serviceScriptedAnimations): (WebCore::ScriptedAnimationController::scheduleAnimation): (WebCore::ScriptedAnimationController::animationTimerFired): * dom/ScriptedAnimationController.h: * loader/EmptyClients.h: * page/Chrome.cpp: (WebCore::Chrome::scheduleAnimation): * page/ChromeClient.h: 2011-09-10 Jarred Nicholls <jarred@sencha.com> [Qt] QWebSettings::setUserStyleSheetUrl() does not work with windows paths that contain drive letters https://bugs.webkit.org/show_bug.cgi?id=34884 KURL::path() alone does not handle removing the leading slash from a windows file path. Using QUrl::toLocalFile() will turn file:///C:/path into C:/path appropriately. Reviewed by Andreas Kling. * platform/qt/KURLQt.cpp: (WebCore::KURL::fileSystemPath): 2011-09-10 Ken Buchanan <kenrb@chromium.org> Crash due to bad data in SVGDocumentExtensions m_pendingResources https://bugs.webkit.org/show_bug.cgi?id=67488 Reviewed by Nikolas Zimmermann. Resolving a crash condition caused by the deletion of elements while pending resource entries for those elements are still recorded. * rendering/svg/RenderSVGResourceContainer.cpp: (WebCore::RenderSVGResourceContainer::registerResource) * svg/SVGDocumentExtensions.h: (WebCore::SVGDocumentExtensions::isElementInPendingResources) * svg/SVGDocumentExtensions.cpp: (WebCore::SVGDocumentExtensions::addPendingResource) (WebCore::SVGDocumentExtensions::isElementInPendingResources) (WebCore::SVGDocumentExtensions::removeElementFromPendingResources) * svg/SVGStyledElement.h: (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGStyledElement.cpp: (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded) (WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible) * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::svgAttributeChanged) 2011-09-10 Adam Barth <abarth@webkit.org> Remove DocumentWriter::deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67882 Reviewed by Eric Seidel. Three years ago, in http://trac.webkit.org/changeset/39026, Alexey Proskuryakov added ContentDispositionEncodingFallbackArray to work around a web site compatibility issue with a non-ASCII file name becoming garbled when received in the Content-Disposition header. Since that time, there has been copious discussion of this topic among browser vendors, in the IETF, and in the broader web community. For example, here is a Stack Overflow thread about this topic: http://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http Eric Lawrence has written a blog post that summarizes IE's perspective on this issue: http://blogs.msdn.com/b/ieinternals/archive/2010/06/07/content-disposition-attachment-and-international-unicode-characters.aspx The current consensus is that browsers should implement RFC 6266, which is a new RFC that updates the definition of the Content-Disposition header. Chrome and Firefox have both implemented RFC 6266 and have encountered only one issue, which was then fixed by the web site operator. IE has also implemented RFC 6266, but I don't have detailed information about their compatibility experience. This patch add explicit PLATFORM #ifdefs around the quirky implementation previously used in Apple's Mac and Windows ports. This code is already only used on Apple's ports, so this patch introduces no functional changes. It does, however, discourage other ports from adopting this quirk. IMHO, Apple should remove this quirk as soon as compatibility allows and converge behavior with the other major browser vendors. See bug for manual test (the bug manifests in Safari download UI). * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::addExtraFieldsToRequest): * platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::adopt): (WebCore::ResourceRequestBase::copyData): * platform/network/ResourceRequestBase.h: 2011-09-09 Beth Dakin <bdakin@apple.com> Attempted Leopard build fix. * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): 2011-09-09 Beth Dakin <bdakin@apple.com> Fix for https://bugs.webkit.org/show_bug.cgi?id=67819 Use high resolution platform images when the deviceScaleFactor > 1 -and corresponding- <rdar://problem/10003098> Reviewed by Darin Adler. Add all of the new high resolution images. I also removed some tiffs from the project and replaced them with png equivalents (that are already checked into WebCore anyway). Since the high resolution images are pngs, it makes sense to use pngs for all of the images that load through Image::loadPlatformResource() * WebCore.xcodeproj/project.pbxproj: * platform/graphics/mac/ImageMac.mm: (WebCore::Image::loadPlatformResource): Load the @2x resource for deviceScaleFactors >= 2. * editing/DeleteButtonController.cpp: (WebCore::DeleteButtonController::createDeletionUI): CachedImage::brokenImage() is no longer a static helper function, but a real member function. It also now loads the @2x resource for deviceScaleFactors >= 2 and takes a parameter for the deviceScaleFactor. When CachedImage::image() returns the brokenImage(), it just returns the 1x version. brokenImage() has to be called directly to reliably return the deviceScaleFactor-appropriate resource. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::brokenImage): (WebCore::CachedImage::image): * loader/cache/CachedImage.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::drawPlatformResizerImage): (WebCore::RenderLayer::paintResizer): * rendering/RenderLayer.h: New static function to retrieve the deviceScaleFactor for callers that do not have direct access to a Page. * page/Page.cpp: (WebCore::Page::deviceScaleFactor): * page/Page.h: Call CachedImage::brokenImage() for the broken-image image at an accurate resolution. * rendering/RenderImage.cpp: (WebCore::RenderImage::imageSizeForError): (WebCore::RenderImage::paintReplaced): 2011-09-09 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * bindings/objc/PublicDOMInterfaces.h: Move contains from DOMElement to DOMNode. * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-09 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Darin Adler. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-09 Julien Chaffraix <jchaffraix@webkit.org> [V8] V8WebKitPoint::constructorCallback leaks https://bugs.webkit.org/show_bug.cgi?id=67865 Reviewed by Adam Barth. Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind. * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): Changed the code to use a RefPtr (per our usual style). Also use toV8 that will take care of properly wrapping the object. 2011-09-09 Chris Rogers <crogers@google.com> HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once https://bugs.webkit.org/show_bug.cgi?id=67866 Reviewed by David Levin. No new tests since this is difficult to test. This is designed to fix existing webaudio layout test failures. * platform/audio/HRTFDatabaseLoader.cpp: (WebCore::HRTFDatabaseLoader::HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::~HRTFDatabaseLoader): (WebCore::HRTFDatabaseLoader::loadAsynchronously): (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion): * platform/audio/HRTFDatabaseLoader.h: 2011-09-09 Jessie Berlin <jberlin@apple.com> Cookies are not available after turning off Private Browsing after the last window has been closed. https://bugs.webkit.org/show_bug.cgi?id=67874 Reviewed by Darin Adler. The private browsing storage session is a global setting that is being incorrectly set on a per-page basis (see http://webkit.org/b/67870). In this case, the global value was getting out of sync with the per-page setting: 1. The global value was getting set to true when setPrivateBrowsingEnabled(true) was called. 2. All Pages were then closed, destroying their Settings objects. 3. When a new Page was created, a new Settings object was created and its m_privateBrowsingEnabled value was getting set to false. 4. The WebPage settings were then applied to the new Settings object, resulting in setPrivateBrowsingEnabled(false) to be called. 5. An if (m_privateBrowsingEnabled == privateBrowsingEnabled) early return prevented the global value for the storage session from being destroyed. * page/Settings.cpp: (WebCore::Settings::setPrivateBrowsingEnabled): Move the early return to be after setting the global private browsing values, and add a clearer comment + FIXME. 2011-09-09 Kentaro Hara <haraken@google.com> Generate a WebKitCSSMatrix constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67458 Reviewed by Adam Barth. Added a 'CallWithNullValue' extended attribute. If a parameter is optional and missing, 'CallWithDefaultValue' handles it as a string "undefined". On the other hand, 'CallWithNullValue' handles it as a null string (Note: not a string "null", but a null string). Tests: fast/dom/Window/custom-constructors.html transforms/svg-vs-css.xhtml transforms/cssmatrix-2d-interface.xhtml transforms/cssmatrix-3d-interface.xhtmlGenerate a WebKitCSSMatrix constructor * WebCore.gypi: Removed V8WebKitCSSMatrixConstructor.cpp. * WebCore.pro: Removed V8WebKitCSSMatrixConstructor.cpp. * bindings/scripts/CodeGeneratorV8.pm: (GenerateParametersCheck): If the 'CallWithNullValue' extended attribute is set, we call MAYBE_MISSING_PARAMETER() with MissingIsEmpty mode to obtain a maybe missing parameter. Otherwise, we call MAYBE_MISSING_PARAMETER() with MissingIsUndefined mode. (RequiresCustomSignature): * bindings/scripts/test/V8/V8TestInterface.cpp: Updated test results. (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::withDynamicFrameAndArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndOptionalArgCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureCallback): (WebCore::TestObjInternal::withDynamicFrameAndUserGestureASADCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): * bindings/v8/V8Binding.h: (WebCore::V8ParameterBase::prepareBase): The fact that V8ParameterBase does not have any object means that we do not need to prepare anything, i.e. we should just return true in this case. (WebCore::::prepare): If V8ParameterBase does not have any object, then we set a null string. * bindings/v8/custom/V8BindingMacros.h: MAYBE_MISSING_PARAMETER() returns the parameter of a given index if the parameter exists. If the parameter does not exist and MissingIsUndefined is set, this macro returns an object that represents undefined. If the parameter does not exist and MissingIsEmpty is set, this macro returns an empty object. * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: Removed. * css/WebKitCSSMatrix.idl: Added the 'Constructor' extended attribute. 2011-09-09 Geoffrey Garen <ggaren@apple.com> Reviewed by Dan Bernstein. Removed ENABLE(SINGLE_THREADED) support, since it is always false https://bugs.webkit.org/show_bug.cgi?id=67862 Next step toward making the baseline platform assumption that threads exist. * WebCore.pri: * features.pri: * platform/sql/SQLiteDatabase.cpp: (WebCore::SQLiteDatabase::interrupt): Removed now-dead code. 2011-09-09 Fady Samuel <fsamuel@chromium.org> Move pageScaleFactor code from Frame.{h|cpp} to Page.{h|cpp} https://bugs.webkit.org/show_bug.cgi?id=67250 Reviewed by Simon Fraser. No new tests because there's no change in functionality. * WebCore.exp.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::styleForDocument): * dom/Element.cpp: (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): * dom/Range.cpp: (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): * loader/HistoryController.cpp: (WebCore::HistoryController::restoreScrollPositionAndViewState): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::pageScaleFactor): * page/Frame.h: * page/Page.cpp: (WebCore::Page::Page): (WebCore::Page::setPageScaleFactor): * page/Page.h: (WebCore::Page::pageScaleFactor): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): (WebCore::RenderLayerCompositor::pageScaleFactor): * rendering/RenderView.cpp: (WebCore::RenderView::paintBoxDecorations): 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> AX: Images within anchors causes crash https://bugs.webkit.org/show_bug.cgi?id=44149 Reviewed by Chris Fleizach. Fixes the way parent RenderObject of an AccessibilityRenderObject is computed in the presence of adjacent continuations. Test: accessibility/div-within-anchors-causes-crash.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::renderParentObject): 2011-09-09 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> CSS rules not being applied when a hidden field is inserted between an input[type=checkbox] and a label https://bugs.webkit.org/show_bug.cgi?id=66887 Reviewed by David Hyatt. Test: fast/css/adjacent-sibling-selector.html This patch addresses the problem of elements not getting their style recomputed when they are affected by direct adjacent sibling rules and one of their sibling in their corresponding rules is modified dynamically. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithElement): (WebCore::parentStylePreventsSharing): * css/SelectorChecker.cpp: (WebCore::SelectorChecker::checkSelector): * dom/Element.cpp: (WebCore::Element::recalcStyle): (WebCore::checkForSiblingStyleChanges): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::RenderStyle): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::affectedByDirectAdjacentRules): (WebCore::InheritedFlags::setAffectedByDirectAdjacentRules): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Make the EFL port use the correct rendering file. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. When compiling with Pango support, the EFL port should use FontPango.cpp instead of FontEfl.cpp (which is just full of stubs). No new functionality so no new tests. * CMakeListsEfl.txt: 2011-09-09 Chris Rogers <crogers@google.com> AudioBufferSourceNode must validate AudioBuffer in .buffer attribute setter https://bugs.webkit.org/show_bug.cgi?id=67749 Reviewed by Kenneth Russell. Test: webaudio/audiobuffersource-channels.html * WebCore.gypi: * bindings/js/JSAudioBufferSourceNodeCustom.cpp: (WebCore::JSAudioBufferSourceNode::setBuffer): * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp: Copied from Source/WebCore/bindings/js/JSAudioBufferSourceNodeCustom.cpp. (WebCore::V8AudioBufferSourceNode::bufferAccessorSetter): * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::setBuffer): * webaudio/AudioBufferSourceNode.h: * webaudio/AudioBufferSourceNode.idl: 2011-09-09 Dan Bernstein <mitz@apple.com> RenderBlock::addOverhangingFloats() takes superfluous parameters https://bugs.webkit.org/show_bug.cgi?id=67863 Reviewed by Dave Hyatt. No new tests, because behavior is unchanged. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::addOverhangingFloats): Removed the logical{Left, Top}Offset parameters, since they were always the inverse of the logical{Left, Top}() of the child parameter. * rendering/RenderBlock.h: 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Add replacement functions for gdk ones. https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This will allow the EFL port to don't depend on gdk anymore. No new functionality so no new tests. * CMakeListsEfl.txt: * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::appendRegionToCairoContext): * platform/graphics/cairo/CairoUtilities.h: * platform/graphics/pango/FontPango.cpp: (WebCore::drawGlyphsShadow): (WebCore::Font::drawComplexText): * platform/graphics/pango/PangoUtilities.cpp: Added. (WebCore::getLineClipRegionFromLayoutIter): (WebCore::getClipRegionFromPangoLayoutLine): * platform/graphics/pango/PangoUtilities.h: Added. 2011-09-09 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-09 Rafael Antognolli <antognolli@profusion.mobi> Rename FontGtk.cpp to FontPango.cpp https://bugs.webkit.org/show_bug.cgi?id=66323 Reviewed by Martin Robinson. This file will be used by the EFL port too, and since it's not GTK specific anymore, rename it to something better. No new functionality so no new tests. * GNUmakefile.list.am: * platform/graphics/pango/FontPango.cpp: Renamed from Source/WebCore/platform/graphics/gtk/FontGtk.cpp. 2011-09-09 Adam Klein <adamk@chromium.org> Initialize ExceptionCode in Element::removeAttribute https://bugs.webkit.org/show_bug.cgi?id=67820 Reviewed by Darin Adler. Silences valgrind warning reported in http://crbug.com/76490. No new tests since this would only very occasionally be flaky, and in the codepath in the valgrind report, the ec is ignored anyway. * dom/Element.cpp: (WebCore::Element::removeAttribute): Initialize ec to 0. 2011-09-09 Laszlo Gombos <laszlo.1.gombos@nokia.com> [Qt] Remove common.pri https://bugs.webkit.org/show_bug.cgi?id=67814 Reviewed by Andreas Kling. No new tests, no change in functionality. * CodeGenerators.pri: * WebCore.pri: 2011-09-09 Dominic Mazzoni <dmazzoni@google.com> Assert being hit in AccessibilityRenderObject::addChildren() https://bugs.webkit.org/show_bug.cgi?id=61805 Reviewed by Chris Fleizach. Fix nextSibling and previousSibling to handle adjacent continuations properly, otherwise nodes end up appearing in the accessibility tree twice (or a debug assertion could be raised). Test: accessibility/adjacent-continuations-cause-assertion-failure.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::previousSibling): (WebCore::AccessibilityRenderObject::nextSibling): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a WebKitAnimationEvent constructor. https://bugs.webkit.org/show_bug.cgi?id=67825 Reviewed by Sam Weinig. There is no spec for the WebKitAnimationEvent constructor since it is WebKit-specific. However, based on the current IDL of initWebKitAnimationEvent(), the constructor IDL should be as follows. [Constructor(DOMString type, optional WebKitAnimationEventInit eventInitDict)] interface WebKitAnimationEvent : Event { ...; } dictionary WebKitAnimationEventInit : EventInit { DOMString animationName; double elapsedTime; } Test: fast/events/constructors/webkit-animation-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the WebKitAnimationEvent constructor. * bindings/js/JSEventConstructors.cpp: Added #includes for WebKitAnimationEvent. * dom/WebKitAnimationEvent.cpp: (WebCore::WebKitAnimationEventInit::WebKitAnimationEventInit): (WebCore::WebKitAnimationEvent::WebKitAnimationEvent): * dom/WebKitAnimationEvent.h: Added a definition for WebKitAnimationEventInit. (WebCore::WebKitAnimationEvent::create): * dom/WebKitAnimationEvent.idl: Makes WebKitAnimationEvent constructible. 2011-09-08 Abhishek Arya <inferno@chromium.org> :before content rendering issues with list markers and run-ins. https://bugs.webkit.org/show_bug.cgi?id=67735 1) Remove the isAnonymous checks for run-in detection since the run-in can belong to a node. 2) When the parent has block children, then the list marker will be enclosed in an anonymous block. In that case, for going to the next list marker, we need to traverse one level up. We don't need this check when searching for generated run-in (loop 2), since we know parent will have inline children, so the list marker wont be enclosed in an anonymous block. Reviewed by Dave Hyatt. Tests: fast/lists/list-marker-before-content-table.html fast/runin/runin-generated-before-content.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::beforePseudoElementRenderer): 2011-09-09 Pavel Podivilov <podivilov@chromium.org> Web Inspector: introduce JavaScriptSourceFrame class. https://bugs.webkit.org/show_bug.cgi?id=67838 SourceFrame should not deal with JavaScript debugging since it is a base class for all source frame implementations. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/JavaScriptSourceFrame.js: Added. (WebInspector.JavaScriptSourceFrame): (WebInspector.SourceFrameDelegateForScriptsPanel): moved from ScriptsPanel.js (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggingSupported): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.debuggerPaused): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.evaluateInSelectedCallFrame): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.releaseEvaluationResult): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._createSourceFrame): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94845. http://trac.webkit.org/changeset/94845 https://bugs.webkit.org/show_bug.cgi?id=67839 This patch kicked Qt-SL bots, but we don't need this modification. (Requested by ossy_ on #webkit). * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Csaba Osztrogonác <ossy@webkit.org> [Qt][Mac]REGRESSION(r94774): Build is broken https://bugs.webkit.org/show_bug.cgi?id=67799 It seems these files didn't rebuilt because of a dependency bug. Touch them to trigger a rebuild. * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/mac/WebVideoFullscreenController.mm: * platform/mac/WebVideoFullscreenHUDWindowController.mm: 2011-09-09 Alexander Pavlov <apavlov@chromium.org> Unreviewed, Chromium valgrind build fix. Web Inspector: [Chromium] Valgrind signals use of uninitialized field in InspectorStyleSheetForInlineStyle https://bugs.webkit.org/show_bug.cgi?id=67837 * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle): 2011-09-09 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94536. http://trac.webkit.org/changeset/94536 https://bugs.webkit.org/show_bug.cgi?id=67836 breaks absoluteLocation() of RelatedMouseEvent (Requested by jknotten on #webkit). * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: live edit both for JS and CSS is not discoverable. https://bugs.webkit.org/show_bug.cgi?id=65962 Add the "Edit" button to SourceFrame, so that resources/scripts can be edited both in the Resources and the Scripts panels. The button is grayed out if the resource/script is not editable. Reviewed by Yury Semikhatsky. * inspector/front-end/Images/statusbarButtonGlyphs.png: * inspector/front-end/ResourceView.js: (WebInspector.EditableResourceSourceFrame.prototype.canEditSource): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype.set visibleView): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.get statusBarItems): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._editButtonClicked): (WebInspector.SourceFrame.prototype.canEditSource): (WebInspector.SourceFrame.prototype.startEditing): (WebInspector.SourceFrame.prototype.commitEditing): (WebInspector.SourceFrame.prototype._setReadOnly): (WebInspector.TextViewerDelegateForSourceFrame.prototype.doubleClick): * inspector/front-end/TextViewer.js: (WebInspector.TextEditorMainPanel.prototype.set readOnly): (WebInspector.TextEditorMainPanel.prototype._updateSelectionOnStartEditing): * inspector/front-end/inspector.css: (button.edit-source-status-bar-item .glyph): (button.edit-source-status-bar-item.toggled-on .glyph): 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::AppendNodeCommand::create(). https://bugs.webkit.org/show_bug.cgi?id=67767 Reviewed by Darin Adler. In CompositeEditCommand::closeParagraphUnderNewElement(), lastNode could be a non Element node. The current code assumes lastNode is an Element node. This patch checks it. Test: editing/execCommand/ident-crashes-topnode-is-text.html * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added an element node check. 2011-09-09 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ApplyStyleCommand.doApply() https://bugs.webkit.org/show_bug.cgi?id=67765 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but ApplyStyleCommand::applyBlockStyle did not check it. This patch make it to be checked. Test: editing/style/remove-format-without-enclosing-block.html * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::applyBlockStyle): Added null check. 2011-09-09 James Simonsen <simonjam@chromium.org> [Chromium] Fix leak of Skia stream with custom CSS fonts https://bugs.webkit.org/show_bug.cgi?id=67815 Reviewed by Adam Barth. Test: fast/css/font-face-opentype.html under valgrind * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::createFontCustomPlatformData): 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Push more code from HTMLInputElement::setValue to TextFieldInputType::setValue https://bugs.webkit.org/show_bug.cgi?id=67742 Reviewed by Darin Adler. Moved more code in HTMLInputElement::setValue to TextFieldInputType::setValue, and merged InputType::valueChanged into InputType::setValue. Also introduced InputType::dispatchChangeEventInResponseToSetValue to be overridden by TextFieldInputType. * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): * html/BaseCheckableInputType.h: * html/ColorInputType.cpp: * html/ColorInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::cacheSelectionInResponseToSetValue): * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): (WebCore::InputType::dispatchChangeEventInResponseToSetValue): * html/InputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValue): * html/RangeInputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): (WebCore::TextFieldInputType::dispatchChangeEventInResponseToSetValue): * html/TextFieldInputType.h: 2011-09-08 Annie Sullivan <sullivan@chromium.org> Crashes in WebCore::InsertNodeBeforeCommand constructor. https://bugs.webkit.org/show_bug.cgi?id=67763 Reviewed by Ryosuke Niwa. Changes editableRootForPosition() to use the position's containerNode instead of deprecatedNode so that positions which are before or after a given node cannot return that node as the editable root. Test: editing/inserting/insert-paragraph-selection-outside-contenteditable.html * editing/htmlediting.cpp: (WebCore::editableRootForPosition): use containerNode instead of deprecatedNode. 2011-09-08 James Weatherall <wez@chromium.org> Release the reference to the HTMLPlugInElement's script object, when the element is removed from the document. This breaks a cyclical reference that would otherwise cause the element to be retained until the document is torn down. https://bugs.webkit.org/show_bug.cgi?id=66181 Reviewed by Anders Carlsson. No new tests - no functional change. * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::removedFromDocument): * html/HTMLPlugInElement.h: 2011-09-08 Daniel Bates <dbates@webkit.org> XSS filter bypass via non-standard URL encoding https://bugs.webkit.org/show_bug.cgi?id=66588 Reviewed by Adam Barth. Tests: http/tests/security/xssAuditor/script-tag-with-16bit-unicode-surrogate-pair.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode2.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode3.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode4.html http/tests/security/xssAuditor/script-tag-with-16bit-unicode5.html http/tests/security/xssAuditor/script-tag-with-three-times-url-encoded-16bit-unicode.html http/tests/security/xssAuditor/window-open-without-url-should-not-assert.html Implement support for decoding non-standard 16-bit Unicode escape sequences of the form %u26C4 as described in <http://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29>. See also <http://en.wikipedia.org/wiki/Percent-encoding#Non-standard_implementations>. * GNUmakefile.list.am: Added DecodeEscapeSequences.h. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * html/parser/XSSAuditor.cpp: (WebCore::decode16BitUnicodeEscapeSequences): Added. (WebCore::decodeStandardURLEscapeSequences): Added. (WebCore::fullyDecodeString): Modified to call decode16BitUnicodeEscapeSequences(). (WebCore::XSSAuditor::init): Modified to return early when the URL of the document is the empty string. This can happen when opening a new browser window or calling window.open(""). * platform/KURL.cpp: (WebCore::decodeURLEscapeSequences): Abstracted code into template-function decodeEscapeSequences(). This function just calls decodeEscapeSequences<URLEscapeSequence>(). * platform/text/DecodeEscapeSequences.h: Added. (WebCore::Unicode16BitEscapeSequence::findInString): (WebCore::Unicode16BitEscapeSequence::matchStringPrefix): (WebCore::Unicode16BitEscapeSequence::decodeRun): (WebCore::URLEscapeSequence::findInString): (WebCore::URLEscapeSequence::matchStringPrefix): (WebCore::URLEscapeSequence::decodeRun): (WebCore::decodeEscapeSequences): 2011-09-08 Adam Barth <abarth@webkit.org> DocumentWriter::deprecatedFrameEncoding doesn't need to refert to Settings https://bugs.webkit.org/show_bug.cgi?id=67812 Reviewed by Eric Seidel. The one caller of this function does this work already. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): 2011-09-08 Adam Klein <adamk@chromium.org> Always zero-out m_sortedTextBoxesPosition to avoid uninitialized read in TextIterator https://bugs.webkit.org/show_bug.cgi?id=67810 Reviewed by Tony Chang. Reported as a valgrind failure in http://crbug.com/84777. No possible change in behavior, so no tests. The unitialized read could never have an impact: if (m_sortedTextBoxesPosition + 1 < m_sortedTextBoxes.size()) ... Since m_sortedTextBoxes.size() will be zero here if m_sortedTextBoxesPosition is uninitialized, and they're both unsigned, so no possible value of m_sortedTextBoxesPosition could be < 0. * editing/TextIterator.cpp: (WebCore::TextIterator::TextIterator): 2011-09-08 Tony Chang <tony@chromium.org> Cleanup of switch statements with default cases https://bugs.webkit.org/show_bug.cgi?id=67808 Reviewed by Adam Barth. No new tests, just a small refactoring. * page/WebKitAnimation.cpp: (WebCore::WebKitAnimation::fillMode): * platform/audio/Distance.cpp: (WebCore::DistanceEffect::gain): 2011-09-08 Eric Seidel <eric@webkit.org> [BiDi] Add support for the BDI element https://bugs.webkit.org/show_bug.cgi?id=50913 Reviewed by Ryosuke Niwa. This patch is ridiculously trivial now that we have unicode-bidi: isolate support in WebKit. Test: css3/bdi-element.html * css/html.css: (bdi): 2011-09-08 David Levin <levin@chromium.org> [chromium] KURL::copy doesn't produce something usable on another thread. https://bugs.webkit.org/show_bug.cgi?id=67809 Reviewed by Adam Barth. No new functionality exposed so no new test. This was caught by testing code: the thread sanitizer run in Chromium (http://code.google.com/p/chromium/issues/detail?id=93708). * platform/KURLGoogle.cpp: (WebCore::KURLGooglePrivate::copyTo): Clear out the invalid String so that it will not be used on another thread. 2011-09-08 Alexey Proskuryakov <ap@apple.com> REGRESSION (r66874): Missing RefPtr in ScriptController https://bugs.webkit.org/show_bug.cgi?id=67748 Reviewed by Adam Barth. * bindings/ScriptControllerBase.cpp: (WebCore::ScriptController::executeScript): 2011-09-08 Adam Barth <abarth@webkit.org> Second attempt to fix Chromium build. * dom/Document.h: 2011-09-08 Oliver Hunt <oliver@apple.com> Use bump allocator for initial property storage https://bugs.webkit.org/show_bug.cgi?id=67494 Reviewed by Geoffrey Garen. Add a forwarding header. * ForwardingHeaders/runtime/StorageBarrier.h: Added. 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> Unreviewed, rolling out r94809. http://trac.webkit.org/changeset/94809 https://bugs.webkit.org/show_bug.cgi?id=67718 commit _still_ premature, despite CQ eagerness * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sam Weinig <sam@webkit.org> Remove the Completion object from JSC, I have never liked it https://bugs.webkit.org/show_bug.cgi?id=67755 Reviewed by Gavin Barraclough. * bindings/js/JSDOMBinding.cpp: (WebCore::reportException): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSInjectedScriptManager.cpp: (WebCore::InjectedScriptManager::createInjectedScript): * bindings/js/JSMainThreadExecState.h: (WebCore::JSMainThreadExecState::evaluate): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::evaluate): * bindings/objc/WebScriptObject.mm: (-[WebScriptObject evaluateWebScript:]): * bridge/NP_jsobject.cpp: (_NPN_Evaluate): * bridge/jni/jni_jsobject.mm: (JavaJSObject::eval): 2011-09-08 Adam Barth <abarth@webkit.org> Inline DocumentWriter::encoding() into it's only caller: deprecatedFrameEncoding() https://bugs.webkit.org/show_bug.cgi?id=67807 Reviewed by Eric Seidel. This function is super nutty. We don't want any more folks to call it thinking that it does something sane. * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::deprecatedFrameEncoding): * loader/DocumentWriter.h: 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94781. http://trac.webkit.org/changeset/94781 https://bugs.webkit.org/show_bug.cgi?id=67806 Broke Objective-C binding on Mac (Requested by rniwa on #webkit). * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): 2011-09-08 Eric Seidel <eric@webkit.org> Remove DocumentWriter::setDecoder as a grep of WebKit shows no callers https://bugs.webkit.org/show_bug.cgi?id=67803 Reviewed by Adam Barth. Smells like dead code. * loader/DocumentWriter.cpp: * loader/DocumentWriter.h: 2011-09-08 Shinya Kawanaka <shinyak@google.com> Crashes in WebCore::ReplaceSelectionCommand::doApply https://bugs.webkit.org/show_bug.cgi?id=67762 Reviewed by Ryosuke Niwa. WebCore::enclosingBlock may return null, but its return value was not checked. This patch checks it. Tests: editing/inserting/insert-without-enclosing-block.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::doApply): Added null check. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94784. http://trac.webkit.org/changeset/94784 https://bugs.webkit.org/show_bug.cgi?id=67796 Commit was premature (Requested by rolandsteiner on #webkit). * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 W. James MacLean <wjmaclean@chromium.org> [chromium] Add backend compositor support for rescaling (zooming) textures during zoom animation. https://bugs.webkit.org/show_bug.cgi?id=66472 This patch contains plumbing from Internals to WebViewImpl that can be removed at a later time when the zoom animator code is complete. Reviewed by James Robinson. Test: platform/chromium/compositing/zoom-animator-scale-test.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setZoomAnimatorScale): (WebCore::Settings::zoomAnimatorScale): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::setZoomAnimatorScale): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::setZoomAnimatorScale): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * testing/Internals.cpp: (WebCore::Internals::setZoomAnimatorScale): * testing/Internals.h: * testing/Internals.idl: 2011-09-08 Eric Carlson <eric.carlson@apple.com> HTMLMediaElement is missing initialTime attribute https://bugs.webkit.org/show_bug.cgi?id=67791 Reviewed by Darin Adler. Test: media/media-initialTime.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::initialTime): * html/HTMLMediaElement.h: * html/HTMLMediaElement.idl: * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::initialTime): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::initialTime): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. Note: This was originally landed in r94755 but positioned-float-layout-after-image-load.html exposed an ASSERT bug, unrelated to this change, and was rolled out. That issue is tracked separately in bug 67759. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout 2011-09-08 Roland Steiner <rolandsteiner@chromium.org> <style scoped>: Add 'scoped' attribute https://bugs.webkit.org/show_bug.cgi?id=67718 Add 'scoped' attribute to IDL and attribute list, implement and test setting/resetting of the attribute. Reviewed by Dimitri Glazkov. Test: fast/css/style-scoped/basic-attribute.html * html/HTMLAttributeNames.in: * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::scoped): (WebCore::HTMLStyleElement::setScoped): (WebCore::HTMLStyleElement::scopingElement): * html/HTMLStyleElement.h: * html/HTMLStyleElement.idl: 2011-09-08 Erik Arvidsson <arv@chromium.org> Move Element.contains to Node https://bugs.webkit.org/show_bug.cgi?id=67651 Reviewed by Darin Adler. This moves the contains method from Element to Node as in the DOM4 working draft: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-node-contains This also special cases Document contains to make it O(1) instead of O(depth). Tests: fast/dom/Node/contains-method.html perf/document-contains.html * dom/Element.idl: * dom/Node.cpp: (WebCore::Node::contains): Added document special case. * dom/Node.idl: * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::mergeParagraphs): Added a null check. 2011-09-08 Chris Rogers <crogers@google.com> Check AudioContext createChannelMerger() for thread safety https://bugs.webkit.org/show_bug.cgi?id=67247 Reviewed by Kenneth Russell. Test: webaudio/audiochannelmerger-stereo.html * webaudio/AudioChannelMerger.cpp: (WebCore::AudioChannelMerger::process): (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput): * webaudio/AudioChannelMerger.h: 2011-09-08 Ned Holbrook <nholbrook@apple.com> Refactor hyphen measurement https://bugs.webkit.org/show_bug.cgi?id=67728 Reviewed by Darin Adler. No new tests, purely refactoring. * rendering/RenderBlockLineLayout.cpp: (WebCore::measureHyphenWidth): Added. (WebCore::setLogicalWidthForTextRun): Use measureHyphenWidth(). (WebCore::tryHyphenating): Ditto. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Ditto. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Remove LayoutStateDisabler instances from RenderLayer https://bugs.webkit.org/show_bug.cgi?id=66896 Reviewed by Simon Fraser. As part of r93614, scrollTo does not call updateLayerPositions anymore. This means that we don't need to disable LayoutState from the scrolling code in RenderLayer. This change is covered by the existing tests. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Updated the comment that was not accurate anymore. Also explained what is wrong with LayoutState vs RenderLayer now. Note that the ASSERT is still valid and will not trigger as the remaining calls to updateLayerPositions are done *outside* layout() where LayoutState is not set (thus disabled). (WebCore::RenderLayer::updateScrollInfoAfterLayout): Removed 2 LayoutStateDisabler surrounding scrollToOffset. 2011-09-08 Julien Chaffraix <jchaffraix@webkit.org> Factor out the code to get the first non-null RenderTableSection in RenderTable https://bugs.webkit.org/show_bug.cgi?id=66972 Reviewed by Darin Adler. Refactoring only, covered by existing tests. * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::addChildren): (WebCore::AccessibilityTable::cellForColumnAndRow): * accessibility/AccessibilityTableCell.cpp: (WebCore::AccessibilityTableCell::rowIndexRange): Updated those for the signature change in sectionBelow. Also added a FIXME where topSection should be used instead of iterating over the section (and likely missing some corner cases). * rendering/FixedTableLayout.cpp: (WebCore::FixedTableLayout::calcWidthArray): * rendering/RenderTable.cpp: (WebCore::RenderTable::calcBorderStart): (WebCore::RenderTable::calcBorderEnd): (WebCore::RenderTable::outerBorderBefore): (WebCore::RenderTable::sectionAbove): (WebCore::RenderTable::sectionBelow): (WebCore::RenderTable::firstLineBoxBaseline): Updated all those functions to use the newly added functions. Also changed the variable names to match the functions. (WebCore::RenderTable::layout): (WebCore::RenderTable::topNonEmptySection): Newly added function that returns the top non null section of the table that has at least a row. (WebCore::RenderTable::cellAbove): (WebCore::RenderTable::cellBelow): Update the signature of those 2 functions to take an enum as it makes the rest of the code more readable. * rendering/RenderTable.h: (WebCore::RenderTable::topSection): Newly added function to return the top non null section in the table. 2011-04-19 Eric Seidel <eric@webkit.org> Reviewed by Ryosuke Niwa. [BiDi] [CSS3] MASTER: Add support for the unicode-bidi:isolate CSS property https://bugs.webkit.org/show_bug.cgi?id=50912 This patch adds support for CSS3 unicode-bidi: isolate property, under the -webkit- vendor prefix. Parsing support was added in a previous patch, this wires up the RenderStyle values to code changes in the BidiResolver. The effect of this patch is that it makes it possible to "isolate" runs of text so that their RTL-ness or LTR-ness does not bleed out into the rest of your text and effect layout. This is important because many unicode characters (like parenthesis, ':', '-', etc.) do not have intrinsic directionality and are affected by whatever characters come before/after. If you have usernames which include RTL text, if you inject those usernames in your page you might end up with nearby characters moving! (like 'RTL USERNAME - my awesome site' as a title, could end up as 'my awesome site - USERNAME RTL' when correct would be 'USERNAME RTL - my awesome site'.) This patch makes it possible to wrap sections of text in isolated spans, so that they correctly order all their RTL/LTR contents, but also correctly participate in the larger RTL/LTR ordering without affecting nearby characters. Because much of this code is old and rarely touched, I've included extra background information in hopes of expanding my set of potential reviewers: WebKit uses the standard "Unicode Bidi Algorithm" henceforth known as the UBA. The UBA is defined at http://unicode.org/reports/tr9/ for those not faint of heart. Text layout is done per-block (<div>, <p>, etc), and begins with a string of text (which in our case comes from the rendering tree) and a specified width. First: Text is measured and wrapped into lines. Second: The UBA is run over the lines of text. Third: WebKit builds InlineBoxes (its linebox tree) and eventually render the text. This patch modifies our UBA to ignore all text content inside "isolated" inlines (treating them as neutral characters) and then adds another step after running the UBA, where we run the UBA recursively on any previously identified "isolated" content. The result of the UBA is an ordered list of "runs" of text with the RTL runs correctly RTL and the LTR runs LTR. The UBA does three things: 1. It assigns a "class" to each character in a text stream (like neutral, strongly-RTL, strongly-LTR, etc.) 2. Divides the text stream up into "runs" of characters of the same directionality (all RTL, all LTR). 3. Re-orders those runs. The UBA in WebKit is implemented by BidiResolver<T> in BidiResolver.h The InlineBidiResolver (BidiResolver specialization which knows about the rendering tree) walks along its InlineIterators, looking at each character and running the Unicode Bidi Algorithm (UBA). It walks through the rendering tree subtree under a block, using a (poorly named) bidiNext function which returns the next inline object. Each inline object (or text character there-in) has a corresponding meaning in the UBA such as a "strong RTL" character or a "neutral" character. The UBA reads these sequence of characters, and figures out what direction (RTL or LTR) to assign to any neutral characters it encounters, based on surrounding characters. As the InlineBidiResolver is walking the rendering tree, the InlineIterator::advance() function calls bidiNext(), which in turn can call notifyObserverEnteredObject/notifyObserverWillExitObject notifying InlineBidiResolver that it is entering or exiting an "isolated" span, at which point it will either start or stop ignoring the stream of characters from the InlineIterator. When the InlineBidiResolver is ignoring the stream of characters, instead of creating separate BidiRuns at each RTL/LTR boundary as it normally would, it instead creates one "fake" run for the entire isolated span. These fake runs participate in the normal UBA run ordering process, but after the main UBA, a second pass is made where we examine the list of isolatedRuns() and run the UBA on each of them, replacing the fake run we previously inserted, with the resulting list of runs from that inner UBA run. The way it "ignores" characters is by treating them all as neutral when inside an isolate. Thus all the characters end up grouped in a single run, but their directionality (as a group) is correctly affected by any surrounding strong characters. If you understood that last paragraph, than the rest of the change is just plumbing. I added a huge number of FIXMEs to this code, because this code has a variety of design choices (or lack there of) which make some of this very difficult. For example the bidiNext iterator function has two sets of mutually exclusive parameters and can be used optionally with or without an observer. Prior to this change there was only ever one object which cared about observing a walk over inlines and that was InlineBidiResolver. This patch (regretfully) templatizes bidiNext to support a new Observer type. The correct fix would be to rip bidiNext into multiple functions and rip need for observation out of InlineBidiResolver. Unfortunately I've tried both in separate bugs and failed. This code is very very old and very poorly understood. We're slowly moving forward, this is another tiny step. This is my fourth iteration of this patch (I'm happy to do more!), but I believe it's a good compromise between fixing all of the design gotcha's of our bidi system and doing the minimum amount to add this killer CSS feature. I ran the PLT. (It averaged 0.2% faster with this change, but I attribute that to noise). Test: css3/unicode-bidi-isolate-basic.html and css3/unicode-bidi-isolate-aharon.html * platform/text/BidiResolver.h: (WebCore::BidiCharacterRun::setNext): - Needed by the new replaceRunWithRuns function. (WebCore::BidiResolver::BidiResolver): (WebCore::BidiResolver::~BidiResolver): (WebCore::BidiResolver::enterIsolate): (WebCore::BidiResolver::exitIsolate): (WebCore::BidiResolver::inIsolate): (WebCore::BidiResolver::isolatedRuns): - Used to track isolated spans of text as they're encoutered. They're stuffed away here to be processed recursively after the main UBA has done its thang. (WebCore::::appendRun): (WebCore::::embed): (WebCore::::commitExplicitEmbedding): (WebCore::::createBidiRunsForLine): * platform/text/BidiRunList.h: (WebCore::::replaceRunWithRuns): - This effectively takes all the runs from one runlist and adds them to this one, replacing the fake run we inserted during a previous pass of the UBA. - This RunList now owns the runs, so we call clear() on the other RunList so that we don't end up double-freeing the runs. (WebCore::::clear): - This allows us to "take" runs from another run list and then clear it. * rendering/BidiRun.h: (WebCore::BidiRun::object): * rendering/InlineIterator.h: (WebCore::InlineIterator::object): (WebCore::InlineIterator::offset): (WebCore::notifyObserverEnteredObject): Mostly just renaming and adding a FIXME about plaintext. (WebCore::notifyObserverWillExitObject): Mostly just renaming. (WebCore::addPlaceholderRunForIsolatedInline): (WebCore::isIsolatedInline): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::statusWithDirection): (WebCore::constructBidiRuns): - This is the heavy-lifting of this change. This function runs the UBA recursively on all the previously identified isolated spans. - If we encounter more isolated spans in our run, we just add them to the main list an keep going. Because the runs are linked lists and we have direct pointers to our placeholder objects, we don't care what order we process the placeholders in, so long as when we're done, they're all processed. (WebCore::RenderBlock::layoutInlineChildren): 2011-09-08 Kentaro Hara <haraken@google.com> Implement a ProgressEvent constructor for JSC https://bugs.webkit.org/show_bug.cgi?id=67537 Reviewed by Sam Weinig. The spec for the ProgressEvent constructor is here: http://www.w3.org/TR/progress-events/#interface-progressevent Test: fast/events/constructors/progress-event-constructor.html * bindings/generic/EventConstructors.h: Added a definition for the ProgressEvent constructor. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): Converts an ECMA-262 Number into an IDL unsigned long long value. Spec: http://www.w3.org/TR/WebIDL/#es-unsigned-long-long * bindings/js/JSEventConstructors.cpp: Added #includes for ProgressEvent. * dom/ProgressEvent.cpp: (WebCore::ProgressEventInit::ProgressEventInit): (WebCore::ProgressEvent::ProgressEvent): * dom/ProgressEvent.h: Added a definition for ProgressEventInit. (WebCore::ProgressEvent::create): * dom/ProgressEvent.idl: Makes ProgressEvent constructible. 2011-09-08 Ryosuke Niwa <rniwa@webkit.org> Make bindings tests quiet after r94701. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): 2011-09-07 Pavel Podivilov <podivilov@chromium.org> Web Inspector: get rid of RawSourceCode.createSourceMappingIfNeeded. https://bugs.webkit.org/show_bug.cgi?id=67717 Listen to SourceMappingUpdated event instead of using createSourceMappingIfNeeded. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._updateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._restoreConsoleMessages): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._consoleMessageAdded): (WebInspector.DebuggerPresentationModel.prototype._createPresentationMessage): (WebInspector.DebuggerPresentationModel.prototype._consoleCleared): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationCallFrame.prototype.sourceLine.sourceMappingUpdated): (WebInspector.PresentationCallFrame.prototype.sourceLine): * inspector/front-end/SourceFile.js: 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken https://bugs.webkit.org/show_bug.cgi?id=67711 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._registerShortcuts): (WebInspector.ConsoleView.prototype._promptKeyDown): 2011-09-08 Andras Becsi <andras.becsi@nokia.com> [Qt] Build fails with strict compiler https://bugs.webkit.org/show_bug.cgi?id=67778 Reviewed by Csaba Osztrogonác. No new tests needed. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::resizeEdgeTiles): Remove unused contentsRect variable which's usage was removed in r94681 to fix the build with [-Werror=unused-but-set-variable]. 2011-09-08 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94695. http://trac.webkit.org/changeset/94695 https://bugs.webkit.org/show_bug.cgi?id=67776 Hitting an assertion on Snow Leopard, Qt, GTK (Requested by Zoltan on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::positionedFloatsNeedRelayout): (WebCore::RenderBlock::layoutPositionedObjects): 2011-09-08 Alexander Pavlov <apavlov@chromium.org> Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css). * inspector/front-end/ApplicationCacheItemsView.js: * inspector/front-end/AuditResultView.js: * inspector/front-end/BinarySearch.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/ConsoleMessage.js: * inspector/front-end/ConsoleModel.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/CookieItemsView.js: * inspector/front-end/CookieParser.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/DOMStorageItemsView.js: * inspector/front-end/DataGrid.js: * inspector/front-end/Database.js: * inspector/front-end/DatabaseQueryView.js: * inspector/front-end/DetailedHeapshotGridNodes.js: * inspector/front-end/DetailedHeapshotView.js: * inspector/front-end/ElementsTreeOutline.js: * inspector/front-end/EmptyView.js: * inspector/front-end/EventListenersSidebarPane.js: * inspector/front-end/ExtensionCommon.js: * inspector/front-end/GoToLineDialog.js: * inspector/front-end/HeapSnapshot.js: * inspector/front-end/HeapSnapshotProxy.js: * inspector/front-end/HeapSnapshotWorkerDispatcher.js: * inspector/front-end/ImageView.js: * inspector/front-end/InjectedFakeWorker.js: * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/MetricsSidebarPane.js: * inspector/front-end/NetworkManager.js: * inspector/front-end/NetworkPanel.js: * inspector/front-end/ObjectPropertiesSection.js: * inspector/front-end/PartialQuickSort.js: * inspector/front-end/ProfileView.js: * inspector/front-end/ProfilesPanel.js: * inspector/front-end/RemoteObject.js: * inspector/front-end/Resource.js: * inspector/front-end/ResourceCategory.js: * inspector/front-end/ResourceHTMLView.js: * inspector/front-end/ResourceHeadersView.js: * inspector/front-end/ResourceJSONView.js: * inspector/front-end/ResourceTimingView.js: * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/ResourceView.js: * inspector/front-end/ResourcesPanel.js: * inspector/front-end/SearchController.js: * inspector/front-end/SettingsScreen.js: * inspector/front-end/ShortcutsScreen.js: * inspector/front-end/SourceCSSTokenizer.js: * inspector/front-end/SourceHTMLTokenizer.js: * inspector/front-end/SourceJavaScriptTokenizer.js: * inspector/front-end/StatusBarButton.js: * inspector/front-end/TextEditorModel.js: * inspector/front-end/TimelineGrid.js: * inspector/front-end/View.js: * inspector/front-end/heapProfiler.css: * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: * inspector/front-end/inspectorSyntaxHighlight.css: * inspector/front-end/networkPanel.css: * inspector/front-end/treeoutline.js: * inspector/front-end/utilities.js: 2011-09-07 Andrey Kosyakov <caseq@chromium.org> Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR https://bugs.webkit.org/show_bug.cgi?id=67715 Reviewed by Yury Semikhatsky. - avoid exception on attempt to dispatch an event that is being dispatched by cloning the event. * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.forwardWheelEvent): (WebInspector.TextViewer): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94674 and r94689. http://trac.webkit.org/changeset/94674 http://trac.webkit.org/changeset/94689 https://bugs.webkit.org/show_bug.cgi?id=67754 Broke inspector/debugger/script-formatter.html (Requested by rniwa on #webkit). * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.get rawSourceCode): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Julien Chaffraix <jchaffraix@webkit.org> offsetFromRoot optimization is disabled after r93837 https://bugs.webkit.org/show_bug.cgi?id=67677 Reviewed by Simon Fraser. Unfortunately not covered by any test as it does not change updateLayerPosition complexity (it is still O(n^2) because of clippedOverflowRectForRepaint). However it is a noticeable slowdown on some use cases but we don't have a good test harness to cover such slowdown. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Pass offsetFromRoot as not doing so means that we miss the optimization altogether. (WebCore::RenderLayer::computeRepaintRects): (WebCore::RenderLayer::updateLayerPositionsAfterScroll): * rendering/RenderLayer.h: Renamed |cachedOffset| to |offsetFromRoot| to be consistent with our latest renaming. 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Windows build fix after r94737. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Dan Bernstein <mitz@apple.com> Removed hyphenation function implementations for an usupported build configuration. Reviewed by Sam Weinig. * platform/text/cf/HyphenationCF.cpp: 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67739 adjustRectForColumns is O(# of columns) when it can be O(1). Fix the slow performance of this function by removing the loop and just computing the start and end column for a repaint rect and uniting everything in between. Reviewed by Dan Bernstein. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustRectForColumns): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94714 and r94723. http://trac.webkit.org/changeset/94714 http://trac.webkit.org/changeset/94723 https://bugs.webkit.org/show_bug.cgi?id=67746 breaks gtk-linux tests with assertion failure (Requested by thorton on #webkit). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): * platform/graphics/GraphicsContext.h: (WebCore::GraphicsContext::inTransparencyLayer): * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer): (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::inTransparencyLayer): (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): * platform/win/ScrollbarThemeWin.cpp: (WebCore::ScrollbarThemeWin::paintTrackPiece): (WebCore::ScrollbarThemeWin::paintButton): (WebCore::ScrollbarThemeWin::paintThumb): * plugins/win/PluginViewWin.cpp: (WebCore::PluginView::paint): * rendering/RenderThemeWin.cpp: (WebCore::drawControl): 2011-09-07 Chris Fleizach <cfleizach@apple.com> Changes to aria-hidden don't change VO navigation https://bugs.webkit.org/show_bug.cgi?id=67722 Reviewed by Darin Adler. When altering aria-hidden, WebCore needs to update the children caches of affected elements. However, for elements that were children, but ignored, their caches did not get updated, and stale information would be propagated. The fix is to always clearChildren() when a parent is asking for children. This ensures information is always up to date when the parent itself is asking for new data. Test: accessibility/aria-hidden-updates-alldescendants.html * accessibility/AccessibilityObject.h: * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaIsHidden): (WebCore::AccessibilityRenderObject::childrenChanged): (WebCore::AccessibilityRenderObject::addChildren): 2011-09-07 Tim Horton <timothy_horton@apple.com> Text rendered with a simple (i.e. 0px blur) shadow inside a transparency layer has a double shadow https://bugs.webkit.org/show_bug.cgi?id=67543 <rdar://problem/10070536> Reviewed by Simon Fraser. Generalize (begin|end)TransparencyLayer, which now forward through to (begin|end)PlatformTransparencyLayer, so that isInTransparencyLayer can exist on every platform. Make use of isInTransparencyLayer in FontMac to disable "simple" shadow drawing when the text is being rendered into a transparency layer. Test: svg/custom/simple-text-double-shadow.svg * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::GraphicsContext): (WebCore::GraphicsContext::~GraphicsContext): (WebCore::GraphicsContext::beginTransparencyLayer): (WebCore::GraphicsContext::endTransparencyLayer): (WebCore::GraphicsContext::isInTransparencyLayer): * platform/graphics/GraphicsContext.h: * platform/graphics/cairo/GraphicsContextCairo.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h: (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): * platform/graphics/haiku/GraphicsContextHaiku.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/mac/FontMac.mm: (WebCore::Font::drawGlyphs): * platform/graphics/openvg/GraphicsContextOpenVG.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::isInTransparencyLayer): (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/GraphicsContextCGWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextCairoWin.cpp: (WebCore::GraphicsContext::releaseWindowsContext): * platform/graphics/win/GraphicsContextWin.cpp: (WebCore::GraphicsContext::getWindowsContext): * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::beginPlatformTransparencyLayer): (WebCore::GraphicsContext::endPlatformTransparencyLayer): (WebCore::GraphicsContext::supportsTransparencyLayers): * platform/win/ScrollbarThemeWin.cpp: * plugins/win/PluginViewWin.cpp: * rendering/RenderThemeWin.cpp: 2011-09-07 Dan Bernstein <mitz@apple.com> <rdar://problem/8881922> Support the hyphenate-limit-lines property https://bugs.webkit.org/show_bug.cgi?id=67730 Reviewed by Dave Hyatt. Tests: fast/css/parsing-hyphenate-limit-lines.html fast/text/hyphenate-limit-lines.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added hyphenate-limit-lines. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): Ditto. Valid values are non-negative integers and the keyword "no-limit". * css/CSSPropertyNames.in: Added -webkit-hyphenate-limit-lines. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Added hyphenate-limit-lines. * css/CSSValueKeywords.in: Added the "no-limit" value keyword. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutRunsAndFloats): Count the number of consecutive hyphenated lines before the start line and pass it to layoutRunsAndFloatsInRange(). (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Keep track of the number of consecutive hyphenated lines before the current line and pass it to LineBreaker::nextLineBreak(). (WebCore::tryHyphenating): Added parameters for the number of consecutive hyphenated lines before the current line and the limit on consecutive hyphenated lines, and an early return if the limit has been reached. (WebCore::RenderBlock::LineBreaker::nextLineBreak): Added a parameter for the number of consecutive hyphenated lines before the current line, which is passed through to tryHyphenating, along with the value of hyphenate-limit-lines. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::isHyphenated): Added. Returns true if the line was hyphenated. * rendering/RootInlineBox.h: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::hyphenationLimitLines): Added this getter. (WebCore::InheritedFlags::setHyphenationLimitLines): Added this setter. (WebCore::InheritedFlags::initialHyphenationLimitLines): Added. The initial value is -1, corresponding to "no-limit". * rendering/style/StyleRareInheritedData.cpp: (WebCore::StyleRareInheritedData::StyleRareInheritedData): Initialize new member variable. (WebCore::StyleRareInheritedData::operator==): Compare new member variable. * rendering/style/StyleRareInheritedData.h: 2011-09-02 Ojan Vafai <ojan@chromium.org> split overrideSize into overrideHeight and overrideWidth https://bugs.webkit.org/show_bug.cgi?id=67550 Reviewed by Sam Weinig. All uses of overrideSize only set one of the width or the height. This change removes a bool from RenderObject and removes some flexbox specific logic from RenderBox. The only downside is that we have two global maps where we used to have one. No functional changes so existing tests are sufficient. * rendering/RenderBox.cpp: (WebCore::RenderBox::hasOverrideHeight): (WebCore::RenderBox::hasOverrideWidth): (WebCore::RenderBox::setOverrideHeight): (WebCore::RenderBox::setOverrideWidth): (WebCore::RenderBox::clearOverrideSize): (WebCore::RenderBox::overrideWidth): (WebCore::RenderBox::overrideHeight): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox): (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox): (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal): * rendering/RenderObject.cpp: (WebCore::RenderObject::RenderObject): * rendering/RenderObject.h: * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::setOverrideHeightFromRowHeight): * rendering/RenderTableCell.h: * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::calcRowLogicalHeight): (WebCore::RenderTableSection::layoutRows): 2011-09-07 Alexei Svitkine <asvitkine@chromium.org> Add test infrastructure to test rubber-banding overhang drawing along with layout tests for existing Chromium Mac overhang drawing in the non-gpu path. https://bugs.webkit.org/show_bug.cgi?id=67511 Reviewed by Dimitri Glazkov. Tests: platform/chromium-mac/rubberbanding/overhang-e.html platform/chromium-mac/rubberbanding/overhang-n.html platform/chromium-mac/rubberbanding/overhang-ne.html platform/chromium-mac/rubberbanding/overhang-nw.html platform/chromium-mac/rubberbanding/overhang-s.html platform/chromium-mac/rubberbanding/overhang-se.html platform/chromium-mac/rubberbanding/overhang-sw.html platform/chromium-mac/rubberbanding/overhang-w.html * WebCore.exp.in: * platform/ScrollableArea.h: * testing/Internals.cpp: (WebCore::Internals::setScrollViewPosition): * testing/Internals.h: * testing/Internals.idl: 2011-09-07 David Reveman <reveman@chromium.org> [Chromium] Render surface anti-aliasing. https://bugs.webkit.org/show_bug.cgi?id=66437 Reviewed by James Robinson. Add CCLayerQuad class and CCLayerQuad::Edge subclass to allow edge computations to be shared between tiled layers and render surfaces. Move isCCW utility function to FloatQuad class and add to2dTransform method to TransformationMatrix class. Add necessary anti-aliasing shaders for render surfaces and use them to avoid aliased edges. Tests: compositing/reflections/nested-reflection-transformed.html (existing) * WebCore.gypi: * platform/graphics/FloatQuad.cpp: (WebCore::FloatQuad::isCounterclockwise): * platform/graphics/FloatQuad.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::drawTexturedQuad): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceProgramAA): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::sharedGeometryQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::VertexShaderQuad::VertexShaderQuad): (WebCore::VertexShaderQuad::init): (WebCore::VertexShaderQuad::getShaderString): (WebCore::FragmentShaderRGBATexAlphaAA::FragmentShaderRGBATexAlphaAA): (WebCore::FragmentShaderRGBATexAlphaAA::init): (WebCore::FragmentShaderRGBATexAlphaAA::getShaderString): (WebCore::FragmentTexClampAlphaAABinding::FragmentTexClampAlphaAABinding): (WebCore::FragmentTexClampAlphaAABinding::init): (WebCore::FragmentShaderRGBATexClampAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexClampSwizzleAlphaAA::getShaderString): (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::VertexShaderQuad::matrixLocation): (WebCore::VertexShaderQuad::pointLocation): (WebCore::FragmentShaderRGBATexAlphaAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaAA::edgeLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::alphaLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::samplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskSamplerLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::edgeLocation): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerQuad.cpp: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::floatQuad): (WebCore::CCLayerQuad::toFloatArray): * platform/graphics/chromium/cc/CCLayerQuad.h: Added. (WebCore::CCLayerQuad::Edge::Edge): (WebCore::CCLayerQuad::Edge::x): (WebCore::CCLayerQuad::Edge::y): (WebCore::CCLayerQuad::Edge::z): (WebCore::CCLayerQuad::Edge::setX): (WebCore::CCLayerQuad::Edge::setY): (WebCore::CCLayerQuad::Edge::setZ): (WebCore::CCLayerQuad::Edge::set): (WebCore::CCLayerQuad::Edge::moveX): (WebCore::CCLayerQuad::Edge::moveY): (WebCore::CCLayerQuad::Edge::moveZ): (WebCore::CCLayerQuad::Edge::move): (WebCore::CCLayerQuad::Edge::scaleX): (WebCore::CCLayerQuad::Edge::scaleY): (WebCore::CCLayerQuad::Edge::scaleZ): (WebCore::CCLayerQuad::Edge::scale): (WebCore::CCLayerQuad::Edge::intersect): (WebCore::CCLayerQuad::CCLayerQuad): (WebCore::CCLayerQuad::left): (WebCore::CCLayerQuad::top): (WebCore::CCLayerQuad::right): (WebCore::CCLayerQuad::bottom): (WebCore::CCLayerQuad::inflateX): (WebCore::CCLayerQuad::inflateY): (WebCore::CCLayerQuad::inflate): (WebCore::CCLayerQuad::inflateAntiAliasingDistance): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::draw): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): * platform/graphics/chromium/cc/CCRenderSurface.h: * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::to2dTransform): * platform/graphics/transforms/TransformationMatrix.h: 2011-09-06 Oliver Hunt <oliver@apple.com> Remove JSObjectWithGlobalObject https://bugs.webkit.org/show_bug.cgi?id=67689 Reviewed by Geoff Garen. Remove use of anonymous storage and JSObjectWithGlobalObject for accessing a JSObject's global object now that they're available on the object's structure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::globalObject): (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): (JSC::Bindings::RuntimeObject::finishCreation): * bridge/runtime_object.h: 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r94694. * WebCore.xcodeproj/project.pbxproj: 2011-09-07 Tim Horton <timothy_horton@apple.com> FELighting is using width instead of height to determine skip for parallel(n>2) case https://bugs.webkit.org/show_bug.cgi?id=67719 <rdar://problem/10086178> Reviewed by Dirk Schulze. No new tests, because the bug only exhibits under conditions which are currently impossible by default (using more than 2 cores) on some platforms. * platform/graphics/filters/FELighting.cpp: (WebCore::FELighting::platformApplyGeneric): 2011-09-07 W. James MacLean <wjmaclean@chromium.org> Eliminate motion jitter in animated, blurred SVG image https://bugs.webkit.org/show_bug.cgi?id=67503 Fixes filter shear-free transform applied to SVG images. In applyResource() the shearFreeAbsoluteTransform is applied to the drawing region, which is based on the object bounding box (which doesn't move). For a rotation around the centre of the box, this should really just be the identity matrix, since the BB should neither change size nor location. So really, we're just interested in the scale change of the BB here, and not in moving it. This impacts how slices are extracted, and affects the {x|y}Mid and {x|y}Max extractions for vertical and horizontal slices, so the test verifies these. Reviewed by Dirk Schulze. Test: svg/W3C-SVG-1.1-SE/filters-image-05-f.svg * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::applyResource): 2011-09-03 Robert Hogan <robert@webkit.org> Elements with position:absolute don't move to correct position after images load https://bugs.webkit.org/show_bug.cgi?id=54611 Reviewed by Simon Fraser. Test: fast/block/positioning/absolute-layout-after-image-load.html fast/block/positioning/positioned-float-layout-after-image-load.html In the test the 'label' block is an absolutely positioned child of an inline flow. So during layout, this RenderBlock::layoutPositionedObjects fails to dirty it for rendering because it requires the parent to be a BlockFlow. The code to do this was introduced in http://trac.webkit.org/changeset/8284. There doesn't seem to be a good reason for requiring a BlockFlow, so remove the check. Do the same for positioned floats in RenderBlock::positionedFloatsNeedRelayout(), although currently layoutPositionedObjects() takes care of it this at least ensures no regression in future. Note: Although the issue is encountered only on first load without a fragment identifier, it happens reliably when you include the fragment identifier in the url (#Footnote_1). This is so because scrolling to the fragment always happens before the image has loaded, rendering the page and clearing the initial dirty bits in the positioned element's renderer. When the image finally loads in this scenario, the positioned element is otherwise clean and relies on the above code to get re-rendered. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutPositionedObjects): remove the check for r->parent()->isBlockFlow() when deciding whether to mark children for layout (WebCore::RenderBlock::positionedFloatsNeedRelayout): ditto 2011-09-07 Anna Cavender <annacc@chromium.org> Moving platform/track to html/track to avoid layering violation. https://bugs.webkit.org/show_bug.cgi?id=67680 Reviewed by Adam Barth. No new tests. No new functionality. * CMakeLists.txt: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * WebCore.pri: * WebCore.pro: * html/track/CueParser.cpp: Renamed from Source/WebCore/platform/track/CueParser.cpp. * html/track/CueParser.h: Renamed from Source/WebCore/platform/track/CueParser.h. * html/track/CueParserPrivate.h: Renamed from Source/WebCore/platform/track/CueParserPrivate.h. * html/track/WebVTTParser.cpp: Renamed from Source/WebCore/platform/track/WebVTTParser.cpp. * html/track/WebVTTParser.h: Renamed from Source/WebCore/platform/track/WebVTTParser.h. * html/track/WebVTTToken.h: Renamed from Source/WebCore/platform/track/WebVTTToken.h. * html/track/WebVTTTokenizer.cpp: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.cpp. * html/track/WebVTTTokenizer.h: Renamed from Source/WebCore/platform/track/WebVTTTokenizer.h. 2011-09-07 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67286 REGRESSION: css2.1/t090204-display-change-01-b-ao.html fails after r94084. Make sure that the trailing floats line box explicitly sets the line top with leading and line bottom with leading to just be the block height. Reviewed by Dan Bernstein. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::linkToEndLineIfNeeded): 2011-09-06 Abhishek Arya <inferno@chromium.org> Null owningRenderer crash in RenderScrollbar::updateScrollbarParts. https://bugs.webkit.org/show_bug.cgi?id=67669 Reviewed by James Robinson. Owning renderer can be cleared for custom scrollbars in clearOwningRenderer() call. We need a null check in updateScrollbarParts, so that we do not crash. No tests since issue seen in crash reports only and I donot know a way to reproduce. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::updateScrollbarParts): 2011-09-05 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt][WK2] Make TiledDrawingArea request tiles only in the direction the viewport is panned to. https://bugs.webkit.org/show_bug.cgi?id=67606 Reviewed by Noam Rosenthal. TiledBackingStore previously used different values for horizontal and vertial multiplication to calculate the cover area. This patch replaces this mechanism, used to give a bigger panning range to vertical panning, with the possibility to use the motion vector of the viewport to request tiles ahead instead. This allows economies on rendering resources as tiles won't be rendered beside the trajectory of the viewport. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers): (WebCore::TiledBackingStore::setCoverAreaFocusVector): (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::calculateKeepRect): (WebCore::TiledBackingStore::calculateCoverRect): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers): 2011-09-01 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt] TiledBackingStore: Import the resizeEdgeTiles logic from TiledDrawindAreaProxy. https://bugs.webkit.org/show_bug.cgi?id=67416 Reviewed by Kenneth Rohde Christiansen. Original code by Antti Koivisto. With the current code, when the page is layouted during load, edge tiles will get removed instead of continuing to show their front buffer while the tile is being rendered for the new size. * platform/graphics/Tile.h: * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): (WebCore::TiledBackingStore::resizeEdgeTiles): * platform/graphics/TiledBackingStore.h: * platform/graphics/qt/TileQt.cpp: (WebCore::TileQt::resize): * platform/graphics/qt/TileQt.h: 2011-09-07 Tim Horton <timothy_horton@apple.com> Don't round-trip through TransformationMatrix in SVGImageBufferTools::clearAffineTransform2DRotation https://bugs.webkit.org/show_bug.cgi?id=67242 <rdar://problem/10069770> Reviewed by Dirk Schulze. No new tests, minor performance improvement. * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::blend): (WebCore::AffineTransform::decompose): (WebCore::AffineTransform::recompose): * platform/graphics/transforms/AffineTransform.h: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::clear2DRotation): 2011-09-06 Pavel Podivilov <podivilov@chromium.org> Web Inspector: do not re-create RawSourceCode when toggling pretty-print mode. https://bugs.webkit.org/show_bug.cgi?id=67647 1) Implement RawSourceCode.setFormatted that allows toggling pretty-print mode on the fly without resetting everything. 2) Add RawSourceCode unit tests. 3) Remove source mapping listeners and console messages from presentation model (they live in RawSourceCode now). Reviewed by Yury Semikhatsky. Test: inspector/debugger/raw-source-code.html * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._toggleFormatSource): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.get uiSourceCode): (WebInspector.RawSourceCode.prototype.setFormatted): (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.RawSourceCode.prototype._saveSourceMapping): 2011-09-07 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Implement circular tabbing through the Styles sidebar pane contents https://bugs.webkit.org/show_bug.cgi?id=67127 Reviewed by Yury Semikhatsky. * inspector/front-end/Section.js: (WebInspector.Section.prototype.get firstSibling): (WebInspector.Section.prototype.get lastSibling): * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylePropertiesSection.prototype.nextEditableSibling): (WebInspector.StylePropertiesSection.prototype.previousEditableSibling): (WebInspector.StylePropertiesSection.prototype.startEditingSelector): (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted.successCallback): (WebInspector.StylePropertiesSection.prototype.editingSelectorCommitted): (WebInspector.StylePropertyTreeElement.prototype): (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection): 2011-09-02 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] expose console API https://bugs.webkit.org/show_bug.cgi?id=67506 Reviewed by Pavel Feldman. Test: inspector/extensions/extensions-console.html * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype.get text): (WebInspector.ConsoleMessage.prototype.get parameters): * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.Console.prototype.getMessages): (WebInspector.injectedExtensionAPI.Console.prototype.addMessage): (WebInspector.injectedExtensionAPI.Console.prototype.get MessageLevel): (WebInspector.injectedExtensionAPI.Network.dispatchRequestEvent): (WebInspector.injectedExtensionAPI.Network): (WebInspector.injectedExtensionAPI.AuditCategoryImpl.dispatchAuditEvent): (WebInspector.injectedExtensionAPI.AuditCategoryImpl): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceEvent): (WebInspector.injectedExtensionAPI.InspectedWindow.dispatchResourceContentEvent): (WebInspector.injectedExtensionAPI.InspectedWindow): * inspector/front-end/ExtensionCommon.js: (WebInspector.commonExtensionSymbols): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyConsoleMessageAdded): (WebInspector.ExtensionServer.prototype._onGetConsoleMessages): (WebInspector.ExtensionServer.prototype._onAddConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage): (WebInspector.ExtensionServer.prototype._makeConsoleMessage.convertParameter): (WebInspector.ExtensionServer.prototype._dispatchCallback): (WebInspector.ExtensionServer.prototype.initExtensions): 2011-09-05 Andrey Kosyakov <caseq@chromium.org> Web Inspector: disable popover when a mouse button is pressed https://bugs.webkit.org/show_bug.cgi?id=67610 Reviewed by Pavel Feldman. - disable popover when a mouse button is pressed - disable popover in a SourceFrame when the source is being edited * inspector/front-end/Popover.js: (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseUp): (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._handleMouseAction): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._onHidePopover): (WebInspector.SourceFrame.prototype.doubleClick): 2011-09-07 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67634 De-virtualize styleForRenderer() Reviewed by Sam Weinig. This has performance and code clarity benefits. - move styleForRenderer from Node to Element - get rid of the now unnecessary NodeRenderingContext parameter - de-virtualize, add virtual customStyleForRenderer() * dom/Element.cpp: (WebCore::Element::customStyleForRenderer): (WebCore::Element::styleForRenderer): (WebCore::Element::recalcStyle): * dom/Element.h: * dom/Node.cpp: * dom/Node.h: (WebCore::Node::hasCustomWillOrDidRecalcStyle): (WebCore::Node::setHasCustomWillOrDidRecalcStyle): (WebCore::Node::hasCustomStyleForRenderer): (WebCore::Node::setHasCustomStyleForRenderer): Move styleForRenderer, add customStyleForRenderer, add a bit. * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererAndStyle): Handle non-element case separately since styleForRenderer was moved from Node to Element. * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::customStyleForRenderer): * html/HTMLNoScriptElement.h: Move a strange XHTMLMP special case to where it belongs. * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::attach): * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::attach): * html/HTMLTitleElement.cpp: (WebCore::HTMLTitleElement::textWithDirection): * html/shadow/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): (WebCore::TextControlInnerElement::customStyleForRenderer): (WebCore::TextControlInnerTextElement::TextControlInnerTextElement): (WebCore::TextControlInnerTextElement::customStyleForRenderer): * html/shadow/TextControlInnerElements.h: * rendering/svg/SVGShadowTreeElements.cpp: (WebCore::SVGShadowTreeContainerElement::customStyleForRenderer): * rendering/svg/SVGShadowTreeElements.h: * svg/SVGElement.cpp: (WebCore::SVGElement::SVGElement): (WebCore::SVGElement::customStyleForRenderer): * svg/SVGElement.h: Adopt customStyleForRenderer(). 2011-09-07 Ryosuke Niwa <rniwa@webkit.org> Change event is not fired for input[type=number] when the user reverts a change made by script https://bugs.webkit.org/show_bug.cgi?id=67697 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue not calling setTextAsOfLastFormControlChangeEvent for text fields other than type=text. Also fixed a that stepUpFromRenderer does not call setTextAsOfLastFormControlChangeEvent at appropriate timing due to setValueAsNumber always passing sendChangeEvent=false to setValue by propagating values through setValueAsNumber and applyStep. This refactoring allows us to remove calls to dispatch* in stepUpFromRenderer because they're now called in setValueAsNumber or applyStep. Test: fast/forms/number-input-changeevent.html * html/BaseDateAndTimeInputType.cpp: (WebCore::BaseDateAndTimeInputType::setValueAsNumber): * html/BaseDateAndTimeInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::applyStep): (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): (WebCore::HTMLInputElement::setValue): (WebCore::HTMLInputElement::setValueAsNumber): (WebCore::HTMLInputElement::stepUpFromRenderer): * html/HTMLInputElement.h: * html/InputType.cpp: (WebCore::InputType::setValueAsNumber): * html/InputType.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::setValueAsNumber): * html/NumberInputType.h: * html/RangeInputType.cpp: (WebCore::RangeInputType::setValueAsNumber): (WebCore::RangeInputType::handleKeydownEvent): * html/RangeInputType.h: 2011-09-07 Antti Koivisto <antti@apple.com> Try to fix Qt build by moving the Qt specific include (which is not really allowed here!). Not reviewed. * css/CSSStyleSelector.cpp: * css/SelectorChecker.cpp: (WebCore::SelectorChecker::determineLinkStateSlowCase): 2011-09-07 Antti Koivisto <antti@apple.com> Move SelectorChecker out from CSSStyleSelector scope https://bugs.webkit.org/show_bug.cgi?id=67648 Reviewed by Sam Weinig. - Move SelectorChecker to SelectorChecker.h/cpp - Make private functions private - Make members private, add accessors - Move m_sameOriginOnly to CSSStyleSelector as it is not used by SelectorChecker * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::CSSStyleSelector): (WebCore::CSSStyleSelector::matchRules): (WebCore::CSSStyleSelector::matchRulesForList): (WebCore::CSSStyleSelector::sortMatchedRules): (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::matchUARules): (WebCore::CSSStyleSelector::styleForElement): (WebCore::CSSStyleSelector::pseudoStyleForElement): (WebCore::CSSStyleSelector::styleForPage): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::RuleData::RuleData): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::checkForGenericFamilyChange): (WebCore::CSSStyleSelector::setFontSize): (WebCore::CSSStyleSelector::getColorFromPrimitiveValue): * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::style): (WebCore::CSSStyleSelector::parentStyle): (WebCore::CSSStyleSelector::rootElementStyle): (WebCore::CSSStyleSelector::element): (WebCore::CSSStyleSelector::fontDescription): (WebCore::CSSStyleSelector::parentFontDescription): (WebCore::CSSStyleSelector::setFontDescription): (WebCore::CSSStyleSelector::setZoom): (WebCore::CSSStyleSelector::setEffectiveZoom): (WebCore::CSSStyleSelector::setTextSizeAdjust): (WebCore::CSSStyleSelector::setStyle): (WebCore::CSSStyleSelector::fontSelector): (WebCore::CSSStyleSelector::allVisitedStateChanged): (WebCore::CSSStyleSelector::visitedStateChanged): (WebCore::CSSStyleSelector::usesSiblingRules): (WebCore::CSSStyleSelector::usesFirstLineRules): (WebCore::CSSStyleSelector::usesBeforeAfterRules): (WebCore::CSSStyleSelector::usesLinkRules): (WebCore::CSSStyleSelector::addMatchedRule): (WebCore::CSSStyleSelector::isRightPage): (WebCore::CSSStyleSelector::ParentStackFrame::ParentStackFrame): (WebCore::CSSStyleSelector::styleNotYetAvailable): * css/SelectorChecker.cpp: Added. (WebCore::SelectorChecker::SelectorChecker): (WebCore::linkAttribute): (WebCore::SelectorChecker::determineLinkStateSlowCase): (WebCore::SelectorChecker::checkSelector): (WebCore::SelectorChecker::fastCheckSelector): (WebCore::SelectorChecker::isFastCheckableSelector): (WebCore::addLocalNameToSet): (WebCore::createHtmlCaseInsensitiveAttributesSet): (WebCore::htmlAttributeHasCaseInsensitiveValue): (WebCore::attributeQualifiedNameMatches): (WebCore::attributeValueMatches): (WebCore::anyAttributeMatches): (WebCore::SelectorChecker::checkOneSelector): (WebCore::SelectorChecker::checkScrollbarPseudoClass): (WebCore::SelectorChecker::allVisitedStateChanged): (WebCore::SelectorChecker::visitedStateChanged): * css/SelectorChecker.h: Added. (WebCore::SelectorChecker::document): (WebCore::SelectorChecker::strictParsing): (WebCore::SelectorChecker::isCollectingRulesOnly): (WebCore::SelectorChecker::setCollectingRulesOnly): (WebCore::SelectorChecker::isMatchingVisitedPseudoClass): (WebCore::SelectorChecker::setMatchingVisitedPseudoClass): (WebCore::SelectorChecker::pseudoStyle): (WebCore::SelectorChecker::setPseudoStyle): (WebCore::SelectorChecker::hasUnknownPseudoElements): (WebCore::SelectorChecker::clearHasUnknownPseudoElements): (WebCore::SelectorChecker::determineLinkState): * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/SelectorQuery.cpp: (WebCore::SelectorQuery::SelectorQuery): * dom/SelectorQuery.h: 2011-09-07 Dmitry Lomov <dslomov@google.com> https://bugs.webkit.org/show_bug.cgi?id=67413 [Chromium]Web Inspector: inspected page with dedicated worker crashes on refresh. This patch enforces lifetime ordering between WorkerInspectorController and WorkerScriptController. Reviewed by Yury Semikhatsky. * workers/WorkerContext.cpp: (WebCore::WorkerContext::clearInspector): * workers/WorkerContext.h: * workers/WorkerThread.cpp: (WebCore::WorkerThreadShutdownFinishTask::performTask): 2011-09-07 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94627 and r94632. http://trac.webkit.org/changeset/94627 http://trac.webkit.org/changeset/94632 https://bugs.webkit.org/show_bug.cgi?id=67698 It broke tests on GTK and Qt (Requested by Ossy on #webkit). * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-08-31 Yury Semikhatsky <yurys@chromium.org> fast/workers/worker-script-error.html fails on Chromium after r94061 https://bugs.webkit.org/show_bug.cgi?id=67206 Default action should be prevented if window.onerror returned true and stay not prevented otherwise. Reviewed by Dmitry Titov. Tests: fast/events/window-onerror14.html fast/events/window-onerror15.html fast/events/window-onerror16.html * bindings/v8/V8AbstractEventListener.cpp: (WebCore::V8AbstractEventListener::invokeEventHandler): (WebCore::V8AbstractEventListener::shouldPreventDefault): allow specific event listeners to decide when to prevent default action based on the handler return value. * bindings/v8/V8AbstractEventListener.h: * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): (WebCore::V8WindowErrorHandler::shouldPreventDefault): * bindings/v8/V8WindowErrorHandler.h: * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): (WebCore::V8WorkerContextErrorHandler::shouldPreventDefault): * bindings/v8/V8WorkerContextErrorHandler.h: 2011-09-06 Xianzhu Wang <wangxianzhu@chromium.org> Replace usages of Vector<UChar> with existing StringBuilder https://bugs.webkit.org/show_bug.cgi?id=67079 Reviewed by Gavin Barraclough. No new tests. All existing unit tests and layout tests should run as before. * css/CSSOMUtils.cpp: (WebCore::appendCharacter): (WebCore::serializeCharacter): (WebCore::serializeCharacterAsCodePoint): (WebCore::serializeIdentifier): (WebCore::serializeString): * css/CSSOMUtils.h: * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::cssText): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::determineLinkStateSlowCase): * css/CSSWrapShapes.cpp: (WebCore::CSSWrapShapeRect::cssText): (WebCore::CSSWrapShapeCircle::cssText): (WebCore::CSSWrapShapeEllipse::cssText): (WebCore::CSSWrapShapePolygon::cssText): * editing/HTMLInterchange.cpp: (WebCore::convertHTMLTextToInterchangeFormat): * editing/MarkupAccumulator.cpp: (WebCore::appendCharactersReplacingEntities): (WebCore::MarkupAccumulator::serializeNodes): (WebCore::MarkupAccumulator::appendStartTag): (WebCore::MarkupAccumulator::appendEndTag): (WebCore::MarkupAccumulator::concatenateMarkup): (WebCore::MarkupAccumulator::appendAttributeValue): (WebCore::MarkupAccumulator::appendCustomAttributes): (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): (WebCore::MarkupAccumulator::appendNodeValue): (WebCore::MarkupAccumulator::appendNamespace): (WebCore::MarkupAccumulator::appendText): (WebCore::MarkupAccumulator::appendComment): (WebCore::MarkupAccumulator::appendDocumentType): (WebCore::MarkupAccumulator::appendProcessingInstruction): (WebCore::MarkupAccumulator::appendElement): (WebCore::MarkupAccumulator::appendOpenTag): (WebCore::MarkupAccumulator::appendCloseTag): (WebCore::MarkupAccumulator::appendAttribute): (WebCore::MarkupAccumulator::appendCDATASection): (WebCore::MarkupAccumulator::appendStartMarkup): (WebCore::MarkupAccumulator::appendEndMarkup): * editing/MarkupAccumulator.h: * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendElement): (WebCore::StyledMarkupAccumulator::wrapWithNode): (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag): (WebCore::StyledMarkupAccumulator::takeResults): (WebCore::StyledMarkupAccumulator::appendText): (WebCore::urlToMarkup): * html/DOMTokenList.cpp: (WebCore::DOMTokenList::removeToken): * html/HTMLFontElement.cpp: (WebCore::parseFontSize): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): * html/parser/CSSPreloadScanner.cpp: (WebCore::CSSPreloadScanner::emitRule): * html/parser/CSSPreloadScanner.h: * html/parser/HTMLEntityParser.cpp: (WebCore::consumeHTMLEntity): * html/parser/HTMLEntityParser.h: * html/parser/HTMLParserIdioms.cpp: (WebCore::parseHTMLInteger): (WebCore::parseHTMLNonNegativeInteger): * html/parser/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::processEntity): (WebCore::HTMLTokenizer::nextToken): * html/parser/HTMLTreeBuilder.cpp: (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::giveRemainingTo): (WebCore::HTMLTreeBuilder::defaultForInTableText): * html/parser/HTMLTreeBuilder.h: * inspector/InspectorValues.cpp: (WebCore::InspectorValue::toJSONString): (WebCore::InspectorValue::writeJSON): (WebCore::InspectorBasicValue::writeJSON): (WebCore::InspectorString::writeJSON): (WebCore::InspectorObject::writeJSON): (WebCore::InspectorArray::writeJSON): * inspector/InspectorValues.h: * loader/CrossOriginAccessControl.cpp: (WebCore::createAccessControlPreflightRequest): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::store): * page/Chrome.cpp: (WebCore::Chrome::setToolTip): * page/PageSerializer.cpp: (WebCore::SerializerMarkupAccumulator::appendText): (WebCore::SerializerMarkupAccumulator::appendElement): (WebCore::SerializerMarkupAccumulator::appendCustomAttributes): * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::toString): * platform/KURL.cpp: (WebCore::KURL::deprecatedString): (WebCore::decodeURLEscapeSequences): * platform/LinkHash.cpp: (WebCore::squeezeOutNullCharacters): (WebCore::cleanSlashDotDotSlashes): (WebCore::mergeDoubleSlashes): (WebCore::cleanSlashDotSlashes): (WebCore::cleanPath): (WebCore::visitedURLInline): (WebCore::visitedURL): (WebCore::visitedLinkHash): * platform/LinkHash.h: * platform/gtk/DataObjectGtk.cpp: (WebCore::DataObjectGtk::setURL): * platform/network/HTTPParsers.cpp: (WebCore::extractMIMETypeFromMediaType): * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode): * platform/text/TextStream.cpp: (WebCore::TextStream::operator<<): (WebCore::TextStream::release): * platform/text/TextStream.h: * plugins/PluginStream.cpp: (WebCore::PluginStream::startStream): * rendering/InlineTextBox.cpp: (WebCore::adjustCharactersAndLengthForHyphen): * rendering/InlineTextBox.h: (WebCore::BufferForAppendingHyphen::BufferForAppendingHyphen): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::markerTextWithSuffix): * rendering/RenderListMarker.cpp: (WebCore::toSymbolic): (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::suffix): * rendering/RenderTreeAsText.cpp: (WebCore::quoteAndEscapeNonPrintables): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * storage/IDBLevelDBCoding.cpp: (WebCore::IDBLevelDBCoding::decodeString): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::getAllResponseHeaders): * xml/XPathFunctions.cpp: (WebCore::XPath::FunId::evaluate): (WebCore::XPath::FunConcat::evaluate): * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): * xml/XSLTProcessorLibxslt.cpp: (WebCore::writeToStringBuilder): (WebCore::saveResultToString): * xml/parser/CharacterReferenceParserInlineMethods.h: (WebCore::unconsumeCharacters): (WebCore::consumeCharacterReference): * xml/parser/XMLCharacterReferenceParser.cpp: (WebCore::consumeXMLCharacterReference): * xml/parser/XMLCharacterReferenceParser.h: * xml/parser/XMLTokenizer.cpp: (WebCore::XMLTokenizer::nextToken): 2011-09-05 Kent Tamura <tkent@chromium.org> REGRESSION (Safari 5.1 - ToT): File input retains its file icon when the value is reset https://bugs.webkit.org/show_bug.cgi?id=67567 Reviewed by Dimitri Glazkov. - Introduce InputType::setValue(), which is called by HTMLInputElement::setValue(). - Clear m_icon in FileInputType::setValue(). Tests: fast/forms/file/file-reset-in-change-expected.html fast/forms/file/file-reset-in-change.html * html/BaseButtonInputType.cpp: (WebCore::BaseButtonInputType::setValue): Implemenation for the "default" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default * html/BaseButtonInputType.h: * html/BaseCheckableInputType.cpp: (WebCore::BaseCheckableInputType::setValue): Implemenation for the "default/on" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-default-on * html/BaseCheckableInputType.h: * html/FileInputType.cpp: (WebCore::FileInputType::setValue): Implemenation for the "filename" mode, and clearing m_icon. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-filename * html/FileInputType.h: * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Move some code to InputType::setValue(). (WebCore::HTMLInputElement::setValueInternal): A helper for InputType::setValue(). * html/HTMLInputElement.h: * html/HiddenInputType.cpp: (WebCore::HiddenInputType::setValue): Implementation for the "default" mode. * html/HiddenInputType.h: * html/InputType.cpp: (WebCore::InputType::setValue): Implementation for the "value" mode. http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-value-value * html/InputType.h: * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::setValue): In addition to the "value" mode processing, updates placeholder visibililty. * html/TextFieldInputType.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): The inner text value of an input element is not updated when input.value is set https://bugs.webkit.org/show_bug.cgi?id=67681 Reviewed by Kent Tamura. The bug was caused by HTMLInputElement::setValue's not clearing m_suggestedValue before updateInnerTextValue is called. Since updateInnerTextValue uses the suggested value when one is present, we need to clear m_suggestedValue in advance. Test: fast/forms/suggested-value-after-setvalue.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): 2011-09-06 Adam Barth <abarth@webkit.org> Attempt to fix GTK build. * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: (WebKit::createHTMLElementWrapper): 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> fast/forms/suggested-value-crash.html crashes on Windows https://bugs.webkit.org/show_bug.cgi?id=67688 Reviewed by Adam Barth. The crash was caused because functions in internals were accessing uninitialized QualifiedNames. Fixed the bug by avoiding to link to inputTag and textareaTag. Instead, we resort to toInputElement and string comparison. * testing/Internals.cpp: (WebCore::Internals::wasLastChangeUserEdit): (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): 2011-09-06 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (5/7) https://bugs.webkit.org/show_bug.cgi?id=67420 Reviewed by Geoffrey Garen. No new tests. Completed the fifth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * WebCore.exp.in: * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::DOMConstructorObject): * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::JSDOMGlobalObject): (WebCore::JSDOMGlobalObject::finishCreation): * bindings/js/JSDOMGlobalObject.h: * bindings/js/JSDOMWindowShell.cpp: * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterface::JSTestInterface): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::JSTestObj): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface): * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): (JSC::Bindings::CRuntimeObject::finishCreation): * bridge/c/CRuntimeObject.h: * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): (JSC::Bindings::JavaRuntimeObject::finishCreation): * bridge/jni/jsc/JavaRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.h: * bridge/objc/ObjCRuntimeObject.mm: (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject): (JSC::Bindings::ObjCRuntimeObject::finishCreation): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMethod::finishCreation): * bridge/qt/qt_runtime.h: * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_method.cpp: (JSC::RuntimeMethod::RuntimeMethod): (JSC::RuntimeMethod::finishCreation): * bridge/runtime_method.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::create): 2011-09-06 Luke Macpherson <macpherson@chromium.org> Implement list style properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=67103 Reviewed by Eric Seidel. No new tests / no behavioral changes. * css/CSSStyleApplyProperty.cpp: Add class to wrap call to CSSStyleSelector::styleImage(). (WebCore::ApplyPropertyStyleImage::ApplyPropertyStyleImage): (WebCore::ApplyPropertyStyleImage::applyValue): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handlers for list style properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing property implementations. 2011-09-06 Alexis Menard <alexis.menard@openbossa.org> [Qt] Move away from QPointer as it is slow and it has a replacement QWeakPointer. https://bugs.webkit.org/show_bug.cgi?id=67673 Reviewed by Ariya Hidayat. Move away from QPointer to QWeakPointer, it is faster. No new tests, the existing ones should cover. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::~QtInstance): (JSC::Bindings::QtInstance::getClass): (JSC::Bindings::QtField::name): (JSC::Bindings::QtField::valueFromInstance): * bridge/qt/qt_instance.h: (JSC::Bindings::QtInstance::getObject): * bridge/qt/qt_runtime.h: * platform/qt/SharedTimerQt.cpp: (WebCore::SharedTimerQt::inst): 2011-09-06 Oliver Hunt <oliver@apple.com> Update expected results of bindings tests. * bindings/scripts/test/JS/JSTestInterface.cpp: (WebCore::JSTestInterfaceConstructor::createStructure): (WebCore::JSTestInterface::createPrototype): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterface::createStructure): (WebCore::JSTestInterfacePrototype::createStructure): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: (WebCore::JSTestMediaQueryListListenerConstructor::createStructure): (WebCore::JSTestMediaQueryListListener::createPrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListener::createStructure): (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::createStructure): (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObj::createStructure): (WebCore::JSTestObjPrototype::createStructure): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: (WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure): (WebCore::JSTestSerializedScriptValueInterface::createPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterface::createStructure): (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): 2011-09-06 Eric Seidel <eric@webkit.org> Remove window.HTMLBlockquoteElement per HTML5 (and DOM Core 1) https://bugs.webkit.org/show_bug.cgi?id=67678 Reviewed by Darin Adler. This is why we can't have nice things. There was some confusion in the original DOM HTML 1 spec about the existence of HTMlBlockquoteElement which was clarified by a later errata, removing HTMLBlockquoteElement: http://www.w3.org/DOM/updates/REC-DOM-Level-1-19981001-errata.html "This interface is an error and must be ignored. The Interface HTMLQuoteElement is used for both the Q and BLOCKQUOTE elements" Le sigh. Personally I think having a separate HTMLBlockquoteElement is clearer, but thats not how the web works. Removed it and updated test results. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * editing/IndentOutdentCommand.cpp: * html/HTMLBlockquoteElement.cpp: Removed. * html/HTMLBlockquoteElement.h: Removed. * html/HTMLBlockquoteElement.idl: Removed. * html/HTMLElementsAllInOne.cpp: * html/HTMLQuoteElement.cpp: (WebCore::HTMLQuoteElement::HTMLQuoteElement): (WebCore::HTMLQuoteElement::insertedIntoDocument): * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> Rename confirmCompositionWithoutDisturbingSelection to cancelComposition https://bugs.webkit.org/show_bug.cgi?id=67569 Reviewed by Antonio Gomes. Renamed Editor::confirmCompositionWithoutDisturbingSelection to Editor::cancelComposition. Also renamed the shared function from confirmComposition to setComposition. * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::confirmComposition): (WebCore::Editor::cancelComposition): (WebCore::Editor::setComposition): * editing/Editor.h: 2011-09-06 Sam Weinig <sam@webkit.org> WebVTTTokenizer files in the wrong place in the Xcode project. * WebCore.xcodeproj/project.pbxproj: Move WebVTTTokenizer files so they are in the right place in the project. 2011-09-06 Chris Rogers <crogers@google.com> MediaElementAudioSourceNode destruction triggers ASSERTS https://bugs.webkit.org/show_bug.cgi?id=67665 Reviewed by Nate Chapin. Test: webaudio/mediaelementaudiosourcenode-gc.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setAudioSourceNode): * webaudio/AudioContext.cpp: (WebCore::AudioContext::uninitializeDispatch): (WebCore::AudioContext::stop): * webaudio/AudioContext.h: 2011-09-05 Oliver Hunt <oliver@apple.com> An object's structure should reference the global object responsible for its creation https://bugs.webkit.org/show_bug.cgi?id=67624 Reviewed by Gavin Barraclough. Update calls to Structure::create() to pass the globalObject in, and update the CodeGenerator to generate appropriate createStructure methods. * bindings/js/JSAudioConstructor.h: (WebCore::JSAudioConstructor::createStructure): * bindings/js/JSDOMBinding.h: (WebCore::DOMConstructorObject::createStructure): (WebCore::getDOMStructure): * bindings/js/JSDOMGlobalObject.h: (WebCore::JSDOMGlobalObject::createStructure): (WebCore::getDOMConstructor): * bindings/js/JSDOMWindowBase.h: (WebCore::JSDOMWindowBase::createStructure): * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/JSDOMWindowShell.h: (WebCore::JSDOMWindowShell::createStructure): * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::createStructure): * bindings/js/JSImageConstructor.h: (WebCore::JSImageConstructor::createStructure): * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): * bindings/js/JSOptionConstructor.h: (WebCore::JSOptionConstructor::createStructure): * bindings/js/JSWorkerContextBase.h: (WebCore::JSWorkerContextBase::createStructure): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): (GenerateConstructorDeclaration): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::createStructure): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::createStructure): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::createStructure): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::createStructure): * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::createStructure): * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::createStructure): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::createStructure): * bridge/runtime_array.h: (JSC::RuntimeArray::createStructure): * bridge/runtime_method.h: (JSC::RuntimeMethod::createStructure): * bridge/runtime_object.h: (JSC::Bindings::RuntimeObject::createStructure): 2011-09-06 Anders Carlsson <andersca@apple.com> Move NPAPI headers in bridge to plugins https://bugs.webkit.org/show_bug.cgi?id=67661 Reviewed by Darin Adler. * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Update build systems. * bridge/npapi.h: Removed. * bridge/npruntime.h: Removed. * bridge/nptypes.h: Removed. * plugins/npapi.h: Copied from Source/WebCore/bridge/npapi.h. * plugins/npruntime.h: Copied from Source/WebCore/bridge/npruntime.h. * plugins/nptypes.h: Copied from Source/WebCore/bridge/nptypes.h. 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67672 Improve background-size parsing. Make it actually dump auto values properly, and also make it omit auto if it is the second value. Fix the parsing to not create a value list when only a singleton value is specified. Reviewed by Beth Dakin. Covered well by existing tests. * css/CSSComputedStyleDeclaration.cpp: (WebCore::fillSizeToCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseFillSize): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapFillSize): 2011-09-06 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67657 Implement border-image-width. This patch stops short of converting -webkit-border-image to a shorthand. I'll do that in the next patch. Note that unlike the -webkit-border-image syntax, border-image-width does not actually set the border width values. It simply makes cuts into the border image drawing area (which for now is just the border box, but that will change once border-image-outset is implemented). This means we need additional storage for the slices, since they are now separate from the border widths. For backwards compatibility, -webkit-border-image will continue to set the border widths when border-image-width is specified in the -webkit-border-image shorthand. Reviewed by Beth Dakin. Added new tests in fast/borders. * css/CSSBorderImageSliceValue.cpp: (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::cssText): * css/CSSBorderImageSliceValue.h: (WebCore::CSSBorderImageSliceValue::create): (WebCore::CSSBorderImageSliceValue::slices): Rename slices() to imageSlices() and add borderSlices() and m_borderSlices to hold the desired cuts for the border image drawing area. Converted the slices over to the new Quad primitive value (a RectBase subclass that is identical to Rect but dumps as a quad instead of a rect primitive). * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Make CSSBorderImageValue take the border slices during construction now. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImageWidth): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for computed style via valueForNinePieceImageWidth. Patch all of the border image properties to dump the most compact form possible for the property values, e.g., "stretch stretch" becomes "stretch." * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseReflect): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::commitImageSlice): (WebCore::BorderImageParseContext::commitBorderWidth): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): (WebCore::isBorderImageRepeatKeyword): (WebCore::CSSParser::parseBorderImageRepeat): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::CSSParser::parseBorderImageSlice): (WebCore::BorderImageWidthParseContext::BorderImageWidthParseContext): (WebCore::BorderImageWidthParseContext::allowNumber): (WebCore::BorderImageWidthParseContext::allowFinalCommit): (WebCore::BorderImageWidthParseContext::top): (WebCore::BorderImageWidthParseContext::commitNumber): (WebCore::BorderImageWidthParseContext::setAllowFinalCommit): (WebCore::BorderImageWidthParseContext::setTop): (WebCore::BorderImageWidthParseContext::commitBorderImageWidth): (WebCore::CSSParser::parseBorderImageWidth): * css/CSSParser.h: Modify the border-image code to pass off border-image-width parsing to parseBorderImageWidth. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): (WebCore::CSSPrimitiveValue::init): (WebCore::CSSPrimitiveValue::cleanup): (WebCore::CSSPrimitiveValue::getQuadValue): (WebCore::CSSPrimitiveValue::cssText): * css/CSSPrimitiveValue.h: (WebCore::CSSPrimitiveValue::getQuadValue): Add the new Quad value to CSSPrimitiveValue. * css/CSSPropertyNames.in: Add the new properties for border-image-width and -webkit-mask-box-image-width. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageSlice): (WebCore::CSSStyleSelector::mapNinePieceImageWidth): (WebCore::CSSStyleSelector::loadPendingImages): * css/CSSStyleSelector.h: Add the code to map the image width into border slices. * css/Rect.h: (WebCore::RectBase::top): (WebCore::RectBase::right): (WebCore::RectBase::bottom): (WebCore::RectBase::left): (WebCore::RectBase::setTop): (WebCore::RectBase::setRight): (WebCore::RectBase::setBottom): (WebCore::RectBase::setLeft): (WebCore::RectBase::RectBase): (WebCore::RectBase::~RectBase): (WebCore::Rect::create): (WebCore::Rect::Rect): (WebCore::Quad::create): (WebCore::Quad::Quad): Adding the new Quad value. * rendering/RenderBoxModelObject.cpp: (WebCore::computeBorderImageSide): (WebCore::RenderBoxModelObject::paintNinePieceImage): Modify painting to treat the border slices as separate from the border widths. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::imageSlices): (WebCore::NinePieceImage::setImageSlices): (WebCore::NinePieceImage::borderSlices): (WebCore::NinePieceImage::setBorderSlices): (WebCore::NinePieceImage::copyImageSlicesFrom): (WebCore::NinePieceImage::copyBorderSlicesFrom): * rendering/style/StyleRareNonInheritedData.cpp: Add the border slices. (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): * rendering/style/StyleReflection.h: (WebCore::StyleReflection::StyleReflection): Make sure masks and reflections default border-image-width to auto instead of 1, since that matches old behavior. 2011-09-06 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist constants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Kenneth Russell. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit style cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move constants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures), define and use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): 2011-09-06 Aaron Colwell <acolwell@chromium.org> Allow MediaSource API to be enabled at runtime. https://bugs.webkit.org/show_bug.cgi?id=67306 Reviewed by Eric Carlson. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::webkitMediaSourceEnabled): (WebCore::RuntimeEnabledFeatures::setWebkitMediaSourceEnabled): * html/HTMLMediaElement.idl: 2011-09-06 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::skiaDrawText): * platform/graphics/skia/SkiaFontWin.h: 2011-09-06 Nat Duca <nduca@chromium.org> [chromium] REGRESSION(94353): requestAnimationFrame not throttled in compositing path https://bugs.webkit.org/show_bug.cgi?id=67621 CCSingleThreadProxy should not perform layout when called via the compositeImmediately path. Doing so makes it look like frame rate is unbounded. Reviewed by James Robinson. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::commitIfNeeded): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: 2011-09-06 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on chromium https://bugs.webkit.org/show_bug.cgi?id=67453 Reviewed by Kent Tamura. Fixed the bug by updating inner text value in setSuggestedValue. Also added a suggestedValue and setSuggestedValue on window.internals for testing purposes. Test: fast/forms/suggested-value.html * WebCore.exp.in: * testing/Internals.cpp: (WebCore::Internals::suggestedValue): (WebCore::Internals::setSuggestedValue): * testing/Internals.h: * testing/Internals.idl: 2011-09-06 Eric Carlson <eric.carlson@apple.com> load() does not reset the resource selection algorithm https://bugs.webkit.org/show_bug.cgi?id=64917 Reviewed by Darin Adler. Test: media/video-source-load.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): Reset m_nextChildNodeToConsider, update comments and rearrange logic to more closely match logic in spec. (WebCore::HTMLMediaElement::noneSupported): Update comments. 2011-09-06 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Share propagateStyleToAnonymousChildren with RenderBlock::styleDidChange. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::styleDidChange): * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: 2011-09-06 Robin Cao <robin.cao@torchmobile.com.cn> [skia] States of GraphicsContext may never be restored after clipToImageBuffer https://bugs.webkit.org/show_bug.cgi?id=67358 beginLayerClippedToImage/applyClipFromImage are mismatched when clipping to an empty ImageBuffer, which will make states of GraphicsContext incorrect. Reviewed by James Robinson. Test: fast/repaint/background-clip-text.html * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::beginLayerClippedToImage): 2011-09-06 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not allocate memory for extremely large surfaces. https://bugs.webkit.org/show_bug.cgi?id=65192 Reviewed by Martin Robinson. So far, RenderThemeEfl tried to allocate a buffer and a cairo surface the size of the whole form element passed to it. In the case of fast/overflow/overflow-height-float-not-removed-crash.html and others, this meant extremely large widgets, which crashed the code. We now only render the widgets if they are smaller than some hardcoded and sufficiently large values which should work in most cases. No new tests, as this was uncovered by existing ones. * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::isFormElementTooLargeToDisplay): (WebCore::RenderThemeEfl::cacheThemePartNew): (WebCore::RenderThemeEfl::paintThemePart): * platform/efl/RenderThemeEfl.h: 2011-08-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: implement source map v3 consumer. https://bugs.webkit.org/show_bug.cgi?id=67205 Reviewed by Yury Semikhatsky. Test: inspector/debugger/compiler-source-mapping.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/CompilerSourceMapping.js: Added. (WebInspector.CompilerSourceMapping): (WebInspector.CompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.CompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.CompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping): (WebInspector.ClosureCompilerSourceMapping.prototype.compiledLocationToSourceLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.sourceLocationToCompiledLocation): (WebInspector.ClosureCompilerSourceMapping.prototype.get sources): (WebInspector.ClosureCompilerSourceMapping.prototype._findMapping): (WebInspector.ClosureCompilerSourceMapping.prototype._parsePayload): (WebInspector.ClosureCompilerSourceMapping.prototype._isSeparator): (WebInspector.ClosureCompilerSourceMapping.prototype._decodeVLQ): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.next): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.peek): (WebInspector.ClosureCompilerSourceMapping.StringCharIterator.prototype.hasNext): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Csaba Osztrogonác <ossy@webkit.org> Unreviewed, rolling out r94564. http://trac.webkit.org/changeset/94564 https://bugs.webkit.org/show_bug.cgi?id=67555 It broke many tests * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Rob Buis <rbuis@rim.com> use after free in WebCore::SVGTRefElement::updateReferencedText https://bugs.webkit.org/show_bug.cgi?id=67555 Reviewed by Nikolas Zimmermann. Do not install event listener if tref is not part of any document. Test: svg/custom/tref-clone-crash.html * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::svgAttributeChanged): 2011-09-06 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94560. http://trac.webkit.org/changeset/94560 https://bugs.webkit.org/show_bug.cgi?id=67636 It made inspector/debugger/script-formatter.html flakey (Requested by Ossy on #webkit). * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.set reset): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.PresenationCallFrame.prototype.select): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.didRequestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype._setContentProvider): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._requestContent): (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.RawSourceCode.prototype._hasPendingResource): (WebInspector.FormattedContentProvider): (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent): (WebInspector.FormattedContentProvider.prototype.requestContent): 2011-09-06 Antti Koivisto <antti@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67480 [Chromium] [REGRESSION] Layout Test svg/batik/text/textStyles.svg is failing Reviewed by Dimitri Glazkov. The text node needs willRecalcStyle mechanism too. * dom/Text.cpp: (WebCore::Text::recalcTextStyle): * dom/Text.h: (WebCore::Text::willRecalcTextStyle): * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): (WebCore::SVGShadowText::SVGShadowText): (WebCore::SVGShadowText::willRecalcTextStyle): 2011-09-05 Pavel Podivilov <podivilov@chromium.org> Web Inspector: re-implement RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=67609 RawSourceCode content and source mapping loading logic is too complex, re-implement it using simpler semantics: 1) Initially, RawSourceCode doesn't have any content or mapping because content loading and formatting operations are asynchronous, it only has scripts metadata. We don't update UI right after RawSourceCode creation until full RawSourceCode representation is ready (content + mapping). 2) When RawSourceCode representation is ready (e.g. resource is finished, or content is formatted if in pretty-print mode) we dispatch SourceMappingUpdated event to notify the listeners that source code should be shown to user and raw locations should be converted to ui locations (to show breakpoins, messages, call frames etc in UI). At this moment, all source file's content is ready for loading and source mapping is available. 3) Later, RawSourceCode representation may change again, e.g. if pretty-print mode is toggled, or blocked resource is finished etc., in that case SourceMappingUpdated is dispatched again to update source code, links and decorations in UI. Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._sourceMappingUpdated): (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.messagesForUISourceCode): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.addScript): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype._resourceFinished): (WebInspector.RawSourceCode.prototype.requestContent): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded.sourceMappingUpdated): (WebInspector.RawSourceCode.prototype.createSourceMappingIfNeeded): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._updateSourceMapping.didCreateSourceMapping): (WebInspector.RawSourceCode.prototype._updateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent.didFormatContent): (WebInspector.RawSourceCode.prototype._createSourceMapping.didRequestContent): (WebInspector.RawSourceCode.prototype._createSourceMapping): (WebInspector.RawSourceCode.prototype._saveSourceMapping): (WebInspector.StaticContentProvider): (WebInspector.StaticContentProvider.prototype.requestContent): 2011-09-06 Dirk Schulze <krit@webkit.org> Return to transform multiplication: motion transform * other transforms https://bugs.webkit.org/show_bug.cgi?id=67601 Reviewed by Nikolas Zimmermann. Right now we take the current transform of a transformable SVG element, post multiply the animation transform and post multiply the motion transform to the other both: transform * animation transform * motion transform We switched to this behavior with the clean up of AffineTransform. While the specification of SVG demands us to do so, no other SVG viewer is doing it that way. Now switching back to: motion transform * transform * animation transform This is done by other SVG viewers as well. While their is no consense about how to multiply the different transforms on the SVG WG, their is a consense that the current specified behavior is unwanted. See http://lists.w3.org/Archives/Public/www-svg/2011Jan/0055.html for more details. We pass the following tests of the official W3C SVG test suite again now: - animate-elem-24-t.svg - animate-elem-30-t.svg * svg/SVGStyledTransformableElement.cpp: (WebCore::SVGStyledTransformableElement::animatedLocalTransform): * svg/SVGTextElement.cpp: (WebCore::SVGTextElement::animatedLocalTransform): 2011-09-05 Adam Barth <abarth@webkit.org> window.HTMLSpanElement does not exist https://bugs.webkit.org/show_bug.cgi?id=67571 Reviewed by Sam Weinig. We have these objects for most other elements and HTMLSpanElement exists in Firefox and in the HTML5 spec. This patch adds it. Test: fast/dom/wrapper-classes.html * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.cpp: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * html/HTMLElementsAllInOne.cpp: * html/HTMLSpanElement.cpp: Added. (WebCore::HTMLSpanElement::HTMLSpanElement): (WebCore::HTMLSpanElement::create): * html/HTMLSpanElement.h: Added. * html/HTMLSpanElement.idl: Added. * html/HTMLTagNames.in: * page/DOMWindow.idl: 2011-09-04 Abhishek Arya <inferno@chromium.org> Style not propagated to anonymous boxes and anonymous inline-blocks. https://bugs.webkit.org/show_bug.cgi?id=67364 Reviewed by James Robinson. Tests: fast/ruby/ruby-block-style-not-updated-with-before-after-content.html fast/ruby/ruby-block-style-not-updated.html fast/ruby/ruby-inline-style-not-updated-with-before-after-content.html fast/ruby/ruby-inline-style-not-updated.html fast/table/table-row-style-not-updated-with-after-content.html fast/table/table-row-style-not-updated-with-before-content.html fast/table/table-row-style-not-updated.html fast/table/table-style-not-updated.html * rendering/RenderObject.cpp: (WebCore::RenderObject::propagateStyleToAnonymousChildren): * rendering/RenderObject.h: (WebCore::RenderObject::isBeforeAfterContent): * rendering/RenderRuby.cpp: (WebCore::RenderRubyAsInline::styleDidChange): (WebCore::RenderRubyAsBlock::styleDidChange): * rendering/RenderRuby.h: * rendering/RenderTable.cpp: (WebCore::RenderTable::styleDidChange): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::styleDidChange): (WebCore::RenderTableRow::addChild): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::styleDidChange): (WebCore::RenderTableSection::addChild): * rendering/RenderTableSection.h: 2011-09-05 Abhishek Arya <inferno@chromium.org> Crash in RenderObjectChildList::destroyLeftOverChildren() https://bugs.webkit.org/show_bug.cgi?id=64753 Reviewed by James Robinson. If any of the ancestors between column span element and containing column's block is a continuation, then don't attempt to render the column span by splitting the block into continuations. Test: fast/multicol/column-span-parent-continuation-crash.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::columnsBlockForSpanningElement): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94537. http://trac.webkit.org/changeset/94537 https://bugs.webkit.org/show_bug.cgi?id=67618 Does not compile on Chromium Mac (Requested by abarth_ on #webkit). * platform/image-encoders/skia/JPEGImageEncoder.cpp: (WebCore::preMultipliedBGRAtoRGB): (WebCore::RGBAtoRGB): (WebCore::encodePixels): (WebCore::JPEGImageEncoder::encode): 2011-09-05 Noel Gordon <noel.gordon@gmail.com> [chromium skia] JPEGImageEncoder: hoist contants out of the encoding loop https://bugs.webkit.org/show_bug.cgi?id=67589 Reviewed by Adam Barth. Change the row converter function signatures to be the same. Call them via a function pointer during the encoding loop. Minor webkit stlye cleanup, remove unused include. No new tests. Covered by existing canvas 2d and 3d tests. canvas/philip/tests/toDataURL.jpeg.alpha.html fast/canvas/webgl/premultiplyalpha-test.html * platform/image-encoders/skia/JPEGImageEncoder.cpp: Remove SkUnPreMultiply.h (not used). (WebCore::preMultipliedBGRAtoRGB): Use unsigned char* instead of void* for pixels. (WebCore::RGBAtoRGB): pixels & pixelCount to match the preMultipliedBGRAtoRGB() signature. (WebCore::encodePixels): Move contants out of the encoding loop: use a function pointer to call preMultipliedBGRAtoRGB or RGBAtoRGB (now they have identical signatures) during the image row encoding loop. Add/use pixelRowStride constant. (WebCore::JPEGImageEncoder::encode): webkit style: no need to split lines. 2011-09-05 John Knottenbelt <jknotten@chromium.org> Take pageScaleFactor into account for MouseRelatedEvents. https://bugs.webkit.org/show_bug.cgi?id=67592 Reviewed by Dimitri Glazkov. Test: fast/events/page-scaled-mouse-click.html * dom/MouseRelatedEvent.cpp: (WebCore::MouseRelatedEvent::MouseRelatedEvent): 2011-09-02 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename RawSourceCode.reload to contentEdited. https://bugs.webkit.org/show_bug.cgi?id=67504 Make RawSourceCode.reload private and remove RawSourceCode.content getter and setter (RawSourceCode isn't supposed to have any content). Reviewed by Yury Semikhatsky. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype.contentEdited): (WebInspector.RawSourceCode.prototype.forceLoadContent): (WebInspector.RawSourceCode.prototype._reload): (WebInspector.RawSourceCode.prototype._didRequestContent): 2011-09-05 Leandro Gracia Gil <leandrogracia@chromium.org> Fix the regression of bug 65333 introduced by 60170. This caused the speech input bubble to appear in the wrong side for RTL text inputs. https://bugs.webkit.org/show_bug.cgi?id=67597 Reviewed by Tony Gentilcore. No new tests. Fixing regression. * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): 2011-09-05 Alexander Pavlov <apavlov@chromium.org> Web Inspector: F5 results in a Web Inspector frontend reload on non-Macs https://bugs.webkit.org/show_bug.cgi?id=67602 Reviewed by Yury Semikhatsky. * inspector/front-end/inspector.js: (WebInspector.documentKeyDown): 2011-09-05 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94525. http://trac.webkit.org/changeset/94525 https://bugs.webkit.org/show_bug.cgi?id=67599 WinCE compilation failed. (Requested by loislo on #webkit). * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Alexander Færøy <alexander.faeroy@nokia.com> [Qt] Compiling using system ICU uses QTextBreakIterator in some cases. https://bugs.webkit.org/show_bug.cgi?id=67391 Reviewed by Kenneth Rohde Christiansen. * platform/text/TextBoundaries.cpp: * platform/text/TextBreakIteratorICU.cpp: * platform/text/qt/TextBoundariesQt.cpp: * platform/text/qt/TextBreakIteratorQt.cpp: 2011-09-05 Kaustubh Atrawalkar <kaustubh@motorola.com> Logic from HTMLElement::deprecatedCreateContextualFragment moved into Range::createContextualFragment function. https://bugs.webkit.org/show_bug.cgi?id=67056 Reviewed by Ryosuke Niwa. Code Refactoring for deprecatedCreateContextualFragment. No new tests. Code Re-factoring. * dom/Element.cpp: * dom/Element.h: * dom/Range.cpp: (WebCore::insertIntoFragment): (WebCore::Range::createDocumentFragmentForElement): (WebCore::Range::createContextualFragment): * dom/Range.h: * editing/markup.cpp: (WebCore::createFragmentFromMarkup): * html/HTMLElement.cpp: * html/HTMLElement.h: 2011-09-04 James Kozianski <koz@chromium.org> Unreviewed, rolling out r94510. http://trac.webkit.org/changeset/94510 https://bugs.webkit.org/show_bug.cgi?id=66531 Causes layout test crashes. * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::wrapWithRenderFullScreen): (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (RenderFullScreen::createFullScreenStyle): * rendering/RenderFullScreen.h: 2011-09-04 Abhishek Arya <inferno@chromium.org> Unreviewed. Compile fix for r94511. * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Abhishek Arya <inferno@chromium.org> Crash in Range::processAncestorsAndTheirSiblings. https://bugs.webkit.org/show_bug.cgi?id=67556 Reviewed by Ryosuke Niwa. Create a temporary RefPtr Node vector to keep all the ancestor's childs so that we don't access removed child nodes. Test: fast/dom/Range/range-delete-contents-event-fire-crash.html * dom/Range.cpp: (WebCore::Range::processContents): (WebCore::Range::processAncestorsAndTheirSiblings): 2011-09-04 Jeremy Apthorp <jeremya@google.com> Don't detach elements from the render tree when entering fullscreen mode https://bugs.webkit.org/show_bug.cgi?id=66531 This prevents plugin instances from being destroyed and reinstantiated when entering fullscreen mode. Reviewed by Darin Fisher. Test: plugins/fullscreen-plugins-dont-reload.html * dom/Document.cpp: (WebCore::Document::webkitWillEnterFullScreenForElement): (WebCore::Document::webkitDidExitFullScreenForElement): * dom/NodeRenderingContext.cpp: (WebCore::NodeRendererFactory::createRendererIfNeeded): * rendering/RenderFullScreen.cpp: (createFullScreenStyle): (RenderFullScreen::wrapRenderer): (RenderFullScreen::unwrapRenderer): * rendering/RenderFullScreen.h: 2011-09-04 Dan Bernstein <mitz@apple.com> <rdar://problem/10071256> Retain retired custom fonts until the next style recalc Reviewed by Darin Adler. Test: fast/css/font-face-used-after-retired.html During style recalc, existing renderers may reference their old style, including font data. Allow them to do so safely by keeping retired custom font data around until after style recalc. * css/CSSFontFace.cpp: (WebCore::CSSFontFace::retireCustomFont): Added. Calls through to CSSFontSelector, if the font face is still part of any segmented font face. Otherwise, deletes the custom font data. * css/CSSFontFace.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::retireCustomFont): Added. Calls through to the Document, if this is still the active font selector for a document. Otherwise, deletes the custom font data. * css/CSSFontSelector.h: * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::pruneTable): Changed to call retireCustomFont() instead of deleting retired font data. * dom/Document.cpp: (WebCore::Document::~Document): Added a call to deleteRetiredCustomFonts(), in case the Document is destroyed before getting a chance to recalc style after custom fonts have been retired. (WebCore::Document::recalcStyle): Added a call to deleteRetiredCustomFonts() after style recalc. (WebCore::Document::deleteRetiredCustomFonts): Added. Deletes all previously-retired custom font data. * dom/Document.h: (WebCore::Document::retireCustomFont): Added. 2011-09-04 Sam Weinig <sam@webkit.org> Document.createEvent should support all the interfaces of Event we got https://bugs.webkit.org/show_bug.cgi?id=67568 Reviewed by Anders Carlsson. Updated fast/events/event-creation.html * dom/BeforeLoadEvent.h: (WebCore::BeforeLoadEvent::create): (WebCore::BeforeLoadEvent::BeforeLoadEvent): Added empty create. * dom/Document.cpp: (WebCore::Document::createEvent): Add missing interfaces. * dom/HashChangeEvent.h: (WebCore::HashChangeEvent::create): (WebCore::HashChangeEvent::HashChangeEvent): Added empty create. * page/SpeechInputEvent.cpp: (WebCore::SpeechInputEvent::create): (WebCore::SpeechInputEvent::SpeechInputEvent): (WebCore::SpeechInputEvent::~SpeechInputEvent): * page/SpeechInputEvent.h: Added empty create. 2011-09-04 Adam Barth <abarth@webkit.org> [Chromium] Add memory threshold values to WebKitPlatformSupport.h https://bugs.webkit.org/show_bug.cgi?id=67575 Reviewed by Darin Fisher. Grab these memory thresholds from PlatformSupport rather than hard-coding them. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): * platform/chromium/PlatformSupport.h: * platform/qt/PlatformSupport.h: (WebCore::PlatformSupport::lowMemoryUsageMB): (WebCore::PlatformSupport::highMemoryUsageMB): (WebCore::PlatformSupport::highUsageDeltaMB): 2011-09-04 Kevin Ollivier <kevino@theolliviers.com> [wx] Unreviewed build fix. Add new / moved files missing from last commit. * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): 2011-09-04 Robin Dunn <robin@alldunn.com> [wx] Enable wxWebKit to run using the wxGC Cairo backend on platforms other than GTK. https://bugs.webkit.org/show_bug.cgi?id=67577 Reviewed by Kevin Ollivier. * platform/graphics/GlyphBuffer.h: (WebCore::GlyphBuffer::glyphAt): (WebCore::GlyphBuffer::add): * platform/graphics/wx/GraphicsContextWx.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipPath): * platform/graphics/wx/PathWx.cpp: (WebCore::Path::Path): (WebCore::Path::clear): * platform/graphics/wx/TransformationMatrixWx.cpp: (WebCore::TransformationMatrix::operator wxGraphicsMatrix): (WebCore::AffineTransform::operator wxGraphicsMatrix): * platform/image-decoders/wx/ImageDecoderWx.cpp: (WebCore::ImageFrame::asNewNativeImage): * platform/wx/ContextMenuWx.cpp: (ContextMenu::ContextMenu): * platform/wx/LocalDC.h: Added. (WebCore::LocalDC::LocalDC): (WebCore::LocalDC::context): (WebCore::LocalDC::~LocalDC): * platform/wx/RenderThemeWx.cpp: (WebCore::RenderThemeWx::paintButton): (WebCore::RenderThemeWx::paintTextField): (WebCore::RenderThemeWx::paintMenuList): (WebCore::RenderThemeWx::paintMenuListButton): * platform/wx/ScrollbarThemeWx.cpp: (WebCore::ScrollbarThemeWx::paint): * platform/wx/wxcode/cairo: Added. * platform/wx/wxcode/cairo/non-kerned-drawing.cpp: Added. (WebCore::pangoFontMap): (WebCore::createPangoFontForFont): (WebCore::createScaledFontForFont): (WebCore::pango_font_get_glyph): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gdiplus: Added. * platform/wx/wxcode/gdiplus/non-kerned-drawing.cpp: Added. (dmin): (dmax): (DegToRad): (RadToDeg): (WebCore::drawTextWithSpacing): * platform/wx/wxcode/gtk/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/non-kerned-drawing.cpp: Removed. * platform/wx/wxcode/win/scrollbar_render.cpp: (GraphicsHDC::GraphicsHDC): (GraphicsHDC::~GraphicsHDC): (wxRenderer_DrawScrollbar): 2011-09-03 Laszlo Gombos <laszlo.1.gombos@nokia.com> REGRESSION (r86268): Fix for qt_networkAccessAllowed() https://bugs.webkit.org/show_bug.cgi?id=67570 Reviewed by Noam Rosenthal. No new tests as this change only removes dead code. Support for Qt 4.6 has been removed a while back. * WebCore.pri: * WebCore.pro: * features.pri: * platform/network/NetworkStateNotifier.h: * platform/network/qt/NetworkStateNotifierQt.cpp: 2011-09-03 Ryosuke Niwa <rniwa@webkit.org> REGRESSION(r94274): selection-change-closes-typing.html fails https://bugs.webkit.org/show_bug.cgi?id=67377 Reviewed by Kent Tamura. The problem was that when the shadow DOM is updated by setInnerTextValue, WebKit layer detects the selection change and calls confirmCompositionWithoutDisturbingSelection, which in turn modifies the shadow DOM by inserting text. Fixed the bug by not inserting text in confirmCompositionWithoutDisturbingSelection. It turned out that this function is only used to cancel composition but never to confirming composition and restoring selection. Test: platform/mac/editing/input/selection-change-closes-typing-2.html * editing/Editor.cpp: (WebCore::Editor::confirmCompositionWithoutDisturbingSelection): (WebCore::Editor::confirmComposition): 2011-09-03 Sam Weinig <sam@webkit.org> Add missing Event constructors to DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=67449 Reviewed by Anders Carlsson. Covered by existing tests. * page/DOMWindow.idl: 2011-08-27 Robert Hogan <robert@webkit.org> div align="center" rendering problem https://bugs.webkit.org/show_bug.cgi?id=4860 Reviewed by David Hyatt. When an inline element with absolute position was the sole or first child of a render block with centred alignment, it wasn't obeying its parent's alignment. However it would obey the alignment if it was preceded by some text. The problem was that the element's render object was getting skipped as leading white space, so it was not included in a normal line block in a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions() which does not pay attention to alignment. Preceding the element with some text allowed the object to get included in a Bidi run and so get a linebox which would get properly aligned. The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by the object's container. This allows WebKit to get the same result on the test as Firefox and IE. Opera has the same bug as unpatched WebKit. Tests: fast/css/bug4860-absolute-block-child-does-not-inherit-alignment.html - Ensure positioned block elements inherit alignment. fast/css/bug4860-absolute-inline-child-inherits-alignment.html - Ensure positioned inline elements inherit alignment. fast/inline/absolute-positioned-inline-in-centred-block.html - Ensure positioned inline element that's the sole or first child of a rendered block obeys parents alignment. fast/inline/absolute-positioned-block-in-centred-block.html - As above, but a positioned block should not inherit alignment. * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment 2011-09-03 Andreas Kling <kling@webkit.org> Remove two unused functions from Element. https://bugs.webkit.org/show_bug.cgi?id=67492 Reviewed by Benjamin Poulain. Removed openTagStartToString() and setCStringAttribute() as they are not called from anywhere. * dom/Element.cpp: * dom/Element.h: 2011-09-03 Andrew Wason <rectalogic@rectalogic.com> [Qt] Enable support for WebGL OES_standard_derivatives for Qt https://bugs.webkit.org/show_bug.cgi?id=67430 Reviewed by Noam Rosenthal. Tested using https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/extensions/oes-standard-derivatives.html Enable existing support for OES_standard_derivatives for Qt. * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::ensureEnabled): (WebCore::Extensions3DOpenGL::isEnabled): 2011-09-03 Yuta Kitamura <yutak@chromium.org> WebSocket: Send ArrayBuffer as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67477 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/send-arraybuffer.html http/tests/websocket/tests/hybi/workers/send-arraybuffer.html http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::sendRequestResult): (WebCore::ThreadableWebSocketChannelClientWrapper::setSendRequestResult): * websockets/ThreadableWebSocketChannelClientWrapper.h: Rename "sent" to "sendRequestResult" to clarify the meaning. Messages from the script may not be sent immediately, thus the return value of WebSocketChannel::send() indicates whether the message has been queued successfully, rather than whether the message has been sent or not. * websockets/WebSocket.cpp: (WebCore::WebSocket::send): Case of sending "[object ArrayBuffer]" is covered by an existing test http/tests/websocket/tests/{hybi,hixie76}/send-object.html. * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::workerContextDidSend): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendArrayBuffer): Construct an ArrayBuffer from the data on Vector<char>. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Copy the content into temporary buffer of Vector<char>, and send it to the main thread. * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Kentaro Hara <haraken@google.com> Implement a CustomEvent constructor for V8 https://bugs.webkit.org/show_bug.cgi?id=67527 Reviewed by Sam Weinig. Test: fast/events/constructors/custom-event-constructor.html * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns ScriptValue corresponding to a given key. * bindings/v8/custom/V8EventConstructors.cpp: Added the CustomEvent constructor. * dom/CustomEvent.idl: Added a 'V8CustomConstructor' attribute. 2011-09-02 Adrienne Walker <enne@google.com> [chromium] Move updateLayers from LayerRendererChromium to CCLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=67438 Reviewed by James Robinson. Covered by existing tests. Move functionality used by both CCLayerTreeHost and LayerRendererChromium into CCLayerTreeHostCommon. Move update, paint, and updateCompositorResource functions into CClayerTreeHost. * WebCore.gypi: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::sortLayers): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::textureMemoryReclaimLimit): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::sortLayers): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::updateLayers): (WebCore::paintContentsIfDirty): (WebCore::CCLayerTreeHost::paintLayerContents): (WebCore::CCLayerTreeHost::updateCompositorResources): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: Added. (WebCore::CCLayerTreeHostCommon::isScaleOrTranslation): (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h: Added. (WebCore::CCLayerTreeHostCommon::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::commitIfNeeded): 2011-09-02 Chris Marrin <cmarrin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67510 Crash can occur when doing a PlatformCAAnimation::copy() with no valueFunction Reviewed by Simon Fraser. Do a null check in two places to avoid sending nulls to CACF ValueFunction API. Test: animations/pause-crash.html * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: (PlatformCAAnimation::valueFunction): (PlatformCAAnimation::setValueFunction): 2011-09-02 Bill Budge <bbudge@chromium.org> Add a 'didDownloadData' method to ResourceLoader, SubresourceLoader, SubresourceLoaderClient, DocumentThreadableLoader, ResourceHandleClient, and ThreadableLoaderClient for the Chromium port only, so we can pass these notifications from our ResourceHandle implementation through the WebCore loader framework. https://bugs.webkit.org/show_bug.cgi?id=67229 Reviewed by Darin Fisher. No new tests. Exposes no new functionality. * WebCore.gypi: * loader/DocumentThreadableLoader.h: * loader/ResourceLoader.h: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: (WebCore::SubresourceLoaderClient::didDownloadData): * loader/ThreadableLoaderClient.h: (WebCore::ThreadableLoaderClient::didDownloadData): * loader/ThreadableLoaderClientWrapper.h: (WebCore::ThreadableLoaderClientWrapper::didDownloadData): * loader/chromium: Added. * loader/chromium/DocumentThreadableLoaderChromium.cpp: Added. (WebCore::DocumentThreadableLoader::didDownloadData): * loader/chromium/ResourceLoaderChromium.cpp: Added. (WebCore::ResourceLoader::didDownloadData): * loader/chromium/SubresourceLoaderChromium.cpp: Added. (WebCore::SubresourceLoader::didDownloadData): * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didDownloadData): 2011-09-02 Jeff Miller <jeffm@apple.com> Assert that PlatformCALayerWinInternal::displayCallback() is only called on the main thread https://bugs.webkit.org/show_bug.cgi?id=67541 Reviewed by Simon Fraser. No new tests, covered by existing media tests. * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: (PlatformCALayerWinInternal::displayCallback): Assert that is function is only called on the main thread. 2011-09-02 Julien Chaffraix <jchaffraix@webkit.org> Enable RenderLayer::updateLayerPosition's cachedOffset optimization for more cases https://bugs.webkit.org/show_bug.cgi?id=66901 Reviewed by Simon Fraser. Test: fast/layers/assert-RenderLayer-update-positions.html Also covered by existing tests under the new ASSERT. This change extends the range of callers making use of the cachedOffset optimization. Most callers did not make use of cachedOffset as it did not work when called on a subtree. This limitation is now gone thus we can enable it more widely. The semantics of the optimization are changed a bit as we now return if it is enabled whereas the old code would check if it was *disabled*. Also there were some renames done to match more closely what was going on (s/cachedOffset/offsetFromRoot/ and s/cachedOffsetDisabled/hasLayerOffset/). Note that this is an optimistic optimization: if cachedOffset is not used, then we have done at least an extra traversal up to the root. I have found it to be a wash on file cycler (alexa) but to be a nice improvement (~20%) on some table benchmarks (modifying a cell, scrolling). * page/FrameView.cpp: (WebCore::FrameView::layout): Extended the use of cachedOffset to subtree layouts. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::styleDidChange): Forbid the use cachedOffset in this case as we have only a single layer to update. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeOffsetFromRoot): Added this function to get the offset from the root layer at a certain point in the RenderLayer's tree. It gets the root layer's checking if no layer in between would prevent convertToLayerCoords to work and return the position relative to this layer. (WebCore::RenderLayer::updateLayerPositions): Added a new ASSERT to make sure our cachedOffset is always fine. Also added a comment about calling convertToLayerCoords. (WebCore::RenderLayer::removeOnlyThisLayer): Added cachedOffset here too as we may have to update several layers. We save the offset prior to being removed from the hierarchy for correctness. (WebCore::RenderLayer::paintChildLayerIntoColumns): Added a comment here about calling convertToLayerCoords. * rendering/RenderLayer.h: Swapped the argument in updateLayerPositions to make cachedOffset a mandatory field. Patched all the callers. (WebCore::RenderLayer::canUseConvertToLayerCoords): Added this helper method to know when a renderer prevents convertToLayerCoords from working. Added some FIXME around suspicious use of convertToLayerCoords. 2011-08-30 Matthew Delaney <mdelaney@apple.com> Read out of bounds in sUnpremultiplyData_RGBA8888 / ImageBufferData::getData https://bugs.webkit.org/show_bug.cgi?id=65352 Reviewed by Simon Fraser. New test: fast/canvas/canvas-getImageData-large-crash.html This patch prevents overflows from happening in getImageData, createImageData, and canvas creation calls that specify widths and heights that end up overflowing the ints that we store those values in as well as derived values such as area and maxX / maxY of the bounding rects involved. Overflow of integer arithmetic is detected via the use of the new Checked type that was introduced in r94207. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed dependency on ints, using FloatRects/Sizes instead. (WebCore::HTMLCanvasElement::createImageBuffer): Moved the check for max canvas area and dimensions here. Added in check that prevents us from having canvases of sizes that will cause overflows. (WebCore::HTMLCanvasElement::baseTransform): Updated use of convertLogicalToDevice. * html/HTMLCanvasElement.h: Updated method signatures. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::createEmptyImageData): Added in check to prevent creating ImageData objects that will cause overflow when computing their size. (WebCore::CanvasRenderingContext2D::createImageData): Avoid creating ImageData objects of size that will overflow later. (WebCore::CanvasRenderingContext2D::getImageData): Added in check to prevent trying to get ImageData objects that will cause overflow when computing their size. * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::isExpressibleAsIntRect): New method that tests whether a FloatRect can become an IntRect without overflow or having to be clamped. * platform/graphics/FloatRect.h: * platform/graphics/FloatSize.cpp: (WebCore::FloatSize::isExpressibleAsIntSize): Same as FloatRect, but for FloatSize->IntSize. * platform/graphics/FloatSize.h: * platform/graphics/cg/ImageBufferCG.cpp: Added check for overflow. (WebCore::ImageBuffer::ImageBuffer): 2011-09-02 Dan Bernstein <mitz@apple.com> <rdar://problem/9755843> anonymous RenderMathMLOperator sets itself as the renderer of its parent mfenced node Reviewed by Darin Adler. Test: mathml/operator-hijacks-fenced-node.xhtml * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): Rather than unconditionally setting the node’s renderer to this, just restore it to whatever it was before calling destroyLeftoverChildren(). 2011-09-02 Mark Hahnenberg <mhahnenberg@apple.com> Incorporate newer, faster dtoa library https://bugs.webkit.org/show_bug.cgi?id=66346 Reviewed by Oliver Hunt. No new tests. Added new dtoa library at http://code.google.com/p/double-conversion/. Replaced old call to dtoa. The new library is much faster than the old one. We still use the old dtoa for some stuff in WebCore as well as the old strtod, but we can phase these out eventually as well. * ForwardingHeaders/wtf/dtoa/double-conversion.h: Added. * WebCore.vcproj/copyForwardingHeaders.cmd: * css/CSSPrimitiveValue.cpp: (WebCore::formatNumber): * html/parser/HTMLParserIdioms.cpp: (WebCore::serializeForNumberType): * inspector/InspectorValues.cpp: (WebCore::InspectorBasicValue::writeJSON): * platform/graphics/Color.cpp: (WebCore::Color::serialized): 2011-09-02 Nat Duca <nduca@chromium.org> [chromium] Check for null context when reinitializing compositor https://bugs.webkit.org/show_bug.cgi?id=67507 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::recreateContextIfNeeded): 2011-09-02 Sam Weinig <sam@webkit.org> Remove BeforeProcessEvent, it was never meant to be https://bugs.webkit.org/show_bug.cgi?id=67493 Reviewed by Anders Carlsson. BeforeProcessEvent was added, never hooked up, and never removed. Now it is being removed. * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/BeforeProcessEvent.cpp: Removed. * dom/BeforeProcessEvent.h: Removed. * dom/BeforeProcessEvent.idl: Removed. * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::addListenerTypeIfNeeded): * dom/Document.h: * dom/EventNames.h: * html/HTMLAttributeNames.in: * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::parseMappedAttribute): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::parseMappedAttribute): 2011-09-02 Adrienne Walker <enne@google.com> [chromium] Remove LayerRendererChromium references from the LayerChromium tree https://bugs.webkit.org/show_bug.cgi?id=66430 Reviewed by James Robinson. Covered by existing tests. Replace references to LayerRendererChromium in the LayerChromium tree with references to LayerTreeHost. The LayerRendererChromium property is no longer synced and instead is set recursively on the CCLayerImpl tree during commit. WebGLLayerChromium's paintRenderedResultsToCanvas function is temporarily turned off for threaded compositing because it needs access to the compositor context. Previously, changing the layer renderer on a layer called cleanup resources on that layer. Now, call that explicitly clean up all resources explicitly from the proxy when the layer renderer gets created. This cleans up all of the ManagedTexture objects which may be hanging onto stale GraphicsContext3D pointers. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::cleanupResourcesRecursive): (WebCore::LayerChromium::setLayerTreeHost): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::layerTreeHost): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::paintLayerContents): * platform/graphics/chromium/RenderSurfaceChromium.cpp: * platform/graphics/chromium/RenderSurfaceChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::updateTileSizeAndTilingOption): (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::textureManager): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::cleanupResources): (WebCore::VideoLayerChromium::setLayerTreeHost): (WebCore::VideoLayerChromium::reserveTextures): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas): (WebCore::WebGLLayerChromium::setTextureUpdated): (WebCore::WebGLLayerChromium::layerRendererContext): * platform/graphics/chromium/WebGLLayerChromium.h: * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setLayerRendererRecursive): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): 2011-09-02 Alexey Proskuryakov <ap@apple.com> Build fix. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): Can't use BUILDING_ON_SNOW_LEOPARD without defined() when not on Snow Leopard. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94421. http://trac.webkit.org/changeset/94421 https://bugs.webkit.org/show_bug.cgi?id=67496 Broke a number of tests on Chromium builders (including the "cr-linux" EWS bot) (Requested by apavlov on #webkit). * accessibility/AXObjectCache.cpp: (WebCore::nodeHasRole): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_name): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::recalcStyleSelector): * dom/Element.cpp: (WebCore::Element::baseURI): (WebCore::Element::formatForDebugger): (WebCore::Element::spellcheckAttributeState): * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doUnapply): * editing/markup.cpp: (WebCore::shouldIncludeWrapperForFullySelectedRoot): (WebCore::createMarkup): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::draggable): (WebCore::HTMLAnchorElement::href): (WebCore::HTMLAnchorElement::name): (WebCore::HTMLAnchorElement::target): (WebCore::HTMLAnchorElement::sendPings): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::target): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::aLink): (WebCore::HTMLBodyElement::bgColor): (WebCore::HTMLBodyElement::link): (WebCore::HTMLBodyElement::text): (WebCore::HTMLBodyElement::vLink): (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::value): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::updateNameCache): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::dir): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): (WebCore::HTMLElement::draggable): (WebCore::HTMLElement::title): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::autofocus): (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::name): (WebCore::HTMLFormElement::action): (WebCore::HTMLFormElement::method): (WebCore::HTMLFormElement::target): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::noResize): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setNameAndOpenURL): (WebCore::HTMLFrameElementBase::location): (WebCore::HTMLFrameElementBase::allowFullScreen): * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::insertedByParser): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::altText): (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::alt): (WebCore::HTMLImageElement::draggable): (WebCore::HTMLImageElement::src): (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::finishParsingChildren): (WebCore::HTMLInputElement::altText): (WebCore::HTMLInputElement::reset): (WebCore::HTMLInputElement::searchEventsShouldBeDispatched): (WebCore::HTMLInputElement::isSpeechEnabled): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::href): (WebCore::HTMLLinkElement::rel): (WebCore::HTMLLinkElement::target): (WebCore::HTMLLinkElement::type): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): (WebCore::HTMLMediaElement::insertedIntoDocument): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::content): (WebCore::HTMLMetaElement::httpEquiv): (WebCore::HTMLMetaElement::name): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::min): (WebCore::HTMLMeterElement::max): (WebCore::HTMLMeterElement::value): (WebCore::HTMLMeterElement::low): (WebCore::HTMLMeterElement::high): (WebCore::HTMLMeterElement::optimum): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::containsJavaApplet): (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::groupLabelText): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::max): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::sourceAttributeValue): (WebCore::HTMLScriptElement::charsetAttributeValue): (WebCore::HTMLScriptElement::typeAttributeValue): (WebCore::HTMLScriptElement::languageAttributeValue): (WebCore::HTMLScriptElement::forAttributeValue): (WebCore::HTMLScriptElement::eventAttributeValue): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::media): (WebCore::HTMLSourceElement::type): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::media): (WebCore::HTMLStyleElement::type): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::abbr): (WebCore::HTMLTableCellElement::axis): (WebCore::HTMLTableCellElement::headers): (WebCore::HTMLTableCellElement::scope): (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::width): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rules): (WebCore::HTMLTableElement::summary): (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::align): (WebCore::HTMLTableSectionElement::ch): (WebCore::HTMLTableSectionElement::chOff): (WebCore::HTMLTableSectionElement::vAlign): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::maxLength): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::src): (WebCore::HTMLTrackElement::kind): (WebCore::HTMLTrackElement::srclang): (WebCore::HTMLTrackElement::label): (WebCore::HTMLTrackElement::isDefault): (WebCore::HTMLTrackElement::load): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::width): (WebCore::HTMLVideoElement::height): * html/StepRange.cpp: (WebCore::StepRange::StepRange): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * platform/win/ClipboardWin.cpp: (WebCore::writeImageToDataObject): (WebCore::ClipboardWin::declareAndWriteDragImage): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::altDisplayString): (WebCore::HitTestResult::absoluteImageURL): (WebCore::HitTestResult::absoluteLinkURL): * rendering/RenderDetails.cpp: (WebCore::RenderDetails::isOpen): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemAccessibilityText): * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computePreferredLogicalWidths): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::autosaveName): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): 2011-09-02 Alexey Proskuryakov <ap@apple.com> REGRESSION (r94093): Private browsing doesn't start with a clean state on Snow Leopard https://bugs.webkit.org/show_bug.cgi?id=67356 Reviewed by Darin Adler. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): Don't enable old-style private browsing when using sessions - it would take precedence over session cookie storage on Snow Leopard. 2011-09-02 Mihnea Ovidenie <mihnea@adobe.com> BORDER attribute percent with the input image tag not working. https://bugs.webkit.org/show_bug.cgi?id=66467 Reviewed by Simon Fraser. This patch fixes 2 issues regarding the border attribute of an input image element. 1. The border attribute, if specified, is now taken into account and the border of the input image element is displayed. 2. If the border attribute contains percent, the border is displayed. The value of the border attribute for input image element is now parsed according to the rules for parsing non-negative integers. This implies that when percent is specified in the border attribute, parsing takes place and the percent is ignored. If after parsing, the value of the border is greater than zero, the border of the input image element is displayed. * html/HTMLElement.cpp: (WebCore::parseBorderWidthAttribute): (WebCore::HTMLElement::applyBorderAttribute): * html/HTMLElement.h: * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::parseMappedAttribute): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMappedAttribute): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): 2011-09-02 Kentaro Hara <haraken@google.com> Implement the Event constructor for V8. https://bugs.webkit.org/show_bug.cgi?id=66756 Reviewed by Adam Barth. The spec of the Event constructor is here: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor This patch implements the Event constructor for V8 in V8EventConstructors.cpp, similar to the implementation for JSC in JSEventConstructors.cpp. * WebCore.gypi: Added V8EventConstructors.cpp. * WebCore.pro: Ditto. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyDouble): Returns a value of type double corresponding to a given key. * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns a value corresponding to a given key. * bindings/v8/custom/V8EventConstructors.cpp: Added. (WebCore::constructV8Event): AllowAllocation::current() means that a DOM object created by WebCore is going to be just wrapped into a V8 object. In this case, we skip the code of constructorCallback(). * dom/Event.idl: Added |V8CustomConstructor|. 2011-09-02 Anton Muhin <antonm@chromium.org> [v8] Use size_t instead of unsigned when iterating over Vector in V8DOMStringMap https://bugs.webkit.org/show_bug.cgi?id=67484 Reviewed by Yury Semikhatsky. No new tests, minor cleanup. * bindings/v8/custom/V8DOMStringMapCustom.cpp: (WebCore::V8DOMStringMap::namedPropertyEnumerator): 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94404. http://trac.webkit.org/changeset/94404 https://bugs.webkit.org/show_bug.cgi?id=67490 "Patch is wrong, new API needs two reviewers, we are already working on how to add notifications elsewhere" (Requested by xan_ on #webkit). * bindings/gobject/GNUmakefile.am: 2011-09-02 Andreas Kling <kling@webkit.org> Use fastGetAttribute() and fastHasAttribute() where appropriate. https://bugs.webkit.org/show_bug.cgi?id=67394 Reviewed by Darin Adler. Change call sites that don't check the "style" or SVG animatable attributes to use fastGetAttribute()/fastHasAttribute() instead of getAttribute()/hasAttribute(). No new tests, this is a minor performance optimization. * accessibility/AXObjectCache.cpp: (WebCore::nodeHasRole): * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_name): * dom/Document.cpp: (WebCore::Document::buildAccessKeyMap): (WebCore::Document::recalcStyleSelector): * dom/Element.cpp: (WebCore::Element::baseURI): (WebCore::Element::formatForDebugger): (WebCore::Element::spellcheckAttributeState): * dom/NameNodeList.cpp: (WebCore::NameNodeList::nodeMatches): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock): * editing/SplitElementCommand.cpp: (WebCore::SplitElementCommand::doUnapply): * editing/markup.cpp: (WebCore::shouldIncludeWrapperForFullySelectedRoot): (WebCore::createMarkup): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::draggable): (WebCore::HTMLAnchorElement::href): (WebCore::HTMLAnchorElement::name): (WebCore::HTMLAnchorElement::target): (WebCore::HTMLAnchorElement::sendPings): (WebCore::HTMLAnchorElement::handleClick): * html/HTMLAppletElement.cpp: (WebCore::HTMLAppletElement::createRenderer): * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::target): * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::aLink): (WebCore::HTMLBodyElement::bgColor): (WebCore::HTMLBodyElement::link): (WebCore::HTMLBodyElement::text): (WebCore::HTMLBodyElement::vLink): (WebCore::HTMLBodyElement::addSubresourceAttributeURLs): * html/HTMLButtonElement.cpp: (WebCore::HTMLButtonElement::value): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::checkForNameMatch): (WebCore::HTMLCollection::updateNameCache): * html/HTMLDocument.cpp: (WebCore::HTMLDocument::dir): * html/HTMLElement.cpp: (WebCore::HTMLElement::parseMappedAttribute): (WebCore::HTMLElement::draggable): (WebCore::HTMLElement::title): (WebCore::setHasDirAutoFlagRecursively): (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged): (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged): * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): (WebCore::HTMLEmbedElement::insertedIntoDocument): (WebCore::HTMLEmbedElement::addSubresourceAttributeURLs): * html/HTMLFormCollection.cpp: (WebCore::HTMLFormCollection::getNamedFormItem): (WebCore::HTMLFormCollection::updateNameCache): * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::autofocus): (WebCore::HTMLFormControlElement::updateVisibleValidationMessage): * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::name): (WebCore::HTMLFormElement::action): (WebCore::HTMLFormElement::method): (WebCore::HTMLFormElement::target): * html/HTMLFrameElement.cpp: (WebCore::HTMLFrameElement::noResize): * html/HTMLFrameElementBase.cpp: (WebCore::HTMLFrameElementBase::setNameAndOpenURL): (WebCore::HTMLFrameElementBase::location): (WebCore::HTMLFrameElementBase::allowFullScreen): * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::insertedByParser): * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::altText): (WebCore::HTMLImageElement::width): (WebCore::HTMLImageElement::height): (WebCore::HTMLImageElement::alt): (WebCore::HTMLImageElement::draggable): (WebCore::HTMLImageElement::src): (WebCore::HTMLImageElement::addSubresourceAttributeURLs): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::finishParsingChildren): (WebCore::HTMLInputElement::altText): (WebCore::HTMLInputElement::reset): (WebCore::HTMLInputElement::searchEventsShouldBeDispatched): (WebCore::HTMLInputElement::isSpeechEnabled): * html/HTMLLabelElement.cpp: (WebCore::HTMLLabelElement::control): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::process): (WebCore::HTMLLinkElement::href): (WebCore::HTMLLinkElement::rel): (WebCore::HTMLLinkElement::target): (WebCore::HTMLLinkElement::type): * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::imageElement): * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): (WebCore::HTMLMediaElement::insertedIntoDocument): * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::content): (WebCore::HTMLMetaElement::httpEquiv): (WebCore::HTMLMetaElement::name): * html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::min): (WebCore::HTMLMeterElement::max): (WebCore::HTMLMeterElement::value): (WebCore::HTMLMeterElement::low): (WebCore::HTMLMeterElement::high): (WebCore::HTMLMeterElement::optimum): * html/HTMLNameCollection.cpp: (WebCore::HTMLNameCollection::itemAfter): * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): (WebCore::HTMLObjectElement::containsJavaApplet): (WebCore::HTMLObjectElement::addSubresourceAttributeURLs): * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::groupLabelText): * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::max): * html/HTMLScriptElement.cpp: (WebCore::HTMLScriptElement::sourceAttributeValue): (WebCore::HTMLScriptElement::charsetAttributeValue): (WebCore::HTMLScriptElement::typeAttributeValue): (WebCore::HTMLScriptElement::languageAttributeValue): (WebCore::HTMLScriptElement::forAttributeValue): (WebCore::HTMLScriptElement::eventAttributeValue): * html/HTMLSourceElement.cpp: (WebCore::HTMLSourceElement::media): (WebCore::HTMLSourceElement::type): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::media): (WebCore::HTMLStyleElement::type): * html/HTMLTableCellElement.cpp: (WebCore::HTMLTableCellElement::abbr): (WebCore::HTMLTableCellElement::axis): (WebCore::HTMLTableCellElement::headers): (WebCore::HTMLTableCellElement::scope): (WebCore::HTMLTableCellElement::addSubresourceAttributeURLs): * html/HTMLTableColElement.cpp: (WebCore::HTMLTableColElement::width): * html/HTMLTableElement.cpp: (WebCore::HTMLTableElement::rules): (WebCore::HTMLTableElement::summary): (WebCore::HTMLTableElement::addSubresourceAttributeURLs): * html/HTMLTableSectionElement.cpp: (WebCore::HTMLTableSectionElement::align): (WebCore::HTMLTableSectionElement::ch): (WebCore::HTMLTableSectionElement::chOff): (WebCore::HTMLTableSectionElement::vAlign): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::maxLength): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::strippedPlaceholder): (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::src): (WebCore::HTMLTrackElement::kind): (WebCore::HTMLTrackElement::srclang): (WebCore::HTMLTrackElement::label): (WebCore::HTMLTrackElement::isDefault): (WebCore::HTMLTrackElement::load): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::width): (WebCore::HTMLVideoElement::height): * html/StepRange.cpp: (WebCore::StepRange::StepRange): * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::startSpeechInput): * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::buildObjectForFrame): * loader/FormSubmission.cpp: (WebCore::FormSubmission::create): * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): * page/Frame.cpp: (WebCore::Frame::matchLabelsAgainstElement): * page/PageSerializer.cpp: (WebCore::PageSerializer::serializeFrame): * page/mac/FrameMac.mm: (WebCore::Frame::matchLabelsAgainstElement): * platform/chromium/ClipboardChromium.cpp: (WebCore::writeImageToDataObject): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeImage): * platform/gtk/PasteboardGtk.cpp: (WebCore::getURLForImageNode): * platform/mac/HTMLConverter.mm: (fileWrapperForElement): * platform/win/ClipboardWin.cpp: (WebCore::writeImageToDataObject): (WebCore::ClipboardWin::declareAndWriteDragImage): * rendering/HitTestResult.cpp: (WebCore::HitTestResult::altDisplayString): (WebCore::HitTestResult::absoluteImageURL): (WebCore::HitTestResult::absoluteLinkURL): * rendering/RenderDetails.cpp: (WebCore::RenderDetails::isOpen): * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::itemAccessibilityText): * rendering/RenderObject.cpp: (WebCore::RenderObject::addPDFURLRect): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::computePreferredLogicalWidths): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::autosaveName): * rendering/RenderVideo.cpp: (WebCore::RenderVideo::calculateIntrinsicSize): * rendering/mathml/RenderMathMLFenced.cpp: (WebCore::RenderMathMLFenced::updateFromElement): * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::updateFromElement): * rendering/mathml/RenderMathMLOperator.cpp: (WebCore::RenderMathMLOperator::updateFromElement): * svg/SVGFontData.cpp: (WebCore::SVGFontData::applySVGGlyphSelection): 2011-09-01 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67431 Implement border-image-repeat. Similar to how border-image-slice was implemented, the parsing of the two repeat values has been moved into separate functions. The value is represented as a Pair (similar to how we handle border radius). Reviewed by Beth Dakin. Added fast/borders/border-image-repeat.html. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): Modified the CSSBorderImageValue (you're living on borrowed time, my friend!) to have a CSSValue that contains a Pair. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForRepeatRule): (WebCore::valueForNinePieceImageRepeat): (WebCore::valueForNinePieceImage): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add support for the new properties. Break out the value retrieval for the image repeat rules into its own function, valueForNinePieceImageRepeat. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowRepeat): (WebCore::BorderImageParseContext::commitSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitWidth): (WebCore::BorderImageParseContext::commitRepeat): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Modified the parsing of border image to call into parseBorderImageRepeat for the repeat values. (WebCore::isBorderImageRepeatKeyword): (WebCore::CSSParser::parseBorderImageRepeat): The new parsing code for border-image-repeat is here. It will build up a CSSValue containing a Pair and return the result. * css/CSSParser.h: * css/CSSPropertyNames.in: Add the new properties. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::mapNinePieceImageRepeat): * css/CSSStyleSelector.h: The mapping into the front end is done the same way as border-image-slice. Factor out the image repeat rules portion into mapNinePieceImageRepeat. * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: Add the new 'space' value as a valid image tiling rule. It's not yet supported and, like the 'round' value, is just mapped to 'repeat' for now. * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::copyRepeatFrom): Helper for copying only the repeat rules from another NinePieceImage. 2011-09-02 Jarred Nicholls <jarred@sencha.com> [Qt] number input not rendering spin buttons properly in RTL direction https://bugs.webkit.org/show_bug.cgi?id=67445 Properly render Qt's number input with RTL direction, and fix Plastique styling. Reviewed by Andreas Kling. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintInnerSpinButton): 2011-09-02 Arko Saha <nghq36@motorola.com> Resetting media controls when the src is changed from a valid url to an invalid url. https://bugs.webkit.org/show_bug.cgi?id=64880 Reviewed by Eric Carlson. Test: media/media-controls-invalid-url.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::mediaLoadingFailed): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Make it more clear when requests are loaded from cache on network panel. https://bugs.webkit.org/show_bug.cgi?id=67396 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._refreshHTTPInformation): * inspector/front-end/networkPanel.css: (.resource-headers-view .outline-disclosure li .status-from-cache): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Should remove resource highlight on sort/filter in network panel. https://bugs.webkit.org/show_bug.cgi?id=67411 Reviewed by Pavel Feldman. * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._sortItems): (WebInspector.NetworkLogView.prototype._sortByTimeline): (WebInspector.NetworkLogView.prototype._updateFilter): 2011-09-02 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network: jump to initiator's record in case of redirect https://bugs.webkit.org/show_bug.cgi?id=67367 Reviewed by Pavel Feldman. * English.lproj/localizedStrings.js: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._appendRedirect): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get redirectSource): (WebInspector.Resource.prototype.set redirectSource): 2011-09-02 Antti Koivisto <antti@apple.com> De-virtualize recalcStyle() https://bugs.webkit.org/show_bug.cgi?id=67378 Reviewed by Dimitri Glazkov. Element::recalcStyle() does not need to be virtual, there are very few legit overrides. This will also make it possible to de-recursify it later. Added willRecalcStyle()/didRecalcStyle() virtual function for subclasses that need custom style recalc. These are only invoked if hasCustomWillOrDidRecalcStyle() bit is set. * dom/Document.cpp: (WebCore::Document::recalcStyle): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::recalcStyle): * dom/Element.h: (WebCore::Element::willRecalcStyle): (WebCore::Element::didRecalcStyle): * dom/Node.h: (WebCore::Node::hasCustomWillOrDidRecalcStyle): (WebCore::Node::setHasCustomWillOrDidRecalcStyle): * dom/ShadowRoot.cpp: (WebCore::ShadowRoot::recalcShadowTreeStyle): * dom/ShadowRoot.h: * dom/Text.cpp: (WebCore::Text::recalcTextStyle): * dom/Text.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): (WebCore::HTMLFormControlElement::didRecalcStyle): * html/HTMLFormControlElement.h: * html/HTMLFrameSetElement.cpp: (WebCore::HTMLFrameSetElement::HTMLFrameSetElement): (WebCore::HTMLFrameSetElement::willRecalcStyle): * html/HTMLFrameSetElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::didRecalcStyle): * html/HTMLMediaElement.h: * html/HTMLNoScriptElement.cpp: (WebCore::HTMLNoScriptElement::HTMLNoScriptElement): (WebCore::HTMLNoScriptElement::willRecalcStyle): * html/HTMLNoScriptElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): (WebCore::HTMLPlugInImageElement::willRecalcStyle): * html/HTMLPlugInImageElement.h: * html/HTMLSelectElement.cpp: * html/HTMLSelectElement.h: * svg/SVGTRefElement.cpp: (WebCore::SVGTRefElement::SVGTRefElement): (WebCore::SVGShadowText::willRecalcStyle): * svg/SVGUseElement.cpp: (WebCore::SVGUseElement::SVGUseElement): (WebCore::SVGUseElement::willRecalcStyle): (WebCore::SVGUseElement::didRecalcStyle): * svg/SVGUseElement.h: 2011-09-02 Yuta Kitamura <yutak@chromium.org> WebSocket: Send Blob as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67465 Reviewed by Kent Tamura. Re-lands r94399 with a fix for Leopard builds. * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Patrick Gansterer <paroga@webkit.org> [GTK] Generate gobject bindings for Notification and NotificationCenter https://bugs.webkit.org/show_bug.cgi?id=67380 Reviewed by Philippe Normand. * bindings/gobject/GNUmakefile.am: 2011-09-02 Kenichi Ishibashi <bashi@chromium.org> [chromium] editing/selection/regional-indicators.html timing out on Linux https://bugs.webkit.org/show_bug.cgi?id=66510 Reviewed by Kent Tamura. Uses SurrogatePairAwareTextIerator in ComplexTextControllerLinux to handle surrogate pairs correctly. No new tests. editing/selection/regional-indicators.html should pass with this patch. * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::nextScriptRun): Used SurrogatePairAwareTextIterator to split run. (WebCore::surrogatePairAwareFirstCharacter): Added. (WebCore::ComplexTextController::setupFontForScriptRun): Used surrogatePairAwareFirstCharacter() to get appropriate FontData. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94399. http://trac.webkit.org/changeset/94399 https://bugs.webkit.org/show_bug.cgi?id=67471 Broke Leopard build (Requested by yutak on #webkit). * bindings/js/JSWebSocketCustom.cpp: * bindings/v8/custom/V8WebSocketCustom.cpp: * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94393. http://trac.webkit.org/changeset/94393 https://bugs.webkit.org/show_bug.cgi?id=67470 It broke Qt-SL build (Requested by ossy on #webkit). * WebCore.pro: 2011-09-02 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Webfonts display bold in Windows https://bugs.webkit.org/show_bug.cgi?id=67387 Uses font's default weight for webfonts by setting FW_DONTCARE. Reviewed by Kent Tamura. No new tests. We don't have fonts to test this change. * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): Sets FW_DONTCARE to use default font weight. 2011-09-02 Yuta Kitamura <yutak@chromium.org> WebSocket: Send Blob as WebSocket binary message https://bugs.webkit.org/show_bug.cgi?id=67465 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hixie76/send-empty.html http/tests/websocket/tests/hixie76/send-object.html http/tests/websocket/tests/hybi/send-blob.html http/tests/websocket/tests/hybi/send-empty.html http/tests/websocket/tests/hybi/send-file-blob-fail.html http/tests/websocket/tests/hybi/send-file-blob.html http/tests/websocket/tests/hybi/workers/send-blob.html http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::send): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::sendCallback): * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::send): * websockets/WebSocket.h: * websockets/WebSocket.idl: Fixing code generator did not sound easy, because there are some classes depending on broken behavior of current code generator (one such example is CanvasRenderingContext2D). As a temporary workaround, new custom handlers for send() are added. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::send): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::send): (WebCore::WorkerThreadableWebSocketChannel::Peer::send): (WebCore::WorkerThreadableWebSocketChannel::mainThreadSendBlob): A Blob can be deserialized from url, type and size. (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): KURL, String and long long (corresponding to url, type and size, respectively) can be passed safely across threads. * websockets/WorkerThreadableWebSocketChannel.h: 2011-09-02 Philippe Normand <pnormand@igalia.com> [WebAudio] Undeclared dependency to VIDEO https://bugs.webkit.org/show_bug.cgi?id=66893 Reviewed by Kenneth Russell. Build MediaAudioSourceNode only if VIDEO is enabled * webaudio/AudioContext.cpp: * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-02 Csaba Osztrogonác <ossy@webkit.org> [Qt][WK2] Unreviewed speculative buildfix. * WebCore.pro: Add platform/graphics/GlyphPageTreeNode.cpp to SOURCES. 2011-09-02 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94389. http://trac.webkit.org/changeset/94389 https://bugs.webkit.org/show_bug.cgi?id=67468 breaks mac build (Requested by philn-tp on #webkit). * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-02 Kentaro Hara <haraken@google.com> Generate an EventSource constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67459 Reviewed by Adam Barth. Tests: fast/eventsource/eventsource-constructor.html fast/eventsource/eventsource-attribute-listeners.html * WebCore.gypi: Removed V8EventSourceConstructor.cpp. * WebCore.pro: Removed V8EventSourceConstructor.cpp. * bindings/v8/custom/V8EventSourceConstructor.cpp: Removed. * page/EventSource.idl: Added the 'Constructor' extended attribute. 2011-09-02 Philippe Normand <pnormand@igalia.com> [WebAudio] Undeclared dependency to VIDEO https://bugs.webkit.org/show_bug.cgi?id=66893 Reviewed by Kenneth Russell. Build MediaAudioSourceNode only if VIDEO is enabled * webaudio/AudioContext.cpp: * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/MediaElementAudioSourceNode.cpp: * webaudio/MediaElementAudioSourceNode.h: * webaudio/MediaElementAudioSourceNode.idl: 2011-09-01 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] Implement WebSocket::close() code and reason handling. https://bugs.webkit.org/show_bug.cgi?id=66925 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/close.html http/tests/websocket/tests/hybi/workers/close.html * bindings/js/JSWebSocketCustom.cpp: (WebCore::JSWebSocket::close): * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::closeCallback): Add custom bridge for WebSocket::close(). * websockets/ThreadableWebSocketChannel.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::close): * websockets/WebSocket.h: * websockets/WebSocket.idl: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::close): Add code and reason arguments handling. (WebCore::WebSocketChannel::startClosingHandshake): Send a close frame without code and reason on server initiated closing handshakes. (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::processFrameHixie76): * websockets/WebSocketChannel.h: * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::close): (WebCore::WorkerThreadableWebSocketChannel::Peer::close): (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose): (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): * websockets/WorkerThreadableWebSocketChannel.h: Add code and reason arguments handling. 2011-09-01 Mark Rowe <mrowe@apple.com> Fix the build by adding some more missing return types. * page/mac/WebCoreViewFactory.m: (-[WebCoreViewFactory init]): 2011-09-01 Michael Nordman <michaeln@google.com> [Chromium] Fix a crashing bug due to raciness around SQL database shutdown. https://bugs.webkit.org/show_bug.cgi?id=67457 The removeOpenDatabase() method can get called multiple times. Subsequent calls to it should be harmeless instead of cause a crash. Reviewed by David Levin. * storage/chromium/DatabaseTrackerChromium.cpp: (WebCore::DatabaseTracker::removeOpenDatabase): 2011-09-01 Kent Tamura <tkent@chromium.org> The filename text color of a file upload control should be inherited. https://bugs.webkit.org/show_bug.cgi?id=67368 Reviewed by Darin Adler. * css/html.css: (input[type="file"]): Add 'color: inherit'. The declaration for 'input' contains 'color: initial;'. So a file upload control has had black foreground color unless it has been specified 'color' property explicitly. Because a file upload control uses inherited background color, the foreground color also should be inherited. 2011-09-01 Kentaro Hara <haraken@google.com> Generate a Worker constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67447 Reviewed by Dimitri Glazkov. Test: fast/workers/worker-constructor.html fast/workers/worker-event-listener.html * bindings/v8/custom/V8WorkerCustom.cpp: Removed constructorCallback(). * workers/Worker.idl: Added the 'Constructor' extended attribute. 2011-09-01 Kentaro Hara <haraken@google.com> Generate a FileReader constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67412 Reviewed by Adam Barth. Test: fast/files/blob-slice-test.html fast/files/file-reader-abort.html * bindings/v8/custom/V8FileReaderCustom.cpp: Removed constructorCallback(). * fileapi/FileReader.idl: Added the 'Constructor' extended attribute. 2011-09-01 Robert Kroeger <rjkroege@chromium.org> [chromium] Code cleanup FIXME in Chromium recognizer https://bugs.webkit.org/show_bug.cgi?id=67448 Reviewed by Adam Barth. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): Fixed a bug noticed by a benjaminp while reviewing a different ndonned patch where global positions were not being set correctly on gesture-driven mouse wheel events. * platform/chromium/GestureRecognizerChromium.cpp: Changed static per-edge functions into methods and improves encapsulation. No new functionality is present. (WebCore::GestureRecognizerChromium::GestureRecognizerChromium): (WebCore::GestureRecognizerChromium::reset): (WebCore::GestureRecognizerChromium::~GestureRecognizerChromium): (WebCore::GestureRecognizerChromium::addEdgeFunction): (WebCore::GestureRecognizerChromium::isInClickTimeWindow): (WebCore::GestureRecognizerChromium::isInsideManhattanSquare): (WebCore::GestureRecognizerChromium::appendClickGestureEvent): (WebCore::GestureRecognizerChromium::processTouchEventForGestures): (WebCore::GestureRecognizerChromium::appendScrollGestureBegin): (WebCore::GestureRecognizerChromium::appendScrollGestureEnd): (WebCore::GestureRecognizerChromium::appendScrollGestureUpdate): (WebCore::GestureRecognizerChromium::updateValues): (WebCore::GestureRecognizerChromium::signature): (WebCore::GestureRecognizerChromium::touchDown): (WebCore::GestureRecognizerChromium::scrollEnd): (WebCore::GestureRecognizerChromium::noGesture): (WebCore::GestureRecognizerChromium::click): (WebCore::GestureRecognizerChromium::isClickOrScroll): (WebCore::GestureRecognizerChromium::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::GestureRecognizerChromium::setState): 2011-09-01 Julien Chaffraix <jchaffraix@webkit.org> Move LayoutRepainter to its own class https://bugs.webkit.org/show_bug.cgi?id=66255 Reviewed by Hajime Morita. No new tests, code movement only. * rendering/RenderObject.h: Moved code from here ... * rendering/LayoutRepainter.cpp: Added. (WebCore::LayoutRepainter::LayoutRepainter): (WebCore::LayoutRepainter::repaintAfterLayout): * rendering/LayoutRepainter.h: Added. (WebCore::LayoutRepainter::checkForRepaint): ... to those 2 files. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: Updated our build systems. * rendering/RenderingAllInOne.cpp: Needed for the Windows bot. * rendering/RenderBlock.cpp: * rendering/RenderDeprecatedFlexibleBox.cpp: * rendering/RenderReplaced.cpp: * rendering/RenderTable.cpp: * rendering/svg/RenderSVGContainer.cpp: * rendering/svg/RenderSVGForeignObject.cpp: * rendering/svg/RenderSVGImage.cpp: * rendering/svg/RenderSVGPath.cpp: * rendering/svg/RenderSVGRoot.cpp: * rendering/svg/RenderSVGText.cpp: Added #include "LayoutRepainter". 2011-09-01 Ada Chan <adachan@apple.com> Cleanup refactoring for https://bugs.webkit.org/show_bug.cgi?id=67160 Don't ifdef out the data member xslStyleSheets in MemoryCache::Statistics to cut down the ifdefs in getWebCoreMemoryCacheStatistics() in WebKit2/WebProcess/WebProcess.cpp. Reviewed by Darin Adler. No new tests required. Just small code refactoring. * loader/cache/MemoryCache.h: 2011-09-01 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page https://bugs.webkit.org/show_bug.cgi?id=65140 Reviewed by Darin Adler. Tests: fast/css/stylesheet-enable-first-alternate-link.html fast/css/stylesheet-enable-first-alternate-on-load-link.html fast/css/stylesheet-enable-first-alternate-on-load-sheet.html fast/css/stylesheet-enable-second-alternate-link.html fast/css/stylesheet-enable-second-alternate-on-load-link.html fast/css/stylesheet-enable-second-alternate-on-load-sheet.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html This patch basically reverts 88479 and 84329 while keeping the tests we developped during the implementation. Following discussion, it looks like HTML5 will need to be amended. In the meantime, we will just revert the changes so that we can come up with a better change. * dom/Document.cpp: (WebCore::Document::recalcStyleSelector): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::setDisabledState): (WebCore::HTMLLinkElement::parseMappedAttribute): (WebCore::HTMLLinkElement::process): Revert those method to their original content. * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isDisabled): (WebCore::HTMLLinkElement::isEnabledViaScript): (WebCore::HTMLLinkElement::isAlternate): Re-introduced the DisabledState enum. * html/HTMLLinkElement.idl: |disabled| is Reflect'ed again. 2011-09-01 Dan Bernstein <mitz@apple.com> Fix layout test regressions from r94352. Reviewed by Anders Carlsson. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): In the custom font case (that is, when there is not base NSFont) always get and use the best variation. 2011-09-01 Ryosuke Niwa <rniwa@webkit.org> Revert r94355 because it caused bunch of builds to break. * page/DOMWindow.idl: 2011-09-01 Mark Rowe <mrowe@apple.com> <rdar://problem/10063411> WebScriptObject.h declares an Objective-C method without a return type. Rubber-stamped by Anders Carlsson. * bridge/objc/WebScriptObject.h: 2011-09-01 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (4/7) https://bugs.webkit.org/show_bug.cgi?id=67174 Reviewed by Oliver Hunt. No new tests. Completed the fourth level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::create): * bindings/js/JSDOMWindowShell.h: * bindings/js/JSDOMWrapper.h: (WebCore::JSDOMWrapper::JSDOMWrapper): * bindings/js/ScriptController.cpp: (WebCore::ScriptController::createWindowShell): * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): * bindings/scripts/test/JS/JSTestInterface.h: (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): * bindings/scripts/test/JS/JSTestMediaQueryListListener.h: (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): * bindings/scripts/test/JS/JSTestObj.h: (WebCore::JSTestObjPrototype::JSTestObjPrototype): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h: (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): * bridge/objc/objc_runtime.h: * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): (JSC::Bindings::ObjcFallbackObjectImp::finishCreation): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): (JSC::RuntimeArray::finishCreation): * bridge/runtime_array.h: * bridge/runtime_object.cpp: (JSC::Bindings::RuntimeObject::RuntimeObject): (JSC::Bindings::RuntimeObject::finishCreation): * bridge/runtime_object.h: 2011-08-31 Adrienne Walker <enne@google.com> [chromium] Remove unsafe raw GraphicsContext3D pointer from ProgramBinding https://bugs.webkit.org/show_bug.cgi?id=67003 Reviewed by James Robinson. ProgramBinding now takes an explicit cleanup call to destroy its resources. This will assert if it is not called and will leak no longer potentially dereference a dead pointer. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::borderProgram): (WebCore::LayerRendererChromium::headsUpDisplayProgram): (WebCore::LayerRendererChromium::renderSurfaceProgram): (WebCore::LayerRendererChromium::renderSurfaceMaskProgram): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::tilerProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzleAA): (WebCore::LayerRendererChromium::canvasLayerProgram): (WebCore::LayerRendererChromium::pluginLayerProgram): (WebCore::LayerRendererChromium::videoLayerRGBAProgram): (WebCore::LayerRendererChromium::videoLayerYUVProgram): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/ProgramBinding.cpp: (WebCore::ProgramBindingBase::ProgramBindingBase): (WebCore::ProgramBindingBase::~ProgramBindingBase): (WebCore::ProgramBindingBase::init): (WebCore::ProgramBindingBase::cleanup): (WebCore::ProgramBindingBase::loadShader): (WebCore::ProgramBindingBase::createShaderProgram): * platform/graphics/chromium/ProgramBinding.h: (WebCore::ProgramBinding::ProgramBinding): (WebCore::ProgramBinding::initialize): 2011-09-01 Patrick Gansterer <paroga@webkit.org> Don't include unnecessary headers in V8 bindings https://bugs.webkit.org/show_bug.cgi?id=67435 Reviewed by Darin Adler. When an IDL attribue is Conditonal the corresponding headers need to be surrounded with the correct #if ENABLE(). * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: 2011-09-01 Pratik Solanki <psolanki@apple.com> Rename CFNETWORK_DATA_ARRAY_CALLBACK to NETWORK_CFDATA_ARRAY_CALLBACK https://bugs.webkit.org/show_bug.cgi?id=67348 Reviewed by Alexey Proskuryakov. * loader/ResourceLoader.h: * loader/SubresourceLoader.h: * loader/cf/SubresourceLoaderCF.cpp: * loader/mac/ResourceLoaderMac.mm: * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::clear): (WebCore::SharedBuffer::buffer): * platform/SharedBuffer.h: * platform/cf/SharedBufferCF.cpp: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::createCFURLConnection): * platform/network/mac/ResourceHandleMac.mm: 2011-09-01 Kentaro Hara <haraken@google.com> TypeError should be thrown when a constructor is called as a normal function. https://bugs.webkit.org/show_bug.cgi?id=67381 Reviewed by Darin Adler. The spec is here: http://www.w3.org/TR/WebIDL/#es-interface-call For example, "Image()" or "XMLHttpRequest()" should throw TypeError. Test: fast/dom/call-a-constructor-as-a-function.html * bindings/v8/custom/V8ArrayBufferCustom.cpp: (WebCore::V8ArrayBuffer::constructorCallback): Throws TypeError if args.IsConstructCall() is false. * bindings/v8/custom/V8ArrayBufferViewCustom.h: (WebCore::constructWebGLArray): Ditto. * bindings/v8/custom/V8AudioContextCustom.cpp: (WebCore::V8AudioContext::constructorCallback): Ditto. * bindings/v8/custom/V8DOMFormDataCustom.cpp: (WebCore::V8DOMFormData::constructorCallback): Ditto. * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: (WebCore::v8HTMLAudioElementConstructorCallback): Ditto. * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore::v8HTMLImageElementConstructorCallback): Ditto. * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: (WebCore::v8HTMLOptionElementConstructorCallback): Ditto. * bindings/v8/custom/V8MessageChannelConstructor.cpp: (WebCore::V8MessageChannel::constructorCallback): Ditto. * bindings/v8/custom/V8SharedWorkerCustom.cpp: (WebCore::V8SharedWorker::constructorCallback): Ditto. * bindings/v8/custom/V8WebKitCSSMatrixConstructor.cpp: (WebCore::V8WebKitCSSMatrix::constructorCallback): Ditto. * bindings/v8/custom/V8WebKitPointConstructor.cpp: (WebCore::V8WebKitPoint::constructorCallback): Ditto. * bindings/v8/custom/V8WebSocketCustom.cpp: (WebCore::V8WebSocket::constructorCallback): Ditto. * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::V8Worker::constructorCallback): Ditto. 2011-08-31 Adrienne Walker <enne@google.com> [chromium] TextureManager overestimates the size of non-RGBA texture formats https://bugs.webkit.org/show_bug.cgi?id=66917 Reviewed by James Robinson. Use GraphicsContext3D to determine the size of a given texture format. Also, make TextureManager use more GraphicsContext3D types. * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/TextureManager.cpp: (WebCore::memoryUseBytes): * platform/graphics/chromium/TextureManager.h: 2011-09-01 Sam Weinig <sam@webkit.org> Add missing Event constructors to DOMWindow.idl https://bugs.webkit.org/show_bug.cgi?id=67449 Reviewed by Anders Carlsson. Covered by existing tests. * page/DOMWindow.idl: 2011-09-01 Patrick Gansterer <paroga@webkit.org> Consider Conditional attribute in CodeGenerator for methods https://bugs.webkit.org/show_bug.cgi?id=67409 Reviewed by Darin Adler. This change adds appropriate #if ENABLE() lines for the preprocessor around the generated functions depending on the Conditional attribute in the IDL file. * bindings/scripts/CodeGeneratorCPP.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorObjC.pm: (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateImplementation): * bindings/scripts/test/CPP/WebDOMTestObj.cpp: * bindings/scripts/test/CPP/WebDOMTestObj.h: * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: * bindings/scripts/test/GObject/WebKitDOMTestObj.h: * bindings/scripts/test/JS/JSTestObj.cpp: * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8TestObj.cpp: 2011-08-29 Nat Duca <nduca@chromium.org> [chromium] Introduce CCSingleThreadProxy in order to move LayerRenderer to CCLayerTreeHostImpl https://bugs.webkit.org/show_bug.cgi?id=66807 Reviewed by James Robinson. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerRendererRecursive): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::close): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getOffscreenLayerTexture): (WebCore::LayerRendererChromium::isContextLost): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::capabilities): (WebCore::LayerRendererChromium::rootLayerImpl): (WebCore::LayerRendererChromium::contextSupportsMapSub): (WebCore::LayerRendererChromium::viewportSize): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::reserveTextures): * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::~CCLayerTreeHost): (WebCore::CCLayerTreeHost::animateAndLayout): (WebCore::CCLayerTreeHost::preCommit): (WebCore::CCLayerTreeHost::commitTo): (WebCore::CCLayerTreeHost::createCompositorThread): (WebCore::CCLayerTreeHost::createLayerTreeHostContext3D): (WebCore::CCLayerTreeHost::createLayerTreeHostImpl): (WebCore::CCLayerTreeHost::didRecreateGraphicsContext): (WebCore::CCLayerTreeHost::scheduleComposite): (WebCore::CCLayerTreeHost::context): (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::finishAllRendering): (WebCore::CCLayerTreeHost::layerRendererCapabilities): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::skiaContext): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::loseCompositorContext): (WebCore::CCLayerTreeHost::contentsTextureManager): (WebCore::CCLayerTreeHost::composite): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (WebCore::LayerRendererCapabilities::LayerRendererCapabilities): * platform/graphics/chromium/cc/CCLayerTreeHostCommitter.h: Removed. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::create): (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::finishAllRendering): (WebCore::CCLayerTreeHostImpl::isContextLost): (WebCore::CCLayerTreeHostImpl::layerRendererCapabilities): (WebCore::CCLayerTreeHostImpl::present): (WebCore::CCLayerTreeHostImpl::readback): (WebCore::CCLayerTreeHostImpl::setRootLayer): (WebCore::CCLayerTreeHostImpl::setVisible): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::CCLayerTreeHostImpl::updateLayers): (WebCore::CCLayerTreeHostImpl::setViewport): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::layerRenderer): (WebCore::CCLayerTreeHostImpl::rootLayer): (WebCore::CCLayerTreeHostImpl::viewportSize): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: Removed. * platform/graphics/chromium/cc/CCMainThreadTask.h: (WebCore::MainThreadTask4::create): (WebCore::MainThreadTask4::MainThreadTask4): (WebCore::MainThreadTask4::performTask): (WebCore::MainThreadTask5::create): (WebCore::MainThreadTask5::MainThreadTask5): (WebCore::MainThreadTask5::performTask): (WebCore::createMainThreadTask): * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCProxy.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommitter.cpp. (WebCore::CCProxy::isMainThread): (WebCore::CCProxy::isImplThread): (WebCore::CCProxy::setImplThread): * platform/graphics/chromium/cc/CCProxy.h: Added. (WebCore::CCProxy::~CCProxy): (WebCore::CCProxy::CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: Added. (WebCore::ScopedSetImplThread::ScopedSetImplThread): (WebCore::ScopedSetImplThread::~ScopedSetImplThread): (WebCore::CCSingleThreadProxy::create): (WebCore::CCSingleThreadProxy::CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::start): (WebCore::CCSingleThreadProxy::~CCSingleThreadProxy): (WebCore::CCSingleThreadProxy::compositeAndReadback): (WebCore::CCSingleThreadProxy::context): (WebCore::CCSingleThreadProxy::finishAllRendering): (WebCore::CCSingleThreadProxy::isStarted): (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::layerRendererCapabilities): (WebCore::CCSingleThreadProxy::loseCompositorContext): (WebCore::CCSingleThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCSingleThreadProxy::setNeedsRedraw): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::skiaContext): (WebCore::CCSingleThreadProxy::contentsTextureManager): (WebCore::CCSingleThreadProxy::compositeImmediately): (WebCore::CCSingleThreadProxy::compositeIfNeeded): (WebCore::CCSingleThreadProxy::doComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h. * platform/graphics/chromium/cc/CCThreadProxy.cpp: Added. (WebCore::CCThreadProxy::create): (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::~CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::context): (WebCore::CCThreadProxy::finishAllRendering): (WebCore::CCThreadProxy::isStarted): (WebCore::CCThreadProxy::initializeLayerRenderer): (WebCore::CCThreadProxy::layerRendererCapabilities): (WebCore::CCThreadProxy::loseCompositorContext): (WebCore::CCThreadProxy::setNeedsCommitAndRedraw): (WebCore::CCThreadProxy::setNeedsRedraw): (WebCore::CCThreadProxy::start): (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::skiaContext): (WebCore::CCThreadProxy::contentsTextureManager): (WebCore::CCThreadProxy::beginFrameAndCommitOnCCThread): (WebCore::CCThreadProxy::beginFrameAndCommit): (WebCore::CCThreadProxy::commitOnCCThread): (WebCore::CCThreadProxy::drawLayersOnCCThread): (WebCore::CCThreadProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCThreadProxy::setNeedsRedrawOnCCThread): (WebCore::CCThreadProxy::initializeImplOnCCThread): (WebCore::CCThreadProxy::initializeLayerRendererOnCCThread): (WebCore::CCThreadProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCThreadProxy.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h. * platform/graphics/chromium/cc/CCThreadTask.h: (WebCore::CCThreadTask5::create): (WebCore::CCThreadTask5::CCThreadTask5): (WebCore::CCThreadTask5::performTask): (WebCore::createCCThreadTask): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): 2011-09-01 Dan Bernstein <mitz@apple.com> <rdar://problem/9528843> STIX glyphs not rendered on this stackoverflow answer https://bugs.webkit.org/show_bug.cgi?id=67444 Reviewed by Darin Adler. Test: fast/text/fallback-traits-fixup.html After obtaining STIX Regular as a fallback font for some characters, getFontDataForCharacters() proceeded to ask for a font from the same family having the desired traits and weight (because wkGetFontInLanguageForRange() does not preserve traits and weight). The returned font was different and happened to not contain the desired character. * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getFontDataForCharacters): Only ask for a family member with the desired traits and weight if the substitute font does not already have them, and only use the returned member if it actually contains the desired character. 2011-09-01 Kentaro Hara <haraken@google.com> Generate an XSLTProcessor constructor of V8 using the IDL 'Constructor' extended attribute https://bugs.webkit.org/show_bug.cgi?id=67414 Reviewed by Dimitri Glazkov. Test: fast/dom/Window/custom-constructors.html fast/xsl/default-html.html * bindings/v8/custom/V8XSLTProcessorCustom.cpp: Removed constructorCallback(). * xml/XSLTProcessor.idl: Added the 'Constructor' extended attribute. 2011-09-01 Eric Carlson <eric.carlson@apple.com> HTMLMediaElement should use fastHasAttribute instead of hasAttribute https://bugs.webkit.org/show_bug.cgi?id=67421 Reviewed by Simon Fraser. Use fastHasAttribute instead of hasAttribute because it is faster, and HTMLMediaElement doesn't ever need to check style or SVG animated attributes. No new tests required, this is just an optimization. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::selectMediaResource): hasAttribute -> fastHasAttribute. (WebCore::HTMLMediaElement::loadResource): Ditto. (WebCore::HTMLMediaElement::autoplay): Ditto. (WebCore::HTMLMediaElement::loop): Ditto. (WebCore::HTMLMediaElement::controls): Ditto. (WebCore::HTMLMediaElement::selectNextSourceChild): Ditto. (WebCore::HTMLMediaElement::sourceWasAdded): Ditto. 2011-09-01 Dominic Mazzoni <dmazzoni@google.com> Add API functions to enable starting and stopping speech input, and checking the current speech input state. https://bugs.webkit.org/show_bug.cgi?id=60170 Reviewed by Dimitri Glazkov. Test: fast/speech/input-text-speechstart.html * html/shadow/TextControlInnerElements.cpp: (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::startSpeechInput): (WebCore::InputFieldSpeechButtonElement::stopSpeechInput): * html/shadow/TextControlInnerElements.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::speechButtonElement): * rendering/RenderTextControlSingleLine.h: 2011-09-01 Tim Horton <timothy_horton@apple.com> REGRESSION: Rendering artifacts on a rotated, pattern filled SVG shape https://bugs.webkit.org/show_bug.cgi?id=53055 <rdar://problem/8910917> Reviewed by Simon Fraser. Make use of wkCGPatternCreateWithImageAndTransform when tiling patterns in both directions. This helps to avoid pixel-cracking along pattern tiling boundaries. Ignore 2D rotation when computing the size of a pattern's tile image, as it artificially inflates the size of the tile, which can cause pixel-cracking. Test: svg/custom/pattern-rotate-gaps.svg * platform/graphics/cg/PatternCG.cpp: (WebCore::Pattern::createPlatformPattern): * rendering/svg/RenderSVGResourcePattern.cpp: * rendering/svg/SVGImageBufferTools.cpp: (WebCore::SVGImageBufferTools::roundedImageBufferSize): * rendering/svg/SVGImageBufferTools.h: 2011-09-01 Patrick Gansterer <paroga@webkit.org> Unreviewed, rolling out r94284. http://trac.webkit.org/changeset/94284 https://bugs.webkit.org/show_bug.cgi?id=65050 Broke building without SVG enabled on Chromium. * page/DOMWindow.idl: 2011-09-01 Alexey Proskuryakov <ap@apple.com> REGRESSION (r93247): 2 http/tests/misc tests failing on SnowLeopard Intel Release (Tests) https://bugs.webkit.org/show_bug.cgi?id=67374 Reviewed by Simon Fraser. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::applyBasicAuthorizationHeader): * platform/network/mac/ResourceHandleMac.mm: (WebCore::applyBasicAuthorizationHeader): Some versions of CFNetwork carry along an Authorization header, some don't. We shouldn't repeat its value twice, this is not one of those headers that allow comma separated lists of values. 2011-09-01 Noel Gordon <noel.gordon@gmail.com> [chromium] Move ImageBuffer::platformLayer() https://bugs.webkit.org/show_bug.cgi?id=67372 Reviewed by Kenneth Russell. No new tests: refactoring only, covered by existting tests. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::platformLayer): Move it away from the toDataURL code. 2011-09-01 Kulanthaivel Palanichamy <kulanthaivel@codeaurora.org> Focus ring is rendered incorrectly for a block with -webkit-writing-mode https://bugs.webkit.org/show_bug.cgi?id=62915 Reviewed by Simon Fraser. RenderBlock::addFocusRingRects() should consider physical box position and dimension instead of logical values for focus ring rects calculation. Test: fast/css/focus-ring-multiline-writingmode-vertical.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addFocusRingRects): 2011-09-01 Philippe Normand <pnormand@igalia.com> Unreviewed, GTK build fix after r94299. * GNUmakefile.list.am: 2011-09-01 Brian Salomon <bsalomon@google.com> [Chromium/Skia] Use GraphicsContext3D::grContext() to create GrContext for accelerated drawing https://bugs.webkit.org/show_bug.cgi?id=67419 Reviewed by James Robinson. Accelerated drawing is not enabled in layout tests. However, once it is this change will be tested by every test. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::contextSupportsAcceleratedPainting): (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::create): (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::createFrameBuffer): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: 2011-09-01 Dominik Röttsches <dominik.rottsches@linux.intel.com> Rename GraphicsContext3DInternal to GraphicsContext3DPrivate and add a dummy version of this class for Mac https://bugs.webkit.org/show_bug.cgi?id=67172 Build fix, completing rename for GTK file. Reviewed by Chris Marrin. * platform/graphics/gtk/GraphicsContext3DPrivate.cpp: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DInternal.cpp. (sharedDisplay): (WebCore::activeGraphicsContexts): (WebCore::GraphicsContext3DPrivate::addActiveGraphicsContext): (WebCore::GraphicsContext3DPrivate::removeActiveGraphicsContext): (WebCore::GraphicsContext3DPrivate::cleanupActiveContextsAtExit): (WebCore::GraphicsContext3DPrivate::create): (WebCore::GraphicsContext3DPrivate::createPbufferContext): (WebCore::GraphicsContext3DPrivate::createPixmapContext): (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::makeContextCurrent): 2011-09-01 Simon Fraser <simon.fraser@apple.com> REGRESSION (r94259): Two tests doing hit testing were broken by this change. https://bugs.webkit.org/show_bug.cgi?id=67353 Reviewed by Chris Marrin. Fix a regression from r94259; that change missed a fix in RenderView, which affects coordinate transforms in position:fixed elements. This fixes these tests: fast/events/document-elementFromPoint.html fast/events/offsetX-offsetY.html plugins/mouse-events-fixedpos.html * rendering/RenderView.cpp: (WebCore::RenderView::mapAbsoluteToLocalPoint): 2011-09-01 Tony Gentilcore <tonyg@chromium.org> [chromium] Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=66673 Reviewed by James Robinson. This was fixed for other ports in http://trac.webkit.org/changeset/88260. However, it was missed in FontCacheLinux likely due to similar param in the nested call to getCachedFontPlatformData(). No new tests because no directly observable change in behavior. * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-31 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Perform a more effective JS GC https://bugs.webkit.org/show_bug.cgi?id=67304 Reviewed by Pavel Feldman. * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::collectGarbage): 2011-09-01 Sam Weinig <sam@webkit.org> WebGLContextEvent should have its own JS wrapper https://bugs.webkit.org/show_bug.cgi?id=67352 Reviewed by Anders Carlsson. The WebGLContextEvent was missing a proper JS wrapper, and thus anyone using one in an EventListener was actually just getting a plain old Event. Rectify this by generating the wrapper and wrapping it on creating. Test: fast/canvas/webgl/WebGLContextEvent.html * CodeGenerators.pri: Add WebGLContextEvent.idl * DerivedSources.make: Add WebGLContextEvent and sort. * WebCore.xcodeproj/project.pbxproj: Add generated JSWebGLContextEvent.h/cpp. * bindings/js/JSEventCustom.cpp: (WebCore::toJS): Wrap WebGLContextEvents as JSWebGLContextEvents. * dom/Event.cpp: (WebCore::Event::isWebGLContextEvent): * dom/Event.h: * html/canvas/WebGLContextEvent.cpp: (WebCore::WebGLContextEvent::isWebGLContextEvent): * html/canvas/WebGLContextEvent.h: Add predicate for WebGLContextEvent. 2011-09-01 Eric Carlson <eric.carlson@apple.com> Add 'muted' content attribute to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=58369 Reviewed by Darin Adler. Test: media/video-defaultmuted.html * html/HTMLAttributeNames.in: Add muted. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::loadResource): Deal with the 'muted' attribute. * html/HTMLMediaElement.idl: Add defaultMuted. 2011-09-01 Tim Horton <timothy_horton@apple.com> REGRESSION: Rendering artifacts on a rotated, pattern filled shape https://bugs.webkit.org/show_bug.cgi?id=53055 <rdar://problem/8910917> Reviewed by Simon Fraser. Introduce wkCGPatternCreateWithImageAndTransform. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-08-30 Adrienne Walker <enne@google.com> [chromium] Fix scissor rects on clipped nested iframes https://bugs.webkit.org/show_bug.cgi?id=67221 Reviewed by James Robinson. Layers that mask to bounds (like iframes) weren't being properly clipped if their parent scissor rect was empty. This case happens when a parent iframe is clipped. Fixed by propagating the empty scissor rect to child layers rather than ignoring it. Test: compositing/iframes/nested-composited-iframe.html * platform/graphics/chromium/LayerRendererChromium.cpp: 2011-08-31 Yury Semikhatsky <yurys@chromium.org> Web Inspector: close dedicated worker inspectors when page inspector is closing https://bugs.webkit.org/show_bug.cgi?id=67366 Close all dedicated worker inspector windows when page inspector is closing. Reviewed by Pavel Feldman. * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager.prototype._openInspectorWindow): (WebInspector.WorkerManager.prototype._pageInspectorClosing): (WebInspector.WorkerManager.prototype._workerInspectorClosing): * inspector/front-end/inspector.js: (WebInspector.close): 2011-08-31 Yury Semikhatsky <yurys@chromium.org> [Chromium] Web Inspector: dedicated worker inspection is broken https://bugs.webkit.org/show_bug.cgi?id=67279 Provide transport for inspector messages between Page and DedicatedWorker inspectors in case of in-process workers. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: sendMessageObjectToBackend should accept message object which is ready for sending to backend. This method is overriden in WorkerManager for dedicated workers and we don't want to replicate request id assignment there. * workers/WorkerMessagingProxy.cpp: (WebCore::PostMessageToPageInspectorTask::create): (WebCore::PostMessageToPageInspectorTask::PostMessageToPageInspectorTask): (WebCore::PostMessageToPageInspectorTask::performTask): (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): (WebCore::connectToWorkerContextInspectorTask): (WebCore::WorkerMessagingProxy::connectToInspector): (WebCore::disconnectFromWorkerContextInspectorTask): (WebCore::WorkerMessagingProxy::disconnectFromInspector): (WebCore::dispatchOnInspectorBackendTask): (WebCore::WorkerMessagingProxy::sendMessageToInspector): (WebCore::WorkerMessagingProxy::postMessageToPageInspector): * workers/WorkerMessagingProxy.h: 2011-09-01 Csaba Osztrogonác <ossy@webkit.org> [CSS3 Backgrounds and Borders] Implement border-image-slice https://bugs.webkit.org/show_bug.cgi?id=67321 * WebCore.pro: Unreviewed buildfix after Dave "scattered" Hyatt (r94299). 2011-09-01 Ned Holbrook <nholbrook@apple.com> Typesetting features need not force complex for single-character runs https://bugs.webkit.org/show_bug.cgi?id=66498 Typesetting features have no effect on a solitary character, so they shouldn't enable complex layout unless multiple characters are present. Reviewed by Dan Bernstein. No new tests, this is merely a performance optimization. * platform/graphics/Font.cpp: (WebCore::Font::codePath): typesettingFeatures() only forces Complex for multiple-character runs. 2011-08-31 Jeff Miller <jeffm@apple.com> Defer creating AVPlayer and AVPlayerItem in MediaPlayerPrivateAVFoundation::setPreload() https://bugs.webkit.org/show_bug.cgi?id=66253 Reviewed by Jon Honeycutt. No new tests, should be covered by existing media tests. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: (WebCore::MediaPlayerPrivateAVFoundation::setPreload): Use the same code on Mac and Windows to only create the AVPlayer and AVPlayerItem when needed. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Assign any existing AVPlayerItem to the new AVPlayer. (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Allow creation of the AVPlayerItem before the AVPlayer. 2011-08-31 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67321 Implement border-image-slice. This will eventually be a component of the new border-image shorthand property. It holds the cuts that you make into the border image along with a new optional "fill" keyword that indicates whether or not the center should be filled with the middle slice of the image. By default -webkit-border-image has always filled, but this does not match the specification. To preserve backwards compatibility, -webkit-border-image will continue to fill by default, but this does slightly affect computed style results, since the "fill" keyword will now be included in property dumps. Reviewed by Beth Dakin. Added fast/borders/border-image-slices.html. * CMakeLists.txt: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSBorderImageSliceValue.cpp: Added. (WebCore::CSSBorderImageSliceValue::CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::~CSSBorderImageSliceValue): (WebCore::CSSBorderImageSliceValue::cssText): * css/CSSBorderImageSliceValue.h: Added. (WebCore::CSSBorderImageSliceValue::create): (WebCore::CSSBorderImageSliceValue::isBorderImageSliceValue): Add a new CSSBorderImageSliceValue that holds both the four slices (as a CSS rect) and the fill keyword (as a boolean). Note that the cssText() dumping of the slices has been refined to be smarter, and it will no longer dump repeating values. * css/CSSBorderImageValue.cpp: (WebCore::CSSBorderImageValue::CSSBorderImageValue): (WebCore::CSSBorderImageValue::cssText): * css/CSSBorderImageValue.h: (WebCore::CSSBorderImageValue::create): CSSBorderImageValue now owns a CSSBorderImageSliceValue instead of just a CSS rect. * css/CSSComputedStyleDeclaration.cpp: (WebCore::valueForNinePieceImageSlice): (WebCore::valueForNinePieceImage): Add a new method, valueForNinePieceImageSlice, for getting the slices plus the fill value from the NinePieceImage and putting it into a CSSBorderImageSliceValue. This method is now used by valueForNinePieceImage to get the CSSBorderImageSliceValue that is part of the overall CSSBorderImageValue. (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Adding support for the new properties: border-image-slice and -webkit-mask-box-image-slice. * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::BorderImageParseContext::BorderImageParseContext): (WebCore::BorderImageParseContext::allowBreak): (WebCore::BorderImageParseContext::commitImage): (WebCore::BorderImageParseContext::commitSlice): (WebCore::BorderImageParseContext::commitSlash): (WebCore::BorderImageParseContext::commitBorderImage): (WebCore::CSSParser::parseBorderImage): Modify parseBorderImage to no longer parse the slices itself. Instead it farms out the parsing to parseBorderImageSlice. (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): (WebCore::BorderImageSliceParseContext::allowNumber): (WebCore::BorderImageSliceParseContext::allowFill): (WebCore::BorderImageSliceParseContext::allowFinalCommit): (WebCore::BorderImageSliceParseContext::top): (WebCore::BorderImageSliceParseContext::commitNumber): (WebCore::BorderImageSliceParseContext::commitFill): (WebCore::BorderImageSliceParseContext::setAllowFinalCommit): (WebCore::BorderImageSliceParseContext::setTop): (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): (WebCore::CSSParser::parseBorderImageSlice): Slice parsing has now been broken out so that it can be parsed as a single property. In addition support for the "fill" keyword has been added to control image filling. * css/CSSParser.h: Modified to add the new parseBorderImageSlice method. * css/CSSPropertyNames.in: Add the new properties: border-image-slice and -webkit-mask-box-image-slice. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): Rework mapNinePieceImage to call mapNinePieceImageSlice so that the mapping can be done just for the slices. (WebCore::CSSStyleSelector::mapNinePieceImageSlice): A new method that handles mapping just the slices into the front-end NinePieceImage. (WebCore::CSSStyleSelector::loadPendingImages): Modified to ensure the fill value is preserved when box-reflect makes a new NinePieceImage. * css/CSSStyleSelector.h: Added the new mapNinePieceImageSlice method. * css/CSSValue.h: (WebCore::CSSValue::isBorderImageSliceValue): Virtual function for identifying border image slice values. * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintNinePieceImage): The painting of the nine piece image has been modified to match the specification. The "fill" keyword controls whether or not the middle is painted. * rendering/style/NinePieceImage.cpp: (WebCore::NinePieceImage::operator==): The fill keyword has to be checked now for equality. * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::NinePieceImage): (WebCore::NinePieceImage::fill): (WebCore::NinePieceImage::setFill): Added the fill keyword to the front end NinePieceImage. (WebCore::NinePieceImage::copySlicesFrom): Added a helper to copy only the slices over from another NinePieceImage. Used when inheriting the border-image-slice property from a parent style. 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Decode query/form parameters names as well as values. https://bugs.webkit.org/show_bug.cgi?id=67393 Reviewed by Yury Semikhatsky. * inspector/front-end/ResourceHeadersView.js: (WebInspector.ResourceHeadersView.prototype._decodeURIComponent): (WebInspector.ResourceHeadersView.prototype._refreshParms): 2011-08-31 Pavel Podivilov <podivilov@chromium.org> Web Inspector: remove PresentationBreakpoint class. https://bugs.webkit.org/show_bug.cgi?id=67275 Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint.didRequestContent): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): 2011-08-31 Steve Block <steveblock@google.com> Clean up all mentions of Android in comments https://bugs.webkit.org/show_bug.cgi?id=67303 Also removes some superfluous guards and methods added for Android. Reviewed by Darin Adler. No new tests, removing dead code only. * WebCorePrefix.h: Chromium uses this file only on Mac, so these Android guards are no longer required. * bindings/v8/NPV8Object.cpp: * bindings/v8/NPV8Object.h: Including npruntime.h for non-Chromium ports was added in http://trac.webkit.org/changeset/53634 for Android. However, this file is included in WebCore.pro, so leaving the guard in place. * bindings/v8/ScriptCachedFrameData.h: This code was added for Android in http://trac.webkit.org/changeset/56716 but is now also used by QT. The comment should have been removed in http://trac.webkit.org/changeset/93573. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::isLayoutTimerActive): (WebCore::Document::minimumLayoutDelay): * dom/Document.h: This method was added for Android in http://trac.webkit.org/changeset/52919 and modified in http://trac.webkit.org/changeset/79775. It is no longer needed. 2011-09-01 Kristóf Kosztyó <kkristof@inf.u-szeged.hu> [Qt] Build dependency problems https://bugs.webkit.org/show_bug.cgi?id=38054 Make clean build after the defines are changed. Reviewed by Csaba Osztrogonác. * features.pri: 2011-09-01 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Network error messages in console should link to the respective request in network panel if there is one. https://bugs.webkit.org/show_bug.cgi?id=65550 Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._formatMessage): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.refresh): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype.searchCanceled): (WebInspector.NetworkLogView.prototype.revealAndHighlightResource): (WebInspector.NetworkLogView.prototype._removeAllNodeHighlights): (WebInspector.NetworkLogView.prototype._highlightNode): (WebInspector.NetworkPanel.prototype._resourceByAnchor): (WebInspector.NetworkPanel.prototype.canShowAnchorLocation): (WebInspector.NetworkPanel.prototype.showAnchorLocation): * inspector/front-end/networkLogView.css: (.network-log-grid tr.highlighted-row): (from): (to): 2011-09-01 Patrick Gansterer <paroga@webkit.org> Replace preprocessor statements in DOMWindow.idl with Conditional attribute https://bugs.webkit.org/show_bug.cgi?id=65050 Reviewed by Brent Fulgham. Many attributes use the [Conditional=XXX] syntax already. Unify the declaration of conditional attributes of DOMWindow with the corresponding Conditional attribute. This reduces the need of the preprocessor which is the the source of much pain on native windows. * page/DOMWindow.idl: 2011-09-01 Yuta Kitamura <yutak@chromium.org> WebSocket: Fix bufferedAmount after WebSocket is closed https://bugs.webkit.org/show_bug.cgi?id=67363 Reviewed by Kent Tamura. Test: http/tests/websocket/tests/hybi/bufferedAmount-after-close.html (updated) * websockets/WebSocket.cpp: (WebCore::WebSocket::send): (WebCore::WebSocket::getFramingOverhead): * websockets/WebSocket.h: 2011-09-01 Keishi Hattori <keishi@webkit.org> Rename colorSelected to didChooseColor https://bugs.webkit.org/show_bug.cgi?id=67271 Reviewed by Kent Tamura. * WebCore.exp.in: * html/ColorInputType.cpp: (WebCore::ColorInputType::didChooseColor): Renamed colorSelected to didChooseColor so it follows common naming practice. * html/ColorInputType.h: * platform/ColorChooser.cpp: (WebCore::ColorChooser::didChooseColor): Renamed. * platform/ColorChooser.h: 2011-09-01 Adam Barth <abarth@webkit.org> Attempt to fix Windows build. * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: 2011-08-31 Adam Barth <abarth@webkit.org> [Chromium] Rename PlatformBridge to PlatformSupport https://bugs.webkit.org/show_bug.cgi?id=67349 Reviewed by Darin Fisher. This matches the WebKitPlatformSupport embedder API. * WebCore.gypi: * WebCore.pro: * bindings/v8/NPV8Object.cpp: (_NPN_Evaluate): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::createScriptInstanceForWidget): * bindings/v8/V8DOMWindowShell.cpp: (WebCore::reportFatalErrorInV8): * bindings/v8/V8GCController.cpp: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::handleOutOfMemory): (WebCore::V8Proxy::evaluate): * bindings/v8/V8Proxy.h: * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: (WebCore::histogramEnumeration): * page/PageGroup.cpp: (WebCore::PageGroup::isLinkVisited): * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): (WebCore::createBusFromInMemoryAudioFile): * platform/chromium/ChromiumDataObject.cpp: (WebCore::ChromiumDataObject::types): (WebCore::ChromiumDataObject::getData): (WebCore::ChromiumDataObject::getSequenceNumber): (WebCore::ChromiumDataObject::containsFilenames): * platform/chromium/DataTransferItemChromium.cpp: (WebCore::DataTransferItemChromium::getAsString): (WebCore::DataTransferItemChromium::getAsFile): * platform/chromium/DragDataChromium.cpp: (WebCore::DragData::asURL): * platform/chromium/FileSystemChromium.cpp: (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::getFileSize): (WebCore::getFileModificationTime): (WebCore::revealFolderInOS): (WebCore::directoryName): (WebCore::pathByAppendingComponent): (WebCore::makeAllDirectories): (WebCore::fileExists): (WebCore::openFile): (WebCore::closeFile): (WebCore::seekFile): (WebCore::truncateFile): (WebCore::readFromFile): (WebCore::writeToFile): * platform/chromium/LanguageChromium.cpp: (WebCore::platformDefaultLanguage): * platform/chromium/LinkHashChromium.cpp: (WebCore::visitedLinkHash): * platform/chromium/MIMETypeRegistryChromium.cpp: (WebCore::MIMETypeRegistry::getMIMETypeForExtension): (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType): (WebCore::MIMETypeRegistry::isSupportedImageMIMEType): (WebCore::MIMETypeRegistry::isSupportedJavaScriptMIMEType): (WebCore::MIMETypeRegistry::isSupportedNonImageMIMEType): * platform/chromium/PasteboardChromium.cpp: (WebCore::Pasteboard::writeSelection): (WebCore::Pasteboard::writePlainText): (WebCore::Pasteboard::writeURL): (WebCore::Pasteboard::writeImage): (WebCore::Pasteboard::canSmartReplace): (WebCore::Pasteboard::plainText): (WebCore::Pasteboard::documentFragment): * platform/chromium/PlatformBridge.h: Removed. * platform/chromium/PlatformScreenChromium.cpp: (WebCore::screenDepth): (WebCore::screenDepthPerComponent): (WebCore::screenIsMonochrome): (WebCore::screenRect): (WebCore::screenAvailableRect): * platform/chromium/PlatformSupport.h: Copied from Source/WebCore/platform/chromium/PlatformBridge.h. * platform/chromium/SSLKeyGeneratorChromium.cpp: (WebCore::signedPublicKeyAndChallengeString): * platform/chromium/ScrollbarThemeChromium.cpp: * platform/chromium/ScrollbarThemeChromiumLinux.cpp: (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness): (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece): (WebCore::ScrollbarThemeChromiumLinux::paintButton): (WebCore::ScrollbarThemeChromiumLinux::paintThumb): (WebCore::ScrollbarThemeChromiumLinux::buttonSize): (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paint): * platform/chromium/ScrollbarThemeChromiumWin.cpp: (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness): (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece): (WebCore::ScrollbarThemeChromiumWin::paintButton): (WebCore::ScrollbarThemeChromiumWin::paintThumb): (WebCore::ScrollbarThemeChromiumWin::buttonSize): * platform/chromium/SharedTimerChromium.cpp: (WebCore::setSharedTimerFiredFunction): (WebCore::setSharedTimerFireInterval): (WebCore::stopSharedTimer): * platform/chromium/SuddenTerminationChromium.cpp: (WebCore::disableSuddenTermination): (WebCore::enableSuddenTermination): * platform/chromium/TraceEvent.h: (WebCore::internal::ScopeTracer::ScopeTracer): (WebCore::internal::ScopeTracer::~ScopeTracer): * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerPainter::paint): * platform/graphics/chromium/CrossProcessFontLoading.mm: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::fontContainsCharacter): (WebCore::FillLogFont): * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::drawGlyphsWin): * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp: (WebCore::FontPlatformData::scriptFontProperties): * platform/graphics/chromium/FontPlatformDataLinux.cpp: (WebCore::FontPlatformData::querySystemForRenderStyle): * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp: (WebCore::fillBMPGlyphs): * platform/graphics/chromium/ImageChromium.cpp: (WebCore::Image::loadPlatformResource): * platform/graphics/chromium/ImageChromiumMac.mm: (WebCore::Image::loadPlatformResource): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::determinePitch): (WebCore::SimpleFontData::platformWidthForGlyph): * platform/graphics/chromium/UniscribeHelperTextRun.cpp: (WebCore::UniscribeHelperTextRun::tryToPreloadFont): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::fontPlatformData): * platform/network/chromium/CookieJarChromium.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): * platform/network/chromium/DNSChromium.cpp: (WebCore::prefetchDNS): * platform/qt/PlatformBridge.h: Removed. * platform/qt/PlatformBridgeQt.cpp: Removed. * platform/qt/PlatformSupport.h: Copied from Source/WebCore/platform/qt/PlatformBridge.h. * platform/qt/PlatformSupportQt.cpp: Copied from Source/WebCore/platform/qt/PlatformBridgeQt.cpp. (WebCore::PlatformSupport::popupsAllowed): (WebCore::PlatformSupport::pluginScriptableObject): * platform/sql/chromium/SQLiteFileSystemChromium.cpp: (WebCore::SQLiteFileSystem::deleteDatabaseFile): (WebCore::SQLiteFileSystem::getDatabaseFileSize): * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: * platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp: * plugins/chromium/PluginDataChromium.cpp: (WebCore::PluginCache::plugins): * rendering/RenderThemeChromiumLinux.cpp: (WebCore::getWebThemeState): (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize): (WebCore::RenderThemeChromiumLinux::paintCheckbox): (WebCore::RenderThemeChromiumLinux::setCheckboxSize): (WebCore::RenderThemeChromiumLinux::paintRadio): (WebCore::RenderThemeChromiumLinux::setRadioSize): (WebCore::RenderThemeChromiumLinux::paintButton): (WebCore::RenderThemeChromiumLinux::paintTextField): (WebCore::RenderThemeChromiumLinux::paintMenuList): (WebCore::RenderThemeChromiumLinux::paintSliderTrack): (WebCore::RenderThemeChromiumLinux::paintSliderThumb): (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle): (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton): (WebCore::RenderThemeChromiumLinux::paintProgressBar): * rendering/RenderThemeChromiumMac.mm: (WebCore::RenderThemeChromiumMac::usesTestModeFocusRingColor): * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::caretBlinkInterval): * rendering/RenderThemeChromiumWin.cpp: (WebCore::RenderThemeChromiumWin::platformActiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformInactiveSelectionBackgroundColor): (WebCore::RenderThemeChromiumWin::platformActiveSelectionForegroundColor): (WebCore::RenderThemeChromiumWin::systemColor): (WebCore::RenderThemeChromiumWin::paintButton): (WebCore::RenderThemeChromiumWin::paintSliderTrack): (WebCore::menuListButtonWidth): (WebCore::RenderThemeChromiumWin::paintMenuList): (WebCore::RenderThemeChromiumWin::paintTextFieldInternal): (WebCore::RenderThemeChromiumWin::paintInnerSpinButton): (WebCore::RenderThemeChromiumWin::paintProgressBar): * storage/chromium/IDBFactoryBackendInterface.cpp: (WebCore::IDBFactoryBackendInterface::create): * storage/chromium/IDBKeyPathBackendImpl.cpp: (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath): (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue): * storage/chromium/QuotaTracker.cpp: (WebCore::QuotaTracker::getDatabaseSizeAndSpaceAvailableToOrigin): 2011-08-31 Ryosuke Niwa <rniwa@webkit.org> Crash when inserting text with a trailing newline into a textarea via JS https://bugs.webkit.org/show_bug.cgi?id=66241 Reviewed by Darin Adler and Kent Tamura. The crash was caused by updateFromElement biting on the editing code. When there is a style rule that applies on text nodes inside the shadow DOM, DOM modifications made by the editing code may trigger style recalculation on input or textarea elements in the midst of editing commands. In response to this style recalculation, HTMLInputElement::updateFromElement and HTMLTextAreaElement::updateFromElement call setInnerTextValue to re-create the text nodes in the shadow DOM. The editing code blows up because setInnerTextValue detaches old text nodes referenced by Positions and VisiblePositions held by the editing commands in progress. Fixed the crash by stop calling setInnerTextValue in updateFromElement. Instead, WebKit now creates the text nodes when attributes, descendent nodes, etc... of input or textarea element changes. Tests: fast/forms/update-from-element-during-editing-crash-1.html fast/forms/update-from-element-during-editing-crash-2.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateType): Force calling setInnerTextValue when input type changes. (WebCore::HTMLInputElement::updateInnerTextValue): Extracted from RenderTextControlSingleLine's updateElement. (WebCore::HTMLInputElement::parseMappedAttribute): Calls updateInnerTextValue; force calling setInnerTextValue when -webkit-speech attribute changes. In the theory, we should be able to call it less frequently but there are too many cases to consider at the moment. (WebCore::HTMLInputElement::setValue): Calls updateInnerTextValue when the value actually changed. Note we need to call it before we set or restore selection. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): Calls updateInnerTextValue when textarea's descendants nodes are changed by parser or scripts. (WebCore::HTMLTextAreaElement::setValueCommon): Calls updateInnerTextValue when the value changes. * html/HTMLTextFormControlElement.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::willBlur): Calls updateInnerTextValue because input[type=number] forces the value to be valid on blur. * rendering/RenderTextControlMultiLine.cpp: Removed RenderTextControlMultiLine::updateFromElement. * rendering/RenderTextControlMultiLine.h: Ditto. * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): 2011-08-31 Tom Zakrajsek <tomz@codeaurora.org> Fix snow-leopard regression caused by r93982 https://bugs.webkit.org/show_bug.cgi?id=67301 Reviewed by Kenneth Russell. Test: canvas/philip/tests/2d.path.stroke.prune.arc.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): 2011-08-31 Keishi Hattori <keishi@webkit.org> Rename closeColorChooser to cleanupColorChooser https://bugs.webkit.org/show_bug.cgi?id=67270 Reviewed by Kent Tamura. * html/ColorInputType.cpp: (WebCore::ColorInputType::~ColorInputType): (WebCore::ColorInputType::detach): (WebCore::ColorInputType::cleanupColorChooserIfCurrentClient): NSColorPanel shouldn't be closed but the color chooser listeners need to be taken care of. Therefore closeColorChooser will be renamed to cleanupColorChooser. This will close the color chooser on platforms where appropriate. * html/ColorInputType.h: * loader/EmptyClients.h: (WebCore::EmptyChromeClient::cleanupColorChooser): Rename. * page/Chrome.cpp: (WebCore::Chrome::cleanupColorChooser): Rename. * page/Chrome.h: * page/ChromeClient.h: 2011-08-31 Kent Tamura <tkent@chromium.org> REGRESSION(r88115): "Choose File" button doesn't respect font-size property for the <input> https://bugs.webkit.org/show_bug.cgi?id=67181 Reviewed by Dimitri Glazkov. r88115 removed the code to make inherited style of the owner input element, and html.css contains "font: -webkit-small-control" for input element. So -webkit-file-upload-button always had -webkit-small-control font. Test: fast/forms/file/file-style-inheritance.html * css/html.css: (input[type="file"]::-webkit-file-upload-button): Specify font-size:inherit explicitly. 2011-08-31 Chris Rogers <crogers@google.com> Do more rigorous bounds checking in AudioBufferSourceNode::renderFromBuffer() https://bugs.webkit.org/show_bug.cgi?id=67351 Reviewed by Dirk Pranke. No new tests since this does not change JavaScript API. * webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::renderFromBuffer): 2011-08-31 Keishi Hattori <keishi@webkit.org> Remove closeColorChooser call from FrameLoader::transitionToCommitted https://bugs.webkit.org/show_bug.cgi?id=67267 Reviewed by Darin Adler. * html/ColorInputType.cpp: (WebCore::ColorInputType::closeColorChooserIfCurrentClient): Moved order to match header. * html/ColorInputType.h: * loader/FrameLoader.cpp: (WebCore::FrameLoader::transitionToCommitted): Remove ColorInputType::closeColorChooserIfCurrentClient call. It wasn't the right place to directly manipulate the UI. 2011-08-31 Chris Rogers <crogers@google.com> Add defensive bounds checking for AudioNode methods https://bugs.webkit.org/show_bug.cgi?id=67346 Reviewed by Anders Carlsson. No new tests since this does not change JavaScript API. * webaudio/AudioNode.cpp: (WebCore::AudioNode::input): (WebCore::AudioNode::output): 2011-08-31 Simon Fraser <simon.fraser@apple.com> TransformState.move() should be negated in the unapply code path https://bugs.webkit.org/show_bug.cgi?id=66246 Reviewed by Chris Marrin. Code using TransformState was confused about when to negate the arguments to move() in the "UnapplyInverseTransform" direction (used by mapAbsoluteToLocal). Made the move() path equivalent to the applyTransform() path by not requiring the caller to negate, and instead negating inside move(). Fixed the erroneous negation in TransformState::move() when accumulating; that negation will happen later via matrix inversion. No behavior change. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::recursiveCommitChanges): * platform/graphics/transforms/TransformState.cpp: (WebCore::TransformState::move): * rendering/RenderBox.cpp: (WebCore::RenderBox::mapAbsoluteToLocalPoint): * rendering/RenderInline.cpp: (WebCore::RenderInline::mapAbsoluteToLocalPoint): 2011-08-31 Pratik Solanki <psolanki@apple.com> Fix compile issues when enabling HAVE(CFNETWORK_DATA_ARRAY_CALLBACK) https://bugs.webkit.org/show_bug.cgi?id=67332 Reviewed by Darin Adler. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::didReceiveDataArray): * platform/network/cf/ResourceHandleCFNet.cpp: 2011-08-31 Dan Bernstein <mitz@apple.com> Refined the heuristic introduced to fix <rdar://problem/10002140> Text gets clipped in multi-column layouts when overflow:auto is used. https://bugs.webkit.org/show_bug.cgi?id=67212 Reviewed by Dave Hyatt. Test: fast/multicol/overflow-across-columns-percent-height.html * rendering/RenderBox.cpp: (WebCore::percentageLogicalHeightIsResolvable): Added. This follows logic similar to the one in computePercentageLogicalHeight() to determine whether percentage values for height properties are resolved or treated as "auto". (WebCore::RenderBox::hasUnsplittableScrollingOverflow): If min-height or max-height are specified as a percentage but actually resolve to "auto", don’t let that prevent splitting. 2011-08-31 Ryosuke Niwa <rniwa@webkit.org> Move text() and textWithHardLineBreaks() from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=67320 Reviewed by Darin Adler. Moved and renamed RenderText::text and RenderText::textWithHardLineBreaks to HTMLTextFormControlElement::innerTextValue and HTMLTextFormControlElement::valueWithHardLineBreaks. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::text): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::appendFormData): Calls valueWithHardLineBreaks. It doesn't have to check the existence of renderer anymore because valueWithHardLineBreaks returns value() when renderer do not exist unlike RenderText::textWithHardLineBreaks returned emptyString() in such cases. This is the only place valueWithHardLineBreaks is ever called; but we can't move valueWithHardLineBreaks because it calls finishText. (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent): (WebCore::HTMLTextAreaElement::updateValue): * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::selectedText): (WebCore::HTMLTextFormControlElement::setInnerTextValue): (WebCore::finishText): Moved from RenderText.cpp (WebCore::HTMLTextFormControlElement::innerTextValue): Ditto. (WebCore::getNextSoftBreak): Ditto. (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks): Ditto; this function returns value() when there are no renderers or root inline boxes instead of emptyString(). * html/HTMLTextFormControlElement.h: * html/NumberInputType.cpp: (WebCore::NumberInputType::hasUnacceptableValue): * html/SearchInputType.cpp: (WebCore::SearchInputType::startSearchEventTimer): * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent): * rendering/RenderTextControl.cpp: * rendering/RenderTextControl.h: 2011-08-31 Jeff Miller <jeffm@apple.com> REGRESSION(92210): AVFoundation media engine is disabled on OS X https://bugs.webkit.org/show_bug.cgi?id=67316 Move the definition of WTF_USE_AVFOUNDATION on the Mac back to JavaScriptCore/wtf/Platform.h, since WebKit2 doesn't have access to WebCore/config.h on this platform. This reverts the changes that were made in r92210. Reviewed by Darin Adler. No new tests, covered by existing media tests. * config.h: Removed definition of WTF_USE_AVFOUNDATION on the Mac, add a comment about fixing this on Windows in the future. 2011-08-31 Sailesh Agrawal <sail@chromium.org> [Chromium] Switching between overlay and opaque scrollbars causes glitches https://bugs.webkit.org/show_bug.cgi?id=62686 Reviewed by Beth Dakin. When switching from opaque scrollbars to overlay scrollbars the page content size wouldn't change leaving a empty region under the overlay scrollbar. The problem was that we were relying on ScrollView::updateScrollbars() to kick off a layout. Unfortunately this doesn't happen because updateScrollbars doesn't distinguish between overlay and opaque scrollbars. To fix this I'm explicitly invalidating the layout when ScrollView::scrollbarStyleChanged() is called. No tests because there are no Mac 10.7 chromium bots yet. Bug 66504 will track the work to add these tests once the bots are in place. * platform/ScrollView.cpp: (WebCore::ScrollView::scrollbarStyleChanged): 2011-08-31 Alexey Proskuryakov <ap@apple.com> http/tests/eventsource/workers/eventsource-simple.html is a flaky crash because of eventsource-status-error-iframe-crash.html https://bugs.webkit.org/show_bug.cgi?id=61523 Reviewed by Nate Chapin. The problem here was that canceling EventSource during frame removal erroneously resulted in event dispatch, and event handler re-entered frame destruction code. * page/EventSource.h: Renamed endRequest() to networkRequestEnded(), because this method doesn't end request. It implements "reestablish the connection" or "fail the connection" algotithms from the spec, depending on current state. Removed m_failSilently, since we can make this decision with existing data, and want to fail silently by default (e.g. when detaching a frame cancels all loads). * page/EventSource.cpp: (WebCore::EventSource::EventSource): Don't initialize m_failSilently. (WebCore::EventSource::~EventSource): Assert taht we are in a correct state. (WebCore::EventSource::connect): Ditto. (WebCore::EventSource::networkRequestEnded): Moved errorevent dispatch elsewhere. (WebCore::EventSource::scheduleReconnect): Error event should always be queued when reconnecting; firing it synchronously after starting m_reconnectTimer implements that. (WebCore::EventSource::reconnectTimerFired): Assert that state is correct (the timer is stopped if EventSource is stopped while waiting on the timer). (WebCore::EventSource::close): Don't set m_state before calling cancel() - it will indirectly call didFail(), which asserts that EventSource is not stopped yet. (WebCore::EventSource::didReceiveResponse): Explicitly dispatch an error event, since it is no longer dispatched when canceling, and canceling is the only way to stop a ThreadableLoader. Removed a special case for 2xx responses, since it's no longer in the spec. (WebCore::EventSource::didReceiveData): Assert that state is correct. (WebCore::EventSource::didFinishLoading): Don't set state to CONNECTING after parsing remaining response bytes - that may well result in dispatching an event whose handler calls close(). (WebCore::EventSource::didFail): It's simple now - we always reconnect unless the request got canceled. (WebCore::EventSource::didFailRedirectCheck): Dispatch error event explicitly, as we are not going to attempt reconnecting. 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94116. http://trac.webkit.org/changeset/94116 https://bugs.webkit.org/show_bug.cgi?id=67323 caused a lot of tests failures (Requested by thorton on #webkit). * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): 2011-08-31 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Tweak rubber banding overhang shadows. Add a drop shadow from the browser's toolbar. https://bugs.webkit.org/show_bug.cgi?id=67289 Chromium bug: http://crbug.com/93228 Reviewed by Dimitri Glazkov. No new tests, since this merely tweaks Chromium overhang area appearance. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paintGivenTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-31 Tony Chang <tony@chromium.org> Remove webcore_bindings (including DerivedSources##.cpp) from the critical path https://bugs.webkit.org/show_bug.cgi?id=67168 Reviewed by Adam Barth. webcore_bindings_sources, debugger_script_source, injected_script_source, and inspector_protocol_sources generates various files (e.g., CSSPropertyNames, DerivedSources, HTMLNames, etc). webcore_bindings depends on *_sources and compiles these files. Previously, the other webcore libs (webcore_svg, webcore_html, webcore_remaining, etc) depended on webcore_bindings. This moves the *_sources dependencies from webcore_bindings to the other webcore libs so the build can parallelize the compile of webcore_bindings and the other webcore_* libs. Also copy over the include dirs that we used to get from webcore_bindings' direct_dependent_settings. No new tests, just changing the build dependencies. * WebCore.gyp/WebCore.gyp: 2011-08-31 Tony Gentilcore <tonyg@chromium.org> Minor cleanup: remove inScriptExecution() https://bugs.webkit.org/show_bug.cgi?id=67276 Reviewed by Adam Barth. At one point inScriptExecution() existed as a non-virtual duplicate of isExecutingScript() to avoid virtual method calls from a tight loop. Now we aren't calling it anywhere perf sensitive, so remove the duplication. No new tests because no change in functionality. * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::isExecutingScript): (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution): (WebCore::HTMLDocumentParser::notifyFinished): * html/parser/HTMLDocumentParser.h: (WebCore::HTMLDocumentParser::shouldDelayEnd): 2011-08-31 Tom Sepez <tsepez@chromium.org> Fix XSS filter bypass by multiply decoding both the URL and the body snippet until they are in the most minimal form before comparison. https://bugs.webkit.org/show_bug.cgi?id=66585 Reviewed by Adam Barth. * html/parser/XSSAuditor.cpp: (WebCore::fullyDecodeString): (WebCore::XSSAuditor::init): (WebCore::XSSAuditor::filterToken): (WebCore::XSSAuditor::isContainedInRequest): 2011-08-31 Simon Fraser <simon.fraser@apple.com> Crash with -webkit-radial-gradient(top) gradient https://bugs.webkit.org/show_bug.cgi?id=66686 Reviewed by Darin Adler. Null-check the current value after calling parseFillPosition(), since it may be null for gradients with degenerate arguments. Test: fast/gradients/css3-radial-gradient-crash.html * css/CSSParser.cpp: (WebCore::CSSParser::parseRadialGradient): 2011-08-31 Nico Weber <thakis@chromium.org> Make ScrollAnimator(Chromium)?Mac check scrollAnimatorEnabled() https://bugs.webkit.org/show_bug.cgi?id=67297 Reviewed by Tony Chang. I need this to disable smooth scrolling in chromium tests. I'm making the change to ScrollAnimatorMac to make unforking the file easier. I changed scrollAnimatorEnabled() to default to true so that this change is a no-op for Safari; in chromium the flag is set explicitly to true or false anyway. * page/Settings.cpp: (WebCore::Settings::Settings): * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::scroll): * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::scroll): 2011-08-31 Nate Chapin <japhet@chromium.org> Don't load resources with empty urls, since this will resolve to the current document. https://bugs.webkit.org/show_bug.cgi?id=30303 Reviewed by Darin Adler. Test: http/tests/loading/empty-urls.html * dom/ScriptElement.cpp: (WebCore::ScriptElement::requestScript): If src="", fail through to the error event case. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::parseMappedAttribute): Ensure the url stays empty if we try to resolve an empty href. * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement): Throw an error instead of loading if the src is empty in all cases, not just local files. 2011-08-28 Robert Hogan <robert@webkit.org> CSS 2.1 failure: margin-applies-to-015 fails, WebKit does not respect top margin for table captions https://bugs.webkit.org/show_bug.cgi?id=34763 Reviewed by Simon Fraser. * rendering/RenderTable.cpp: (WebCore::RenderTable::adjustLogicalHeightForCaption): Added the caption's margin to the position calculation. 2011-08-30 Oliver Hunt <oliver@apple.com> Add support for checked arithmetic https://bugs.webkit.org/show_bug.cgi?id=67095 Reviewed by Sam Weinig. Add a forwarding header for CheckedArithmetic.h * ForwardingHeaders/wtf/CheckedArithmetic.h: Added. 2011-08-31 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=67300 Add the new border-image-source property (and its corresponding analogue for masks, mask-box-image-source). Change the border-image parsing code to no longer consider "none" to represent the entire border-image expression, but instead to just mean "none" for the image component of the expression. Change the pending image code for border-image and mask-box-image to use the new *-source properties when loading the image so that they're considered the same. This is the first step towards eliminating the border-image parsing code in favor of just parsing it as a shorthand instead, but for now I'm implementing each property one by one, and once they're all there, we can cut over to border-image as a true shorthand. Reviewed by Beth Dakin. Added fast/borders/border-image-source.html. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseBorderImage): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::mapNinePieceImage): (WebCore::CSSStyleSelector::loadPendingImages): * rendering/style/NinePieceImage.h: (WebCore::NinePieceImage::setImage): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::borderImageSource): (WebCore::InheritedFlags::maskBoxImageSource): (WebCore::InheritedFlags::setBorderImageSource): (WebCore::InheritedFlags::setMaskBoxImageSource): (WebCore::InheritedFlags::initialBorderImageSource): (WebCore::InheritedFlags::initialMaskBoxImageSource): 2011-08-31 Stephen White <senorblanco@chromium.org> [chromium] Set the GrContext before SkGpuDevice is destroyed. https://bugs.webkit.org/show_bug.cgi?id=67296 When SkGpuDevice is destroyed, it frees the FBO used for accelerated rendering. If the wrong context is set (e.g., compositor context), a crash may result. Reviewed by Kenneth Russell. No new tests. (Unfortunately, wrong-context bugs are difficult to express in a layout test). * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::~ImageBuffer): 2011-08-31 Eric Carlson <eric.carlson@apple.com> Clean up HTMLMediaElement behavior restrictions https://bugs.webkit.org/show_bug.cgi?id=67231 Reviewed by Darin Adler. No new tests, cleanup only. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with enum and function renaming. (WebCore::HTMLMediaElement::load): Call userGestureRequiredForLoad() instead of testing bits directly. (WebCore::HTMLMediaElement::loadInternal): Deal with enum and function renaming. (WebCore::HTMLMediaElement::play): Call userGestureRequiredForRateChange() instead of testing bits directly. (WebCore::HTMLMediaElement::pause): Ditto. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::userGestureRequiredForLoad): Renamed. (WebCore::HTMLMediaElement::userGestureRequiredForRateChange): (WebCore::HTMLMediaElement::userGestureRequiredForFullscreen): (WebCore::HTMLMediaElement::pageConsentRequiredForLoad): (WebCore::HTMLMediaElement::addBehaviorRestriction): (WebCore::HTMLMediaElement::removeBehaviorRestriction): * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::webkitEnterFullscreen): requireUserGestureForFullScreen renamed to userGestureRequiredForFullscreen. 2011-08-31 Andrei Popescu <andreip@google.com> Investigate current uses of OS(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66761 Reviewed by Darin Adler. Remove the last legacy Android code. No new tests needed as the code wasn't tested in the first place. * bridge/jni/JNIUtility.cpp: (JSC::Bindings::getJNIEnv): 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94082. http://trac.webkit.org/changeset/94082 https://bugs.webkit.org/show_bug.cgi?id=67291 Breaks trunk (not canary) Chromium Mac builders upon WebKit roll (Requested by apavlov on #webkit). * WebCore.gyp/WebCore.gyp: 2011-08-31 No'am Rosenthal <noam.rosenthal@nokia.com> [Qt] Add a convenience function to cast a QTransform to TransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=67246 Reviewed by Andreas Kling. No new functionality so no new tests. * platform/graphics/qt/TransformationMatrixQt.cpp: (WebCore::TransformationMatrix::TransformationMatrix): * platform/graphics/transforms/TransformationMatrix.h: 2011-08-31 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94176. http://trac.webkit.org/changeset/94176 https://bugs.webkit.org/show_bug.cgi?id=67290 This does not fix the build failure on Macs (Requested by apavlov on #webkit). * WebCore.gyp/WebCore.gyp: 2011-08-31 Mike Reed <reed@google.com> [skia] antialias images if we're rotated https://bugs.webkit.org/show_bug.cgi?id=67207 Reviewed by Stephen White. * platform/graphics/skia/ImageSkia.cpp: (WebCore::hasNon90rotation): (WebCore::paintSkBitmap): 2011-08-31 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Having the "Metrics" pane open affects the node highlight display https://bugs.webkit.org/show_bug.cgi?id=67278 Reviewed by Yury Semikhatsky. * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._updateMetrics): 2011-08-31 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: console view does a style recalculation per each addMessage call. https://bugs.webkit.org/show_bug.cgi?id=67198 It is bad from the performance point of view. Reviewed by Yury Semikhatsky. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._isScrollIntoViewScheduled): (WebInspector.ConsoleView.prototype._appendConsoleMessage): 2011-08-31 Alexander Pavlov <apavlov@chromium.org> [Chromium] Unreviewed build fix. Restore debugger_script_source target dependency broken in http://trac.webkit.org/changeset/94082. * WebCore.gyp/WebCore.gyp: 2011-08-30 Alexander Pavlov <apavlov@chromium.org> Early return in CSSPrimitiveValue::getDoubleValueInternal() omits additional invalid enums https://bugs.webkit.org/show_bug.cgi?id=67139 Reviewed by Darin Adler. * css/CSSPrimitiveValue.cpp: (WebCore::isValidCSSUnitTypeForDoubleConversion): Check if a given unit type can be converted to a double. (WebCore::CSSPrimitiveValue::getDoubleValueInternal): Make use of the new method that explicitly lists all unit types. 2011-08-30 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename sourceFile to uiSourceCode and get rid of sourceFileId where possible. https://bugs.webkit.org/show_bug.cgi?id=67136 Reviewed by Yury Semikhatsky. * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype.set reset): (WebInspector.BreakpointManager.prototype.debuggerReset): * inspector/front-end/BreakpointsSidebarPane.js: (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.removeBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.highlightBreakpoint): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._createBreakpointItemId): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked): (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._contextMenu): * inspector/front-end/CallStackSidebarPane.js: (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine): (WebInspector.CallStackSidebarPane.prototype.update): * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype.setFormatSource): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForUISourceCode): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.PresentationBreakpoint): (WebInspector.PresentationBreakpoint.prototype.get url): (WebInspector.PresentationBreakpoint.prototype.loadSnippet): (WebInspector.PresenationCallFrame): (WebInspector.PresenationCallFrame.prototype.get url): (WebInspector.PresenationCallFrame.prototype.select): (WebInspector.PresenationCallFrame.prototype.sourceLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.get statusBarItems): (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded.get if): (WebInspector.ScriptsPanel.prototype._showScriptFoldersSettingChanged): (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect): (WebInspector.ScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.ScriptsPanel.prototype._consoleMessagesCleared): (WebInspector.ScriptsPanel.prototype._consoleMessageAdded): (WebInspector.ScriptsPanel.prototype._breakpointAdded): (WebInspector.ScriptsPanel.prototype._breakpointRemoved): (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._debuggerPaused): (WebInspector.ScriptsPanel.prototype.reset): (WebInspector.ScriptsPanel.prototype._resetFilesSelect): (WebInspector.ScriptsPanel.prototype.showAnchorLocation): (WebInspector.ScriptsPanel.prototype._showSourceLine): (WebInspector.ScriptsPanel.prototype._showSourceFrameAndAddToHistory): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype._uiSourceCodeReplaced): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.ScriptsPanel.prototype._filesSelectChanged): (WebInspector.ScriptsPanel.prototype._toggleFormatSource): (WebInspector.SourceFrameDelegateForScriptsPanel): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.updateBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.removeBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.findBreakpoint): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.continueToLine): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.canEditScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSource): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.setScriptSourceIsBeingEdited): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): 2011-08-31 Yuta Kitamura <yutak@chromium.org> WebSocket: Load Blob in WebSocketChannel https://bugs.webkit.org/show_bug.cgi?id=67013 Reviewed by Kent Tamura. Add WebSocketChannel::enqueueBlobFrame(). It makes WebSocketChannel start loading a Blob and send a WebSocket frame after the Blob is loaded. While a Blob is being loaded, subsequent send() requests cannot be processed and are blocked. Pending requests are stored in m_outgoingFrameQueue. When we have finished loading a Blob, requests in the queue are allowed to get processed. No new tests are added, because nobody uses enqueueBlobFrame() yet. New tests will be added when WebSocket.send(Blob) is implemented, and they will cover this code change. * websockets/WebSocketChannel.cpp: ref() is called when m_blobLoader is allocated, and deref() is called in didFinishLoading() or didFail(). This is necessary because WebSocketChannel must be able to receive callbacks from FileReaderLoader even if the channel is referred from no other objects. (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::didStartLoading): (WebCore::WebSocketChannel::didReceiveData): (WebCore::WebSocketChannel::didFinishLoading): (WebCore::WebSocketChannel::didFail): When we have failed to load a Blob, fail() is called, and eventually didCloseSocketStream() will be called. It will clean up the pending requests in the queue. (WebCore::WebSocketChannel::enqueueBlobFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): Cancel the Blob loader when the outgoing request queue is about to be aborted. The loader will not invoke didFail() callback once it is canceled, thus we need to call didFail() manually so that we can free up the loader and decrement the reference count. 2011-08-31 Yuta Kitamura <yutak@chromium.org> WebSocket: Receive binary message as ArrayBuffer https://bugs.webkit.org/show_bug.cgi?id=67180 Reviewed by Kent Tamura. Tests: http/tests/websocket/tests/hybi/receive-arraybuffer.html http/tests/websocket/tests/hybi/workers/receive-arraybuffer.html * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Convert ArrayBuffer to JSValue. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): Convert ArrayBuffer to v8::Value. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): * dom/MessageEvent.h: Added DataTypeArrayBuffer and ArrayBuffer-related functions. (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsArrayBuffer): * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData): Construct an ArrayBuffer from binaryData and raise MessageEvent. 2011-08-31 Keishi Hattori <keishi@webkit.org> input color: onchange event is not fired when changing color from color chooser https://bugs.webkit.org/show_bug.cgi?id=66848 Reviewed by Kent Tamura. Test: fast/forms/color/input-color-onchange-event.html * WebCore.exp.in: Added calls used in Internals.cpp. * html/ColorInputType.cpp: (WebCore::ColorInputType::colorSelected): Dispatch change event. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::connectToColorChooser): Added. Called from Internals::connectColorChooserClient. * html/HTMLInputElement.h: * testing/Internals.cpp: (WebCore::Internals::connectColorChooserClient): Added. Connects element as client to color chooser. (WebCore::Internals::selectColorInColorChooser): Added. Simulate color selection in color chooser. * testing/Internals.h: * testing/Internals.idl: 2011-08-31 Kentaro Hara <haraken@google.com> Implement Web IDL Constructor extended attribute in IDLParser.pm and CodeGeneratorV8.pm. https://bugs.webkit.org/show_bug.cgi?id=66536 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#Constructor [1] Introduced Web IDL 'Constructor' extended attribute. [2] Added 'ConstructorWith=ScriptExecutionContext' extended attribute. - The constructor passes ScriptExecutionContext to a XXX::create() method, like XXX::create(..., context, ...). [3] Added 'V8ConstructorSetsActiveDOMWrapper' extended attribute. - The constructor calls V8DOMWrapper::setJSWrapperForActiveDOMObject() instead of V8DOMWrapper::setJSWrapperForDOMObject(). [4] Added 'ConstructorRaisesException' extended attribute. - A placeholder for ExceptionCode is passed to a XXX::create() method, like XXX::create(..., ec). - We can use 'ConstructorRaisesException' and 'ConstructorWith=ScriptExecutionContext' together. Note: - Constructor overloading is not yet implemented. - We cannot yet specify [Optional] without CallWithDefaultValue. Test: Source/WebCore/bindings/scripts/test/TestInterface.idl Source/WebCore/bindings/scripts/test/TestObj.idl * bindings/scripts/CodeGeneratorV8.pm: (GenerateHeader): Generates constructorCallback() header, if 'Constructor' is specified. (GenerateFunctionCallback): Uses GenerateArgumentsCountCheck() and GenerateParametersCheck(). (GenerateArgumentsCountCheck): Splits out of GenerateFunctionCallback() for reuse. (GenerateParametersCheck): Ditto. (GenerateConstructorCallback): Generates constructorCallback() definition. (GenerateImplementation): * bindings/scripts/IDLParser.pm: (parseExtendedAttributes): Previously, only a string in the "A=B, C, D, E=F" format can be parsed. This patch enables to parse a string in the "A=B, C, D, E=F, G(in DOMString s, in [H, I, J] DOMString t)" format. (parseParameters): Splits out of ParseInterface() for reuse. (ParseInterface): Uses parseParameters(). * bindings/scripts/IDLStructure.pm: Added domClass{constructor}. Changed the regular expression to extract the list of extended attributes. * bindings/scripts/test/TestInterface.idl: Added all the extended attributes that this patch is going to introduce. * bindings/scripts/test/TestObj.idl: Added 'Constructor'. * bindings/scripts/test/V8/V8TestInterface.cpp: Updated the test result. (WebCore::V8TestInterface::constructorCallback): (WebCore::ConfigureV8TestInterfaceTemplate): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::V8TestObj::constructorCallback): * bindings/scripts/test/V8/V8TestObj.h: Ditto. 2011-08-30 Philippe Normand <pnormand@igalia.com> [GTK] gstreamer/ files directly related to the MediaPlayer need VIDEO guards https://bugs.webkit.org/show_bug.cgi?id=67196 Reviewed by Martin Robinson. Guard those files with ENABLE(VIDEO) so other features using GStreamer can be built even with VIDEO disabled. * platform/graphics/gstreamer/GStreamerGWorld.cpp: * platform/graphics/gstreamer/GStreamerGWorld.h: * platform/graphics/gstreamer/ImageGStreamer.h: * platform/graphics/gstreamer/ImageGStreamerCG.mm: * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: * platform/graphics/gstreamer/ImageGStreamerQt.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/gstreamer/PlatformVideoWindow.h: * platform/graphics/gstreamer/PlatformVideoWindowGtk.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: * platform/graphics/gstreamer/VideoSinkGStreamer.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: 2011-08-30 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r94142, r94144, r94145, and r94148. http://trac.webkit.org/changeset/94142 http://trac.webkit.org/changeset/94144 http://trac.webkit.org/changeset/94145 http://trac.webkit.org/changeset/94148 https://bugs.webkit.org/show_bug.cgi?id=67262 Broke isindex element (Requested by rniwa on #webkit). * WebCore.order: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::applyProperty): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::addButton): (WebCore::CheckedRadioButtons::removeButton): * dom/Node.cpp: (WebCore::Node::toInputElement): * dom/Node.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::isInPasswordField): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::toInputElement): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::trackLimiterElementOf): * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::repeatingTimerFired): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): * page/DragController.cpp: (WebCore::asFileInput): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): (WebCore::RenderTheme::isIndeterminate): 2011-08-30 David Levin <levin@chromium.org> Quick fix for crashing tests caused by r94142. Tests: editing/execCommand/remove-format-elements.html fast/block/child-not-removed-from-parent-lineboxes-crash.html fast/forms/implicit-submission.html * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): Allow for isIndex element which is derived from HTMLInputElement. 2011-08-30 Sam Weinig <sam@webkit.org> Add constructor for CustomEvent https://bugs.webkit.org/show_bug.cgi?id=67248 Reviewed by Dan Bernstein. Test: fast/events/constructors/custom-event-constructor.html * bindings/generic/EventConstructors.h: Add definition for CustomEvent constructor. * bindings/js/JSEventConstructors.cpp: Add CustomEvent #includes. * dom/CustomEvent.cpp: (WebCore::CustomEventInit::CustomEventInit): (WebCore::CustomEvent::CustomEvent): * dom/CustomEvent.h: (WebCore::CustomEvent::create): Add Initializer./ * dom/CustomEvent.idl: Make constructible. * page/DOMWindow.idl: Add CustomEvent attribute. 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Get rid of toInputElement() https://bugs.webkit.org/show_bug.cgi?id=67175 Reviewed by Darin Adler. Got rid of Node::toInputElement and HTMLInputElement::toInputElement and replaced them by a global toHTMLInputElement. * WebCore.order: * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::textMarkerDataForVisiblePosition): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isPasswordField): (WebCore::AccessibilityRenderObject::isIndeterminate): (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): (WebCore::AccessibilityRenderObject::isChecked): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::canShareStyleWithControl): (WebCore::CSSStyleSelector::adjustRenderStyle): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSStyleSelector::applyProperty): * dom/CheckedRadioButtons.cpp: (WebCore::CheckedRadioButtons::addButton): (WebCore::CheckedRadioButtons::removeButton): * dom/Node.cpp: * dom/Node.h: * editing/FrameSelection.cpp: (WebCore::FrameSelection::isInPasswordField): * html/HTMLInputElement.h: (WebCore::toHTMLInputElement): * html/shadow/SliderThumbElement.cpp: (WebCore::sliderThumbElementOf): (WebCore::RenderSliderThumb::layout): (WebCore::RenderSliderContainer::layout): (WebCore::SliderThumbElement::hostInput): (WebCore::trackLimiterElementOf): * html/shadow/TextControlInnerElements.cpp: (WebCore::SearchFieldResultsButtonElement::shadowPseudoId): (WebCore::SearchFieldResultsButtonElement::defaultEventHandler): (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::defaultEventHandler): (WebCore::SpinButtonElement::repeatingTimerFired): (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): * page/DragController.cpp: (WebCore::asFileInput): * platform/efl/RenderThemeEfl.cpp: (WebCore::RenderThemeEfl::paintThemePart): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine): (WebCore::RenderTextControlSingleLine::inputElement): * rendering/RenderTheme.cpp: (WebCore::RenderTheme::isChecked): (WebCore::RenderTheme::isIndeterminate): 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Speculative WinCairo build fix after r94093. * platform/network/ResourceHandle.h: 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> Mac build fix after r94128. * WebCore.xcodeproj/project.pbxproj: 2011-08-30 Alice Boxhall <aboxhall@chromium.org> Correctly report selected text range for accessibility APIs for role=textbox https://bugs.webkit.org/show_bug.cgi?id=65900 Reviewed by Chris Fleizach. Test: accessibility/textbox-role-reports-selection.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): (WebCore::AccessibilityRenderObject::rootEditableElementForPosition): (WebCore::AccessibilityRenderObject::nodeIsTextControl): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): * accessibility/AccessibilityRenderObject.h: 2011-08-30 Rachel Blum <groby@chromium.org> The "port" property of an <a> whose href does not specify a port returns the wrong value https://bugs.webkit.org/show_bug.cgi?id=66081 HTMLAnchorElement now returns "" instead of "0" for unset port Fixed KURLGoogle.cpp to have same behavior as KURL.cpp when setting port 0 Fixed Location.cpp to have same behavior as KURL.cpp when setting port 0 Reviewed by Adam Barth. Tests: fast/dom/HTMLAnchorElement/get-href-attribute-port.html fast/dom/HTMLAnchorElement/set-href-attribute-port.html fast/loader/location-port.html fast/url/segments-from-data-url.html fast/url/segments.html fast/url/trivial-segments.html platform/chromium/fast/dom/HTMLAnchorElement/set-href-attribute-port.html * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::port): * page/Location.cpp: (WebCore::Location::host): (WebCore::Location::port): (WebCore::Location::setPort): * platform/KURLGoogle.cpp: (WebCore::KURL::setPort): 2011-08-30 Scott Byer <scottbyer@chromium.org> Fix pan scrolling on Windows to be clamped https://bugs.webkit.org/show_bug.cgi?id=66910 With the recent change to support rubberband scrolling on the Mac, pan scrolling of overflow divs became unclamped and would scroll infinitely and along an axis without a scrollbar. Reviewed by Simon Fraser Test: platform/win/fast/events/panScroll-correct-direction.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::panScrollFromPoint): (WebCore::RenderLayer::scrollByRecursively): * rendering/RenderLayer.h: 2011-08-30 Bill Budge <bbudge@chromium.org> This patch makes the XMLHttpRequest method/header validation logic available as static methods so URL loaders can perform the same checks for untrusted HTTP requests coming from plugins. https://bugs.webkit.org/show_bug.cgi?id=66909 Reviewed by David Levin. No new tests. Exposes no new functionality. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * platform/network/HTTPValidation.cpp: Added. (WebCore::isValidHTTPToken): (WebCore::isValidHTTPHeaderValue): * platform/network/HTTPValidation.h: Added. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::isAllowedHTTPMethod): (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): (WebCore::XMLHttpRequest::isAllowedHTTPHeader): (WebCore::XMLHttpRequest::open): (WebCore::XMLHttpRequest::setRequestHeader): * xml/XMLHttpRequest.h: 2011-08-30 Chris Rogers <crogers@google.com> Don't allow nodes of one context to be connected to nodes of another context https://bugs.webkit.org/show_bug.cgi?id=67245 Reviewed by Dimitri Glazkov. Tests: updated webaudio/audionode.html * webaudio/AudioNode.cpp: (WebCore::AudioNode::connect): 2011-08-30 Dan Bernstein <mitz@apple.com> WebCore part of <rdar://problem/9281695> Add text search API for getting the DOM range of a text match https://bugs.webkit.org/show_bug.cgi?id=67230 Reviewed by Darin Adler. Test: TestWebKitAPI/Tests/mac/DOMRangeOfString. * WebCore.exp.in: Export Page::rangeOfString(). * dom/Range.h: Added a default ASSERT_NO_EXCEPTION to a few more member functions. * editing/Editor.cpp: (WebCore::Editor::findString): Moved most of the logic into rangeOfString(), which this function now calls, passing in the current selection as the reference range and setting the selection to the returned range. (WebCore::Editor::rangeOfString): Added. Contains the find logic from findString(). * editing/Editor.h: * page/Page.cpp: (WebCore::Page::rangeOfString): Added. This function is similar to findString(), but it takes an optional reference range and returns a Range, rather than using the current selection as the reference range and setting the selection to the next match. * page/Page.h: 2011-08-30 Sam Weinig <sam@webkit.org> Add additional convertValue overloads to JSDictionary https://bugs.webkit.org/show_bug.cgi?id=67244 Reviewed by Darin Adler. Add overloads for convertValue that will be needed for Event constructors. * bindings/js/JSDictionary.cpp: (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: Add overloads. Remove #include of <runtime/Error.h> and just include <interpreter/CallFrame.h> * bindings/js/JSEventConstructors.cpp: Add now necessary #include of <runtime/Error.h>. 2011-08-30 Aaron Colwell <acolwell@chromium.org> Add MediaSource API to HTMLMediaElement https://bugs.webkit.org/show_bug.cgi?id=64731 Reviewed by Eric Carlson. Tests: http/tests/media/media-source/webm/video-media-source-errors.html http/tests/media/media-source/webm/video-media-source-play.html http/tests/media/media-source/webm/video-media-source-seek.html http/tests/media/media-source/webm/video-media-source-state-changes.html * Configurations/FeatureDefines.xcconfig: * GNUmakefile.am: * dom/EventNames.h: * features.pri: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Added initializers for new member variables. (WebCore::HTMLMediaElement::prepareForLoad): Close the media source before starting a new load. (WebCore::HTMLMediaElement::loadResource): Fail loading if the media source url from another media element is used. (WebCore::HTMLMediaElement::mediaEngineError): Make sure the source is in the closed state before firing an emptied event. (WebCore::HTMLMediaElement::mediaPlayerSourceOpened): New method called by WebCore::MediaPlayer to signal when the source is open. (WebCore::HTMLMediaElement::mediaPlayerSourceURL): New method called by the WebCore::MediaPlayer to determine what the media source URL is for this HTMLMediaElement instance. (WebCore::HTMLMediaElement::seek): Disabled noSeekRequired optimization if a media source is open and resets the source state to SOURCE_OPEN if it was in the SOURCE_ENDED state when seek() was called. (WebCore::HTMLMediaElement::webkitSourceAppend): New method for passing media data from JavaScript to the WebCore::MediaPlayer. (WebCore::HTMLMediaElement::webkitSourceEndOfStream): New method that allows JavaScript to signal the end of the stream. (WebCore::HTMLMediaElement::webkitSourceState): New method allowing JavaScript to read the current source state. (WebCore::HTMLMediaElement::setSourceState): New method for updating the current source state. (WebCore::HTMLMediaElement::userCancelledLoad): Transitions an open source to the closed state before firing an emptied event. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::webkitMediaSourceURL): New method providing the media source URL to JavaScript for this HTMLMediaElement instance. * html/HTMLMediaElement.idl: Added new methods, attributes, and constants for the media source api. * platform/graphics/MediaPlayer.cpp: (WebCore::NullMediaPlayerPrivate::sourceAppend): Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceAppend. (WebCore::NullMediaPlayerPrivate::sourceEndOfStream): Stub implementation of new WebCore::MediaPlayerPrivateInterface::sourceEndOfStream. (WebCore::MediaPlayer::sourceAppend): New method for receiving media data from WebCore::HTMLMediaElement. (WebCore::MediaPlayer::sourceEndOfStream): New method for receiving end of stream from WebCore::HTMLMediaElement. (WebCore::MediaPlayer::sourceOpened): New method called by the MediaPlayerPrivate object to notify the MediaPlayer when the source has opened. (WebCore::MediaPlayer::sourceURL): New method called by the MediaPlayerPrivate implementation to get the media source URL from the MediaPlayer. * platform/graphics/MediaPlayer.h: (WebCore::MediaPlayerClient::mediaPlayerSourceOpened): Interface method used by the MediaPlayer to tell the HTMLMediaElement when the media source has been opened. (WebCore::MediaPlayerClient::mediaPlayerSourceURL): Interface method used by the MediaPlayer to get the media source URL from the HTMLMediaElement. * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::sourceAppend): Interface method used by the MediaPlayer to pass media data to the MediaPlayerPrivate object. (WebCore::MediaPlayerPrivateInterface::sourceEndOfStream): Interface method used by the MediaPlayer to pass end of stream information to the MediaPlayerPrivate object. 2011-08-30 Sam Weinig <sam@webkit.org> Refactor JS dictionary code into helper class and covert geolocation code to use it https://bugs.webkit.org/show_bug.cgi?id=67213 Reviewed by Darin Adler. * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Add new files. * bindings/js/JSDictionary.cpp: Added. (WebCore::JSDictionary::convertValue): * bindings/js/JSDictionary.h: Added. (WebCore::JSDictionary::JSDictionary): (WebCore::JSDictionary::tryGetProperty): Encapsulate dictionary initialization code into JSDictionary class. * bindings/js/JSEventConstructors.cpp: (WebCore::constructJSEventWithInitializer): Use JSDictionary. * bindings/js/JSGeolocationCustom.cpp: (WebCore::setEnableHighAccuracy): (WebCore::setTimeout): (WebCore::setMaximumAge): (WebCore::createPositionOptions): Use JSDictionary. 2011-08-30 Scott Byer <scottbyer@chromium.org> Switch chromium to use ScrollAnimatorNone on Windows. https://bugs.webkit.org/show_bug.cgi?id=67000 Reviewed by Adam Barth. Testing covered by Chromium webkit_unit_tests ScrollAnimatorNoneTest.* * WebCore.gyp/WebCore.gyp: * WebCore.gypi: 2011-08-30 Tony Chang <tony@chromium.org> refactor and cleanup RenderFlexibleBox https://bugs.webkit.org/show_bug.cgi?id=67165 Reviewed by Ojan Vafai. No new tests, just refactoring code. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal): Make childSizes a param so we can pass the results to layoutAndPlaceChildrenHorizontal. (WebCore::hasPackingSpace): Move closer to where it's used. (WebCore::RenderFlexibleBox::layoutAndPlaceChildrenHorizontal): Pull this code out into its own function because it's not part of running the free space allocation algorithm. * rendering/RenderFlexibleBox.h: 2011-08-30 Tim Horton <timothy_horton@apple.com> getBBox() on a SVGPathElement with curves incorrectly includes control points https://bugs.webkit.org/show_bug.cgi?id=53512 <rdar://problem/9861154> Reviewed by Dirk Schulze. The CoreGraphics implementation of Path::boundingRect() called CGPathGetBoundingBox, which includes the path's control points in its calculations. Snow Leopard added CGPathGetPathBoundingBox, which finds the bounding box of only points within the path, and does not include control points. On Snow Leopard and above, we now use the latter. Test: svg/custom/getBBox-path.svg * platform/graphics/cg/PathCG.cpp: (WebCore::Path::boundingRect): 2011-08-30 Tim Horton <timothy_horton@apple.com> SVG panning y-axis is flipped in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=65800 <rdar://problem/9908012> Reviewed by Darin Adler. We previously were not transforming the pointer coordinates passed to SVGDocument's panning implementation into the coordinate space of the contents, so on different platforms, the drag direction was different. Test: svg/custom/pan-direction.svg * page/EventHandler.cpp: (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::handleMouseMoveEvent): (WebCore::EventHandler::handleMouseReleaseEvent): * svg/SVGDocument.cpp: (WebCore::SVGDocument::startPan): (WebCore::SVGDocument::updatePan): 2011-08-30 Adam Barth <abarth@webkit.org> Flaky crash with JavaScript URLs https://bugs.webkit.org/show_bug.cgi?id=66360 Reviewed by Nate Chapin. This patch teaches DocumentWriter::begin to make a copy of the URL before beginning a new document to avoid a crash. Test: fast/loader/javascript-url-iframe-crash.html * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): 2011-08-30 Tony Gentilcore <tonyg@chromium.org> PreloadScanner shouldn't load images inside noscript via doc.write https://bugs.webkit.org/show_bug.cgi?id=67214 Reviewed by Adam Barth. The problem was that the tokenizer state was lost between each call to document.write. This works around that bug by making all document.write()s in the same script block share the same tokenizer state. Test: fast/preloader/document-write-noscript.html * html/parser/HTMLDocumentParser.cpp: (WebCore::HTMLDocumentParser::~HTMLDocumentParser): (WebCore::HTMLDocumentParser::detach): (WebCore::HTMLDocumentParser::insert): * html/parser/HTMLDocumentParser.h: 2011-08-30 Dmitry Titov <dimich@chromium.org> https://bugs.webkit.org/show_bug.cgi?id=67210 [Chromium] Use after free in ScheduledAction::execute(WebCore::V8Proxy*) Reviewed by David Levin. * bindings/v8/ScheduledAction.cpp: (WebCore::ScheduledAction::execute): Removed usage of V8Proxy instance after it could have been deleted. * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::V8Proxy): * bindings/v8/V8Proxy.h: Removed unused timerCallback() and setTimerCallback(). 2011-08-30 Abhishek Arya <inferno@chromium.org> Style not updated for table parts in :before, :after content. https://bugs.webkit.org/show_bug.cgi?id=66141 Reviewed by Dave Hyatt. Tests: fast/table/table-before-child-style-update.html fast/table/table-row-before-child-style-update.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::updateBeforeAfterContent): 2011-08-30 Tony Chang <tony@chromium.org> refactor box-ordinal-group handling so we don't timeout on large values https://bugs.webkit.org/show_bug.cgi?id=65783 Reviewed by David Hyatt. The old code walked from 1 to the last box-ordinal-group while iterating over each flex item. The new code collects ordinals as we do the first walk and sorts them. Each additional iteration through the flex items gets the next oridnal from the sorted list. This maintains the single pass for the common case of no box-ordinal-groups specified. If there are ordinal groups, the runtime is O(n*m + m lg m) where n is the # of flex items and m is the number of unique box-ordinal-group values. The memory usage is O(2m). Test: fast/flexbox/box-ordinal-group.html * rendering/RenderDeprecatedFlexibleBox.cpp: (WebCore::FlexBoxIterator::FlexBoxIterator): (WebCore::FlexBoxIterator::reset): (WebCore::FlexBoxIterator::next): (WebCore::FlexBoxIterator::compareFlexOrder): 2011-08-30 Abhishek Arya <inferno@chromium.org> Removed m_owner accessed in custom scrollbars. https://bugs.webkit.org/show_bug.cgi?id=64737 Reviewed by David Hyatt. Problem does not reproduce in DRT, even with Eventhandler tricks and gc(). So, adding a manual test. * manual-tests/custom-scrollbar-renderer-removed-crash.html: Added. * page/FrameView.cpp: (WebCore::FrameView::clearOwningRendererForCustomScrollbars): * page/FrameView.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::willBeDestroyed): when this renderbox is getting destroyed, clear the custom scrollbar in this frameview having this renderbox as its owning renderer. * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::getScrollbarPseudoStyle): fix the null check. 2011-08-30 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Emit last progress notification before calling dispatchDidFinishLoad https://bugs.webkit.org/show_bug.cgi?id=28851 Reviewed by Adam Barth. Original patch by Xan Lopez. Change FrameLoader to dispatch the notifications in a more natural sequence. Test: http/tests/loading/progress-finished-callback.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame): 2011-08-30 Ojan Vafai <ojan@chromium.org> CSS parsing for -webkit-flex-flow https://bugs.webkit.org/show_bug.cgi?id=67224 Reviewed by Tony Chang. Adds support for the first value of -webkit-flex-flow. Later we'll need to add support for the second "wrap" value, but that can wait until we are ready to implement multiline flex and the spec has stabilized a bit. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexFlow): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexFlow): (WebCore::InheritedFlags::setFlexFlow): (WebCore::InheritedFlags::initialFlexFlow): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-30 Dawit Alemayehu <adawit@kde.org> [Qt] Replace QLibrary("libgtk-x11-2.0.so.0") with QLibrary("libgtk-x11-2.0", 0) https://bugs.webkit.org/show_bug.cgi?id=66627 Reviewed by Simon Hausmann. * plugins/qt/PluginPackageQt.cpp: (WebCore::initializeGtk): 2011-08-29 Oliver Hunt <oliver@apple.com> TypedArrays don't ensure that denormalised values are normalised https://bugs.webkit.org/show_bug.cgi?id=67178 Reviewed by Gavin Barraclough. Ensure that we convert singaling nans to silent nans when loading from a typed array. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): 2011-08-29 Alexey Proskuryakov <ap@apple.com> DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 <rdar://problem/5666907> Reviewed by Darin Adler. Use a clean CFURLStorageSession when this functionality is available. * WebCore.exp.in: Added exports. * WebCore.xcodeproj/project.pbxproj: Made CookieStorageCFNet.h private, as currentCFHTTPCookieStorage is used in WebKit. * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): Updated to use currentCFHTTPCookieStorage(). * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h. * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp. * platform/network/ResourceHandle.h: Exposed default session support on Mac, too. Made privateBrowsingStorageSession() private, as callers shouldn't be concerned about where the current sssion came from. * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): Updated to use currentCFHTTPCookieStorage(). * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API. (WebCore::overrideCookieStorage): Ditto. (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable, unless it has been overridden on Windows. We can always get it from a session. (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just use private session's storage. Note that Mac has a separate code path for OS versions that don't support sessions. (WebCore::startObservingCookieChanges): Updated to use currentCFHTTPCookieStorage(). (WebCore::stopObservingCookieChanges): Ditto. * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change. (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK), as this function is also used with NSURLConnection when sessions are enabled. (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session is now supported on Mac, too. (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK). (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer adopt the session, because nothing in method name says that it will steal a reference from the caller. (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK). (WebCore::privateStorageSession): Moved from ResourceHandle.cpp. (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): We no longer store a reference to cookie storage in a static variable, so nothing to do here. On older OS versiosn, we still need to enable legacy private browsing mode. * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): Updated to use the new currentCFHTTPCookieStorage function. (WebCore::ResourceHandle::createNSURLConnection): Updated to use currentStorageSession() instead of privateBrowsingStorageSession(). (WebCore::ResourceHandle::willSendRequest): Ditto. 2011-08-30 David Hyatt <hyatt@apple.com> <rdar://problem/10002140> 9A309: Text gets clipped in book because of overflow:auto https://bugs.webkit.org/show_bug.cgi?id=67212 - Text gets clipped in multi-column layouts when overflow:auto is used. Revise our overflow:auto pagination behavior. If the overflow block doesn't specify any logical height information, then we'll just assume the plan is for it to enclose its contents, and we will be willing to paginate in those circumstances. Reviewed by Dan Bernstein. Added overflow-across-columns.html and overflow-unsplittable.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustForUnsplittableChild): * rendering/RenderBox.cpp: (WebCore::RenderBox::hasUnsplittableScrollingOverflow): * rendering/RenderBox.h: 2011-08-30 Antti Koivisto <antti@apple.com> querySelector/querySelectorAll should use selector checker fast path https://bugs.webkit.org/show_bug.cgi?id=67161 Reviewed by Sam Weinig. Descendant and child selectors can be matches substantially faster using SelectorChecker::fastCheckSelector() path. Currently it is used for style matching only. Add SelectorQuery class that can do both querySelector and querySelectorAll efficiently using fast path. Use inlined loop for DOM traversal. The patch is ~25% speedup in the overall native score of http://www.webkit.org/perf/slickspeed/. Some individual subtests (using child or descendant selectors) execute twice as fast. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::isFastCheckableSelector): (WebCore::RuleData::RuleData): * css/CSSStyleSelector.h: Make fast path checking available outside CSSStyleSelector. * dom/DOMAllInOne.cpp: * dom/Node.cpp: (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): Switch to SelectorQuery. * dom/SelectorNodeList.cpp: Removed. * dom/SelectorNodeList.h: Removed. SelectorQuery makes these obsolete. * dom/SelectorQuery.cpp: Added. (WebCore::SelectorQuery::SelectorQuery): (WebCore::SelectorQuery::queryAll): (WebCore::SelectorQuery::queryFirst): (WebCore::SelectorQuery::canUseIdLookup): (WebCore::SelectorQuery::execute): * dom/SelectorQuery.h: Added. Class for selector matching in tree. 2011-08-30 Dmitry Titov <dimich@chromium.org> REGRESSION (r93913): Failures in fast/replaced/frame-removed-during-resize.html and scrollbars/scrollable-iframe-remove-crash.html https://bugs.webkit.org/show_bug.cgi?id=67074 Reviewed by Darin Adler. Added flag m_isClosed to prevent events that cause Frame to be destroyed from posting more events into EventQueue of a dying Document. The tests mentioned above should now pass. * dom/Document.cpp: (WebCore::Document::detach): * dom/EventQueue.cpp: (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::close): Renamed method to reflect better what it does. * dom/EventQueue.h: 2011-08-30 Tony Chang <tony@chromium.org> Fix compile warning on clang: error: 'WebKit::ChromeClientImpl::scrollRectIntoView' hides overloaded virtual function [-Werror,-Woverloaded-virtual] virtual void scrollRectIntoView( ^ ../../WebCore/page/ChromeClient.h:171:22: note: hidden overloaded virtual function 'WebCore::ChromeClient::scrollRectIntoView' declared here virtual void scrollRectIntoView(const IntRect&) { }; // Currently only Mac has a non empty implementation. * page/ChromeClient.h: (WebCore::ChromeClient::scrollRectIntoView): 2011-08-30 David Hyatt <hyatt@apple.com> <rdar://problem/8832814> With large line-height, column break can happen anywhere in the inter-line gap, causing staggered lines. https://bugs.webkit.org/show_bug.cgi?id=67202 Handle positive leading when paginating lines. Technically we should paginate lines based solely off their line top and line bottom with leading included. However there are two issues with always doing so. The first is that overflow can cause lines to overlap, and the second is that negative leading can cause lines to overlap. Since we're incapable of dealing with overlap until we stop clipping column boxes and allow them to have a form of specialized overflow, we still have to at least factor in overflow and ignore negative leading for now. However we can at least honor positive leading when the lines don't overlap. This patch provides basic support for paginating when positive leading is involved. Reviewed by Dan Bernstein. Added fast/multicol/positive-leading.html. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::markLinesDirtyInBlockRange): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. (WebCore::RenderBlock::adjustLinePositionForPagination): Grow the top and extent of the line to include our leading when deciding how to paginate the line. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeBlockDirectionPositionsForLine): (WebCore::RenderBlock::layoutRunsAndFloatsInRange): (WebCore::RenderBlock::linkToEndLineIfNeeded): (WebCore::RenderBlock::checkFloatsInCleanLine): (WebCore::RenderBlock::determineStartPosition): (WebCore::RenderBlock::determineEndPosition): (WebCore::RenderBlock::matchedEndLine): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::RootInlineBox): (WebCore::RootInlineBox::adjustPosition): (WebCore::RootInlineBox::alignBoxesInBlockDirection): * rendering/RootInlineBox.h: (WebCore::RootInlineBox::lineTopWithLeading): (WebCore::RootInlineBox::lineBottomWithLeading): (WebCore::RootInlineBox::setLineTopBottomPositions): Instead of one member variable, blockLogicalHeight(), RootInlineBoxes now know both their top and bottom including leading. These values are obtainable using lineTopWithLeading() and lineBottomWithLeading(). Add these two values to the setLineTopBottomPositions setter and remove setBlockLogicalHeight. * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::layoutRootBox): Renamed blockLogicalHeight() to lineBottomWithLeading(). The value is the same. 2011-08-29 Chris Marrin <cmarrin@apple.com> Rename GraphicsContext3DInternal to GraphicsContext3DPrivate and add a dummy version of this class for Mac https://bugs.webkit.org/show_bug.cgi?id=67172 Reviewed by Kenneth Russell. * GNUmakefile.list.am: * platform/graphics/GraphicsContext3D.h: * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/gtk/GraphicsContext3DGtk.cpp: (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::platformGraphicsContext3D): * platform/graphics/gtk/GraphicsContext3DInternal.h: Removed. * platform/graphics/gtk/GraphicsContext3DPrivate.h: Copied from Source/WebCore/platform/graphics/gtk/GraphicsContext3DInternal.h. * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate): (WebCore::GraphicsContext3DPrivate::getViewportGLWidget): (WebCore::GraphicsContext3DPrivate::paintToTextureMapper): (WebCore::GraphicsContext3DPrivate::boundingRect): (WebCore::GraphicsContext3DPrivate::paint): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer): (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebufferAndRestoreContext): (WebCore::GraphicsContext3D::create): (WebCore::GraphicsContext3D::GraphicsContext3D): (WebCore::GraphicsContext3D::~GraphicsContext3D): (WebCore::GraphicsContext3D::platformGraphicsContext3D): (WebCore::GraphicsContext3D::platformLayer): (WebCore::GraphicsContext3D::makeContextCurrent): (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas): (WebCore::GraphicsContext3D::reshape): (WebCore::GraphicsContext3D::activeTexture): (WebCore::GraphicsContext3D::attachShader): (WebCore::GraphicsContext3D::getAttachedShaders): (WebCore::GraphicsContext3D::bindAttribLocation): (WebCore::GraphicsContext3D::bindBuffer): (WebCore::GraphicsContext3D::bindFramebuffer): (WebCore::GraphicsContext3D::bindRenderbuffer): (WebCore::GraphicsContext3D::bindTexture): (WebCore::GraphicsContext3D::blendColor): (WebCore::GraphicsContext3D::blendEquation): (WebCore::GraphicsContext3D::blendEquationSeparate): (WebCore::GraphicsContext3D::blendFunc): (WebCore::GraphicsContext3D::blendFuncSeparate): (WebCore::GraphicsContext3D::bufferData): (WebCore::GraphicsContext3D::bufferSubData): (WebCore::GraphicsContext3D::checkFramebufferStatus): (WebCore::GraphicsContext3D::clearColor): (WebCore::GraphicsContext3D::clear): (WebCore::GraphicsContext3D::clearDepth): (WebCore::GraphicsContext3D::clearStencil): (WebCore::GraphicsContext3D::colorMask): (WebCore::GraphicsContext3D::compileShader): (WebCore::GraphicsContext3D::copyTexImage2D): (WebCore::GraphicsContext3D::copyTexSubImage2D): (WebCore::GraphicsContext3D::cullFace): (WebCore::GraphicsContext3D::depthFunc): (WebCore::GraphicsContext3D::depthMask): (WebCore::GraphicsContext3D::depthRange): (WebCore::GraphicsContext3D::detachShader): (WebCore::GraphicsContext3D::disable): (WebCore::GraphicsContext3D::disableVertexAttribArray): (WebCore::GraphicsContext3D::drawArrays): (WebCore::GraphicsContext3D::drawElements): (WebCore::GraphicsContext3D::enable): (WebCore::GraphicsContext3D::enableVertexAttribArray): (WebCore::GraphicsContext3D::finish): (WebCore::GraphicsContext3D::flush): (WebCore::GraphicsContext3D::framebufferRenderbuffer): (WebCore::GraphicsContext3D::framebufferTexture2D): (WebCore::GraphicsContext3D::frontFace): (WebCore::GraphicsContext3D::generateMipmap): (WebCore::GraphicsContext3D::getActiveAttrib): (WebCore::GraphicsContext3D::getActiveUniform): (WebCore::GraphicsContext3D::getAttribLocation): (WebCore::GraphicsContext3D::getError): (WebCore::GraphicsContext3D::getString): (WebCore::GraphicsContext3D::hint): (WebCore::GraphicsContext3D::isBuffer): (WebCore::GraphicsContext3D::isEnabled): (WebCore::GraphicsContext3D::isFramebuffer): (WebCore::GraphicsContext3D::isProgram): (WebCore::GraphicsContext3D::isRenderbuffer): (WebCore::GraphicsContext3D::isShader): (WebCore::GraphicsContext3D::isTexture): (WebCore::GraphicsContext3D::lineWidth): (WebCore::GraphicsContext3D::linkProgram): (WebCore::GraphicsContext3D::pixelStorei): (WebCore::GraphicsContext3D::polygonOffset): (WebCore::GraphicsContext3D::readPixels): (WebCore::GraphicsContext3D::releaseShaderCompiler): (WebCore::GraphicsContext3D::renderbufferStorage): (WebCore::GraphicsContext3D::sampleCoverage): (WebCore::GraphicsContext3D::scissor): (WebCore::GraphicsContext3D::shaderSource): (WebCore::GraphicsContext3D::stencilFunc): (WebCore::GraphicsContext3D::stencilFuncSeparate): (WebCore::GraphicsContext3D::stencilMask): (WebCore::GraphicsContext3D::stencilMaskSeparate): (WebCore::GraphicsContext3D::stencilOp): (WebCore::GraphicsContext3D::stencilOpSeparate): (WebCore::GraphicsContext3D::texParameterf): (WebCore::GraphicsContext3D::texParameteri): (WebCore::GraphicsContext3D::uniform1f): (WebCore::GraphicsContext3D::uniform1fv): (WebCore::GraphicsContext3D::uniform2f): (WebCore::GraphicsContext3D::uniform2fv): (WebCore::GraphicsContext3D::uniform3f): (WebCore::GraphicsContext3D::uniform3fv): (WebCore::GraphicsContext3D::uniform4f): (WebCore::GraphicsContext3D::uniform4fv): (WebCore::GraphicsContext3D::uniform1i): (WebCore::GraphicsContext3D::uniform1iv): (WebCore::GraphicsContext3D::uniform2i): (WebCore::GraphicsContext3D::uniform2iv): (WebCore::GraphicsContext3D::uniform3i): (WebCore::GraphicsContext3D::uniform3iv): (WebCore::GraphicsContext3D::uniform4i): (WebCore::GraphicsContext3D::uniform4iv): (WebCore::GraphicsContext3D::uniformMatrix2fv): (WebCore::GraphicsContext3D::uniformMatrix3fv): (WebCore::GraphicsContext3D::uniformMatrix4fv): (WebCore::GraphicsContext3D::useProgram): (WebCore::GraphicsContext3D::validateProgram): (WebCore::GraphicsContext3D::vertexAttrib1f): (WebCore::GraphicsContext3D::vertexAttrib1fv): (WebCore::GraphicsContext3D::vertexAttrib2f): (WebCore::GraphicsContext3D::vertexAttrib2fv): (WebCore::GraphicsContext3D::vertexAttrib3f): (WebCore::GraphicsContext3D::vertexAttrib3fv): (WebCore::GraphicsContext3D::vertexAttrib4f): (WebCore::GraphicsContext3D::vertexAttrib4fv): (WebCore::GraphicsContext3D::vertexAttribPointer): (WebCore::GraphicsContext3D::viewport): (WebCore::GraphicsContext3D::getBooleanv): (WebCore::GraphicsContext3D::getBufferParameteriv): (WebCore::GraphicsContext3D::getFloatv): (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getProgramiv): (WebCore::GraphicsContext3D::getProgramInfoLog): (WebCore::GraphicsContext3D::getRenderbufferParameteriv): (WebCore::GraphicsContext3D::getShaderiv): (WebCore::GraphicsContext3D::getShaderInfoLog): (WebCore::GraphicsContext3D::getShaderSource): (WebCore::GraphicsContext3D::getTexParameterfv): (WebCore::GraphicsContext3D::getTexParameteriv): (WebCore::GraphicsContext3D::getUniformfv): (WebCore::GraphicsContext3D::getUniformiv): (WebCore::GraphicsContext3D::getUniformLocation): (WebCore::GraphicsContext3D::getVertexAttribfv): (WebCore::GraphicsContext3D::getVertexAttribiv): (WebCore::GraphicsContext3D::getVertexAttribOffset): (WebCore::GraphicsContext3D::texImage2D): (WebCore::GraphicsContext3D::texSubImage2D): (WebCore::GraphicsContext3D::createBuffer): (WebCore::GraphicsContext3D::createFramebuffer): (WebCore::GraphicsContext3D::createProgram): (WebCore::GraphicsContext3D::createRenderbuffer): (WebCore::GraphicsContext3D::createShader): (WebCore::GraphicsContext3D::createTexture): (WebCore::GraphicsContext3D::deleteBuffer): (WebCore::GraphicsContext3D::deleteFramebuffer): (WebCore::GraphicsContext3D::deleteProgram): (WebCore::GraphicsContext3D::deleteRenderbuffer): (WebCore::GraphicsContext3D::deleteShader): (WebCore::GraphicsContext3D::deleteTexture): 2011-08-30 Tony Chang <tony@chromium.org> Remove webcore_bindings (including DerivedSources##.cpp) from the critical path https://bugs.webkit.org/show_bug.cgi?id=67168 Reviewed by Adam Barth. webcore_bindings_sources generates various files (e.g., CSSPropertyNames, DerivedSources, HTMLNames, etc). webcore_bindings depends on webcore_bindings_sources and compiles these files. Previously, the other webcore libs (webcore_svg, webcore_html, webcore_remaining, etc) depended on webcore_bindings. This changes the dependency on webocre_bindings_sources so the build can parallelize the compile of webcore_bindings and the other webcore_* libs. No new tests, just changing the build dependencies. Manually copy over the include dirs that we used to get from webcore_bindings' direct_dependent_settings. * WebCore.gyp/WebCore.gyp: 2011-08-30 Kaustubh Atrawalkar <kaustubh@motorola.com> The unused ScrollView* argument can and should be removed from scrollRectIntoView. https://bugs.webkit.org/show_bug.cgi?id=67117 Reviewed by Darin Adler. * loader/EmptyClients.h: (WebCore::EmptyChromeClient::scrollRectIntoView): * page/Chrome.cpp: (WebCore::Chrome::scrollRectIntoView): * page/ChromeClient.h: (WebCore::ChromeClient::scrollRectIntoView): 2011-08-30 Ben Wells <benwells@chromium.org> Update registerProtocolHandler scheme whitelist to match spec https://bugs.webkit.org/show_bug.cgi?id=67104 Reviewed by Darin Adler. * page/Navigator.cpp: (WebCore::initProtocolHandlerWhitelist): 2011-08-30 Vsevolod Vlasov <vsevik@chromium.org> Web Inspector: Inspected page sometimes crashes in InspectorResourceAgent::didFailLoading https://bugs.webkit.org/show_bug.cgi?id=67193 Reviewed by Pavel Feldman. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didFailLoading): 2011-08-30 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> [Qt] Do not unconditionally use pkg-config in .pro files https://bugs.webkit.org/show_bug.cgi?id=67055 Reviewed by Andreas Kling. Original patch from Rohan McGovern <rohan.mcgovern@nokia.com> Using the first pkg-config in PATH is prone to errors when cross compiling inside the Qt repository (using Qt's build-system). This patch protect calls for pkg-config with !contains(QT_CONFIG, no-pkg-config). no-pkg-config is added to QT_CONFIG by Qt's 'configure' when cross-compiling on systems without pkg-config. The respective change in Qt's configure has been submited already. No new tests as this is just a build change. * features.pri: protect pkg-config calls 2011-08-30 Andreas Kling <kling@webkit.org> HTMLImageElement: Don't cache "ismap" and "usemap" attributes. https://bugs.webkit.org/show_bug.cgi?id=66784 Reviewed by Darin Adler. * html/HTMLImageElement.h: Remove the "ismap" and "usemap" members, shrinking HTMLImageElement by 16 bytes (on 64-bit.) * html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::HTMLImageElement): (WebCore::HTMLImageElement::parseMappedAttribute): Most of the logic for "ismap" and "usemap" moved into isServerMap(). (WebCore::HTMLImageElement::isServerMap): Out-of-lined and implemented using fast*Attribute(). 2011-08-30 Ryosuke Niwa <rniwa@webkit.org> lastChangeWasUserEdit continues to return true when innerText or textContent is modified https://bugs.webkit.org/show_bug.cgi?id=67183 Reviewed by Kent Tamura. Fixed the bug by calling setLastChangeWasNotUserEdit in HTMLTextAreaElement::childrenChanged. Also got rid of HTMLTextFormControlElement::subtreeHasChanged because it was a needless indirection. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged. * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::childrenChanged): Calls setLastChangeWasNotUserEdit. (WebCore::HTMLTextAreaElement::subtreeHasChanged): No longer calls HTMLTextFormControlElement::subtreeHasChanged. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::defaultEventHandler): Merged subtreeHasChanged. (WebCore::HTMLTextFormControlElement::setInnerTextValue): No longer set m_lastChangeWasUserEdit to false since this is now done when renderers are set dirty. * html/HTMLTextFormControlElement.h: Made subtreeHasChanged a pure virtual function. 2011-08-29 Yury Semikhatsky <yurys@chromium.org> Web Inspector: wrong script display name when there is a slash in its URL query parameters https://bugs.webkit.org/show_bug.cgi?id=67120 Fixed folder name computation in ScriptsPanel. Now search query is ignored when searching for the script folder name. Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._folderAndDisplayNameForScriptURL): 2011-08-29 Yury Semikhatsky <yurys@chromium.org> Return value of window.onerror has inverted semantics https://bugs.webkit.org/show_bug.cgi?id=67119 Error is now treated as handled only when window.onerror function returns true. Reviewed by Darin Adler. Test: fast/events/window-onerror13.html * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/v8/V8WindowErrorHandler.cpp: (WebCore::V8WindowErrorHandler::callListenerFunction): * bindings/v8/V8WorkerContextErrorHandler.cpp: (WebCore::V8WorkerContextErrorHandler::callListenerFunction): 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Touch Internals.cpp in an attempt to fix GTK+ build. * testing/Internals.cpp: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Move setInnerTextValue from RenderTextControl to HTMLTextFormControlElement https://bugs.webkit.org/show_bug.cgi?id=67152 Reviewed by Darin Adler. Moved setInnerTextValue from RenderTextControl to HTMLTextFormControlElement. Also moved m_lastChangeWasUserEdit from RenderTextControl to HTMLTextFormControlElement and related inline functions from RenderTextControl to HTMLTextFormControlElement. Because m_lastChangeWasUserEdit is no longer reset when RenderTextControl is recreated, added explicit calls to setLastChangeWasNotUserEdit in setValue functions of HTMLInputElement and HTMLTextAreaElement. This patch also fixes the bug that lastChangeWasUserEdit() incorrectly returns false when input or textarea don't have renderer (e.g. invisible). Unfortunately, there is no way to test this behavioral change from layout tests. * WebCore.exp.in: Exports lastChangeWasUserEdit in HTMLTextFormControlElement instead of that of HTMLInputElement and HTMLTextAreaElement. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setValue): Explicitly calls setLastChangeWasNotUserEdit. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::setValueCommon): Ditto. * html/HTMLTextAreaElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::HTMLTextFormControlElement): (WebCore::HTMLTextFormControlElement::subtreeHasChanged): Sets m_lastChangeWasUserEdit true as it used to do via respondToChangeByUser. (WebCore::HTMLTextFormControlElement::lastChangeWasUserEdit): Moved from HTMLInputElement and HTMLTextAreaElement. (WebCore::HTMLTextFormControlElement::setInnerTextValue): Moved from RenderTextControl. * html/HTMLTextFormControlElement.h: (WebCore::HTMLTextFormControlElement::setLastChangeWasNotUserEdit): Added. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::RenderTextControl): No longer initializes m_lastChangeWasUserEdit. * rendering/RenderTextControl.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): Calls setInnerTextValue. * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::updateFromElement): Ditto. 2011-08-25 Kent Tamura <tkent@chromium.org> REGRESSION(r88115): Disabling a file upload control causes an endless busyloop. https://bugs.webkit.org/show_bug.cgi?id=66659 Reviewed by Darin Adler. Test: fast/forms/file/disabling-file-busy-loop.html * rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::updateFromElement): Don't call setDisabled() if the disabled status is not changed. setDisabled() causes styleRecalc(), and HTMLFormControlElement::styleRecalc() causes updateFromElement(). updateFromElement() should not call setDisabled() again. 2011-08-29 Daniel Bates <dbates@webkit.org> Add HAVE(VASPRINTF) macro to test for vasprintf() support https://bugs.webkit.org/show_bug.cgi?id=67156 Reviewed by Darin Adler. * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::error): Modified to use HAVE(VASPRINTF). 2011-08-29 Yuta Kitamura <yutak@chromium.org> WebSocket: Receive binary message as Blob https://bugs.webkit.org/show_bug.cgi?id=67115 Reviewed by Kent Tamura. Make WebSocketChannel be able to receive WebSocket binary messages and deliver them via didReceiveBinaryData() callback of WebSocketChannelClient. Tests: http/tests/websocket/tests/hybi/fragmented-binary-frames.html http/tests/websocket/tests/hybi/receive-blob.html http/tests/websocket/tests/hybi/workers/receive-blob.html * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): Convert Blob to JSValue. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): Convert Blob to v8::Value. * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): * dom/MessageEvent.h: Added DataTypeBlob and Blob-related functions. (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataAsBlob): * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData): (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryDataCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveBinaryData): If binaryType attribute is "blob", construct a Blob using BlobData filled with the given binary message. * websockets/WebSocket.h: * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::processFrame): Create continuousFrameData as OwnPtr<> rather than stack-allocated value so we can easily pass it to didReceiveBinaryData() callback. Save the content of a fragmented message even if it is a binary opcode. * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didReceiveBinaryData): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidReceiveBinaryData): (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): Pass binaryData as PassOwnPtr<Vector<char> > to deliver the value efficiently (without copying the content) across threads. * websockets/WorkerThreadableWebSocketChannel.h: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Add a test for lastChangeWasUserEdit in HTMLInputElement and HTMLTextAreaElement https://bugs.webkit.org/show_bug.cgi?id=67173 Reviewed by Darin Adler. Exposed HTMLInputElement::lastChangeWasUserEdit and HTMLTextAreaElement::lastChangeWasUserEdit via internals.wasLastChangeUserEdit(Element*, ExceptionCode&). The first argument must be an input element or a textarea element lastChangeWasUserEdit is called upon. Test: fast/forms/textfield-lastchange-was-useredit.html * testing/Internals.cpp: (WebCore::Internals::wasLastChangeUserEdit): * testing/Internals.h: * testing/Internals.idl: 2011-08-29 Luke Macpherson <macpherson@chromium.org> Implement CSSPropertyWebkitColumns in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=67106 Reviewed by Darin Adler. Tests: LayoutTests/fast/multicol/inherit-column-values.html LayoutTests/fast/multicol/initial-column-values.html * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Initialize handler for CSSPropertyWebkitColumns. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Remove existing implementation for CSSPropertyWebkitColumns. 2011-08-29 Mark Hahnenberg <mhahnenberg@apple.com> Unzip initialization lists and constructors in JSCell hierarchy (3/7) https://bugs.webkit.org/show_bug.cgi?id=67064 Reviewed by Darin Adler. No new tests. Completed the third level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::finishCreation): * bindings/js/JSDOMWindowShell.h: 2011-08-29 John Bauman <jbauman@chromium.org> Speed up texImage from BGRA https://bugs.webkit.org/show_bug.cgi?id=66884 Reviewed by Kenneth Russell. BGRA input is common coming from skia, so optimize BGRA->RGBA conversion and also avoid the pointless RGBA to RGBA conversion. * platform/graphics/GraphicsContext3D.cpp: (WebCore::doUnpackingAndPacking): 2011-08-29 Matthew Delaney <mdelaney@apple.com> [CG] ImageBufferCG should handle IOSurface allocation failure gracefully https://bugs.webkit.org/show_bug.cgi?id=67099 Reviewed by Simon Fraser. No new tests. Testing the "fallback to old path" behavior is not easily testable. * platform/graphics/cg/ImageBufferCG.cpp: Rearranged backing store creation to fall back to old path if IOSurface creation path fails. (WebCore::ImageBuffer::ImageBuffer): 2011-08-29 Cary Clark <caryclark@google.com> Only enable font smoothing as requested (Skia on Mac) https://bugs.webkit.org/show_bug.cgi?id=67143 This adjusts LayoutTest pixel output to more closely match other platforms. Reviewed by Kenneth Russell. No new tests. This platform is not yet enabled. * platform/graphics/skia/FontSkia.cpp: (WebCore::setupPaint): LCD text was always enabled to test the code path. With this change, it is only enabled when instructed by the font state. 2011-08-29 Julien Chaffraix <jchaffraix@webkit.org> Assertion failure in RenderLayer::computeRepaintRects when scrolling https://bugs.webkit.org/show_bug.cgi?id=67140 Reviewed by David Hyatt. Test: fast/repaint/scroll-fixed-layer-with-no-visible-content.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::computeRepaintRects): Fixed style after r93837. (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Tweaked the code to bail early if our layer has no visible content. This avoids the ASSERT and also makes sense as we shouldn't repaint / update empty layers. 2011-08-29 Anna Cavender <annacc@chromium.org> Implement WebVTT Cue Text Parsing rules and DOM construction https://bugs.webkit.org/show_bug.cgi?id=64132 Reviewed by Adam Barth. Tests in media/track, particularly track-webvtt-tc[022 - 028]*. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.xcodeproj/project.pbxproj: * html/TextTrackCue.cpp: * html/TextTrackCue.h: * platform/track/CueParser.cpp: * platform/track/CueParser.h: * platform/track/WebVTTParser.cpp: * platform/track/WebVTTParser.h: * platform/track/WebVTTToken.h: Added. * platform/track/WebVTTTokenizer.cpp: Added. * platform/track/WebVTTTokenizer.h: Added. 2011-08-29 Patrick Gansterer <paroga@webkit.org> Add parsing support for extended attributes on IDL constants https://bugs.webkit.org/show_bug.cgi?id=65046 Reviewed by Brent Fulgham. With support for extended attributes on constants we can replace some preprocessor lines from the IDL files with the corresponding [Conditional=XXX] later. Using the preprocessor causes much pain on native windows. CodeGenerator support will be added in separate patches. * bindings/scripts/IDLParser.pm: * bindings/scripts/IDLStructure.pm: 2011-08-29 Ryosuke Niwa <rniwa@webkit.org> Cleanup: notifyFormStateChanged, formControlValueMatchesRenderer, and setFormControlValueMatchesRenderer https://bugs.webkit.org/show_bug.cgi?id=67141 Reviewed by Eric Seidel. No new tests since this is a refactoring. * dom/Element.h: Removed formControlValueMatchesRenderer and setFormControlValueMatchesRenderer. * html/HTMLInputElement.cpp: Removed notifyFormStateChanged. * html/HTMLInputElement.h: * html/HTMLTextAreaElement.cpp: (WebCore::HTMLTextAreaElement::updateValue): Calls notifyFormStateChanged; modifies m_wasModifiedByUser. (WebCore::HTMLTextAreaElement::setValueCommon): Calls notifyFormStateChanged; also renamed value to newValue to avoid the conflict with value(). * html/HTMLTextAreaElement.h: Made m_wasModifiedByUser mutable. * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::notifyFormStateChanged): Extracted from notifyFormStateChanged in HTMLInputElement.cpp and HTMLTextAreaElement.cpp. * html/HTMLTextFormControlElement.h: * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::setInnerTextValue): Calls setFormControlValueMatchesRenderer. 2011-08-29 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93987, r93992, r93995, r93998, and r93999. http://trac.webkit.org/changeset/93987 http://trac.webkit.org/changeset/93992 http://trac.webkit.org/changeset/93995 http://trac.webkit.org/changeset/93998 http://trac.webkit.org/changeset/93999 https://bugs.webkit.org/show_bug.cgi?id=67147 Many failing tests (Requested by ap on #webkit). * WebCore.exp.in: * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): * platform/network/CookieStorage.h: * platform/network/ResourceHandle.cpp: (WebCore::privateStorageSession): (WebCore::privateBrowsingStorageSessionIdentifierBase): (WebCore::ResourceHandle::setPrivateBrowsingEnabled): (WebCore::ResourceHandle::privateBrowsingStorageSession): (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): * platform/network/ResourceHandle.h: * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::privateBrowsingCookieStorage): (WebCore::defaultSessionCookieStorage): (WebCore::defaultCookieStorage): (WebCore::currentCookieStorage): (WebCore::setCurrentCookieStorage): (WebCore::setCookieStoragePrivateBrowsingEnabled): (WebCore::startObservingCookieChanges): (WebCore::stopObservingCookieChanges): * platform/network/cf/CookieStorageCFNet.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): (WebCore::ResourceHandle::currentStorageSession): (WebCore::defaultCFURLStorageSession): (WebCore::ResourceHandle::setDefaultStorageSession): (WebCore::ResourceHandle::defaultStorageSession): * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): 2011-08-29 Nayan Kumar K <nayankk@motorola.com> As per HTML specification, default font style of dfn tag should be italic. https://bugs.webkit.org/show_bug.cgi?id=56670 Reviewed by Adam Barth. Test: fast/css/dfn-default-font-style.html * css/html.css: (i, cite, em, var, address, dfn): 2011-08-29 Patrick Gansterer <paroga@webkit.org> Consider Conditional attribute in CodeGeneratorJS' JSValueToNative and NativeToJSValue function https://bugs.webkit.org/show_bug.cgi?id=65040 Reviewed by Brent Fulgham. JSValueToNative and NativeToJSValue add additional include statements to the implementation and need to handle the Conditional attribute from the IDL file. The Conditional attribute adds appropriate #if ENABLE() lines for the preprocessor around the include statements to remove some unneeded build dependencies. * bindings/scripts/CodeGeneratorJS.pm: 2011-08-29 Nate Chapin <japhet@chromium.org> Plumb ResourceLoaderOptions out to CachedResourceLoader::requestResource(). This will be needed in order for DocumentThreadableLoader to become a CachedResourceClient. https://bugs.webkit.org/show_bug.cgi?id=66018 Reviewed by Antti Koivisto. No new tests, refactor only. * loader/cache/CachedImage.cpp: (WebCore::CachedImage::load): * loader/cache/CachedResource.cpp: (WebCore::CachedResource::CachedResource): (WebCore::CachedResource::load): * loader/cache/CachedResource.h: (WebCore::CachedResource::load): (WebCore::CachedResource::setResourceLoaderOptions): (WebCore::CachedResource::sendResourceLoadCallbacks): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): (WebCore::CachedResourceLoader::requestResource): (WebCore::CachedResourceLoader::loadResource): * loader/cache/CachedResourceLoader.h: * loader/cache/CachedResourceRequest.cpp: (WebCore::CachedResourceRequest::load): * loader/cache/CachedResourceRequest.h: 2011-08-29 Chris Palmer <palmer@google.com> Fix failures when FFT size is changed. https://bugs.webkit.org/show_bug.cgi?id=66916 Reviewed by Kenneth Russell. Test: webaudio/fft-sizing.html * webaudio/RealtimeAnalyser.cpp: (WebCore::RealtimeAnalyser::setFftSize): Assert size sanity. (WebCore::RealtimeAnalyser::doFFTAnalysis): Iterate the correct number of times over magnitudeBuffer. * webaudio/RealtimeAnalyser.h: Put member fields in the correct order (Min before Max). 2011-08-29 Abhishek Arya <inferno@chromium.org> Crash in InlineBox::deleteLine due to accessing removed renderer. https://bugs.webkit.org/show_bug.cgi?id=66015 Reviewed by Simon Fraser. Test: fast/block/line-layout/inline-box-wrapper-crash.html * rendering/RenderBox.cpp: (WebCore::RenderBox::positionLineBox): Make sure that the previous inline box wrapper is destroyed properly, before setting a new one. 2011-08-29 Alexey Proskuryakov <ap@apple.com> Lion build fix. * WebCore.exp.in: We have different definitions of CFURLStorageSessionRef on different versions of Mac OS X, and need separate exports. 2011-08-29 Tony Chang <tony@chromium.org> Implement -webkit-flex-pack for horizontal flexboxen https://bugs.webkit.org/show_bug.cgi?id=66898 Reviewed by Ojan Vafai. Test: css3/flexbox/004.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::hasPackingSpace): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithmHorizontal): 2011-08-29 Alexey Proskuryakov <ap@apple.com> Windows build fix. * platform/network/cf/CookieJarCFNet.cpp: (WebCore::setCookies): (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): (WebCore::getHostnamesWithCookies): (WebCore::deleteCookiesForHostname): (WebCore::deleteAllCookies): Updated for new function name and signature: currentCFHTTPCookieStorage(). 2011-08-29 Alexey Proskuryakov <ap@apple.com> Mac build fix. * platform/network/cf/CookieStorageCFNet.cpp: Move Windows specific includes into PLATFORM(WIN). 2011-08-29 Andreas Kling <kling@webkit.org> Viewing a post on reddit.com wastes a lot of memory on event listeners. https://bugs.webkit.org/show_bug.cgi?id=67133 Reviewed by Darin Adler. Specialize the HashMap used to store registered listeners on an EventTarget to have a minimum size of 32 (rather than the default 64.) It's very rare for pages to register listeners for so many different events and this cuts memory consumption in half for the common case. As an example, for a typical post on the reddit.com front page, this reduces memory used by ~700kB on 64-bit. * dom/EventTarget.h: 2011-08-29 Stephen White <senorblanco@chromium.org> Skia's accelerated canvas 2D implementation should use GrTexture, not DrawingBuffer https://bugs.webkit.org/show_bug.cgi?id=67050 Reviewed by Kenneth Russell. Covered by existing tests. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::create): (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::drawsContent): Construct Canvas2DLayerChromium with a GraphicsContext3D, not a DrawingBuffer. (WebCore::Canvas2DLayerChromium::updateCompositorResources): Flush the GrContext and GraphicsContext3D on compositor update. * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/CanvasLayerChromium.cpp: (WebCore::CanvasLayerChromium::CanvasLayerChromium): * platform/graphics/chromium/CanvasLayerChromium.h: Put textureId() back on the base class (CanvasLayerChromium) and de-virtualize it. (WebCore::CanvasLayerChromium::textureId): (WebCore::CanvasLayerChromium::setTextureId): Move m_textureId from WebGLLayerChromium, since canvas2D now uses it too. Provide getters and setters. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): (WebCore::DrawingBuffer::~DrawingBuffer): Remove all Canvas2D-related calls from DrawingBuffer. (WebCore::DrawingBuffer::publishToPlatformLayer): Remove GrContext::flush call, since it's now handled by the platform layer. (WebCore::DrawingBuffer::platformLayer): Return NULL for now (WebGL may rescussitate this later). * platform/graphics/chromium/GraphicsLayerChromium.cpp: Remove a useless #include. * platform/graphics/chromium/ImageBufferDataSkia.h: Add ownership of the Canvas2DLayerChromium. * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::WebGLLayerChromium): * platform/graphics/chromium/WebGLLayerChromium.h: Remove all texture ID stuff (now on base class). * platform/graphics/gpu/DrawingBuffer.h: Remove Canvas2DLayerChromium and all Ganesh datatypes from DrawingBuffer, since it's no longer used by canvas2D. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): On accelerated ImageBuffer creation, create a GrTexture instead of a DrawingBuffer. If all is cool, create and set the SkGpuDevice here, and create a Canvas2DLayerChromium platform layer. (WebCore::ImageBuffer::platformLayer): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: Remove all GrContext creation and DrawingBuffer "scraping" from PlatformContextSkia::setGraphicsContext3D(). This is handled in the ImageBuffer constructor instead. 2011-08-26 Alexey Proskuryakov <ap@apple.com> DumpRenderTree should begin each test with an empty cookie store https://bugs.webkit.org/show_bug.cgi?id=63545 <rdar://problem/5666907> Reviewed by Darin Adler. Use a clean CFURLStorageSession when this functionality is available. * WebCore.exp.in: Added exports * platform/mac/CookieJar.mm: (WebCore::cookies): (WebCore::cookieRequestHeaderFieldValue): (WebCore::setCookies): (WebCore::cookiesEnabled): (WebCore::getRawCookies): (WebCore::deleteCookie): Updated for privateBrowsingCookieStorage->currentCFHTTPCookieStorage change. * platform/network/CookieStorage.h: Moved CFNetwork specific declarations to CookieStorageCFNet.h. * platform/network/ResourceHandle.cpp: Moved CFNetwork specific code to ResourceHandleCFNet.cpp. This file contains cross platform functionality, and we no longer need to put code in it to share it between Mac and Windows. * platform/network/ResourceHandle.h: Expose methods to manipulate default session on Mac, too. * platform/network/cf/CookieStorageCFNet.cpp: (WebCore::cookieStorageOverride): Make it clear that this override is only for a Windows API. (WebCore::overrideCookieStorage): Ditto. (WebCore::currentCFHTTPCookieStorage): We no longer store a cookie storage in a static variable, unless it has been overridden on Windows. We can always get it from a session. (WebCore::setCookieStoragePrivateBrowsingEnabled): There is nothing to do here - we'll just use private session's storage. Note that Mac has a separate code path for OS versions that don't support sessions. * platform/network/cf/CookieStorageCFNet.h: Changed exposed methods for more clarity. * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::makeFinalRequest): Updated for currentCookieStorage->currentCFHTTPCookieStorage change. (WebCore::ResourceHandle::createPrivateBrowsingStorageSession): Moved out of USE(CFNETWORK), as this function is also used with NSURLConnection when sessions are enabled. (WebCore::ResourceHandle::currentStorageSession): Ditto. Removed an #if since default session is now supported on Mac, too. (WebCore::defaultCFURLStorageSession): Moved out of USE(CFNETWORK). (WebCore::ResourceHandle::setDefaultStorageSession): Moved out of USE(CFNETWORK). No longer adopt the session, because nothing in method name says that it will steal a reference from the caller. (WebCore::ResourceHandle::defaultStorageSession): Moved out of USE(CFNETWORK). (WebCore::privateStorageSession): Moved from ResourceHandle.cpp. (WebCore::privateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingEnabled): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSession): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::setPrivateBrowsingStorageSessionIdentifierBase): Moved from ResourceHandle.cpp. (WebCore::ResourceHandle::privateBrowsingStorageSessionIdentifierDefaultBase): Moved from ResourceHandle.cpp. * platform/network/mac/CookieStorageMac.mm: (WebCore::setCookieStoragePrivateBrowsingEnabled): We no longer store a reference to cookie storage in a static variable, so nothing to do here. On older OS versiosn, we still need to enable legacy private browsing mode. * platform/network/mac/ResourceHandleMac.mm: (WebCore::shouldRelaxThirdPartyCookiePolicy): Updated to use the new currentCFHTTPCookieStorage function. 2011-08-22 David Levin <levin@chromium.org> postMessage raises INVALID_STATE_ERR instead of DATA_CLONE_ERR in many cases. https://bugs.webkit.org/show_bug.cgi?id=66713 Reviewed by Dmitry Titov. See http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#posting-messages for postMessage * bindings/js/JSMessagePortCustom.cpp: (WebCore::fillMessagePortArray): * bindings/v8/custom/V8MessagePortCustom.cpp: (WebCore::getMessagePortArray): * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): (WebCore::MessagePort::disentanglePorts): 2011-08-29 Tom Zakrajsek <tomz@codeaurora.org> canvas arc() missing line to start of arc if swing is zero https://bugs.webkit.org/show_bug.cgi?id=55696 Reviewed by Andreas Kling. Test: fast/canvas/canvas-arc-zero-lineto.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::arc): 2011-08-23 Chris Marrin <cmarrin@apple.com> [mac] requestAnimationFrame support for mac port https://bugs.webkit.org/show_bug.cgi?id=59146 Reviewed by Simon Fraser. Enable REQUEST_ANIMATION_FRAME logic and add ScriptedAnimationController to build. Added JavaScript support for Mac, too. * CodeGenerators.pri: * Configurations/FeatureDefines.xcconfig: * DerivedSources.make: * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSRequestAnimationFrameCallbackCustom.cpp: Added. (WebCore::JSRequestAnimationFrameCallback::handleEvent): * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): * dom/RequestAnimationFrameCallback.idl: 2011-08-29 Alexander Pavlov <apavlov@chromium.org> Web Inspector: <button hidden>..</button> has a different computed "display" value than "none" https://bugs.webkit.org/show_bug.cgi?id=67124 Attribute styles have a higher priority than user agent styles and thus should be rendered above them. Reviewed by Yury Semikhatsky. * inspector/front-end/StylesSidebarPane.js: (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules): (WebInspector.StylesSidebarPane.prototype._rebuildStyleRules.get continue): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: rename sourceFile to (raw|ui)SourceCode in DebuggerPresentationModel. https://bugs.webkit.org/show_bug.cgi?id=66769 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.uiSourceCode): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._scriptLocationToUILocation): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._uiLocationToScriptLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor.didGetLocation): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation.updateAnchor): (WebInspector.DebuggerPresentationModel.prototype.linkifyLocation): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype._uiSourceCodeReplaced): (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource.didEditScriptSource): (WebInspector.DebuggerPresentationModel.prototype.setScriptSource): (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage.didGetUILocation): (WebInspector.DebuggerPresentationModel.prototype._addConsoleMessage): (WebInspector.DebuggerPresentationModel.prototype._consoleCleared): (WebInspector.DebuggerPresentationModel.prototype.continueToLine): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused): (WebInspector.DebuggerPresentationModel.prototype._rawSourceCodeForScript): (WebInspector.DebuggerPresentationModel.prototype._scriptForRawSourceCode): (WebInspector.DebuggerPresentationModel.prototype._createRawSourceCodeId): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationBreakpoint): (WebInspector.PresenationCallFrame.prototype.sourceLine.didGetUILocation): (WebInspector.PresenationCallFrame.prototype.sourceLine): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.canSetContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype.setContent): (WebInspector.DebuggerPresentationModelResourceBinding.prototype._setContentWithInitialContent): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._sourceFrameLoaded): (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): (WebInspector.ScriptsPanel.prototype._callFrameSelected): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.requestContent): (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.rawLocationToUILocation): (WebInspector.UILocation): 2011-08-29 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: cached permanent redirects don't show redirect code and text in Network panel. https://bugs.webkit.org/show_bug.cgi?id=67126 Reviewed by Yury Semikhatsky. * inspector/InspectorResourceAgent.cpp: (WebCore::buildObjectForResourceResponse): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract FormattedContentProvider from RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=66938 Reviewed by Pavel Feldman. * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._setContentProvider): (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.RawSourceCode.prototype._didRequestContent): (WebInspector.FormattedContentProvider): (WebInspector.FormattedContentProvider.prototype.requestContent.didRequestContent.didFormatContent): (WebInspector.FormattedContentProvider.prototype.requestContent): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: link UISourceCode to RawSourceCode. https://bugs.webkit.org/show_bug.cgi?id=66944 Reviewed by Pavel Feldman. * inspector/front-end/UISourceCode.js: (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.get rawSourceCode): 2011-08-25 Pavel Podivilov <podivilov@chromium.org> Web Inspector: remove RawSourceCode.setFormatted. https://bugs.webkit.org/show_bug.cgi?id=66947 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): 2011-08-26 Pavel Podivilov <podivilov@chromium.org> Web Inspector: Debugger.setBreakpointByUrl should return error when setting breakpoint on the same location twice. https://bugs.webkit.org/show_bug.cgi?id=67030 Reviewed by Pavel Feldman. Test: inspector/debugger/set-breakpoint.html * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): 2011-08-29 Matthew Delaney <mdelaney@apple.com> fast/canvas/shadow-offset-*.html fail on Leopard/Snow Leopard when removing the work around for <rdar://problem/5539388>. https://bugs.webkit.org/show_bug.cgi?id=67107 Reviewed by David Levin. No new tests. Effectively reverting the change from https://bugs.webkit.org/show_bug.cgi?id=67052 for Leopard and SL because it caused test regressions on Leopard and SL, but not Lion. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::setPlatformShadow): 2011-08-29 Zoltan Herczeg <zherczeg@webkit.org> [Qt] Unreviewed minimal-build buildfix after r93937. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintInnerSpinButton): * platform/qt/RenderThemeQt.h: 2011-08-28 Keishi Hattori <keishi@webkit.org> Chromium Win: Setting square-button appearance reaches NOTREACHED https://bugs.webkit.org/show_bug.cgi?id=66918 Reviewed by Kent Tamura. Test: fast/css/square-button-appearance.html * rendering/RenderThemeChromiumWin.cpp: (WebCore::supportsFocus): Add case for SquareButtonPart. (WebCore::RenderThemeChromiumWin::supportsFocusRing): Add case for SquareButtonPart. (WebCore::RenderThemeChromiumWin::getThemeData): Add case for SquareButtonPart. 2011-08-28 Luke Macpherson <macpherson@chromium.org> Fix reference counting of values in CSSSelector. https://bugs.webkit.org/show_bug.cgi?id=66452 Reviewed by Darin Adler. No new tests / no functionality changed. Call deref when reassigning the value. * css/CSSSelector.h: (WebCore::CSSSelector::setValue): 2011-08-28 Sam Weinig <sam@webkit.org> Add support for constructor syntax for Events https://bugs.webkit.org/show_bug.cgi?id=63878 Reviewed by Oliver Hunt. Add basic support for Event constructors, starting with just supporting the constructor for the base Event class and just JSC support. This lays the infrastructure for the other events as well. Test: fast/events/event-constructors.html * GNUmakefile.list.am: * UseJSC.cmake: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSBindingsAllInOne.cpp: Add files. * bindings/generic/EventConstructors.h: Added. Add binding agnostic header that defines the Event initializers using a macro based DSL. * bindings/js/JSEventConstructors.cpp: Added. (WebCore::convertValue): (WebCore::tryGetProperty): (WebCore::constructJSEventWithInitializer): Add JSC implementation of Event initializer DSL. * dom/Event.cpp: (WebCore::EventInit::EventInit): (WebCore::Event::Event): * dom/Event.h: (WebCore::Event::create): Add Event initializer interface for base Event. * dom/Event.idl: Mark Event as having a custom constructor function. 2011-08-27 Andreas Kling <kling@webkit.org> SQLiteStatement::getColumnText() could construct WTF::String result more efficiently. https://bugs.webkit.org/show_bug.cgi?id=67090 Reviewed by Darin Adler. * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::getColumnText): Use sqlite3_column_bytes16() to get the length of the column text without looking for the null terminator. 2011-08-07 Robert Hogan <robert@webkit.org> The child div element with position:absolute will overlap with its parent div when a 'break' element is present in between https://bugs.webkit.org/show_bug.cgi?id=21934 Reviewed by David Hyatt. Test: fast/block/positioning/absolute-appended-to-inline.html Appending a positioned child node to an inline flow should dirty the lines in the flow, just as inserting a positioned child node does. Treating an appended and inserted node differently meant that updating the display type from 'none' to 'block' for the following markup would result in the div getting positioned correctly under the line block: <div><a onMouseOver="mopen()">Hover</a><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"><br></div></div> but this would not happen with the following markup (the <br> is before the child div rather than after it): <div><a onMouseOver="mopen()">Hover</a><br><div style="display:none; position:absolute; background:#4682b4; height:10px; width:20px"></div></div> This problem is specific to cases where an object is appended to a line block whose last child is a <br>. When the line is relaid out after appending the positioned object the last line in the line block is always considered dirty unless it broke cleanly (ie. with a <br>, see RenderBlock::determineStartPosition), So in the second case above, the clean break and failing to dirty any lines in the block when appending the object means that the line block doesn't get relaid out to position the new positioned object relative to its containing line block. So the change could special-case appending a node when the previous sibling isBR(), but it seems just as well to behave the same way as insertChildNode(). * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::appendChildNode): Call dirtyLinesFromChangedChild() if the child is positioned, just like insertChildNode(). 2011-08-27 Anders Carlsson <andersca@apple.com> iChat: Receiving a message containing only a single-quote (') causes bubble to fail https://bugs.webkit.org/show_bug.cgi?id=67076 <rdar://problem/10026089> Reviewed by Dan Bernstein. Test: fast/borders/border-fit-2.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::borderFitAdjust): Make sure that the resulting rect isn't smaller than the border + padding. (WebCore::RenderBlock::clearTruncation): Fix blatant coding style violations. 2011-08-27 Andreas Kling <kling@webkit.org> Shrink RenderLayer. https://bugs.webkit.org/show_bug.cgi?id=67089 Reviewed by Antonio Gomes. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::RenderLayer): * rendering/RenderLayer.h: Make m_inResizeMode a bitfield, shrinking RenderLayer by 8 bytes (on 64-bit.) 2011-08-27 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end https://bugs.webkit.org/show_bug.cgi?id=63553 calculateAnimationPercentAndRepeat() is returning 1, which means 100%, whenever elapsed >= m_intervalEnd, but this is wrong because m_intervalEnd can be in the middle of the animation duration. (e.g. begin="0s" end="2s" dur="3s") This change makes the function return the animations's true progress instead of 100% when the animation ends. Test: svg/animations/animate-end-attribute.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-27 Jarred Nicholls <jarred@sencha.com> [Qt] Need spin-button implementation https://bugs.webkit.org/show_bug.cgi?id=65896 Reviewed by Kenneth Rohde Christiansen. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustInnerSpinButtonStyle): (WebCore::RenderThemeQt::paintInnerSpinButton): * platform/qt/RenderThemeQt.h: 2011-08-26 Xiaomei Ji <xji@chromium.org> Regression(91788): Bad cast in WebCore::blockWithNextLineBox https://bugs.webkit.org/show_bug.cgi?id=66090 Reviewed by Ryosuke Niwa. This is more like (but not exactly) a revert of r91788. It does not search for previous or next root inline box in different render object, which completely eliminates the cause of this issue. And it removes createPositionAvoidingIgnoredNode(), changed its caller to use createLegacyEditingPosition(). createPositionAvoidingIgnoredNode is not correct when node is a replaced element whose caretMaxOffset could be greater than 1. Tests: editing/selection/move-by-word-visually-crash-test-1.html editing/selection/move-by-word-visually-crash-test-2.html editing/selection/move-by-word-visually-crash-test-3.html editing/selection/move-by-word-visually-crash-test-4.html * editing/htmlediting.cpp: * editing/htmlediting.h: * editing/visible_units.cpp: (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): (WebCore::leftmostPositionInRTLBoxInLTRBlock): (WebCore::rightmostPositionInLTRBoxInRTLBlock): (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality): (WebCore::appendPositionAtLogicalEndOfLine): (WebCore::leftInlineBox): (WebCore::rightInlineBox): 2011-08-26 James Robinson <jamesr@chromium.org> [Chromium] Possible leak of LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=66981 Reviewed by Kenneth Russell. Fix a number of reference cycle leaks that prevent LayerRendererChromiums from being destroyed when a tab is closed. Not possible to write a layout test where an entire WebView goes away. * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::~GraphicsLayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::clearRenderSurfacesOnCCLayerImplRecursive): (WebCore::LayerRendererChromium::clearRootCCLayerImpl): (WebCore::LayerRendererChromium::cleanupSharedObjects): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::setRootLayer): 2011-08-26 Nate Chapin <japhet@chromium.org> Move allowCredentials from ThreadableLoaderOptions down to ResourceLoaderOptions. This allows us to remove getShouldUseCredentialStorage() from SubresourceLoaderClient and check allowCredentials in ResourceLoader. https://bugs.webkit.org/show_bug.cgi?id=65330 Reviewed by Alexey Proskuryakov. No new tests, refractor only. * loader/DocumentThreadableLoader.cpp: * loader/DocumentThreadableLoader.h: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::shouldUseCredentialStorage): Check m_options.allowCredentials instead of calling a client. * loader/ResourceLoaderOptions.h: * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/SubresourceLoaderClient.h: * loader/ThreadableLoader.h: * loader/cache/CachedResourceRequest.cpp: 2011-08-26 Ojan Vafai <ojan@chromium.org> change the default preferred width of the flex() function to 0px per the new spec https://bugs.webkit.org/show_bug.cgi?id=67067 Reviewed by Tony Chang. * css/CSSParser.cpp: (WebCore::CSSParser::parseFlex): 2011-08-26 Matthew Delaney <mdelaney@apple.com> Remove offset hack from GraphicsContextCG setShadow code https://bugs.webkit.org/show_bug.cgi?id=67052 Reviewed by Simon Fraser. No new tests - current tests cover it. * platform/graphics/cg/GraphicsContextCG.cpp: Removing the offset hack introduced in http://trac.webkit.org/changeset/28714 for an issue with offsets in an old version of CoreGraphics that's long since been fixed. 2011-08-26 Alexey Proskuryakov <ap@apple.com> Get rid of frame life support timer https://bugs.webkit.org/show_bug.cgi?id=66874 Reviewed by Geoff Garen. V8 fixes courtesy of Dmitry Titov. Test: fast/frames/detached-frame-property.html * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSDOMWindowBase.h: * bindings/js/ScriptController.cpp: (WebCore::ScriptController::evaluateInWorld): * bindings/v8/ScriptController.cpp: (WebCore::ScriptController::evaluate): * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::runScript): (WebCore::V8Proxy::callFunction): (WebCore::V8Proxy::newInstance): * page/Frame.cpp: (WebCore::Frame::Frame): (WebCore::Frame::~Frame): (WebCore::Frame::pageDestroyed): * page/Frame.h: * page/Page.cpp: (WebCore::Page::~Page): Removed all code that dealt with the life support timer. Protect Frame inside runScript() and callFunction() for v8 bindings. * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): Replaced ref/deref calls on self with a RefPtr. 2011-08-26 Ned Holbrook <nholbrook@apple.com> RenderText::computePreferredLogicalWidths() should measure words with trailing spaces https://bugs.webkit.org/show_bug.cgi?id=66733 Reviewed by Dan Bernstein. Test: fast/text/complex-preferred-logical-widths.html * rendering/RenderText.cpp: (WebCore::RenderText::computePreferredLogicalWidths): Apply logic from RenderBlock::LineBreaker::nextLineBreak(). 2011-08-26 Tony Chang <tony@chromium.org> Add CSS parsing for -webkit-flex-align https://bugs.webkit.org/show_bug.cgi?id=66726 Reviewed by Ojan Vafai. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexAlign): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/CSSValueKeywords.in: * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexAlign): (WebCore::InheritedFlags::setFlexAlign): (WebCore::InheritedFlags::initialFlexAlign): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-26 Nate Chapin <japhet@chromium.org> Fix http/tests/misc/willCacheResponse-delegate-callback.html after r93886. We're implicitly converting an enum to a bool. Rubber-stamped by David Levin. * loader/mac/ResourceLoaderMac.mm: (WebCore::ResourceLoader::willCacheResponse): 2011-08-26 Chris Rogers <crogers@google.com> Add MediaPlayer::audioSourceProvider() method for audio stream access by the Web Audio API. https://bugs.webkit.org/show_bug.cgi?id=66398 Reviewed by Eric Carlson. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): (WebCore::HTMLMediaElement::prepareForLoad): (WebCore::HTMLMediaElement::loadNextSourceChild): (WebCore::HTMLMediaElement::ensureMediaPlayer): (WebCore::HTMLMediaElement::createMediaPlayer): MediaPlayer creation has now been put into createMediaPlayer() instead of it being created separately in these various methods. It has been made thread-safe for use with the Web Audio API in conjunction with an MediaElementAudioSourceNode. (WebCore::HTMLMediaElement::setAudioSourceNode): (WebCore::HTMLMediaElement::audioSourceProvider): * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::audioSourceNode): The HTMLMediaElement now keeps track of an optional MediaElementAudioSourceNode if the audio stream is being processed using the Web Audio API. * platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::audioSourceProvider): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::audioSourceProvider): MediaPlayer now has an audioSourceProvider() method with a default "empty" implementation. audioSourceProvider() returns an AudioSourceProvider object which the Web Audio API's MediaElementAudioSourceNode uses (indirectly through an HTMLMediaElement method) to get the rendered audio stream. * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: AudioContext::createMediaElementSource() is now more careful to check that an HTMLMediaElement doesn't already have a MediaElementAudioSourceNode attached to it. * webaudio/MediaElementAudioSourceNode.cpp: (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::process): (WebCore::MediaElementAudioSourceNode::lock): (WebCore::MediaElementAudioSourceNode::unlock): * webaudio/MediaElementAudioSourceNode.h: Implement thread-safe processing (replacing the old stub implementation). 2011-08-23 Stephen White <senorblanco@chromium.org> Assertion fires if canvas is resized while save() active https://bugs.webkit.org/show_bug.cgi?id=66710 Reviewed by Simon Fraser. Test: fast/canvas/resize-while-save-active.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): Call CanvasRenderingContext2D::reset() before resizing the canvas, so that the GraphicsContext state stack can be unwound. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::unwindStateStack): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): Refactor the state stack unwinding code from the destructor to unwindStateStack() (new). (WebCore::CanvasRenderingContext2D::reset): Unwind the GraphicsContext state stack when the context is reset. * html/canvas/CanvasRenderingContext2D.h: 2011-08-26 Darin Adler <darin@apple.com> [Mac] Use the progress cursor instead of the wristwatch for CSS "wait" cursor https://bugs.webkit.org/show_bug.cgi?id=67049 Reviewed by Beth Dakin. * platform/mac/CursorMac.mm: (WebCore::Cursor::ensurePlatformCursor): Use BusyButClickable cursor for wait as well as for Progress. 2011-08-26 Nate Chapin <japhet@chromium.org> Fix gtk build after r93886. * platform/track/CueParser.cpp: (WebCore::CueParser::load): 2011-08-26 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Update searchableIndexIntroduction() to match GTK+'s. https://bugs.webkit.org/show_bug.cgi?id=66885 Reviewed by Gustavo Noronha Silva. Using this new string allows us to share the test expectations with other ports, and thus makes fast/replaced/table-percent-height-text-controls.html pass. No new tests, as this is covered by an existing one. * platform/efl/LocalizedStringsEfl.cpp: (WebCore::searchableIndexIntroduction): 2011-08-26 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Do not log an error if a fallback cursor cannot be found. https://bugs.webkit.org/show_bug.cgi?id=67037 Reviewed by Gustavo Noronha Silva. Ecore_X does not necessarily have to be used (DumpRenderTree does not use it, for example), so showing an error message here is bogus. No new tests, as it just removes erroneous error messages from when running DRT with existing tests. * platform/efl/WidgetEfl.cpp: (WebCore::Widget::applyFallbackCursor): 2011-08-26 Nate Chapin <japhet@chromium.org> Change a bunch of nondescript bools to descriptive enums in ResourceLoaderOptions and ThreadableLoaderOptions. https://bugs.webkit.org/show_bug.cgi?id=66984 Reviewed by David Levin. No new tests, no functionality change intended. * WebCore.exp.in: * fileapi/FileReaderLoader.cpp: * html/MediaDocument.cpp: * html/PluginDocument.cpp: * loader/CrossOriginAccessControl.cpp: * loader/CrossOriginAccessControl.h: * loader/CrossOriginPreflightResultCache.cpp: * loader/CrossOriginPreflightResultCache.h: * loader/DocumentThreadableLoader.cpp: * loader/FrameLoader.h: * loader/ImageLoader.cpp: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: * loader/ResourceLoader.h: * loader/ResourceLoaderOptions.h: * loader/ThreadableLoader.h: * loader/cache/CachedResource.cpp: * loader/cache/CachedResourceRequest.cpp: * loader/cf/ResourceLoaderCFNet.cpp: * loader/mac/ResourceLoaderMac.mm: * page/EventSource.cpp: * platform/network/ResourceHandle.h: * workers/WorkerScriptLoader.cpp: * xml/XMLHttpRequest.cpp: 2011-08-26 Andreas Kling <kling@webkit.org> HTMLMetaElement: Don't cache "http-equiv" and "content" attributes. https://bugs.webkit.org/show_bug.cgi?id=67040 Reviewed by Darin Adler. * html/HTMLMetaElement.h: Remove m_equiv and m_content members, shrinking HTMLMetaElement by 16 bytes (on 64-bit.) * html/HTMLMetaElement.cpp: (WebCore::HTMLMetaElement::parseMappedAttribute): (WebCore::HTMLMetaElement::process): Implemented using fastGetAttribute(). 2011-08-26 Pavel Feldman <pfeldman@google.com> Web Inspector: [REGRESSION] No way to expand hovered objects while debugging. https://bugs.webkit.org/show_bug.cgi?id=67039 Reviewed by Yury Semikhatsky. * inspector/front-end/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.show): (WebInspector.PopoverHelper.prototype._mouseDown): (WebInspector.PopoverHelper.prototype._hidePopover): (WebInspector.PopoverHelper.prototype._mouseHover): (WebInspector.PopoverHelper.prototype._killHidePopoverTimer): 2011-08-26 Pavel Podivilov <podivilov@chromium.org> Unreviewed, rolling out r93870. http://trac.webkit.org/changeset/93870 https://bugs.webkit.org/show_bug.cgi?id=65203 Broke i18n chromium tests * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::init): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::initializeForGDI): (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::~TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::~TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::hdc): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::~TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed): * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: (WebCore::windowsCanHandleDrawTextShadow): (WebCore::windowsCanHandleTextDrawing): (WebCore::windowsCanHandleTextDrawingWithoutShadow): * platform/graphics/skia/SkiaFontWin.h: 2011-08-26 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Use a custom pattern image for rubber banding overhang area https://bugs.webkit.org/show_bug.cgi?id=66707 Also roll Chromium revision to 98101, to include dependency: http://codereview.chromium.org/7714036/ Reviewed by Dimitri Glazkov. No new tests since its just changing the Chromium-specific overhang pattern. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-26 Eric Carlson <eric.carlson@apple.com> <video> playlist can not advance when playing in background tab https://bugs.webkit.org/show_bug.cgi?id=66978 Reviewed by Darin Adler. No new tests added because it isn't possible to simulate a background tab in DRT. * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequirePageConsentToLoadMedia restriction. (WebCore::HTMLMediaElement::loadInternal): Don't consider page->canStartMedia if it has ever allowed a file to load. * html/HTMLMediaElement.h: (WebCore::HTMLMediaElement::requirePageConsentToLoadMedia): New. (WebCore::HTMLMediaElement::removeBehaviorRestriction): New. 2011-08-26 Andreas Kling <kling@webkit.org> [Qt] Path::boundingRect() is unnecessarily slow. https://bugs.webkit.org/show_bug.cgi?id=66854 Reviewed by Benjamin Poulain. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): Remove Qt-specific optimization since calling Path::boundingRect() will now do exactly the same thing. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): Return QPainterPath::controlPointRect() since that is much faster than computing the (precise) QPainterPath::boundingRect() and Path::boundingRect() is not expected to be 100% precise anyway. 2011-08-26 Gavin Peters <gavinp@chromium.org> add a state enumeration to track down cause of null CachedScript execution https://bugs.webkit.org/show_bug.cgi?id=66939 Reviewed by Alexey Proskuryakov. Over in http://code.google.com/p/chromium/issues/detail?id=75604 I have a bug I cannot reproduce. I added an earlier crash in https://bugs.webkit.org/show_bug.cgi?id=65563 , and we've since gotten many good stacks, all coming in through a failed request that eventually calls notifyFinished() on a ScriptElement with a NULL m_cachedScript. I'd like to know how this got NULL. This enumeration should let me find that in stack dumps from reproductions. No new tests, as my goal here is to get telemetry on a bug that I cannot reproduce. * dom/ScriptElement.cpp: (WebCore::ScriptElement::ScriptElement): (WebCore::ScriptElement::requestScript): (WebCore::ScriptElement::stopLoadRequest): (WebCore::ScriptElement::notifyFinished): * dom/ScriptElement.h: 2011-08-26 Mike Reed <reed@google.com> [skia] never draw with GDI, so that all text can be gpu-accelerated https://bugs.webkit.org/show_bug.cgi?id=65203 Reviewed by Kenneth Russell. * platform/graphics/chromium/FontChromiumWin.cpp: (WebCore::TransparencyAwareFontPainter::TransparencyAwareFontPainter::TransparencyAwareFontPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::TransparencyAwareGlyphPainter): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::TransparencyAwareUniscribePainter): (WebCore::drawGlyphsWin): (WebCore::Font::drawComplexText): * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::draw): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: * platform/graphics/skia/SkiaFontWin.cpp: * platform/graphics/skia/SkiaFontWin.h: 2011-08-26 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: in some cases Popover code is failing to calculate popover box position. https://bugs.webkit.org/show_bug.cgi?id=67029 Reviewed by Yury Semikhatsky. * inspector/front-end/Popover.js: (WebInspector.Popover.prototype._positionElement): 2011-08-26 Nikolas Zimmermann <nzimmermann@rim.com> [Qt] http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm fails intermittently https://bugs.webkit.org/show_bug.cgi?id=65969 Reviewed by Zoltan Herczeg. Fix intrinsic size negotiation flakiness, most visible on the Qt port. The http/tests/misc/object-embedding-svg-delayed-size-negotiation-2.htm testcase triggered an assertion on a Qt debug build indicating that the HashSet updateLayoutAndStyleIfNeededRecursive() operates on is mutated while its iterated, leading to an assertion/crash. Due the new forceLayoutParentViewIfNeeded() logic it's no longer safe to directly use the children() HashSet in that method - we have to make a copy first. The second part of the fix is to stop entering forceLayoutParentViewIfNeeded(), if the origin of that call is forceLayoutParentViewIfNeeded() itself. Set m_inLayoutParentView to true before calling FrameView::layout() on our parent frame view - this is only an optimization to avoid doing layout() twice. The third part of the fix is to call updateWidgetPositions() on the parent FrameView, _before_ calling layout() on the parent view itself, as the SVG document needs to report the correct intrinsic size (which can depend on the host object/embed/iframe) when we're running RenderReplaced::layout() on the host renderer. * page/FrameView.cpp: (WebCore::FrameView::FrameView): (WebCore::collectFrameViewChildren): (WebCore::FrameView::forceLayoutParentViewIfNeeded): (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): * page/FrameView.h: 2011-08-26 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Double clicking on numbers in Count & size columns doesn't toggle between values and percents in the Heap Snapshot. https://bugs.webkit.org/show_bug.cgi?id=66988 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._mouseClickInContentsGrid): (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid): 2011-08-26 Shinya Kawanaka <shinyak@google.com> REGRESSION(r93390): Empty or invalid maxlength of an input tag should be ignored. https://bugs.webkit.org/show_bug.cgi?id=67015 Reviewed by Kent Tamura. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMaxLengthAttribute): Checks the validity of maxlength attribute when converting it to integer. 2011-08-25 Yuta Kitamura <yutak@chromium.org> WebSocket: Fix indentation of WebSocket header files https://bugs.webkit.org/show_bug.cgi?id=67018 Reviewed by Kent Tamura. No new tests. Style fix only. * websockets/WebSocket.h: (WebCore::WebSocket::create): (WebCore::WebSocket::toWebSocket): (WebCore::WebSocket::refEventTarget): (WebCore::WebSocket::derefEventTarget): * websockets/WebSocketChannel.h: Removed formal parameter name of resumeTimerFired(). (WebCore::WebSocketChannel::create): (WebCore::WebSocketChannel::refThreadableWebSocketChannel): (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): (WebCore::WebSocketChannel::isNonControlOpCode): (WebCore::WebSocketChannel::isControlOpCode): (WebCore::WebSocketChannel::isReservedOpCode): * websockets/WebSocketHandshake.h: Removed formal parameter name of setClientProtocol(). 2011-08-25 Martin Robinson <mrobinson@igalia.com> Touch GtkVersioning.c so that the release bot rebuilds it. This is necessary because of the switch to GTK+ 3.x. * platform/gtk/GtkVersioning.c: Touch this file. 2011-08-25 Ben Wells <benwells@chromium.org> Use PATH_BASED_BORDER_RADIUS_DRAWING for skia https://bugs.webkit.org/show_bug.cgi?id=65583 This change brings in the new border rendering for Skia. To support this without aliasing the skia graphics context has been updated to support anti-aliased clipping around convex polygons and also anti-aliased clipping outside a path. Reviewed by James Robinson. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipOut): (WebCore::GraphicsContext::clipConvexPolygon): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::clipPathAntiAliased): * rendering/RenderObject.h: 2011-08-25 Luke Macpherson <macpherson@chromium.org> Implement animation and transition properties in CSSStyleApplyProperty. https://bugs.webkit.org/show_bug.cgi?id=66126 Reviewed by Dean Jackson. No new tests. This is essentially a refactoring of the HANDLE_ANIMATION* and HANDLE_TRANSITION* macros in CSSStyleSelector.cpp. The only functional change is to iterate correctly over the lists instead of setting only the first element. See bug 66118 for details on that. * css/CSSStyleApplyProperty.cpp: Added new class ApplyPropertyAnimation to handle animation and transition properties. (WebCore::ApplyPropertyAnimation::ApplyPropertyAnimation): (WebCore::ApplyPropertyAnimation::applyInheritValue): (WebCore::ApplyPropertyAnimation::applyInitialValue): (WebCore::ApplyPropertyAnimation::applyValue): (WebCore::ApplyPropertyAnimation::setValue): (WebCore::ApplyPropertyAnimation::value): (WebCore::ApplyPropertyAnimation::test): (WebCore::ApplyPropertyAnimation::clear): (WebCore::ApplyPropertyAnimation::initial): (WebCore::ApplyPropertyAnimation::map): (WebCore::ApplyPropertyAnimation::accessAnimations): (WebCore::ApplyPropertyAnimation::animations): (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: Removed animation and transition macros (celebrate!) (WebCore::CSSStyleSelector::applyProperty): Removed old implementations of animation and transition properties. * platform/animation/Animation.h: Changed return types of initial values to match the setters and getters. (WebCore::Animation::initialAnimationDelay): (WebCore::Animation::initialAnimationName): (WebCore::Animation::initialAnimationTimingFunction): 2011-08-25 Julien Chaffraix <jchaffraix@webkit.org> Concentrate RenderLayer repaint rects updates https://bugs.webkit.org/show_bug.cgi?id=64993 Reviewed by David Hyatt. The change moves the update of the repaint rects to 2 methods (computeRepaintRects and clearRepaintRects) to better track those changes. No new test, refactoring covered by the existing test cases. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositions): Reverse the logic and calculate the new bounds upfront. This should have no impact as none of the methods rely on the internal value. (WebCore::RenderLayer::computeRepaintRects): Added the cachedOffset parameter to avoid breaking the performance optimization in updateLayerPositions. Added some ASSERTS. (WebCore::RenderLayer::clearRepaintRects): Added some ASSERTs here. (WebCore::RenderLayer::updateRepaintRectsAfterScroll): Added a FIXME as this method could use the cachedOffset trick too. (WebCore::RenderLayer::setHasVisibleContent): Changed the code to use computeRepaintRects. * rendering/RenderLayer.h: Updated the signature of computeRepaintRects and moved those 2 methods into the private section of the class. 2011-08-25 Van Lam <vanlam@google.com> Remove use of magic number -1 in WebCore/editing/visible_units.cpp https://bugs.webkit.org/show_bug.cgi?id=66980 Reviewed by Ryosuke Niwa. Replaced use of magic number -1 with constant offsetNotFound. * editing/visible_units.cpp: (WebCore::greatestOffsetUnder): (WebCore::smallestOffsetAbove): 2011-08-25 Igor Oliveira <igor.oliveira@openbossa.org> Rollout r93799: Caused bad clipping on the bottom of tall glyphs inside a button label * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderBox.cpp: * rendering/RenderBox.h: (WebCore::RenderBox::hasControlClip): (WebCore::RenderBox::controlClipRect): * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 2011-08-25 Ademar de Souza Reis Jr. <ademar.reis@openbossa.org> [Qt] Enable password echo on Symbian builds https://bugs.webkit.org/show_bug.cgi?id=66954 Reviewed by Chang Shu. No tests, as this is just a build change. * config.h: 2011-08-25 Nate Chapin <japhet@chromium.org> Windows build fix after r93811. * loader/cf/ResourceLoaderCFNet.cpp: (WebCore::ResourceLoader::shouldCacheResponse): 2011-08-25 Nate Chapin <japhet@chromium.org> Split some of the variables out of ThreadableLoaderOptions into a superclass, ResourceLoaderOptions. Use ResourceLoaderOptions all the way down to ResourceLoader. https://bugs.webkit.org/show_bug.cgi?id=63301 Reviewed by David Levin. No new tests, refractor only. * GNUmakefile.list.am: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * loader/DocumentThreadableLoader.cpp: * loader/MainResourceLoader.cpp: * loader/NetscapePlugInStreamLoader.cpp: * loader/ResourceLoadScheduler.cpp: * loader/ResourceLoadScheduler.h: * loader/ResourceLoader.cpp: * loader/ResourceLoader.h: * loader/ResourceLoaderOptions.h: Added. * loader/SubresourceLoader.cpp: * loader/SubresourceLoader.h: * loader/ThreadableLoader.h: * loader/cache/CachedResourceRequest.cpp: * loader/mac/ResourceLoaderMac.mm: 2011-08-25 Adam Klein <adamk@chromium.org> use strict in CodeGeneratorJS and CodeGeneratorV8 https://bugs.webkit.org/show_bug.cgi?id=66915 Reviewed by Darin Adler. Making these files "use strict" makes changing them less time-consuming and error-prone, and helps avoid accidentally adding dead code (added a FIXME for one such case). No expected change in behavior. * bindings/scripts/CodeGeneratorJS.pm: (AddIncludesForType): (GenerateParametersCheckExpression): (GenerateFunctionParametersCheck): (GenerateImplementation): (GenerateImplementationFunctionCall): (NativeToJSValue): (GenerateHashValue): * bindings/scripts/CodeGeneratorV8.pm: (AddIncludesForType): (GenerateHeaderNamedAndIndexedPropertyAccessors): (GenerateNormalAttrSetter): (GetFunctionTemplateCallbackName): (GenerateNewFunctionTemplate): (GenerateParametersCheckExpression): (GenerateFunctionParametersCheck): (GenerateImplementation): (): 2011-08-25 Dean Jackson <dino@apple.com> https://bugs.webkit.org/show_bug.cgi?id=21586 Apply CSS animations and transitions to SVG properties Reviewed by Simon Fraser. Expose the applicable SVG properties from SVGRenderStyle to RenderStyle and add them to the list of animatable properties. There aren't many SVG properties that are animatable directly. SVGPaint (used in "fill" and "stroke") is supported only when both ends of the animation are a Color. Also updated SVGLength to have some methods for converting to and from user space units. Test: transitions/svg-transitions.html * page/animation/AnimationBase.cpp: (WebCore::blendFunc): Calls the blend method on SVGLength (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint): New property wrapper type for SVGPaint (WebCore::PropertyWrapperSVGPaint::equals): (WebCore::PropertyWrapperSVGPaint::blend): (WebCore::AnimationBase::ensurePropertyMap): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::fillPaintType): (WebCore::InheritedFlags::fillPaintColor): (WebCore::InheritedFlags::setFillPaintColor): (WebCore::InheritedFlags::strokePaintType): (WebCore::InheritedFlags::strokePaintColor): (WebCore::InheritedFlags::setStrokePaintColor): (WebCore::InheritedFlags::strokeWidth): (WebCore::InheritedFlags::setStrokeWidth): (WebCore::InheritedFlags::strokeDashOffset): (WebCore::InheritedFlags::setStrokeDashOffset): (WebCore::InheritedFlags::strokeMiterLimit): (WebCore::InheritedFlags::setStrokeMiterLimit): (WebCore::InheritedFlags::stopOpacity): (WebCore::InheritedFlags::setStopOpacity): (WebCore::InheritedFlags::setStopColor): (WebCore::InheritedFlags::setFloodColor): (WebCore::InheritedFlags::setLightingColor): (WebCore::InheritedFlags::baselineShiftValue): (WebCore::InheritedFlags::setBaselineShiftValue): (WebCore::InheritedFlags::kerning): (WebCore::InheritedFlags::setKerning): (WebCore::InheritedFlags::stopColor): (WebCore::InheritedFlags::floodColor): (WebCore::InheritedFlags::lightingColor): * rendering/style/SVGRenderStyle.h: (WebCore::SVGRenderStyle::stopColor): (WebCore::SVGRenderStyle::floodColor): (WebCore::SVGRenderStyle::lightingColor): * svg/SVGLength.cpp: (WebCore::SVGLength::value): (WebCore::SVGLength::setValue): (WebCore::SVGLength::convertValueFromUserUnits): (WebCore::SVGLength::convertValueToUserUnits): New conversion functions used when setting and getting values * svg/SVGLength.h: (WebCore::SVGLength::isZero): (WebCore::SVGLength::blend): Custom blend function that takes into account whether the units of a length can be converted in an animation, where you don't necessarily have an SVGElement for context. 2011-08-25 Kent Tamura <tkent@chromium.org> REGRESSION(r90971): Fix an assertion failure with textarea placeholder. https://bugs.webkit.org/show_bug.cgi?id=66164 Reviewed by Dave Hyatt. Minor patch nits addressed by inferno@chromium.org, on Hyatt's review. Test: fast/forms/textarea-placeholder-relayout-assertion.html * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::layoutSpecialExcludedChild): Pass 'false' to the 'markParents' argument of setChildNeedsLayout(). We don't need to propagate needsLayout for ancestors because layoutSpecialExcludedChild() is called from layout() of the parent. 2011-08-25 Igor Oliveira <igor.oliveira@openbossa.org> Text-overflow is broken for button elements https://bugs.webkit.org/show_bug.cgi?id=53438 Fix text-overflow for button elements. Make the element inside the button inherit the button controlClip. Reviewed by David Hyatt. Test: fast/css/button-overflow-ellipsis.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): * rendering/RenderBox.cpp: (WebCore::RenderBox::controlClipRect): * rendering/RenderBox.h: (WebCore::RenderBox::hasControlClip): * rendering/RenderButton.cpp: (WebCore::RenderButton::setupInnerStyle): 2011-08-24 Adrienne Walker <enne@google.com> [chromium] Update VideoLayerChromium to not access GC3D on the main thread https://bugs.webkit.org/show_bug.cgi?id=66434 Reviewed by James Robinson. Covered by existing tests. This change allows the main thread VideoLayerChromium to not depend on compositor thread resources (GC3D, LayerRendererChromium). The texture allocation in VideoLayerChromium was changed to use ManagedTexture so that textures can now be evicted when there is texture memory pressure and so that destruction can be automatically deferred until a GC3D is available. * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/ManagedTexture.cpp: * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::size): (WebCore::ManagedTexture::format): * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::VideoLayerChromium): (WebCore::VideoLayerChromium::~VideoLayerChromium): (WebCore::VideoLayerChromium::cleanupResources): (WebCore::VideoLayerChromium::updateCompositorResources): (WebCore::VideoLayerChromium::pushPropertiesTo): (WebCore::VideoLayerChromium::setLayerTreeHost): (WebCore::VideoLayerChromium::determineTextureFormat): (WebCore::VideoLayerChromium::reserveTextures): (WebCore::VideoLayerChromium::updateTexture): (WebCore::VideoLayerChromium::releaseCurrentFrame): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::contentsTextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.h: * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::setTexture): (WebCore::CCVideoLayerImpl::drawYUV): (WebCore::CCVideoLayerImpl::drawRGBA): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: 2011-08-25 Abhishek Arya <inferno@chromium.org> Incorrect layout of :before and :after content, with display table, table-row and table-cell. https://bugs.webkit.org/show_bug.cgi?id=66699 Reviewed by David Hyatt. Tests: fast/table/table-after-child-in-table.html fast/table/table-before-child-in-table.html fast/table/table-cell-after-child-in-block.html fast/table/table-cell-after-child-in-table.html fast/table/table-cell-before-child-in-block.html fast/table/table-cell-before-child-in-table.html fast/table/table-row-after-child-in-block.html fast/table/table-row-after-child-in-table.html fast/table/table-row-before-child-in-block.html fast/table/table-row-before-child-in-table.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): Fix the looping condition to detect :after child correctly. isAnonymousBlock() does not apply to tables, instead using isAnonymous(). * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::addChild): Don't add the new child in the generatedContainer with :before, :after content. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::addChild): Don't add the new child in the generatedContainer with :before, :after content. 2011-08-25 Sam Weinig <sam@webkit.org> JSHTMLImageElement (and associated Node) is abandoned when image load is canceled via beforeload <rdar://problem/9925630> https://bugs.webkit.org/show_bug.cgi?id=66906 Reviewed by Darin Adler. * loader/ImageLoader.cpp: (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): Very similar fix to the one in r93717 except this patches the case where the image load was canceled via beforeload. 2011-08-25 John Bates <jbates@google.com> [chromium] Leaking SkBitmaps for background images https://bugs.webkit.org/show_bug.cgi?id=66488 Reviewed by Stephen White. This patch simply changes NativeImageSkia to have a SkBitmap instead of deriving from SkBitmap. All dependent code updated to access the member instead of calling SkBitmap methods on NativeImageSkia objects. This may or may not fix the memory leak, but it's definitely a bug that could cause memory leaks. * platform/chromium/DragImageChromiumSkia.cpp: (WebCore::createDragImageFromImage): * platform/graphics/chromium/PlatformImage.cpp: (WebCore::PlatformImage::updateFromImage): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::size): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * platform/graphics/skia/GraphicsContext3DSkia.cpp: (WebCore::GraphicsContext3D::getImageData): * platform/graphics/skia/ImageSkia.cpp: (WebCore::paintSkBitmap): (WebCore::Image::drawPattern): (WebCore::BitmapImage::checkForSolidColor): * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): (WebCore::NativeImageSkia::decodedSize): (WebCore::NativeImageSkia::resizedBitmap): * platform/graphics/skia/NativeImageSkia.h: (WebCore::NativeImageSkia::bitmap): * platform/graphics/skia/PatternSkia.cpp: (WebCore::Pattern::platformPattern): * platform/image-decoders/ImageDecoder.h: (WebCore::ImageFrame::getAddr): * platform/image-decoders/skia/ImageDecoderSkia.cpp: (WebCore::ImageFrame::operator=): (WebCore::ImageFrame::clearPixelData): (WebCore::ImageFrame::zeroFillPixelData): (WebCore::ImageFrame::copyBitmapData): (WebCore::ImageFrame::setSize): (WebCore::ImageFrame::hasAlpha): (WebCore::ImageFrame::setHasAlpha): (WebCore::ImageFrame::width): (WebCore::ImageFrame::height): 2011-08-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93774. http://trac.webkit.org/changeset/93774 https://bugs.webkit.org/show_bug.cgi?id=66945 It broke 26 tests on the Qt bot (Requested by ossy on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): 2011-08-25 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [refactoring] use PopoverHelper to implement popup in the SourceFrame https://bugs.webkit.org/show_bug.cgi?id=66858 Reviewed by Pavel Feldman. * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype._showStringContentPopover): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype.initializeView): (WebInspector.NetworkLogView.prototype.willHide): (WebInspector.NetworkLogView.prototype._reset): (WebInspector.NetworkLogView.prototype.switchToBriefView): (WebInspector.NetworkLogView.prototype._showPopover): * inspector/front-end/Popover.js: (WebInspector.Popover): (WebInspector.Popover.prototype.show): (WebInspector.Popover.prototype.dispose): (WebInspector.PopoverHelper): (WebInspector.PopoverHelper.prototype._mouseMove.doHide): (WebInspector.PopoverHelper.prototype._mouseMove): (WebInspector.PopoverHelper.prototype.hidePopover): (WebInspector.PopoverHelper.prototype._hidePopover): (WebInspector.PopoverHelper.prototype._mouseHover): (WebInspector.PopoverHelper.prototype._killHidePopupTimer): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype._initializeTextViewer): (WebInspector.SourceFrame.prototype._scroll): (WebInspector.SourceFrame.prototype._mouseDown): (WebInspector.SourceFrame.prototype._onHidePopover): (WebInspector.SourceFrame.prototype._shouldShowPopover): (WebInspector.SourceFrame.prototype._getPopoverAnchor): (WebInspector.SourceFrame.prototype._highlightExpression): (WebInspector.SourceFrame.prototype._onShowPopover.showObjectPopover): (WebInspector.SourceFrame.prototype._onShowPopover): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel): (WebInspector.TimelinePanel.prototype._showPopover): (WebInspector.TimelinePanel.prototype._closeRecordDetails): 2011-08-25 Pavel Feldman <pfeldman@google.com> [Qt] REGRESSION(93769): inspector/console/console-tests.html fails https://bugs.webkit.org/show_bug.cgi?id=66930 Reviewed by Yury Semikhatsky. Test: inspector/console/console-repeat-count.html * inspector/front-end/ConsoleModel.js: (WebInspector.ConsoleModel): (WebInspector.ConsoleModel.prototype.addMessage): (WebInspector.ConsoleModel.prototype.clearMessages): (WebInspector.ConsoleModel.prototype.interruptRepeatCount): (WebInspector.ConsoleModel.prototype._messageRepeatCountUpdated): (WebInspector.ConsoleDispatcher.prototype.messageRepeatCountUpdated): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._consoleMessageAdded): * inspector/front-end/inspector.js: 2011-08-25 Mikhail Naganov <mnaganov@chromium.org> Chromium: expose MemoryCache::prune and FontCache::purgeInactiveFontData. https://bugs.webkit.org/show_bug.cgi?id=66132 Reviewed by Tony Gentilcore. * loader/cache/MemoryCache.cpp: (WebCore::MemoryCache::prune): (WebCore::MemoryCache::pruneToPercentage): * loader/cache/MemoryCache.h: Methods moved from .h to .cpp to work around compilation problem with the Win Chromium port. 2011-08-25 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93771. http://trac.webkit.org/changeset/93771 https://bugs.webkit.org/show_bug.cgi?id=66933 Broke css3/font-feature-settings-rendering.html on chromium mac 10.5 (Requested by podivilov on #webkit). * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-08-23 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> [Qt][WK2] Drive tiling from the WebProcess and reuse TiledBackingStore. https://bugs.webkit.org/show_bug.cgi?id=66771 Reviewed by Tor Arne Vestbø. We need the tiling logic to be moved to the web process to allow invalidated tile rects to be rendered with the same layout. This also allows the web process to render tiles into buffers readable directly by the GPU (on supported platforms). We also take the opportunity to use the TiledBackingStore in WebCore to have only one tiling implementation. Before this patch: - TiledDrawingAreaProxy manages tiles from the UI process. - TiledDrawingArea received rendering requests for a rect and returns the result to the proxy through shared memory. After this patch: - TiledDrawingArea uses a TiledBackingStore to manage tiles from the web process. - TiledBackingStoreRemoteTile forwards tile creations, update and removals to the proxy. - TiledDrawingAreaProxy updates the scene graph directly from requests. It also implements tile buffer swapping correctly in SGTileNode, triggered by the DidRenderFrame message. Render throttling is implemented by waiting in TiledDrawingArea for the UI process to notify us when the last rendered frame is ready to make it to the screen. TiledDrawingAreaTileSets have been replaced by using two instances of TiledBackingStore instead. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::updateTileBuffers): (WebCore::TiledBackingStore::coverageRatio): (WebCore::TiledBackingStore::startTileBufferUpdateTimer): * platform/graphics/TiledBackingStore.h: * platform/graphics/TiledBackingStoreClient.h: (WebCore::TiledBackingStoreClient::tiledBackingStoreIsUpdatingAllowed): 2011-08-23 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> TiledBackingStore: Untie the tile implementation from the platform. https://bugs.webkit.org/show_bug.cgi?id=66760 Reviewed by Kenneth Rohde Christiansen. Make the Tile class polymorphic and introduce TiledBackingStoreBackend as a Tile factory. * platform/graphics/Tile.h: (WebCore::Tile::~Tile): * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::TiledBackingStore): (WebCore::TiledBackingStore::paint): (WebCore::TiledBackingStore::createTiles): * platform/graphics/TiledBackingStore.h: (WebCore::TiledBackingStore::client): * platform/graphics/TiledBackingStoreBackend.h: Added. (WebCore::TiledBackingStoreBackend::create): (WebCore::TiledBackingStoreBackend::~TiledBackingStoreBackend): (WebCore::TiledBackingStoreBackend::TiledBackingStoreBackend): * platform/graphics/qt/TileQt.cpp: (WebCore::TileQt::TileQt): (WebCore::TileQt::~TileQt): (WebCore::TileQt::isDirty): (WebCore::TileQt::isReadyToPaint): (WebCore::TileQt::invalidate): (WebCore::TileQt::updateBackBuffer): (WebCore::TileQt::swapBackBufferToFront): (WebCore::TileQt::paint): (WebCore::TiledBackingStoreBackend::paintCheckerPattern): (WebCore::TiledBackingStoreBackend::createTile): * platform/graphics/qt/TileQt.h: Copied from Source/WebCore/platform/graphics/Tile.h. (WebCore::TileQt::create): (WebCore::TileQt::coordinate): (WebCore::TileQt::rect): 2011-08-25 Andreas Kling <kling@webkit.org> [Qt] Path::boundingRect() is unnecessarily slow. https://bugs.webkit.org/show_bug.cgi?id=66854 Reviewed by Benjamin Poulain. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::stroke): Remove Qt-specific optimization since calling Path::boundingRect() will now do exactly the same thing. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::boundingRect): Return QPainterPath::controlPointRect() since that is much faster than computing the (precise) QPainterPath::boundingRect() and Path::boundingRect() is not expected to be 100% precise anyway. 2011-08-25 Yuta Kitamura <yutak@chromium.org> WebSocket: Queue messages to be sent https://bugs.webkit.org/show_bug.cgi?id=66298 Reviewed by Kent Tamura. Blobs must be read asynchronously and thus cannot be sent immediately. Therefore, we need to create a queue of messages to be sent in order to handle pending requests. No new tests. Strictly speaking, there is a small change in behavior but it is hard to reproduce in tests. See description of WebSocketChannel::send below. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::send): Now, this function always returns true if hybi-10 protocol is selected. The impact of this change should be minimum, because the current WebSocket API defines the return type of WebSocket.send() is void (see also bug 65850). It's hard to make SocketStreamHandle::send() fail deliberately, therefore it's difficult to write a test to detect this behavior change. (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::startClosingHandshake): (WebCore::WebSocketChannel::processFrame): (WebCore::WebSocketChannel::enqueueTextFrame): (WebCore::WebSocketChannel::enqueueRawFrame): (WebCore::WebSocketChannel::processOutgoingFrameQueue): (WebCore::WebSocketChannel::abortOutgoingFrameQueue): * websockets/WebSocketChannel.h: 2011-08-24 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Directional arrow on element info box looks terrible https://bugs.webkit.org/show_bug.cgi?id=66819 Beautify the tooltip arrow, give it a better alignment in some edge cases, and fix the tooltip font on Macs. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-08-25 Jeremy Moskovich <jeremy@chromium.org> Remove ATSFont*() functions in favor of CGFont in FontCustomPlatformData.cpp https://bugs.webkit.org/show_bug.cgi?id=66629 As of r72774 and dropping support for OS X 10.4, we can safely remove the ATS APIs from FontCustomPlatformData.cpp in favor of just the CGFont code. This change is motivated by a bug in ATSFontDeactivite() on 10.7 which affects the Chromium port, due to its compiling once against the 10.5 SDK for all platforms - See crbug.com/93191 or rdar://9976774 . Reviewed by Dan Bernstein. No new tests - covered by existing tests. * platform/graphics/mac/FontCustomPlatformData.cpp: (WebCore::FontCustomPlatformData::~FontCustomPlatformData): (WebCore::createFontCustomPlatformData): * platform/graphics/mac/FontCustomPlatformData.h: (WebCore::FontCustomPlatformData::FontCustomPlatformData): 2011-08-25 Pavel Feldman <pfeldman@google.com> Not reviewed: rollout r93768 for breaking build. * inspector/DOMNodeHighlighter.cpp: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: split ConsoleView into the View and the Model. https://bugs.webkit.org/show_bug.cgi?id=66861 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: * inspector/front-end/ConsoleMessage.js: (WebInspector.ConsoleMessage.prototype._format): * inspector/front-end/ConsoleModel.js: Added. (WebInspector.ConsoleModel): (WebInspector.ConsoleModel.prototype._setConsoleMessageExpiredCount): (WebInspector.ConsoleModel.prototype.addMessage): (WebInspector.ConsoleModel.prototype._incrementErrorWarningCount): (WebInspector.ConsoleModel.prototype.requestClearMessages): (WebInspector.ConsoleModel.prototype.clearMessages): (WebInspector.ConsoleDispatcher): (WebInspector.ConsoleDispatcher.prototype.messageAdded): (WebInspector.ConsoleDispatcher.prototype.messageRepeatCountUpdated): * inspector/front-end/ConsolePanel.js: (WebInspector.ConsolePanel): (WebInspector.ConsolePanel.prototype.performSearch): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView): (WebInspector.ConsoleView.prototype._consoleMessageAdded): (WebInspector.ConsoleView.prototype._appendConsoleCommand): (WebInspector.ConsoleView.prototype._appendConsoleCommandResult): (WebInspector.ConsoleView.prototype._appendConsoleMessage): (WebInspector.ConsoleView.prototype._consoleCleared): (WebInspector.ConsoleView.prototype._registerShortcuts): (WebInspector.ConsoleView.prototype._requestClearMessages): * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype.addSourceMappingListener): (WebInspector.DebuggerPresentationModel.prototype.removeSourceMappingListener): * inspector/front-end/NetworkLog.js: Copied from Source/WebCore/inspector/front-end/externs.js. (WebInspector.NetworkLog): (WebInspector.NetworkLog.prototype.get resources): (WebInspector.NetworkLog.prototype._frameNavigated): (WebInspector.NetworkLog.prototype._onResourceStarted): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype._mimeTypeIsConsistentWithType): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.set finished): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._scriptForRawLocation): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent.appendChunk): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): * inspector/front-end/UISourceCode.js: (WebInspector.ContentProvider): (WebInspector.ContentProvider.prototype.requestContent): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (WebInspector.linkifyURLAsNode): (WebInspector.formatLinkText): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createGlobalStatusBarItems): (WebInspector._updateErrorAndWarningCounts): (WebInspector.showConsole): 2011-08-24 Alexander Pavlov <apavlov@chromium.org> Web Inspector: Directional arrow on element info box looks terrible https://bugs.webkit.org/show_bug.cgi?id=66819 Beautify the tooltip arrow, give it a better alignment in some edge cases, and fix the tooltip font on Macs. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: 2011-08-25 Yuta Kitamura <yutak@chromium.org> Let MessageEvent.data hold SerializedScriptValue or String selectively https://bugs.webkit.org/show_bug.cgi?id=66841 Reviewed by Adam Barth. MessageEvent from WebSocket contains a String in its "data" attribute, but it does not have to be serialized. No new tests are added, because this is refactoring and the behavior should not change. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::data): To call putAnonymousValue(), "this" needs to be converted to non-const using const_cast<>. (WebCore::JSMessageEvent::initMessageEvent): Update the cache value as well. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::dataAccessorGetter): ForceSet() is used to cache a value. This is the same as what the code generated by CodeGeneratorV8 does. (WebCore::V8MessageEvent::initMessageEventCallback): * dom/MessageEvent.cpp: (WebCore::MessageEvent::MessageEvent): (WebCore::MessageEvent::initMessageEvent): (WebCore::MessageEvent::data): This is only used within the Objective-C bindings (JSC and V8 have the custom functions). Since Objective-C code generator does not support [CustomGetter] IDL attribute, there is no good way to return a variant value for Objective-C bindings. * dom/MessageEvent.h: (WebCore::MessageEvent::create): (WebCore::MessageEvent::dataType): (WebCore::MessageEvent::dataAsSerializedScriptValue): (WebCore::MessageEvent::dataAsString): * dom/MessageEvent.idl: * websockets/WebSocket.cpp: (WebCore::WebSocket::didReceiveMessage): Construct a MessageEvent without serializing the received message. 2011-08-25 MORITA Hajime <morrita@google.com> Unreviewed, rolling out r93762. http://trac.webkit.org/changeset/93762 https://bugs.webkit.org/show_bug.cgi?id=66756 IndexedDb tests crash * WebCore.gypi: * WebCore.pro: * bindings/generic/EventConstructors.h: Removed. * bindings/v8/OptionsObject.cpp: * bindings/v8/OptionsObject.h: * bindings/v8/custom/V8EventConstructors.cpp: Removed. * dom/Event.cpp: * dom/Event.h: (WebCore::Event::create): * dom/Event.idl: 2011-08-24 Kentaro Hara <haraken@google.com> Implement an Event constructor. https://bugs.webkit.org/show_bug.cgi?id=66756 Reviewed by Adam Barth. The spec of the Event constructor is here: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor. This patch added the Event constructor to EventConstructors.h using JavaScript implementation-independent macros. This patch also added the V8 implementation of these macros to V8EventConstructors.cpp. The bug 63878 has been implementing the Event constructors for JSC. Our plan is to first implement all the Event constructors for V8 using EventConstructors.h proposed in the JSC patch, and then merge the JSC patch with these V8 patches. In any case, we are going to split the patches for V8 and those for JSC in order to avoid hard regression. Test: fast/events/event-constructors.html * WebCore.gypi: Added V8EventConstructors.cpp. * WebCore.pro: Added V8EventConstructors.cpp. * bindings/generic/EventConstructors.h: Added. The Event constructor. This is written using JavaScript implementation-independent macros. The V8 implementation of these macros is written in bindings/v8/custom/V8EventConstructors.cpp. * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyDouble): Returns the value of a given key of type double. (WebCore::OptionsObject::getKey): Returns true whenever the given key is found, even if the value is null or undefined. * bindings/v8/OptionsObject.h: (WebCore::OptionsObject::getKeyValue): Returns the value of the given key. We need to overload getKeyValue() for all types required to EventConfiguration members. * bindings/v8/custom/V8EventConstructors.cpp: Added. Implemented macros used in EventConstructors.h. (WebCore::constructV8Event): The Event constructor. * dom/Event.cpp: (WebCore::EventConfiguration::EventConfiguration): A constructor of EventConfiguration. (WebCore::Event::Event): A constructor of the Event class. * dom/Event.h: Added EventConfiguration, which manages attributes of the Event class. (WebCore::Event::create): A factory method of the Event class with EventConfiguration. * dom/Event.idl: Added 'CanBeConstructed' and 'V8CustomConstructor'. 2011-08-24 Philippe Normand <pnormand@igalia.com> [GTK] bump GStreamer requirement to 0.10.30 https://bugs.webkit.org/show_bug.cgi?id=66860 Reviewed by Martin Robinson. Use fast element linking by default. * platform/graphics/gstreamer/GStreamerGWorld.cpp: (WebCore::GStreamerGWorld::enterFullscreen): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): 2011-08-24 James Robinson <jamesr@chromium.org> Some layerTreeAsText compositing tests are flaky https://bugs.webkit.org/show_bug.cgi?id=66913 Reviewed by Simon Fraser. Remove compositingLayerUpdatePending() and unconditionally update compositing layers when RenderLayerCompositor::layerTreeAsText(). compositingLayerUpdatePending() was only used by test code and is unreliable. Covered by compositing/ layerTreeAsText tests. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::layerTreeAsText): * rendering/RenderLayerCompositor.h: 2011-08-24 Kentaro Hara <haraken@google.com> Implement a keypath parser strictly following the specification https://bugs.webkit.org/show_bug.cgi?id=62288 Reviewed by Tony Chang. Implemented a keypath parser that accepts either an empty string, a JavaScript identifier, or multiple JavaScript identifiers separated by periods. We fixed createObjectStore() and createIndex() so that they parse and check their |keypath| argument and return an appropriate exception if the |keypath| is not valid. We also added unit tests for the new keypath parser in keypath-basics.html. Tests: storage/indexeddb/keypath-fetch-key.html storage/indexeddb/keypath-basics.html * bindings/v8/IDBBindingUtilities.cpp: (WebCore::createIDBKeyFromSerializedValueAndKeyPath): Replaced IDBKeyPathElement with String (WebCore::injectIDBKeyIntoSerializedValue): Replaced IDBKeyPathElement with String * bindings/v8/IDBBindingUtilities.h: * bindings/v8/OptionsObject.cpp: (WebCore::OptionsObject::getKeyStringWithUndefinedOrNullCheck): Returns false when a given value is null or undefined (WebCore::OptionsObject::getKey): Removed undefined check * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::createObjectStore): Checks if a |keypath| argument is valid, and returns a NON_TRANSIENT_ERR if it is not valid * storage/IDBDatabaseBackendImpl.cpp: (WebCore::IDBDatabaseBackendImpl::createObjectStore): Removed null check of a keypath * storage/IDBKeyPath.cpp: (WebCore::IDBKeyPathLexer::currentElement): Part of the keypath parser (WebCore::IDBKeyPathLexer::lex): Part of the keypath parser (WebCore::IDBKeyPathLexer::lexIdentifier): Part of the keypath parser (WebCore::IDBIsValidKeyPath): Checks if a keypath is valid (WebCore::IDBParseKeyPath): Part of the keypath parser * storage/IDBKeyPath.h: Replaced IDBKeyPathElement with String * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::createIndex): Checks if a |keypath| argument is valid, and returns a NON_TRANSIENT_ERR if it is not valid * storage/IDBObjectStore.idl: 2011-08-24 Eric Uhrhane <ericu@chromium.org> Reviewed by Adam Barth. [filesystem/Chromium] Filesystem paths need proper URL escaping https://bugs.webkit.org/show_bug.cgi?id=62811 Fix http://code.google.com/p/chromium/issues/detail?id=78860 by making KURLChromium.cpp's escaping code actually work. Make encodeWithURLEscapeSequences call into googleurl to do proper escaping. Tested in WebKit/chromium/tests/KURLTest.cpp. * platform/KURLGoogle.cpp: (WebCore::encodeWithURLEscapeSequences): 2011-08-24 Chris Palmer <palmer@google.com> Resolve potential integer overflow in memory allocation, and ensure that allocation succeeds. Reviewed by Kenneth Russell. * platform/audio/AudioArray.h: (WebCore::AudioArray::allocate): Check for integer overflow. (WebCore::AudioArray::at): Document the safety assertion. (WebCore::AudioArray::zero): Document the safety assertion. (WebCore::AudioArray::zeroRange): Document the safety assertion. (WebCore::AudioArray::copyToRange): Document the safety assertion. 2011-08-24 Raphael Kubo da Costa <kubo@profusion.mobi> [EFL] Fix build with ENABLE_GEOLOCATION. https://bugs.webkit.org/show_bug.cgi?id=66881 Use adoptPtr() to create a new GeolocationService instance, otherwise the build will fail when creating the PassOwnPtr object. * platform/efl/GeolocationServiceEfl.cpp: (WebCore::GeolocationServiceEfl::create): 2011-08-24 Raphael Kubo da Costa <kubo@profusion.mobi> [CMake] Fix build with ENABLE_BLOB or ENABLE_FILE_SYSTEM. https://bugs.webkit.org/show_bug.cgi?id=66880 Generate and build some additional files required by these options. No new tests, as this is a build fix for some build options. * CMakeLists.txt: 2011-08-24 Iain Merrick <husky@google.com> [chromium] Don't call glDeleteTexture(0) in TextureManager https://bugs.webkit.org/show_bug.cgi?id=66862 Delete(0) is allowed in standard OpenGL, but not in Chrome. See http://code.google.com/p/chromium/issues/detail?id=85268 Reviewed by James Robinson. * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::deleteEvictedTextures): 2011-08-24 Adrienne Walker <enne@google.com> [chromium] Properly initialize CCTiledLayerImpl::m_skipsDraw https://bugs.webkit.org/show_bug.cgi?id=66889 Reviewed by James Robinson. * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): 2011-08-24 Tom Sepez <tsepez@chromium.org> chromium WebFrameImpl - don't load javascript URLs against chrome internal pages. Adds a mechanism for registering sensitive schemes which should not be subject to manipulation by javascript urls typed into a location bar or, more importantly, their bookmarklet equivalents. https://bugs.webkit.org/show_bug.cgi?id=66720 Reviewed by Adam Barth. Test: Chromium WebKit API unit test in chromium specific directory. * platform/SchemeRegistry.cpp: (WebCore::notAllowingJavascriptURLsSchemes): (WebCore::SchemeRegistry::registerURLSchemeAsNotAllowingJavascriptURLs): (WebCore::SchemeRegistry::shouldTreatURLSchemeAsNotAllowingJavascriptURLs): * platform/SchemeRegistry.h: 2011-08-24 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] Fix Element::getBoundingClientRect and Element::getClientRects for content flow https://bugs.webkit.org/show_bug.cgi?id=66641 Original author of the patch is Mihnea Ovidenie <mihnea@adobe.com>. Redirected the mapLocalToContainer method to the appropriate RenderRegion. Note: RenderObject::absoluteQuads method needs some refactor to support multiple regions, will do that in a separate bug. Reviewed by David Hyatt. Tests: fast/regions/flowed-content-bounding-client-rect-horizontal-bt.html fast/regions/flowed-content-bounding-client-rect-vertical-rl.html fast/regions/flowed-content-bounding-client-rect-vertical.html fast/regions/flowed-content-bounding-client-rect.html fast/regions/flowed-content-transform-bounding-client-rect.html * rendering/RenderBox.cpp: (WebCore::RenderBox::mapLocalToContainer): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::mapFromFlowToRegion): * rendering/RenderFlowThread.h: 2011-08-24 Alok Priyadarshi <alokp@chromium.org> [chromium] Root layer is not updated when only a portion of tile is updated https://bugs.webkit.org/show_bug.cgi?id=66506 This only happened in the accelerated path which changes stencil state. Incorrect stencil state was used to draw the root layer. Reviewed by James Robinson. Test: compositing/overflow/overflow-scroll.html (existing) * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayersInternal): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): 2011-08-24 Nate Chapin <japhet@chromium.org> Fix an intermittent crash in EventSource, when a reconnect timer triggers after a navigation away from the current page begins. https://bugs.webkit.org/show_bug.cgi?id=45202 Reviewed by Alexey Proskuryakov. Test: http/tests/eventsource/eventsource-reconnect-during-navigate-crash.html * page/EventSource.cpp: (WebCore::EventSource::connect): Don't set m_requestInFlight to true if ThreadableLoader::create() failed. 2011-08-24 Mike Reed <reed@google.com> Change clip routine to promote the clipbounds up to (local) floats and then perform the intersection, rather than rounding the srcRect down to integers. https://bugs.webkit.org/show_bug.cgi?id=66810 Reviewed by Kenneth Russell. No new tests. Existing tests that resize images will exercise this code path * platform/graphics/skia/SkiaUtils.cpp: (WebCore::ClipRectToCanvas): 2011-08-24 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderRegion is not used if there's another renderer after it https://bugs.webkit.org/show_bug.cgi?id=66844 There was no call to attachRegion in RenderObjectChildList::insertChildNode, so the region was not added to the RenderFlowThread. Reviewed by David Hyatt. Test: fast/regions/content-flowed-into-regions-dynamically-inserted.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::insertChildNode): 2011-08-24 Sam Weinig <sam@webkit.org> JSHTMLImageElement (and associated Node) is abandoned when image load is canceled <rdar://problem/9925630> https://bugs.webkit.org/show_bug.cgi?id=66864 Reviewed by Anders Carlsson. In the JSC bindings, we use HTMLImageElement::hasPendingActivity() (which in turn calls HTMLImageLoader::haveFiredLoadEvent()) to reason about the liveness of JSHTMLImageElements. In the case that an image load is canceled, the haveFiredLoadEvent never true, so the JSHTMLImageElement is kept alive forever (and since it references the global object, it keeps the entire graph alive as well). * loader/ImageLoader.cpp: (WebCore::ImageLoader::notifyFinished): Set m_firedLoad to true in the case of a canceled load, to reset the state back to its initial values. 2011-08-24 Tommy Widenflycht <tommyw@google.com> MediaStream API: add createObjectURL functionality https://bugs.webkit.org/show_bug.cgi?id=65925 This patch introduces the functionality for generating the url associated with a MediaStream, which can then be assigned to the src attribute of the <video> tag for example. Reviewed by Adam Barth. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::createPublicBlobURL): (WebCore::ScriptExecutionContext::revokePublicBlobURL): * dom/ScriptExecutionContext.h: * html/DOMURL.cpp: (WebCore::DOMURL::createObjectURL): * html/DOMURL.h: * html/DOMURL.idl: * platform/MediaStreamRegistry.cpp: Added. (WebCore::MediaStreamRegistry::registry): (WebCore::MediaStreamRegistry::registerMediaStreamURL): (WebCore::MediaStreamRegistry::unregisterMediaStreamURL): (WebCore::MediaStreamRegistry::mediaStream): * platform/MediaStreamRegistry.h: Copied from Source/WebCore/html/DOMURL.h. Tests for the Media Stream API will be provided by the bug 56587, pending enough landed code. 2011-08-23 David Levin <levin@chromium.org> MessageEvent.ports shouldn't ever be null. https://bugs.webkit.org/show_bug.cgi?id=66789 Reviewed by Darin Adler. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::ports): Never return null. * bindings/v8/custom/V8MessageEventCustom.cpp: (WebCore::V8MessageEvent::portsAccessorGetter): Ditto. 2011-08-24 Alexandru Chiculita <achicu@adobe.com> https://bugs.webkit.org/show_bug.cgi?id=66799 RenderFlowThread creates a list of child elements, so that it can search the insertion point of a new element without searching the whole DOM. The issue is that it used addChild/removeChild, but that wasn't taking care of elements added in anonymous blocks created inside the RenderFlowThread. Reviewed by David Hyatt. Test: fast/regions/flow-anonymous-children.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::nextRendererForNode): (WebCore::RenderFlowThread::previousRendererForNode): (WebCore::RenderFlowThread::addFlowChild): (WebCore::RenderFlowThread::removeFlowChild): * rendering/RenderFlowThread.h: * rendering/RenderObjectChildList.cpp: (WebCore::renderFlowThreadContainer): (WebCore::RenderObjectChildList::removeChildNode): (WebCore::RenderObjectChildList::appendChildNode): (WebCore::RenderObjectChildList::insertChildNode): 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: Add 9 more javascript files to the compilation. https://bugs.webkit.org/show_bug.cgi?id=66847 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.sh: * inspector/front-end/BreakpointManager.js: * inspector/front-end/CSSStyleModel.js: * inspector/front-end/Checkbox.js: * inspector/front-end/ConsoleMessage.js: Added. (WebInspector.ConsoleStackFrame): (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessage.prototype.get stackTrace): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded): (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated): * inspector/front-end/CookieParser.js: * inspector/front-end/DOMAgent.js: * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/DebuggerModel.js: * inspector/front-end/DebuggerPresentationModel.js: * inspector/front-end/InspectorFrontendHostStub.js: (WebInspector.isMac): * inspector/front-end/NetworkManager.js: * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject.prototype.setPropertyValue): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.Type.Document.0.Stylesheet.1.Image.2.Font.3.Script.4.XHR.5.WebSocket.7.Other.8.isTextType): (WebInspector.Resource.Type.toUIString): (WebInspector.Resource.Type.toString): (WebInspector.Resource.prototype._checkWarnings): (WebInspector.ResourceDomainModelBinding): (WebInspector.ResourceDomainModelBinding.prototype.canSetContent): (WebInspector.ResourceDomainModelBinding.prototype.setContent): * inspector/front-end/ResourceCategory.js: (WebInspector.ResourceCategory): (WebInspector.ResourceCategory.prototype.toString): (WebInspector.ResourceCategory.prototype.get title): * inspector/front-end/ResourceTreeModel.js: * inspector/front-end/ScriptFormatter.js: (WebInspector.ScriptFormatter.prototype._didFormatContent): (WebInspector.FormatterMappingPayload): * inspector/front-end/TimelineManager.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/externs.js: (console.assert): (WebInspector.linkifyURLAsNode): (WebInspector.linkifyStringAsFragment): (WebInspector.UIString): (Element.prototype.scrollIntoViewIfNeeded): * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector.UIString): * inspector/front-end/treeoutline.js: * inspector/front-end/utilities.js: * inspector/generate-protocol-externs: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: extract ConsoleMessage into a separate file. https://bugs.webkit.org/show_bug.cgi?id=66853 Reviewed by Yury Semikhatsky. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/ConsoleMessage.js: Added. (WebInspector.ConsoleMessage): (WebInspector.ConsoleMessage.createTextMessage): (WebInspector.ConsoleMessage.prototype._formatMessage): (WebInspector.ConsoleMessage.prototype._linkifyLocation): (WebInspector.ConsoleMessage.prototype._linkifyCallFrame): (WebInspector.ConsoleMessage.prototype.isErrorOrWarning): (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.valueFormatter): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.append): (WebInspector.ConsoleMessage.prototype.clearHighlight): (WebInspector.ConsoleMessage.prototype.highlightSearchResults): (WebInspector.ConsoleMessage.prototype.matchesRegex): (WebInspector.ConsoleMessage.prototype.toMessageElement): (WebInspector.ConsoleMessage.prototype._populateStackTraceTreeElement): (WebInspector.ConsoleMessage.prototype._updateRepeatCount): (WebInspector.ConsoleMessage.prototype.toString): (WebInspector.ConsoleMessage.prototype.isEqual): (WebInspector.ConsoleMessage.prototype.get stackTrace): * inspector/front-end/ConsoleView.js: * inspector/front-end/WebKit.qrc: 2011-08-24 Tatiana Meshkova <tatiana.meshkova@nokia.com> Paint SliderTrack and SliderThumb independently. https://bugs.webkit.org/show_bug.cgi?id=50453 Also fixes https://bugs.webkit.org/show_bug.cgi?id=65456 crash. Reviewed by Kenneth Rohde Christiansen. RenderSlider works only with <input type=range>. Nowadays RenderTheme supports painting of SliderTrack and SliderThumb without range input. In order to be in sync with other platforms this patch gets rid of upcasting in RenderThemeQt::paintSliderTrack and allows to paint SliderTrack and SliderThumb independently. Test: platform/qt/fast/forms/range/slider-crash.html * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::paintSliderTrack): Draw SC_SliderGroove. Allow paintSliderThumb() to care about SC_SliderHandle. We don't need to setup value and position anymore, since handle is drawn separately. Draw focus explicitly, since QStyleOptionSlider doesn't allow to focus on CC_Slider without handle subcontrol. (WebCore::RenderThemeQt::paintSliderThumb): Draw SC_SliderHandle. 2011-08-23 Pavel Feldman <pfeldman@google.com> Web Inspector: annotate and prepare for compilation first 14 JavaScript files within 4 modules. https://bugs.webkit.org/show_bug.cgi?id=66776 Reviewed by Yury Semikhatsky. * inspector/compile-front-end.sh: * inspector/front-end/ContextMenu.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype._childNodeRemoved): (WebInspector.DOMAgent.prototype._inspectElementRequested): (WebInspector.DOMDispatcher.prototype.inspectElementRequested): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.Location): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel): (WebInspector.ElementsPanel.prototype._inspectElementRequested): * inspector/front-end/InspectorFrontendHostStub.js: * inspector/front-end/KeyboardShortcut.js: * inspector/front-end/Object.js: (WebInspector.Object.prototype.addEventListener): (WebInspector.Object.prototype.removeEventListener): (WebInspector.Object.prototype.hasEventListeners): * inspector/front-end/Panel.js: (WebInspector.Panel): * inspector/front-end/Placard.js: * inspector/front-end/Popover.js: (WebInspector.Popover.prototype.show): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel): (WebInspector.StorageCategoryTreeElement): * inspector/front-end/Script.js: (WebInspector.Script.prototype.editSource): * inspector/front-end/ScriptsPanel.js: * inspector/front-end/Settings.js: (WebInspector.Settings): (WebInspector.Settings.prototype.createSetting): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype._menuItemMouseUp): (.WebInspector.SoftContextMenu.prototype._triggerAction): (.WebInspector.SoftContextMenu.prototype._menuKeyDown): * inspector/front-end/TabbedPane.js: * inspector/front-end/TextPrompt.js: * inspector/front-end/UserMetrics.js: * inspector/front-end/View.js: * inspector/front-end/externs.js: (JSON.parse): (JSON.stringify): * inspector/front-end/inspector.js: (): * inspector/generate-protocol-externs: 2011-08-24 Andreas Kling <kling@webkit.org> SelectElementData: Reorder members to reduce memory usage. https://bugs.webkit.org/show_bug.cgi?id=66787 Reviewed by Darin Adler. Reduced the size of SelectElementData by 24 bytes on 64-bit by rearranging its data members. Also added missing initialization of m_userDrivenChange. * dom/SelectElement.cpp: (WebCore::SelectElementData::SelectElementData): * dom/SelectElement.h: 2011-08-24 Pavel Feldman <pfeldman@google.com> Web Inspector: clearPseudoState should retain Element while clearing its state. https://bugs.webkit.org/show_bug.cgi?id=66790 Reviewed by Yury Semikhatsky. * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::clearPseudoState): 2011-08-23 Mark Hahnenberg <mhahnenberg@apple.com> Add checks to ensure allocation does not take place during initialization of GC-managed objects https://bugs.webkit.org/show_bug.cgi?id=65288 Reviewed by Darin Adler. No new tests. Adding the new validation functionality. In its current state, it will performs checks, but they don't fail unless you do allocation in the arguments to the parent constructor in the initialization list of a class. The allocateCell() method turns on the global flag disallowing any new allocations, and the constructorBody() method in JSCell turns it off. This way, allocation is still allowed in constructor bodies while other refactoring efforts continue. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::operator new): * bindings/js/JSDOMWindowShell.h: 2011-08-23 Scott Byer <scottbyer@chromium.org> ScrollAnimatorNone coasting implementation https://bugs.webkit.org/show_bug.cgi?id=66258 Increase the animation time based on the velocity of the scroll, up to a maximum amount. Fix bugs found by additional unit testing. Reviewed by James Robinson. Additional tests in ScrollAnimatorNoneTest: CurveMathQuartic, CurveMathCoast, ScrollOnceQuartic, ScrollTwiceCubic, ScrollLotsCubic, ScrollLotsCubicSmoothed, ScrollUpToBumperCoast, ScrollDownToBumperCoast, VaryingInputsEquivalency, VaryingInputsEquivalencyCoast, VaryingInputsEquivalencyCoastLarge, VaryingInputsEquivalencyCoastSteep * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::Parameters::Parameters): (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::coastCurve): (WebCore::ScrollAnimatorNone::PerAxisData::curveIntegralAt): (WebCore::ScrollAnimatorNone::PerAxisData::attackArea): (WebCore::ScrollAnimatorNone::PerAxisData::releaseArea): (WebCore::ScrollAnimatorNone::PerAxisData::PerAxisData): (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::PerAxisData::updateVisibleLength): (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): (WebCore::ScrollAnimatorNone::scroll): (WebCore::ScrollAnimatorNone::willEndLiveResize): (WebCore::ScrollAnimatorNone::didAddVerticalScrollbar): (WebCore::ScrollAnimatorNone::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorNone::updateVisibleLengths): * platform/ScrollAnimatorNone.h: 2011-08-23 James Robinson <jamesr@chromium.org> [chromium] Need a way to test lost compositor context recovery https://bugs.webkit.org/show_bug.cgi?id=66820 Reviewed by Kenneth Russell. Adds support for recreating a context as if it was lost, and fixes compositeAndReadback() to attempt context recovery. Test: platform/chromium/compositing/lost-compositor-context.html * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::compositeAndReadback): (WebCore::CCLayerTreeHost::loseCompositorContext): * platform/graphics/chromium/cc/CCLayerTreeHost.h: 2011-08-23 Nat Duca <nduca@chromium.org> [chromium] Implement CCThread in terms of WebThread https://bugs.webkit.org/show_bug.cgi?id=66610 Reviewed by Darin Fisher. * WebCore.gypi: * platform/graphics/chromium/cc/CCCompletionEvent.h: * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::client): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::CCLayerTreeHostImplProxy): * platform/graphics/chromium/cc/CCThread.h: (WebCore::CCThread::~CCThread): 2011-08-23 Iain Merrick <husky@google.com> [chromium] Renderer crashes when about:gpucrash is loaded https://bugs.webkit.org/show_bug.cgi?id=66814 WebViewImpl::didRecreateGraphicsContext() was calling setRootLayer() on the CC layer tree, but the root layer doesn't actually change and the code wasn't defensive against this. This CL adds some asserts to catch tree corruption and removes the unnecessary calls. Reviewed by James Robinson. * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::setParent): * platform/graphics/GraphicsLayer.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setParent): (WebCore::LayerChromium::hasAncestor): * platform/graphics/chromium/LayerChromium.h: 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93645. http://trac.webkit.org/changeset/93645 https://bugs.webkit.org/show_bug.cgi?id=66828 Broke webkit_unit_tests on chromium mac (Requested by jamesr on #webkit). * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-23 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66244 Cached pages don't fully update when going back after changing the display scale factor -and corresponding- <rdar://problem/9955656> Reviewed by Darin Adler. This patch adds a generalized concept of needing a full style recalc to the BackForwardController. So when the display scale factor is changed, the BackForwardController can be informed that all pages will need a full style recalc when they come out of the cache. This same mechanism is also used to fix a long- standing bug with full-page/text zoom. Iterate through the HistoryItems and mark all CachedPages as needing a full style recalc. * history/BackForwardController.cpp: (WebCore::BackForwardController::markPagesForFullStyleRecalc): * history/BackForwardController.h: ChachedPage has a new bool -- m_needsFullStyleRecalc -- to track whether a full style recalc is needed when the CachedPage is restored. * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): (WebCore::CachedPage::restore): (WebCore::CachedPage::clear): * history/CachedPage.h: (WebCore::CachedPage::markForFullStyleRecalc): HistoryItem actually takes care of calling into CachedPage. * history/HistoryItem.cpp: (WebCore::HistoryItem::markForFullStyleRecalc): * history/HistoryItem.h: Fix style recalc issues for full-page/text zoom by calling our new function on PageCache. * page/Frame.cpp: (WebCore::Frame::setPageAndTextZoomFactors): Fix style recalc issues for display scale factor changes by calling our new function on PageCache. * page/Page.cpp: (WebCore::Page::setDeviceScaleFactor): 2011-08-23 Anders Carlsson <andersca@apple.com> Fix build. * inspector/InstrumentingAgents.cpp: 2011-08-23 Chang Shu <cshu@webkit.org> Added support for momentarily revealing last typed character in password input. Code change was partially based on Apple's iOS code and Samuel Nevala's work. https://bugs.webkit.org/show_bug.cgi?id=32509 Reviewed by Alexey Proskuryakov. * editing/InsertIntoTextNodeCommand.cpp: (WebCore::InsertIntoTextNodeCommand::doApply): * rendering/RenderText.cpp: (WebCore::SecureTextTimer::SecureTextTimer): (WebCore::SecureTextTimer::restartWithNewText): (WebCore::SecureTextTimer::invalidate): (WebCore::SecureTextTimer::lastTypedCharacterOffset): (WebCore::SecureTextTimer::fired): (WebCore::RenderText::willBeDestroyed): (WebCore::RenderText::setTextInternal): (WebCore::RenderText::secureText): (WebCore::RenderText::momentarilyRevealLastTypedCharacter): * rendering/RenderText.h: (WebCore::RenderText::isSecure): * testing/Internals.cpp: (WebCore::Internals::setPasswordEchoEnabled): Fixed some silly coding in Internals. (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): 2011-08-23 Dmitry Lomov <Dmitry Lomov (dslomov@google.com)> https://bugs.webkit.org/show_bug.cgi?id=66751 [Chromium]WebWorkerClientImpl should always invoke InspectorIntrumentation on main thread. The fix moves calls to InspectorInstrumentation from WebWorkerClientImpl to unedrlying WorkerMessagingProxy. Reviewed by Pavel Feldman. Covered by existing tests. * inspector/InstrumentingAgents.cpp: (WebCore::instrumentationForPage): * workers/WorkerMessagingProxy.cpp: (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal): (WebCore::WorkerMessagingProxy::terminateWorkerContext): 2011-08-23 Misha Tyutyunik <michael.tyutyunik@nokia.com> [Qt] Button text is invisible when mobile theme is in use and application palette set to use light text color. https://bugs.webkit.org/show_bug.cgi?id=66635 When mobile theme is in use and application palette is using light color to display text button text becomes invisible. The reason for that is that in RenderThemeQt::systemFont() we are using application pallete while when are painting buttons lightGrayPalette is used. Calling setPaletteFromPageClientIfExists() takes care of the issue. Reviewed by Andreas Kling. Covered by existing tests. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::systemColor): 2011-08-23 Tony Chang <tony@chromium.org> Add handling of mix-width and max-width for flexitems https://bugs.webkit.org/show_bug.cgi?id=66723 Reviewed by David Hyatt. If we flex past a min/max width value, we need to mark the flexitem as a fixed width and re-start the flexing algorithm. We use a HashMap to keep track of fixed width items. This patch also split out the size computation from the actual layout to avoid unnecessary layouts caused by restarting the flexing algorithm. Test: css3/flexbox/003.html * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::runFreeSpaceAllocationAlgorithm): * rendering/RenderFlexibleBox.h: 2011-08-23 Pratik Solanki <psolanki@apple.com> ResourceRequest::setStorageSession should update NSURLRequest as well https://bugs.webkit.org/show_bug.cgi?id=66811 Reviewed by Darin Adler. * platform/network/cf/ResourceRequestCFNet.cpp: (WebCore::ResourceRequest::setStorageSession): Update the m_nsRequest field as well since we have a new CFURLRequestRef. 2011-08-23 James Robinson <jamesr@chromium.org> [chromium] Remove obsolete child context list from LayerRendererChromium https://bugs.webkit.org/show_bug.cgi?id=66743 Reviewed by Kenneth Russell. Before we had proper semantics for flush() in the command buffer, we used a scheme of latches across contexts to ensure consistent frames were presented for WebGL and canvas. We no longer have latches and flush is a proper synchronization primative, so the child context list no longer does anything. Canvas2DLayerChromium and WebGLLayerChromium's implementations of updateCompositorResources() do flushes on the appropriate context already - canvas layers via DrawingBuffer::publishToPlatformLayer(), and WebGL layers via the call to prepareTexture(). No new tests since the code being removed doesn't do anything. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::~Canvas2DLayerChromium): (WebCore::Canvas2DLayerChromium::setDrawingBuffer): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::~WebGLLayerChromium): (WebCore::WebGLLayerChromium::setContext): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-08-23 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Use a custom pattern image for rubber banding overhang area https://bugs.webkit.org/show_bug.cgi?id=66707 Reviewed by Dimitri Glazkov. No new tests since its just changing the Chromium-specific overhang pattern. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-23 Tatiana Meshkova <tatiana.meshkova@nokia.com> Prepare to paint slider thumb separately. Provide proper size values for vertical SliderThumb. https://bugs.webkit.org/show_bug.cgi?id=66732 Reviewed by Kenneth Rohde Christiansen. * platform/qt/RenderThemeQt.cpp: (WebCore::RenderThemeQt::adjustSliderThumbSize): Swap length and thickness for sliderthumb-vertical. 2011-08-23 Adrienne Walker <enne@google.com> [chromium] Fix potential nullptr deref in TiledLayerChromium::pushPropertiesTo https://bugs.webkit.org/show_bug.cgi?id=66808 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::pushPropertiesTo): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-08-23 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93452. http://trac.webkit.org/changeset/93452 https://bugs.webkit.org/show_bug.cgi?id=66423 Broke Leopard, Snowleopard, and Chromium bots * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-08-23 Ahmad Sharif <asharif@chromium.org> Fixed warnings produced by gcc-4.6.0. https://bugs.webkit.org/show_bug.cgi?id=62168 Reviewed by Adam Barth. * dom/Element.cpp: (WebCore::Element::recalcStyle): * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): * thirdparty: Copied from Source/WebCore/thirdparty. 2011-08-23 Alexandru Chiculita <achicu@adobe.com> Text overlaps with the floats https://bugs.webkit.org/show_bug.cgi?id=66671 The problem was that LineWidth::fitBelowFloats is not updating the m_left and m_right fields. Next time LineWidth::shrinkAvailableWidthForNewFloatIfNeeded was called the width was recalculated using the old values, making the line bigger. Reviewed by David Hyatt. Test: fast/block/float/fit_line_below_floats.html * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::fitBelowFloats): 2011-08-23 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderFlowThread layout should use the attached region sizes https://bugs.webkit.org/show_bug.cgi?id=66143 When RenderFlowThread is doing the layout it also sets the current RenderFlowThread on the RenderView. RenderFlowThread cannot be nested inside a single RenderView, so there's no need to put that on the LayoutState. The right offset used to layout the inlines inside a RenderFlowThread is now adjusted to fit inside the current region. Reviewed by David Hyatt. Tests: fast/regions/webkit-flow-floats-inside-regions-bounds.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-rl.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical.html fast/regions/webkit-flow-inlines-inside-regions-bounds.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): * rendering/RenderFlowThread.h: (WebCore::RegionFittingDisabler::RegionFittingDisabler): (WebCore::RegionFittingDisabler::~RegionFittingDisabler): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThread): (WebCore::RenderView::currentRenderFlowThread): (WebCore::RenderView::setCurrentRenderFlowThread): (WebCore::RenderView::pushLayoutState): 2011-08-23 Alexandru Chiculita <achicu@adobe.com> Text-indent and floats push the text out of the container box https://bugs.webkit.org/show_bug.cgi?id=66662 Text indent was not propagated when a new float was pushed on the line. It was only calculated when the logicalLeft/RightOffsetForLine was called. Because of that RenderBlock::LineBreaker::nextLineBreak used a bigger width than actually available and made the line render on top of the borders. Reviewed by David Hyatt. Tests: fast/block/float/floats-and-text-indent-rl.html fast/block/float/floats-and-text-indent.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::textIndentOffset): (WebCore::RenderBlock::logicalLeftOffsetForLine): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): 2011-08-23 Al Patrick <apatrick@chromium.org> Add shareResources flag to 3D graphics context attributes https://bugs.webkit.org/show_bug.cgi?id=66516 Reviewed by James Robinson. * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): * platform/graphics/GraphicsContext3D.h: (WebCore::GraphicsContext3D::Attributes::Attributes): * platform/graphics/gpu/SharedGraphicsContext3D.cpp: (WebCore::SharedGraphicsContext3D::create): 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93616. http://trac.webkit.org/changeset/93616 https://bugs.webkit.org/show_bug.cgi?id=66796 "causes fast/css/absolute-child-with-percent-height-inside- relative-parent.html to fail" (Requested by mwenge2 on #webkit). * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): (WebCore::setStaticPositions): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-07-25 Robert Hogan <robert@webkit.org> div align="center" rendering problem https://bugs.webkit.org/show_bug.cgi?id=4860 Reviewed by David Hyatt. Tests: fast/inline/absolute-positioned-block-in-centred-block.html fast/inline/absolute-positioned-inline-in-centred-block.html When an element with absolute position was the sole or first child of a render block with centred alignment, it wasn't obeying its parent's alignment. However it would obey the alignment if it was preceded by some text. The problem was that the element's render object was getting skipped as leading white space, so it was not included in a normal line block in a bidi run. Instead, its position was getting set by RenderBlockLineLayout::setStaticPositions() which does not pay attention to alignment. Preceding the element with some text allowed the object to get included in a Bidi run and so get a linebox which would get properly aligned. The fix is to get RenderBlockLineLayout::setStaticPositions() to obey the alignment specified by the object's container. This allows WebKit to get the same result on the test as Firefox and IE. Opera has the same bug as unpatched WebKit. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustPositionedBlock): use startAlignedOffsetForBlock * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine and use startAlignedOffsetForBlock (WebCore::RenderBlock::LineBreaker::nextLineBreak): use startAlignedOffsetForLine (WebCore::RenderBlock::startAlignedOffsetForBlock): New function, find the aligned offset using updateLogicalWidthForAlignment (WebCore::RenderBlock::startAlignedOffsetForLine): ditto * rendering/RenderBlock.h: * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::updateLogicalWidthForAlignment): (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Move the alignment check to updateLogicalWidthForAlignment. (WebCore::setStaticPositions): use startAlignedOffsetForLine. (WebCore::RenderBlock::startAlignedOffsetForLine): New function, find the aligned offset using updateLogicalWidthForAlignment 2011-08-23 Adrienne Walker <enne@google.com> [chromium] Remove LayerRendererChromium references from TiledLayerChromium https://bugs.webkit.org/show_bug.cgi?id=66433 Reviewed by James Robinson. Covered by existing tests. Updated TiledLayerChromium and the texture updater classes to not access LayerRendererChromium or cache GraphicsContext3D. Some settings like max texture size were moved from LayerRendererChromium to CCLayerTreeHost in order to facilitate this refactoring. LayerTextureUpdaterSkPicture has been #ifdef'd to only work when the compositor is not threaded. It will need to be refactored more in order to not own graphics resources from the main thread. * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdater): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::create): (WebCore::ImageLayerTextureUpdater::updateTextureRect): (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater): (WebCore::ImageLayerChromium::paintContentsIfDirty): (WebCore::ImageLayerChromium::createTextureUpdater): * platform/graphics/chromium/ImageLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setLayerRenderer): (WebCore::LayerChromium::setLayerTreeHost): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: (WebCore::LayerTextureUpdater::LayerTextureUpdater): * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: (WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas): (WebCore::LayerTextureUpdaterBitmap::create): (WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap): (WebCore::LayerTextureUpdaterBitmap::updateTextureRect): (WebCore::LayerTextureUpdaterSkPicture::create): (WebCore::LayerTextureUpdaterSkPicture::LayerTextureUpdaterSkPicture): (WebCore::LayerTextureUpdaterSkPicture::updateTextureRect): * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: (WebCore::LayerTextureUpdaterSkPicture::context): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::setLayerTreeHost): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::layerRenderer): (WebCore::CCLayerTreeHost::contextSupportsMapSub): (WebCore::CCLayerTreeHost::maxTextureSize): (WebCore::CCLayerTreeHost::bestTextureFormat): 2011-08-23 Julien Chaffraix <jchaffraix@webkit.org> Reduce the amount of RenderLayer rectangles' update when scrolling https://bugs.webkit.org/show_bug.cgi?id=66618 Reviewed by David Hyatt. This patch avoids recomputing the RenderLayers rectangles if not needed. The current code path for scrolling would update RenderLayers' repaint rectangles twice. However we do need to update only children of a fixed element as they are the only type of layers that move during a scroll. We just change a call to updateLayerPositions for a call to updateLayerPositionsAfterScroll. updateLayerPositions being pessimist about the layer's state - because it is called after layout - it is missing some optimization that can be done during scrolling. Tests: fast/repaint/scroll-absolute-layer-with-reflection.html fast/repaint/scroll-fixed-layer-with-reflection.html fast/repaint/scroll-fixed-layer-with-transformed-parent-layer.html fast/repaint/scroll-fixed-reflected-layer.html fast/repaint/scroll-in-clipped-layer.html fast/repaint/scroll-in-fixed-layer.html fast/repaint/scroll-in-transformed-layer.html fast/repaint/scroll-with-transformed-parent-layer.html * rendering/RenderLayer.h: * page/FrameView.cpp: (WebCore::FrameView::repaintFixedElementsAfterScrolling): Updated those 2 call sites after updateRepaintRectsAfterScroll renaming. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateLayerPositionsAfterScroll): Beefed up the method to take care of also updating the layer's position (that sounded like a bug in the previous code that is covered by the tests above). Note that we don't care if one of our ancestor has a fixed position as we are scrolling *inside* this ancestor. (WebCore::RenderLayer::scrollTo): Call updateLayerPositionsAfterScroll instead of updateLayerPositions. 2011-08-23 Jeffrey Pfau <jpfau@apple.com> New XML parser: pretty XML tree viewer https://bugs.webkit.org/show_bug.cgi?id=66489 Reviewed by Adam Barth. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::finish): 2011-08-23 Jessie Berlin <jberlin@apple.com> Build fix. * inspector/InspectorDOMAgent.h: HighlightData is a struct, not a class. 2011-08-23 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] provide access to page resources https://bugs.webkit.org/show_bug.cgi?id=66767 Reviewed by Pavel Feldman. Test: inspector/extensions/extensions-resources.html * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.EventSinkImpl.prototype.addListener): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.RequestImpl.prototype.getContent): (WebInspector.injectedExtensionAPI.InspectedWindow.resourceDispatch): (WebInspector.injectedExtensionAPI.InspectedWindow.resourceContentDispatch): (WebInspector.injectedExtensionAPI.InspectedWindow): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.eval): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.getResources): (WebInspector.injectedExtensionAPI.InspectedWindow.prototype.getResources.callbackWrapper): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.get url): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.get type): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.getContent): (WebInspector.injectedExtensionAPI.ResourceImpl.prototype.setContent): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._notifyResourceAdded): (WebInspector.ExtensionServer.prototype.notifyResourceContentCommitted): (WebInspector.ExtensionServer.prototype._makeResource): (WebInspector.ExtensionServer.prototype._onGetPageResources): (WebInspector.ExtensionServer.prototype._getResourceContent): (WebInspector.ExtensionServer.prototype._onGetRequestContent): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._onSetResourceContent): (WebInspector.ExtensionServer.prototype.initExtensions): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.addRevision): 2011-08-23 Pavel Feldman <pfeldman@google.com> Not reviewed: fixing build. One line drive-by typo fix in the inspector shortcut (Esc -> Backspace). * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::highlightFrame): * inspector/front-end/treeoutline.js: (TreeOutline.prototype._treeKeyDown): 2011-08-23 Alexander Pavlov <apavlov@chromium.org> Web Inspector: differentiate element highlight colors for margin and padding https://bugs.webkit.org/show_bug.cgi?id=37768 The highlighting WIP API is slightly changed: clients will specify colors for certain elements of the highlighted objects, rather than a generic "highlighting mode". This allows to: - use entirely custom colors for highlighting (and vary them over time); - display any combination of fill/outline for the highlighted area; - highlight any combinations of element parts. Reviewed by Pavel Feldman. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawHighlight): * inspector/DOMNodeHighlighter.h: * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::parseColor): (WebCore::parseConfigColor): (WebCore::InspectorDOMAgent::~InspectorDOMAgent): (WebCore::InspectorDOMAgent::clearFrontend): (WebCore::InspectorDOMAgent::highlightedNode): (WebCore::InspectorDOMAgent::handleMousePress): (WebCore::InspectorDOMAgent::mouseDidMoveOverElement): (WebCore::InspectorDOMAgent::setSearchingForNode): (WebCore::InspectorDOMAgent::setInspectModeEnabled): (WebCore::InspectorDOMAgent::setHighlightDataFromConfig): (WebCore::InspectorDOMAgent::highlight): (WebCore::InspectorDOMAgent::highlightRect): (WebCore::InspectorDOMAgent::highlightNode): (WebCore::InspectorDOMAgent::highlightFrame): (WebCore::InspectorDOMAgent::hideHighlight): (WebCore::InspectorDOMAgent::drawHighlight): * inspector/InspectorDOMAgent.h: * inspector/front-end/Color.js: (WebInspector.Color.fromRGBA): (WebInspector.Color.prototype.toProtocolRGBA): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.setSearchingForNode): * inspector/front-end/MetricsSidebarPane.js: (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.handleMouseOver): (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.handleMouseOut): (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.set hovered): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype._highlightRect): * inspector/front-end/inspector.css: * inspector/front-end/inspector.js: (WebInspector.buildHighlightConfig): (WebInspector.highlightDOMNode): 2011-08-23 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93579. http://trac.webkit.org/changeset/93579 https://bugs.webkit.org/show_bug.cgi?id=66774 "ASSERTION FAILED: m_purgePreventCount" (Requested by tonyg-cr on #webkit). * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Fix build on Lion https://bugs.webkit.org/show_bug.cgi?id=66770 Reviewed by Andreas Kling. We were mistakenly picking up mac/WebCoreSystemInterface.h instead of the Qt one, and building on Lion revealed this when a typedef for IOSurfaceRef was wrapped in PLATFORM(MAC). For now we fix this by including WebCoreSystemInterface using brackets, so that we'll pick up the right file based on the include paths. This also means exposing a few missing enums in our own version of the file, so those were added. Lasty, we need to link against the right system interface library on Lion. * platform/mac/WebVideoFullscreenHUDWindowController.mm: * platform/qt/WebCoreSystemInterface.h: 2011-08-23 Steve Block <steveblock@google.com> Remove last occurrences of PLATFORM(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66763 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * bindings/v8/V8GCController.cpp: (WebCore::V8GCController::checkMemoryUsage): 2011-08-23 Steve Block <steveblock@google.com> Remove Android-specific modifications to non-client-based Geolocation https://bugs.webkit.org/show_bug.cgi?id=66759 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * page/Geolocation.cpp: * page/Geolocation.h: * platform/GeolocationService.h: * platform/efl/GeolocationServiceEfl.cpp: * platform/efl/GeolocationServiceEfl.h: * platform/gtk/GeolocationServiceGtk.cpp: * platform/gtk/GeolocationServiceGtk.h: 2011-08-19 Pavel Podivilov <podivilov@chromium.org> Web Inspector: switch to using BreakpointManager. https://bugs.webkit.org/show_bug.cgi?id=66225 Reviewed by Pavel Feldman. * inspector/front-end/DebuggerPresentationModel.js: (WebInspector.DebuggerPresentationModel): (WebInspector.DebuggerPresentationModel.prototype._addScript.didCreateSourceMapping): (WebInspector.DebuggerPresentationModel.prototype._addScript): (WebInspector.DebuggerPresentationModel.prototype.setFormatSourceFiles): (WebInspector.DebuggerPresentationModel.prototype.breakpointsForSourceFileId): (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled): (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint): (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint): (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved): (WebInspector.DebuggerPresentationModel.prototype._debuggerReset): (WebInspector.PresentationBreakpoint.prototype.loadSnippet): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode): 2011-08-23 Steve Block <steveblock@google.com> Remove all mention of removed Android files from build scripts https://bugs.webkit.org/show_bug.cgi?id=66755 Reviewed by Tony Gentilcore. No new tests, removing dead code only. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * gyp/WebCore.gyp: 2011-08-23 Mikhail Naganov <mnaganov@chromium.org> Web Inspector: [Chromium] Fix handling of aggregate names in profiler. https://bugs.webkit.org/show_bug.cgi?id=66753 Reviewed by Pavel Feldman. * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshot.prototype._buildAggregates): 2011-08-23 Adam Barth <abarth@webkit.org> Remove WebCore/editing/android and other Android-specific directories https://bugs.webkit.org/show_bug.cgi?id=66739 Reviewed by Steve Block. Now that Android shares more code with Chromium, we don't need these Android-specific files. * editing/android: Removed. * editing/android/EditorAndroid.cpp: Removed. * history/android: Removed. * history/android/AndroidWebHistoryBridge.h: Removed. * history/android/HistoryItemAndroid.cpp: Removed. * page/android: Removed. * page/android/DragControllerAndroid.cpp: Removed. * page/android/EventHandlerAndroid.cpp: Removed. * platform/network/android: Removed. * platform/network/android/AuthenticationChallenge.h: Removed. * platform/network/android/CookieJarAndroid.cpp: Removed. * platform/network/android/ProxyServerAndroid.cpp: Removed. * platform/network/android/ResourceError.h: Removed. * platform/network/android/ResourceHandleAndroid.cpp: Removed. * platform/network/android/ResourceLoaderAndroid.h: Removed. * platform/network/android/ResourceRequest.h: Removed. * platform/network/android/ResourceRequestAndroid.cpp: Removed. * platform/network/android/ResourceResponse.h: Removed. * platform/text/android: Removed. * platform/text/android/HyphenationAndroid.cpp: Removed. * platform/text/android/TextBreakIteratorInternalICU.cpp: Removed. 2011-08-23 Adam Barth <abarth@webkit.org> Remove WebCore/platform/android https://bugs.webkit.org/show_bug.cgi?id=66734 Reviewed by Steve Block. This directory is not needed now that Android shares more code with Chromium. * platform/android: Removed. * platform/android/ClipboardAndroid.cpp: Removed. * platform/android/ClipboardAndroid.h: Removed. * platform/android/CursorAndroid.cpp: Removed. * platform/android/DragDataAndroid.cpp: Removed. * platform/android/EventLoopAndroid.cpp: Removed. * platform/android/FileSystemAndroid.cpp: Removed. * platform/android/GeolocationServiceAndroid.cpp: Removed. * platform/android/GeolocationServiceAndroid.h: Removed. * platform/android/GeolocationServiceBridge.cpp: Removed. * platform/android/GeolocationServiceBridge.h: Removed. * platform/android/KeyEventAndroid.cpp: Removed. * platform/android/LanguageAndroid.cpp: Removed. * platform/android/LocalizedStringsAndroid.cpp: Removed. * platform/android/PlatformBridge.h: Removed. * platform/android/PlatformTouchEventAndroid.cpp: Removed. * platform/android/PlatformTouchPointAndroid.cpp: Removed. * platform/android/PopupMenuAndroid.cpp: Removed. * platform/android/RenderThemeAndroid.cpp: Removed. * platform/android/RenderThemeAndroid.h: Removed. * platform/android/SSLKeyGeneratorAndroid.cpp: Removed. * platform/android/ScreenAndroid.cpp: Removed. * platform/android/ScrollViewAndroid.cpp: Removed. * platform/android/SearchPopupMenuAndroid.cpp: Removed. * platform/android/SharedTimerAndroid.cpp: Removed. * platform/android/SoundAndroid.cpp: Removed. * platform/android/SystemTimeAndroid.cpp: Removed. * platform/android/TemporaryLinkStubs.cpp: Removed. * platform/android/WidgetAndroid.cpp: Removed. 2011-08-23 Pavel Feldman <pfeldman@google.com> Not reviewed. Adding a file that slipped from r93586. * inspector/generate-protocol-externs: Added. 2011-08-22 Pavel Feldman <pfeldman@google.com> Web Inspector: generate protocol externs API for the front-end compilation. https://bugs.webkit.org/show_bug.cgi?id=66677 Reviewed by Tony Gentilcore. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setAttributesText): * inspector/InspectorDOMAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpointByUrl): * inspector/InspectorDebuggerAgent.h: * inspector/compile-front-end.sh: Added. * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.setAttribute): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpoint): * inspector/front-end/externs.js: Added. (console.warn): 2011-08-22 Pavel Feldman <pfeldman@google.com> Web Inspector: Prepare utilities.js for compilation. https://bugs.webkit.org/show_bug.cgi?id=66656 Removes "this" usage in functions, does not define getters for offsets. Reviewed by Tony Gentilcore. * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleMessage.prototype._format): (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.valueFormatter): * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode.prototype.appropriateSelectorFor): (WebInspector.DOMNode.prototype.isAncestor): (WebInspector.DOMNode.prototype.isDescendant): (WebInspector.DOMNode.prototype.isWhitespace): * inspector/front-end/DataGrid.js: (WebInspector.DataGrid.prototype._resizerDragging): (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.get savedHeight): (WebInspector.Drawer.prototype.onResize): (WebInspector.Drawer.prototype._startStatusBarDragging): (WebInspector.Drawer.prototype._statusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.updateModifiedNodes): (WebInspector.ElementsPanel.prototype.updateBreadcrumb): (WebInspector.ElementsPanel.prototype.updateBreadcrumbSizes.crumbsAreSmallerThanContainer): * inspector/front-end/ElementsTreeOutline.js: (WebInspector.ElementsTreeOutline.prototype.findTreeElement): (WebInspector.ElementsTreeOutline.prototype._treeElementFromEvent): (): * inspector/front-end/RemoteObject.js: (WebInspector.RemoteObject): * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.createTimingTable): * inspector/front-end/ResourcesPanel.js: (WebInspector.BaseStorageTreeElement.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._startSidebarResizeDrag): * inspector/front-end/SoftContextMenu.js: (.WebInspector.SoftContextMenu.prototype.show): * inspector/front-end/Toolbar.js: (WebInspector.ToolbarDropdown.prototype.show): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement): * inspector/front-end/inspector.js: (Number.secondsToString): (Number.bytesToString): * inspector/front-end/treeoutline.js: (TreeElement.prototype.isEventWithinDisclosureTriangle): * inspector/front-end/utilities.js: (setupPrototypeUtilities.Element.prototype.totalOffsetLeft): (setupPrototypeUtilities.Element.prototype.totalOffsetTop): (setupPrototypeUtilities.Element.prototype.offsetRelativeToWindow): (setupPrototypeUtilities): (setupPrototypeUtilities.): (): 2011-08-22 John Bates <jbates@google.com> Implemented skia support for caching resizes of cropped images. https://bugs.webkit.org/show_bug.cgi?id=65587 Reviewed by Darin Fisher. Previously, resizes of cropped images would not be cached. This causes various websites to have janky CSS animations in software compositing mode. * platform/graphics/skia/ImageSkia.cpp: (WebCore::drawResampledBitmap): Changed to use new APIs for subset caching. (WebCore::Image::drawPattern): Added allowCaching parameter. * platform/graphics/skia/NativeImageSkia.cpp: (WebCore::NativeImageSkia::NativeImageSkia): (WebCore::NativeImageSkia::CachedImageInfo::CachedImageInfo): (WebCore::NativeImageSkia::CachedImageInfo::isEqual): (WebCore::NativeImageSkia::CachedImageInfo::set): (WebCore::NativeImageSkia::hasResizedBitmap): Changed this method so that it does not modify caching data. Added a second version used for cropped image resizes. (WebCore::NativeImageSkia::resizedBitmap): Added parameter to let caller specify whether caching is allowed. (WebCore::NativeImageSkia::shouldCacheResampling): Added a second version used for cropped image resizes. (WebCore::NativeImageSkia::shouldCacheResamplingInternal): Both shouldCacheResampling methods call down to this for the shared logic. * platform/graphics/skia/NativeImageSkia.h: Added CachedImageInfo to uniquely identify the cached or requested image resize operation. 2011-08-22 Tony Gentilcore <tonyg@chromium.org> [chromium] Fonts returned by FontCache::getFontDataForCharacters() are never released https://bugs.webkit.org/show_bug.cgi?id=66673 Reviewed by James Robinson. This was fixed for other ports in http://trac.webkit.org/changeset/88260. However, it was missed in FontCacheLinux likely due to similar param in the nested call to getCachedFontPlatformData(). No new tests because no directly observable change in behavior. * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getFontDataForCharacters): 2011-08-22 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93565. http://trac.webkit.org/changeset/93565 https://bugs.webkit.org/show_bug.cgi?id=66745 Breaks layout tests (Requested by koz2 on #webkit). * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaLabeledByElements): (WebCore::AccessibilityRenderObject::ariaLabeledByAttribute): (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::hasTextAlternative): * accessibility/AccessibilityRenderObject.h: 2011-08-22 Alice Boxhall <aboxhall@chromium.org> Range::setEnd(const Position&, ExceptionCode) calls setStart() instead of setEnd() https://bugs.webkit.org/show_bug.cgi?id=66638 Reviewed by Ryosuke Niwa. Relevant layout test coming in a future patch (see https://bugs.webkit.org/show_bug.cgi?id=65900) * dom/Range.cpp: (WebCore::Range::setEnd): 2011-08-22 Adam Barth <abarth@webkit.org> Remove PLATFORM(ANDROID) https://bugs.webkit.org/show_bug.cgi?id=66741 Reviewed by Darin Adler. PLATFORM(CHROMIUM) && OS(ANDROID) is the new hotness. These special cases can be removed now that Android shares more code with Chromium. * bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::supportsRichSourceInfo): * bindings/v8/ScriptCachedFrameData.cpp: * bindings/v8/ScriptCachedFrameData.h: * bindings/v8/V8GCController.cpp: * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod): * history/HistoryItem.cpp: (WebCore::HistoryItem::~HistoryItem): (WebCore::HistoryItem::setDocumentState): (WebCore::HistoryItem::clearDocumentState): (WebCore::HistoryItem::setIsTargetItem): (WebCore::HistoryItem::addChildItem): (WebCore::HistoryItem::setFormInfoFromRequest): * history/HistoryItem.h: * loader/cache/CachedFont.cpp: * platform/DragImage.h: * platform/PlatformTouchEvent.h: * platform/PlatformTouchPoint.h: (WebCore::PlatformTouchPoint::PlatformTouchPoint): * platform/Widget.h: * platform/network/NetworkStateNotifier.cpp: * platform/network/NetworkStateNotifier.h: * platform/network/NetworkingContext.h: * platform/network/ResourceHandle.h: * platform/network/ResourceHandleInternal.h: * platform/network/ResourceRequestBase.cpp: 2011-08-22 Adrienne Walker <enne@google.com> [chromium] Remove compositing assertions about creating layers when painting https://bugs.webkit.org/show_bug.cgi?id=66731 Reviewed by James Robinson. The trigger for this assertion would cause a real rendering issue, but it is both intermittent and in the wrong place in the codebase to catch the source of the problem. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::~LayerChromium): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): * platform/graphics/chromium/LayerRendererChromium.h: 2011-08-22 Alexey Proskuryakov <ap@apple.com> showModalDialog does not correctly return the defined returnValue in case domain relaxing is used https://bugs.webkit.org/show_bug.cgi?id=53191 <rdar://problem/8629478> Reviewed by Geoff Garen. Cannot test domain relaxing, we only have 127.0.0.1 and localhost. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): Added a FIXME about a difference with Firefox. (WebCore::DialogHandler::DialogHandler): (WebCore::DialogHandler::dialogCreated): (WebCore::DialogHandler::returnValue): Changed to fetch returnValue from the global object that's in the frame when the dialog is dismissed. A dialog can navigate itself, and it also creates a new JSDOMWindow on first load if the origin doesn't match opener origin (which the case with domain relaxing). Re-added a security check for returnValue that got lost in r73829, so that we don't send the result across origins. This matches Firefox. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): Added an assertion against a very confusing case that should no longer occur. * page/Frame.cpp: (WebCore::Frame::pageDestroyed): Don't clear the window shell, it doesn't seem necessary, but prevents DialogHandler from fetching the return value. Added a keepAlive call to avoid changing life support timer behavior in this patch. 2011-08-22 Alice Boxhall <aboxhall@chromium.org> Reviewed by Chris Fleizach. aria-labelledby should be used in preference to aria-labeledby https://bugs.webkit.org/show_bug.cgi?id=62351 Test: accessibility/aria-labelledby-overrides-aria-labeledby.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::ariaLabelledByElements): Renamed from ariaLabeledByElements. (WebCore::AccessibilityRenderObject::ariaLabelledByAttribute): Renamed from ariaLabeledByAttribute, and re-ordered to prefer the standard spelling. (WebCore::AccessibilityRenderObject::title): (WebCore::AccessibilityRenderObject::hasTextAlternative): * accessibility/AccessibilityRenderObject.h: 2011-08-22 Nat Duca <nduca@chromium.org> Make GraphicsContext3D::isResourceSafe a function and, on Chromium, determine its value lazily https://bugs.webkit.org/show_bug.cgi?id=66708 Reviewed by Kenneth Russell. * platform/graphics/GraphicsContext3D.cpp: (WebCore::GraphicsContext3D::texImage2DResourceSafe): * platform/graphics/GraphicsContext3D.h: * platform/graphics/gtk/GraphicsContext3DGtk.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/mac/GraphicsContext3DMac.mm: (WebCore::GraphicsContext3D::GraphicsContext3D): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::isResourceSafe): * platform/graphics/qt/GraphicsContext3DQt.cpp: (WebCore::GraphicsContext3D::GraphicsContext3D): 2011-08-22 Adam Barth <abarth@webkit.org> HTMLSourceTracker crashes when network packets break poorly https://bugs.webkit.org/show_bug.cgi?id=66728 Reviewed by Darin Adler. If there is a network packet boundary in the middle of an attribute that begins with the letters "on", then the HTMLSourceTracker will get confused and try to extract too many characters from future input. If the future input is small enough, that will walk off the end of the input and crash. Test: http/tests/security/xssAuditor/crash-while-loading-tag-with-pause.html * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): 2011-08-22 Eric Seidel <eric@webkit.org> Attempt to clean up bidiNext usage https://bugs.webkit.org/show_bug.cgi?id=66721 Reviewed by Ryosuke Niwa. bidiNext and bidiFirst are horribly confusing. Even worse is that bidiNext takes a bunch of mutually exclusive options. It appears that there is a "return me every inline, even if its empty" mode which is only used for simplified inline layout in RenderBlock.cpp. To support that mode, there is a endOfInline pointer which keeps track of if we just returned at the end of an inline to so we don't get stuck in and empty inline (unable to distinguish the start from the finish). The actual bidi/line-layout code uses bidiNext/bidiFirst in a "skip empty inlines" mode. (Since empty inlines do not participate in the Unicode Bidi Algorithm.) This change renames bidiNext to bidiNextShared (still a horrible name) and moves all callers to explicitly calling bidiNextSkippingEmptyInlines or bidiNextIncludingEmptyInlines. It becomes obvious which code uses which. In reviewing this code be aware that the previous bidiNext default was to "skip empty inlines" (skipInlines = true). Thus any caller who didn't pass true/false should now be calling bidiNextSkippingEmptyInlines instead. No functional change, thus no tests. * rendering/InlineIterator.h: (WebCore::bidiNextShared): (WebCore::bidiNextSkippingEmptyInlines): (WebCore::bidiNextIncludingEmptyInlines): (WebCore::bidiFirstSkippingEmptyInlines): (WebCore::bidiFirstIncludingEmptyInlines): (WebCore::InlineWalker::InlineWalker): (WebCore::InlineWalker::advance): (WebCore::InlineIterator::increment): (WebCore::InlineBidiResolver::appendRun): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::determineStartPosition): (WebCore::shouldSkipWhitespaceAfterStartObject): (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-08-22 David Levin <levin@chromium.org> Fix usage of PassRefPtr in postMessage and structured clone code. https://bugs.webkit.org/show_bug.cgi?id=66725 Reviewed by Darin Adler. No new functionality exposed so no new tests. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::postMessage): Changed PassRefPtr to RefPtr and added release when handed off. * bindings/js/JSMessageEventCustom.cpp: (WebCore::JSMessageEvent::initMessageEvent): Ditto. * bindings/js/JSMessagePortCustom.h: (WebCore::handlePostMessage): Ditto. * bindings/js/SerializedScriptValue.cpp: (WebCore::SerializedScriptValue::create): Ditto. * workers/SharedWorkerContext.cpp: (WebCore::createConnectEvent): Added release() when a RefPtr is returned. 2011-08-22 Luke Macpherson <macpherson@chromium.org> Implement cast between CSSPrimitiveValue and EBackfaceVisibility, use in CSSStyleSelector::applyProperty. https://bugs.webkit.org/show_bug.cgi?id=66648 Reviewed by Dan Bernstein. No new tests / no functionality changed. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from EBackfaceVisibility. (WebCore::CSSPrimitiveValue::operator EBackfaceVisibility): Support cast from EBackfaceVisibility. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro. 2011-08-22 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93538. http://trac.webkit.org/changeset/93538 https://bugs.webkit.org/show_bug.cgi?id=66143 Broke Leopard, SnowLeopard, and Chromium Mac bots * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderRegion.cpp: * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::pushLayoutState): 2011-08-22 Tony Chang <tony@chromium.org> Add CSS parsing of -webkit-flex-pack https://bugs.webkit.org/show_bug.cgi?id=66701 Reviewed by Eric Seidel. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator EFlexPack): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexPack): (WebCore::InheritedFlags::setFlexPack): (WebCore::InheritedFlags::initialFlexPack): * rendering/style/RenderStyleConstants.h: * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-22 Tony Chang <tony@chromium.org> handle child margin values when flexing https://bugs.webkit.org/show_bug.cgi?id=65887 Reviewed by David Hyatt. Test: css3/flexbox/002.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalWidth): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutHorizontalBlock): (WebCore::RenderFlexibleBox::computePreferredSize): If the margin is auto, treat it as flex(1 0 0). * rendering/RenderObject.cpp: (WebCore::RenderObject::isFlexibleBoxIncludingDeprecated): Added. 2011-08-22 Nat Duca <nduca@chromium.org> [chromium] Make compositor context current before querying for extensions https://bugs.webkit.org/show_bug.cgi?id=66696 Reviewed by James Robinson. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): 2011-08-22 Cary Clark <caryclark@google.com> Webkit Mac10.6 Builder-Tester (Skia)(deps)(dbg) has compile failures https://bugs.webkit.org/show_bug.cgi?id=66703 This error was detected by the debug build of the Chromium WebKit Canary. Reviewed by James Robinson. No new tests. This change suppresses a compile-time warning but does not affect the generated code. * platform/graphics/mac/FontCustomPlatformData.h: Replaced struct with class in a forward reference. 2011-08-22 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderFlowThread layout should use the attached region sizes https://bugs.webkit.org/show_bug.cgi?id=66143 When RenderFlowThread is doing the layout it also sets the current RenderFlowThread on the RenderView. RenderFlowThread cannot be nested inside a single RenderView, so there's no need to put that on the LayoutState. The right offset used to layout the inlines inside a RenderFlowThread is now adjusted to fit inside the current region. Reviewed by David Hyatt. Tests: fast/regions/webkit-flow-floats-inside-regions-bounds.html fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-lr.html fast/regions/webkit-flow-inlines-inside-regions-bounds.html * rendering/LayoutState.cpp: (WebCore::LayoutState::LayoutState): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::adjustForRegionFittingIfNeeded): (WebCore::RenderBlock::logicalRightOffsetForLine): * rendering/RenderBlock.h: * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::RenderFlowThread): (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer): (WebCore::CurrentRenderFlowThreadMaintainer::~CurrentRenderFlowThreadMaintainer): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::renderRegionForLine): (WebCore::RenderFlowThread::regionLogicalWidthForLine): * rendering/RenderFlowThread.h: (WebCore::RegionFittingDisabler::RegionFittingDisabler): (WebCore::RegionFittingDisabler::~RegionFittingDisabler): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::layout): * rendering/RenderRegion.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThread): (WebCore::RenderView::currentRenderFlowThread): (WebCore::RenderView::setCurrentRenderFlowThread): (WebCore::RenderView::pushLayoutState): 2011-08-22 Peter Kasting <pkasting@google.com> Unreviewed, rolling out r93517. http://trac.webkit.org/changeset/93517 https://bugs.webkit.org/show_bug.cgi?id=63553 Breaks GTK Linux and Chromium Win * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-22 Wyatt Carss <wcarss@chromium.org> FrameSelection::setNonDirectionalSelectionIfNeeded should not have a FrameSelection passed to it https://bugs.webkit.org/show_bug.cgi?id=66636 Reviewed by Darin Adler. setNonDirectionalSelection was moved into FrameSelection in r93134 for bug 60529, and still took a FrameSelection as an argument, which has been removed. * editing/FrameSelection.cpp: (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): 2011-08-22 Tony Chang <tony@chromium.org> Add CSS parsing of -webkit-flex-order https://bugs.webkit.org/show_bug.cgi?id=65384 The property is an int described here: http://dev.w3.org/csswg/css3-flexbox/#flex-order Doesn't do anything yet, just hooking it up. Reviewed by Ojan Vafai. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleApplyProperty.cpp: (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::flexOrder): (WebCore::InheritedFlags::setFlexOrder): (WebCore::InheritedFlags::initialFlexOrder): * rendering/style/StyleFlexibleBoxData.cpp: (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleFlexibleBoxData::operator==): * rendering/style/StyleFlexibleBoxData.h: 2011-08-22 Adrienne Walker <enne@google.com> [chromium] Fix nullptr deref when switching composited tabs https://bugs.webkit.org/show_bug.cgi?id=66691 Reviewed by James Robinson. * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::protectTileTextures): 2011-08-22 James Robinson <jamesr@chromium.org> [chromium] Content and render surface textures not freed when compositor context destroyed https://bugs.webkit.org/show_bug.cgi?id=66589 Reviewed by Kenneth Russell. Explicitly delete all managed textures when destroying the compositor context. This regressed due to a combination of using share groups (so destroying a context no longer implicitly releases all resources in that context) and switching the TextureManager over to support deferred texture destruction. We sadly don't have a way to construct automated tests for resource leaks currently. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::cleanupSharedObjects): 2011-08-22 Nate Chapin <japhet@chromium.org> Unload events can crash us when they blank out a parent frame. https://bugs.webkit.org/show_bug.cgi?id=64741 Reviewed by Adam Barth. Test: fast/loader/document-destruction-within-unload.html * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Prevent unload events from going into infinite recursion. (WebCore::FrameLoader::setDocumentLoader): Ensure we don't let set m_documentLoader to a DocumentLoader with a null Frame*. (WebCore::FrameLoader::detachChildren): Save off a vector of children to detach, rather than doing it inline. 2011-08-22 Young Han Lee <joybro@company100.net> Reviewed by Dirk Schulze. SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end https://bugs.webkit.org/show_bug.cgi?id=63553 calculateAnimationPercentAndRepeat() is returning 1, which means 100%, whenever elapsed >= m_intervalEnd, but this is wrong because m_intervalEnd can be in the middle of the animation duration. (e.g. begin="0s" end="2s" dur="3s") This change makes the function return the animations's true progress instead of 100% when the animation ends. Test: svg/animations/animate-end-attribute.html * svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat): 2011-08-22 Gyuyoung Kim <gyuyoung.kim@samsung.com> Fix build error when inspector is disabled. https://bugs.webkit.org/show_bug.cgi?id=66644 Reviewed by Darin Adler. * inspector/InspectorDatabaseResource.h: Add ENABLE(INSPECTOR) macro. 2011-08-22 Abhishek Arya <inferno@chromium.org> Crash in FocusController::advanceFocusInDocumentOrder https://bugs.webkit.org/show_bug.cgi?id=66678 RefPtr the focusable node to prevent getting deleted by mutation event. Reviewed by Dave Hyatt. Test: fast/frames/focus-controller-crash-change-event.html * page/FocusController.cpp: (WebCore::FocusController::advanceFocusInDocumentOrder): 2011-08-22 Justin Novosad <junov@chromium.org> [Chromium] Crash when allocation of very large canvas fails https://bugs.webkit.org/show_bug.cgi?id=66563 Replacing the crash with a more graceful failure: canvas will not render. Reviewed by Stephen White. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): Invoking TryCreateBitmapCanvas instead of CreateBitmapCanvas This is the non-crashing version of the factory function. It returns NULL if allocation fails. Code for handling NULL pointer was already in place. 2011-08-22 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: bind registerDomainDispatcher to domain names. https://bugs.webkit.org/show_bug.cgi?id=66670 jscompiler can't be used for validating domain events dispatchers because registerDomainDispatcher is too generic. I'd like to introduce named versions per each domain. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: (GenerateInterface): (generateBackendStubJS): * inspector/front-end/ApplicationCacheItemsView.js: * inspector/front-end/ConsoleView.js: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent): * inspector/front-end/DOMStorage.js: * inspector/front-end/Database.js: * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher): * inspector/front-end/ProfilesPanel.js: * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): * inspector/front-end/TimelineManager.js: (WebInspector.TimelineDispatcher): * inspector/front-end/WorkerManager.js: (WebInspector.WorkerManager): * inspector/front-end/inspector.js: 2011-08-22 Benjamin Poulain <benjamin@webkit.org> Fix generate-inspector-idl for Python3 after r93396 https://bugs.webkit.org/show_bug.cgi?id=66663 Reviewed by Andreas Kling. In Python3, print is a function instead of a language keyword. Using parentheses around the argument ensures the code works for both Python 2 and 3. * inspector/generate-inspector-idl: 2011-08-22 Keishi Hattori <keishi@webkit.org> Chrome::setSelectedColorInColorChooser shouldn't be called when color chooser sets a new color https://bugs.webkit.org/show_bug.cgi?id=66658 Reviewed by Kent Tamura. * html/ColorInputType.cpp: (WebCore::ColorInputType::colorSelected): Call setValueFromRenderer instead of setValue. * html/ColorInputType.h: 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract breakpoint management code to a separate class and add tests. https://bugs.webkit.org/show_bug.cgi?id=66224 Reviewed by Pavel Feldman. Test: inspector/debugger/breakpoint-manager.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Added. (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype._breakpointResolved): (WebInspector.BreakpointManager.prototype.serializeBreakpoints): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.deserialize): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get rawSourceCode): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-21 Martin Robinson <mrobinson@igalia.com> Fix 'make dist' for WebKitGTK+. * GNUmakefile.am: Add a missing file to the EXTRA_DIST list. * GNUmakefile.list.am: Update the sources list to reflect reality. 2011-08-20 Nebojsa Ciric <cira@chromium.org> Point build system and #include headers to v8-i18n library instead of v8 library. We forked a new code.google.com/p/v8-i18n project from v8/extensions/experimental. https://bugs.webkit.org/show_bug.cgi?id=66573 Reviewed by Kent Tamura. Covered by existing tests, and no code was changed. * WebCore.gyp/WebCore.gyp: * bindings/v8/V8DOMWindowShell.cpp: (WebCore::V8DOMWindowShell::createNewContext): 2011-08-20 Tom Zakrajsek <tomz@codeaurora.org> instanceof HTMLSourceElement Fails https://bugs.webkit.org/show_bug.cgi?id=65013 Reviewed by Eric Carlson. Add HTMLSourceElement to DOMWindow.idl for consistency. Constructors for all elements should be available on DOMWindow. * bindings/generic/RuntimeEnabledFeatures.cpp: (WebCore::RuntimeEnabledFeatures::htmlSourceElementEnabled): * bindings/generic/RuntimeEnabledFeatures.h: * page/DOMWindow.idl: 2011-08-20 Darin Adler <darin@apple.com> If Range::insertNode is passed an empty document fragment, it creates a broken DOM tree https://bugs.webkit.org/show_bug.cgi?id=65015 Reviewed by Alexey Proskuryakov. Test: fast/dom/Range/insertNode-empty-fragment-crash.html * dom/Range.cpp: (WebCore::Range::insertNode): Don't adjust the range after insertion if we didn't add anything. Otherwise the code will put a wrong "child before" value into the range end boundary point. 2011-08-20 Ken Buchanan <kenrb@chromium.org> OOB Read in WebCore::SVGAnimationElement https://bugs.webkit.org/show_bug.cgi?id=65858 Reviewed by Nikolas Zimmermann. Potential crash resulting from incorrect keySpline array lengths. This fix validates the length in startedActiveInterval. Test: svg/animations/animate-calcMode-spline-crash-bad-array-length.xhtml * svg/SVGAnimationElement.cpp: (WebCore::SVGAnimationElement::parseMappedAttribute): (WebCore::SVGAnimationElement::calculateKeyTimesIndex): 2011-08-19 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93415. http://trac.webkit.org/changeset/93415 https://bugs.webkit.org/show_bug.cgi?id=66623 Introduces failing test (Requested by pfeldman on #webkit). * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Removed. * inspector/front-end/DebuggerModel.js: * inspector/front-end/SourceFile.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-19 Chris Fleizach <cfleizach@apple.com> AX WK2 Regression: WebKit outputs incorrect AX position in frames/iframes https://bugs.webkit.org/show_bug.cgi?id=61289 Update the code to determine the position of accessibility elements on Mac for WK2, so that elements within iframes are positioned correctly. Reviewed by Darin Adler.. * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::page): * accessibility/AccessibilityObject.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): 2011-08-19 Jeffrey Pfau <jpfau@apple.com> New XML parser: text nodes outside of root element not created for document fragments https://bugs.webkit.org/show_bug.cgi?id=66604 When intializing a fragment parser, declare that the first element has been seen. Also, flush the text nodes when finishing parsing a document. Reviewed by Darin Adler. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::finish): * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): (WebCore::XMLTreeBuilder::processToken): (WebCore::XMLTreeBuilder::finish): * xml/parser/XMLTreeBuilder.h: 2011-08-19 Jeff Miller <jeffm@apple.com> MediaPlayerPrivateAVFoundationCF should use AVCFURLAssetCopyAudiovisualMIMETypes() to get list of supported MIME types https://bugs.webkit.org/show_bug.cgi?id=66612 Reviewed by Darin Adler. No new tests, should be covered by existing media tests. * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added AVCFURLAssetCopyAudiovisualMIMETypes(). * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: (WebCore::mimeTypeCache): Use AVCFURLAssetCopyAudiovisualMIMETypes() to build the cache of supported MIME types. 2011-08-19 Adrienne Walker <enne@google.com> [chromium] Regression: Fix clang errors from r93424 https://bugs.webkit.org/show_bug.cgi?id=66609 Reviewed by James Robinson. The invalidateRect function does not appear to be used anywhere because the setNeedsDisplay function is used instead. Fix the Clang error by just removing this unused vestigial base class function. * platform/graphics/chromium/LayerChromium.h: 2011-08-19 Anders Carlsson <andersca@apple.com> Add new enums to npapi.h https://bugs.webkit.org/show_bug.cgi?id=66608 Reviewed by Sam Weinig. * bridge/npapi.h: 2011-08-19 Jeffrey Pfau <jpfau@apple.com> libxml2 fragment parser loses prefix namespaces https://bugs.webkit.org/show_bug.cgi?id=66423 This makes the loop over the elements outside of the context actually update the element it's processing. Reviewed by Darin Adler. Test: fast/parser/innerhtml-with-prefixed-elements.xhtml * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::XMLDocumentParser::XMLDocumentParser): 2011-08-19 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66590 Re-name scrollbar painter types Reviewed by Sam Weinig. Names changed to remove references to WebKitSystemInterface since the implementation is now in WebCore. And the type names changed to be more Objective- Cish instead of C++ish WTF_USE_WK_SCROLLBAR_PAINTER -> WTF_USE_SCROLLBAR_PAINTER WKScrollbarPainterRef -> ScrollbarPainter WKScrollbarPainterControllerRef -> ScrollbarPainterController * platform/mac/NSScrollerImpDetails.h: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::cancelAnimations): (WebCore::ScrollAnimatorMac::setIsActive): (WebCore::ScrollAnimatorMac::updateScrollerStyle): * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformSetScrollbarOverlayStyle): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (+[ScrollbarPrefsObserver appearancePrefsChanged:]): (WebCore::updateArrowPlacement): (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeMac::painterForScrollbar): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): 2011-08-19 Van Lam <vanlam@google.com> Rename VisiblePosition::honorEditableBoundary* to VisiblePosition::honorEditingBoundary* https://bugs.webkit.org/show_bug.cgi?id=66499 Reviewed by Ryosuke Niwa. Renamed VisiblePosition::honorEditableBoundary* to honorEditingBoundary. * editing/VisiblePosition.cpp: (WebCore::VisiblePosition::next): (WebCore::VisiblePosition::previous): (WebCore::VisiblePosition::left): (WebCore::VisiblePosition::right): (WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore): (WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter): * editing/VisiblePosition.h: * editing/visible_units.cpp: (WebCore::previousWordPosition): (WebCore::nextWordPosition): (WebCore::startOfLine): (WebCore::endOfLine): (WebCore::previousSentencePosition): (WebCore::nextSentencePosition): (WebCore::logicalStartOfLine): (WebCore::logicalEndOfLine): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-08-19 James Robinson <jamesr@chromium.org> REGRESSION(r91628): 3 canvas tests crash on Chromium Linux and one test fail on Chromium Mac https://bugs.webkit.org/show_bug.cgi?id=65063 Reviewed by Darin Fisher. Fixes crashes due to a bad cast from Image to BitmapImage on skia ports that use BitmapImageSingleFrameSkia. In the skia port Image::isBitmapImage() returning true does not necessarily mean that Image is of type BitmapImage. Covered by fast/canvas/canvas-as-image.html and many other canvas tests. Patch originally by Tom Hudson. * platform/graphics/BitmapImage.h: (WebCore::BitmapImage::currentFrameHasAlpha): (WebCore::BitmapImage::notSolidColor): * platform/graphics/Image.cpp: (WebCore::Image::drawTiled): * platform/graphics/Image.h: (WebCore::Image::currentFrameHasAlpha): (WebCore::Image::notSolidColor): * platform/graphics/skia/BitmapImageSingleFrameSkia.h: (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha): (WebCore::BitmapImageSingleFrameSkia::notSolidColor): * rendering/RenderImage.cpp: (WebCore::RenderImage::backgroundIsObscured): 2011-08-19 Emil A Eklund <eae@chromium.org> Switch clipping for svg to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66586 Reviewed by Eric Seidel. No new tests as no new functionality. * rendering/svg/RenderSVGForeignObject.h: * rendering/svg/RenderSVGGradientStop.h: (WebCore::RenderSVGGradientStop::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGHiddenContainer.h: (WebCore::RenderSVGHiddenContainer::clippedOverflowRectForRepaint): * rendering/svg/RenderSVGInline.cpp: (WebCore::RenderSVGInline::clippedOverflowRectForRepaint): (WebCore::RenderSVGInline::computeRectForRepaint): * rendering/svg/RenderSVGInline.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGModelObject::computeRectForRepaint): * rendering/svg/RenderSVGModelObject.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::clippedOverflowRectForRepaint): (WebCore::RenderSVGText::computeRectForRepaint): * rendering/svg/RenderSVGText.h: * svg/SVGSVGElement.cpp: (WebCore::SVGSVGElement::localCoordinateSpaceTransform): * svg/SVGSVGElement.h: (WebCore::SVGSVGElement::setContainerSize): (WebCore::SVGSVGElement::containerSize): * svg/graphics/SVGImage.cpp: (WebCore::SVGImageChromeClient::invalidateContentsAndWindow): (WebCore::SVGImage::setContainerSize): * svg/graphics/SVGImage.h: 2011-08-19 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93425. http://trac.webkit.org/changeset/93425 https://bugs.webkit.org/show_bug.cgi?id=66591 "The newly-added ASSERT is being triggered on several bots" (Requested by jchaffraix on #webkit). * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): (WebCore::HTMLLinkElement::setDisabled): (WebCore::HTMLLinkElement::sheetLoaded): (WebCore::HTMLLinkElement::disabled): * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isEnabledViaScript): 2011-08-18 Adrienne Walker <enne@google.com> [chromium] Refactor updateCompositorResources to take an explicit GraphicsContext3D https://bugs.webkit.org/show_bug.cgi?id=66432 Reviewed by James Robinson. Covered by existing tests. * platform/graphics/chromium/Canvas2DLayerChromium.cpp: (WebCore::Canvas2DLayerChromium::updateCompositorResources): * platform/graphics/chromium/Canvas2DLayerChromium.h: * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::updateCompositorResources): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/VideoLayerChromium.cpp: (WebCore::VideoLayerChromium::updateCompositorResources): * platform/graphics/chromium/VideoLayerChromium.h: * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::updateCompositorResources): * platform/graphics/chromium/WebGLLayerChromium.h: 2011-08-19 Victoria Kirst <vrk@chromium.org> Tell media player to prepareToPlay() at end of HTMLMediaElement::load() https://bugs.webkit.org/show_bug.cgi?id=66414 Reviewed by Eric Carlson. Test: media/video-load-preload-none.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::load): 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderBlock to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66502 Reviewed by Eric Seidel. Convert RenderBlock to new layout abstraction. Leave m_lineHight as a 30 bit int for now to avoid unnecessarily increasing the memory usage. No new tests as no new functionality. * rendering/RenderBlock.cpp: * rendering/RenderBlock.h: 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderBoxModelObject to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66534 Reviewed by Eric Seidel. Convert RenderBoxModelObject to new layout abstraction. No new tests as no new functionality. * rendering/RenderBoxModelObject.cpp: (WebCore::ImageQualityController::set): (WebCore::ImageQualityController::shouldPaintAtLowQuality): (WebCore::RenderBoxModelObject::shouldPaintAtLowQuality): (WebCore::backgroundRectAdjustedForBleedAvoidance): (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::calculateFillTileSize): (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment): (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): (WebCore::RenderBoxModelObject::paintNinePieceImage): (WebCore::borderWillArcInnerEdge): (WebCore::RenderBoxModelObject::paintOneBorderSide): (WebCore::RenderBoxModelObject::paintBorderSides): (WebCore::RenderBoxModelObject::paintBorder): (WebCore::RenderBoxModelObject::drawBoxSideFromPath): (WebCore::RenderBoxModelObject::clipBorderSidePolygon): (WebCore::areaCastingShadowInHole): (WebCore::RenderBoxModelObject::paintBoxShadow): (WebCore::RenderBoxModelObject::containingBlockLogicalWidthForContent): * rendering/RenderBoxModelObject.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Speed up RenderFlowThread repaint of regions https://bugs.webkit.org/show_bug.cgi?id=66566 Reviewed by David Hyatt. When in printing or the repaint rectangle is empty, there is no need to iterate the render flow regions in order to repaint. Covered by existing tests. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::shouldRepaint): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Parse -webkit-region-break(after, before, inside) https://bugs.webkit.org/show_bug.cgi?id=66559 Reviewed by David Hyatt. * css/CSSComputedStyleDeclaration.cpp: (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSMutableStyleDeclaration.cpp: * css/CSSParser.cpp: (WebCore::CSSParser::parseValue): * css/CSSPropertyNames.in: * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::regionBreakBefore): (WebCore::InheritedFlags::regionBreakInside): (WebCore::InheritedFlags::regionBreakAfter): (WebCore::InheritedFlags::setRegionBreakBefore): (WebCore::InheritedFlags::setRegionBreakInside): (WebCore::InheritedFlags::setRegionBreakAfter): * rendering/style/StyleRareNonInheritedData.cpp: (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareNonInheritedData::operator==): * rendering/style/StyleRareNonInheritedData.h: 2011-08-19 Emil A Eklund <eae@chromium.org> Switch RenderLayer to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66507 Reviewed by Eric Seidel. Convert RenderLayer to new layout abstraction. No new tests as no new functionality. * rendering/LayoutTypes.h: (WebCore::flooredLayoutSize): * rendering/RenderLayer.cpp: * rendering/RenderLayer.h: * rendering/RenderLayerBacking.cpp: * rendering/RenderLayerBacking.h: * rendering/RenderLayerCompositor.cpp: * rendering/RenderLayerCompositor.h: 2011-08-19 Mihnea Ovidenie <mihnea@adobe.com> [CSSRegions]Content displayed in regions should not be scrollable https://bugs.webkit.org/show_bug.cgi?id=66459 Reviewed by Darin Adler. Initially, when creating the style for the RenderFlowThread, overflowX and overflowY were both set to hidden, so that RenderView did not display scrollbars when a RenderFlowThread exists. However, this allowed the possibility of scrolling the content displayed in region. Now, the RenderFlowThread objects are ignored in RenderBlock::insertPositionedObject and the style of the RenderFlowThread can be set to visible, thus preventing scrolling of the content displayed in regions. Test: fast/regions/content-flowed-into-regions-no-scroll.html * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::createFlowThreadStyle): 2011-08-19 Julien Chaffraix <jchaffraix@webkit.org> REGRESSION (r84327-r84329): CSS stylesheets fail to load on www.flagstar.com login page https://bugs.webkit.org/show_bug.cgi?id=65140 <rdar://problem/9835905> Reviewed by Antti Koivisto. Tests: fast/css/stylesheet-enable-first-alternate-on-load.html fast/css/stylesheet-enable-first-alternate.html fast/css/stylesheet-enable-second-alternate-on-load.html fast/css/stylesheet-enable-second-alternate.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet-in-error.html http/tests/css/link-css-disabled-value-with-slow-loading-sheet.html The gist of the issue is that we were ignoring calls to HTMLLinkElement::setDisabled that would enable a style sheet when we were loading a stylesheet (m_sheet was 0 and thus ignored the call per the spec). FF goes against the CSS OM spec in this case and always keep an associated sheet as long as 'rel' hints at a stylesheet link and href is present. Instead of siding with FF, I continued to follow the specification and store the enabled via javascript state into m_scriptState (renamed from m_isEnabledViaScript). This information gets merged back into the style sheet disabled state when it is available. While debugging the case at hand, I found some cases that were not properly handled and were fixed as part of this change. * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::HTMLLinkElement): Updated after m_isEnabledViaScript rename. (WebCore::HTMLLinkElement::setDisabled): Always call setIsEnabledViaScript so that the information is properly stored (either for recalcStyleSelector or just to store the state during loading). (WebCore::HTMLLinkElement::sheetLoaded): Merge back the state from m_scriptState to the sheet's disabled state. (WebCore::HTMLLinkElement::disabled): Account for the temporary state and return the right value. It matches FF and what people would expect. (WebCore::HTMLLinkElement::areDisabledAndScriptStatesConsistent): Debug only method that checks that disabled() and isEnabledViaScript() are consistent with each other (under some circumstances). * html/HTMLLinkElement.h: (WebCore::HTMLLinkElement::isEnabledViaScript): Updated after m_isEnabledViaScript rename. (WebCore::HTMLLinkElement::setIsEnabledViaScript): Added setter. 2011-08-17 Adrienne Walker <enne@google.com> [chromium] Split tiler into main thread / compositor thread versions https://bugs.webkit.org/show_bug.cgi?id=66065 Reviewed by James Robinson. Covered by existing tests. LayerTilerChromium is renamed to be CCLayerTilingData. Invalidation and paint functionality is pushed into TiledLayerChromium and drawing with GL is pushed into CCTiledLayerImpl. During tree synchronization, the tiler properties and texture IDs are synchronized into CCTiledLayerImpl. * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): (WebCore::ContentLayerChromium::createTextureUpdaterIfNeeded): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::bestTextureFormat): (WebCore::LayerRendererChromium::initializeSharedObjects): (WebCore::LayerRendererChromium::tilerProgram): (WebCore::LayerRendererChromium::tilerProgramSwizzle): (WebCore::LayerRendererChromium::tilerProgramAA): (WebCore::LayerRendererChromium::tilerProgramSwizzleAA): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/LayerTextureUpdater.h: * platform/graphics/chromium/LayerTilerChromium.cpp: Removed. * platform/graphics/chromium/ManagedTexture.h: (WebCore::ManagedTexture::textureId): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::UpdatableTile::UpdatableTile): (WebCore::UpdatableTile::texture): (WebCore::UpdatableTile::dirty): (WebCore::UpdatableTile::clearDirty): (WebCore::TiledLayerChromium::TiledLayerChromium): (WebCore::TiledLayerChromium::cleanupResources): (WebCore::TiledLayerChromium::drawsContent): (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::updateCompositorResources): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::dumpLayerProperties): (WebCore::TiledLayerChromium::textureManager): (WebCore::TiledLayerChromium::tileAt): (WebCore::TiledLayerChromium::createTile): (WebCore::TiledLayerChromium::invalidateTiles): (WebCore::TiledLayerChromium::invalidateRect): (WebCore::TiledLayerChromium::protectVisibleTileTextures): (WebCore::TiledLayerChromium::protectTileTextures): (WebCore::TiledLayerChromium::prepareToUpdate): * platform/graphics/chromium/TiledLayerChromium.h: * platform/graphics/chromium/cc/CCLayerTilingData.cpp: Added. (WebCore::CCLayerTilingData::create): (WebCore::CCLayerTilingData::CCLayerTilingData): (WebCore::CCLayerTilingData::setTileSize): (WebCore::CCLayerTilingData::operator=): (WebCore::CCLayerTilingData::addTile): (WebCore::CCLayerTilingData::takeTile): (WebCore::CCLayerTilingData::tileAt): (WebCore::CCLayerTilingData::reset): (WebCore::CCLayerTilingData::contentRectToTileIndices): (WebCore::CCLayerTilingData::contentRectToLayerRect): (WebCore::CCLayerTilingData::layerRectToContentRect): (WebCore::CCLayerTilingData::tileContentRect): (WebCore::CCLayerTilingData::tileLayerRect): (WebCore::CCLayerTilingData::setLayerPosition): (WebCore::CCLayerTilingData::growLayerToContain): * platform/graphics/chromium/cc/CCLayerTilingData.h: Renamed from Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h. (WebCore::CCLayerTilingData::numTiles): (WebCore::CCLayerTilingData::numTilesX): (WebCore::CCLayerTilingData::numTilesY): (WebCore::CCLayerTilingData::tileBounds): (WebCore::CCLayerTilingData::textureOffset): (WebCore::CCLayerTilingData::tileSize): (WebCore::CCLayerTilingData::hasBorderTexels): (WebCore::CCLayerTilingData::isEmpty): (WebCore::CCLayerTilingData::Tile::Tile): (WebCore::CCLayerTilingData::Tile::i): (WebCore::CCLayerTilingData::Tile::j): (WebCore::CCLayerTilingData::Tile::moveTo): (WebCore::CCLayerTilingData::TileMapKeyTraits::emptyValue): (WebCore::CCLayerTilingData::TileMapKeyTraits::constructDeletedValue): (WebCore::CCLayerTilingData::TileMapKeyTraits::isDeletedValue): (WebCore::CCLayerTilingData::tiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::DrawableTile::DrawableTile): (WebCore::DrawableTile::textureId): (WebCore::DrawableTile::setTextureId): (WebCore::CCTiledLayerImpl::CCTiledLayerImpl): (WebCore::CCTiledLayerImpl::bindContentsTexture): (WebCore::CCTiledLayerImpl::tileAt): (WebCore::CCTiledLayerImpl::createTile): (WebCore::CCTiledLayerImpl::draw): (WebCore::CCTiledLayerImpl::setTilingData): (WebCore::CCTiledLayerImpl::syncTextureId): (WebCore::isCCW): (WebCore::computeEdge): (WebCore::intersect): (WebCore::CCTiledLayerImpl::drawTiles): * platform/graphics/chromium/cc/CCTiledLayerImpl.h: (WebCore::CCTiledLayerImpl::setSkipsDraw): (WebCore::CCTiledLayerImpl::setTextureOrientation): (WebCore::CCTiledLayerImpl::setSampledTexelFormat): * platform/graphics/gpu/TilingData.h: 2011-08-19 Dan Bernstein <mitz@apple.com> Better build fix after r93384. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Use WTF::Unicode wrapper instead of ICU. 2011-08-19 Pavel Podivilov <podivilov@chromium.org> Web Inspector: update scope variables upon value changes via console. https://bugs.webkit.org/show_bug.cgi?id=54720 Reviewed by Pavel Feldman. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract breakpoint management code to a separate class and add tests. https://bugs.webkit.org/show_bug.cgi?id=66224 Reviewed by Pavel Feldman. Test: inspector/debugger/breakpoint-manager.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/BreakpointManager.js: Added. (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded): (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode): (WebInspector.BreakpointManager.prototype.setBreakpoint): (WebInspector.BreakpointManager.prototype.removeBreakpoint): (WebInspector.BreakpointManager.prototype._materializeBreakpoint): (WebInspector.BreakpointManager.prototype._breakpointDebuggerLocationChanged): (WebInspector.BreakpointManager.prototype._addBreakpointToUI): (WebInspector.BreakpointManager.prototype._deleteBreakpointFromUI): (WebInspector.BreakpointManager.prototype._moveBreakpointInUI): (WebInspector.BreakpointManager.prototype._breakpoints): (WebInspector.BreakpointManager.prototype._breakpoint): (WebInspector.BreakpointManager.prototype._forEachBreakpoint): (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger): (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger): (WebInspector.BreakpointManager.prototype._breakpointResolved): (WebInspector.BreakpointManager.prototype.serializeBreakpoints): (WebInspector.BreakpointManager.prototype.reset): (WebInspector.BreakpointManager.prototype.debuggerReset): (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.serialize): (WebInspector.Breakpoint.deserialize): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.setBreakpointByScriptLocation): * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype.get rawSourceCode): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-19 Adam Roben <aroben@apple.com> Fix typo * dom/DOMAllInOne.cpp: 2011-08-19 Adam Roben <aroben@apple.com> Windows build fix after r93385 * dom/DOMAllInOne.cpp: Added EventDispatcMediator.cpp. 2011-08-19 Pavel Feldman <pfeldman@google.com> Web Inspector: getAttributes should work on a single node, not array. https://bugs.webkit.org/show_bug.cgi?id=66544 Reviewed by Adam Roben. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::getAttributes): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype._loadNodeAttributes): 2011-08-19 Anton Muhin <antonm@chromium.org> [v8] CSS wrapper objects retention https://bugs.webkit.org/show_bug.cgi?id=66377 Reviewed by Pavel Feldman. Disable object grouping for CSS object wrappers. This logic leads to hard to debug use-after-free problems. * bindings/v8/V8GCController.cpp: (WebCore::GrouperVisitor::visitDOMWrapper): 2011-08-19 Pavel Feldman <pfeldman@google.com> Web Inspector: introduce NodeId inherited from integer in the DOM domain description. https://bugs.webkit.org/show_bug.cgi?id=66491 Drive-by rename of couple of DOM domain protocol methods. Reviewed by Adam Roben. * inspector/Inspector.json: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::requestChildNodes): (WebCore::InspectorDOMAgent::getAttributes): (WebCore::InspectorDOMAgent::requestNode): (WebCore::InspectorDOMAgent::buildObjectForNode): * inspector/InspectorDOMAgent.h: * inspector/front-end/DOMAgent.js: (WebInspector.DOMNode): (WebInspector.DOMNode.prototype.getChildNodes): (WebInspector.DOMAgent.prototype.pushNodeToFrontend): (WebInspector.DOMAgent.prototype._loadNodeAttributes): (WebInspector.DOMAgent.prototype._setDocument): (WebInspector.DOMAgent.prototype._setDetachedRoot): * inspector/generate-inspector-idl: 2011-08-19 Jochen Eisinger <jochen@chromium.org> IDBSQLiteBackingStore::deleteObjectStore should maintain referential integrity. https://bugs.webkit.org/show_bug.cgi?id=66470 Reviewed by Tony Gentilcore. * storage/IDBSQLiteBackingStore.cpp: (WebCore::IDBSQLiteBackingStore::deleteObjectStore): 2011-08-19 Takashi Toyoshima <toyoshim@chromium.org> [WebSocket] CloseEvent's code and reason properties support. https://bugs.webkit.org/show_bug.cgi?id=66362 Reviewed by Kent Tamura. Current WebSocket implementation miss code and reason properties in CloseEvent. This change expose incoming closing frame's code and reason to JavaScript API. Tests: http/tests/websocket/tests/hybi/close-code-and-reason.html http/tests/websocket/tests/hybi/workers/close-code-and-reason.html * websockets/CloseEvent.h: (WebCore::CloseEvent::initCloseEvent): (WebCore::CloseEvent::code): (WebCore::CloseEvent::reason): (WebCore::CloseEvent::CloseEvent): * websockets/CloseEvent.idl: Add code and reason properies. * websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::didClose): (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback): * websockets/ThreadableWebSocketChannelClientWrapper.h: * websockets/WebSocket.cpp: (WebCore::WebSocket::didConnect): (WebCore::WebSocket::didClose): * websockets/WebSocket.h: Add implement to handle code and reason. * websockets/WebSocketChannel.cpp: (WebCore::WebSocketChannel::WebSocketChannel): (WebCore::WebSocketChannel::didCloseSocketStream): (WebCore::WebSocketChannel::processFrame): * websockets/WebSocketChannel.h: Add closing frame payload parser. * websockets/WebSocketChannelClient.h: (WebCore::WebSocketChannelClient::didClose): * websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::workerContextDidClose): (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): * websockets/WorkerThreadableWebSocketChannel.h: Add implement to handle code and reason. 2011-08-19 MORITA Hajime <morrita@google.com> Spell-checking doesn't recognize word boundaries on contests inserted by execCommand('insertHTML') https://bugs.webkit.org/show_bug.cgi?id=65902 Reviewed by Ryosuke Niwa. markMisspellingsAndBadGrammar() was using markSpelling() and markBadGrammar(). But these are low-level API and caller should take care of word boundary. This change replaced these call with overloaded version of markMisspellingsAndBadGrammar(), which handles word boundary correctly. Test: editing/spelling/spelling-insert-html.html * WebCore.exp.in: * editing/Editor.cpp: (WebCore::Editor::markMisspellingsAndBadGrammar): * testing/Internals.cpp: (WebCore::Internals::markerCountOf): Added. (WebCore::Internals::markedRangeAt): Added. * testing/Internals.h: * testing/Internals.idl: 2011-08-19 Nayan Kumar K <nayankk@motorola.com> Run-time error fix in WebKit-GTK with video support disabled. https://bugs.webkit.org/show_bug.cgi?id=66541 Definition of the function extraFullScreenStyleSheet() in webkit-gtk lies outside ENABLE(VIDEO) guard, resulting in runtime error while trying to launch GtkLauncher with video support disabled. Reviewed by Philippe Normand. Run-time error fix. No test cases were added. * platform/gtk/RenderThemeGtk.h: 2011-08-19 Shinya Kawanaka <shinyak@google.com> input[maxlength=0] should ignore text input. https://bugs.webkit.org/show_bug.cgi?id=65497 Reviewed by Kent Tamura. Changed the valid range of maxlength. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::parseMaxLengthAttribute): Changed maxlength check condition. 2011-08-19 Ilya Tikhonovsky <loislo@chromium.org> Web Inspector: backend js api: an ability to skip optional arguments in the middle of the argument list is required. https://bugs.webkit.org/show_bug.cgi?id=66482 There are functions in the API with multiple optional arguments. When we call it we have to specify an optional argument as 'undefined' if we want to pass non default value for the next one. This can be solved with passing the arguments as an object. Reviewed by Pavel Feldman. * inspector/CodeGeneratorInspector.pm: * inspector/front-end/RemoteObject.js: 2011-08-19 Zoltan Horvath <zoltan@webkit.org> [Qt] Build fix after r93384. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): 2011-08-18 Shawn Singh <shawnsingh@chromium.org> Computing screen-space transform for LayerChromium and CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=66114 Added a data member to LayerChromium and CCLayerImpl that holds the screen-space transform. The transform is computed in calculateDrawTransformsAndVisibility(), which is used during updating (LayerChromium) and drawing (CCLayerImpl). Also fixed a FIXME in LayerRendererChromium::drawLayer, which was not computing the entire hierarchy of transforms to determine back-face visibility. Now it simply uses the world space transform. Reviewed by James Robinson. Test: compositing/backface-visibility-hierarchical-transform.html * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::screenSpaceTransform): (WebCore::LayerChromium::setScreenSpaceTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::screenSpaceTransform): (WebCore::CCLayerImpl::setScreenSpaceTransform): 2011-08-18 Ben Wells <benwells@chromium.org> [skia] -webkit-transform breaks -webkit-mask https://bugs.webkit.org/show_bug.cgi?id=66442 The problem here is that in RenderBox::paintMaskImages, if we are in a transform with a rotation, scale or skew we set the composite mode to be DestinationIn and then create a transparency layer, then paint the mask with SourceOver and end the transparency layer. (The normal case is just to use DestinationIn to paint the mask.) In skia when we create transparency layers we don't pass on the composite mode, so when we end the transparency layer it is composited back using SourceOver. The fix is to pass on the composite mode when creating transparency layers in skia. Reviewed by Stephen White. * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::beginTransparencyLayer): * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::getXfermodeMode): * platform/graphics/skia/PlatformContextSkia.h: 2011-08-18 Hayato Ito <hayato@chromium.org> Isolate EventDispatchMediator into a separate file. https://bugs.webkit.org/show_bug.cgi?id=66458 Reviewed by Ryosuke Niwa. Extracted EventDispatchMediator.h and EventDispatchMediator.cpp out of Event.h and Event.cpp Also moved FocusEventDispatchMediator and BlurEventDispatchMediator from Event.{h|cpp} to EventDispatchMediator.{h|cpp}. No new tests since this is just refactoring. * CMakeLists.txt: * GNUmakefile.list.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Event.cpp: * dom/Event.h: * dom/EventDispatchMediator.cpp: Added. (WebCore::EventDispatchMediator::create): (WebCore::EventDispatchMediator::EventDispatchMediator): (WebCore::EventDispatchMediator::dispatchEvent): (WebCore::FocusEventDispatchMediator::create): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): (WebCore::BlurEventDispatchMediator::dispatchEvent): * dom/EventDispatchMediator.h: Added. (WebCore::EventDispatchMediator::~EventDispatchMediator): (WebCore::EventDispatchMediator::event): (WebCore::EventDispatchMediator::EventDispatchMediator): (WebCore::EventDispatchMediator::setEvent): * dom/EventDispatcher.cpp: * dom/KeyboardEvent.h: * dom/MouseEvent.h: * dom/Node.cpp: * dom/ScopedEventQueue.cpp: * dom/UIEvent.h: * dom/WheelEvent.h: 2011-08-18 Dan Bernstein <mitz@apple.com> Mid-word break can occur between a character and a combining mark https://bugs.webkit.org/show_bug.cgi?id=66529 Reviewed by Simon Fraser. No test added because I could not find a combining mark with a non-zero advance in any of the system fonts and tests fonts. * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Disallow a mid-word break before a combining mark. 2011-08-18 Kent Tamura <tkent@chromium.org> REGRESSION(r90971): Null pointer dereference with placeholder and webkit-scrollbar-corner https://bugs.webkit.org/show_bug.cgi?id=66453 Reviewed by Simon Fraser. Test: fast/forms/placeholder-crash-with-scrollbar-corner.html * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): Add a NULL check for owner's layer. 2011-08-18 Jeffrey Pfau <jpfau@apple.com> New XML parser: scripting support https://bugs.webkit.org/show_bug.cgi?id=66406 Reviewed by Adam Barth. * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::resumeParsing): (WebCore::NewXMLDocumentParser::processScript): (WebCore::NewXMLDocumentParser::append): Add support for pausing the parsing (WebCore::NewXMLDocumentParser::finish): Add support for pausing the parsing (WebCore::NewXMLDocumentParser::notifyFinished): * xml/parser/NewXMLDocumentParser.h: (WebCore::NewXMLDocumentParser::pauseParsing): * xml/parser/XMLTreeBuilder.cpp: Add a shared function between self-closing and end tags (WebCore::XMLTreeBuilder::closeElement): Registers scripts and pops the stack (WebCore::XMLTreeBuilder::processStartTag): (WebCore::XMLTreeBuilder::processEndTag): * xml/parser/XMLTreeBuilder.h: 2011-08-18 Mark Hahnenberg <mhahnenberg@apple.com> Move allocation in constructors into separate constructorBody() methods https://bugs.webkit.org/show_bug.cgi?id=66265 Reviewed by Oliver Hunt. No new tests. Refactoring to put all allocations that need to be done after the object's initialization list has executed but before the object is ready for use into a separate constructorBody() method. This method is still called by the constructor, so the patch doesn't resolve any potential issues, it's just to set up the code for further refactoring. * bridge/objc/ObjCRuntimeObject.h: (JSC::Bindings::ObjCRuntimeObject::create): * bridge/objc/ObjCRuntimeObject.mm: * bridge/objc/objc_instance.mm: (ObjCRuntimeMethod::create): (ObjCRuntimeMethod::ObjCRuntimeMethod): * bridge/runtime_array.cpp: * bridge/runtime_array.h: (JSC::RuntimeArray::create): 2011-08-18 Beth Dakin <bdakin@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66495 Lion-specific scroller SPIs can use forward declaration instead of WebKitSystemInterface Reviewed by Sam Weinig. * WebCore.exp.in: * WebCore.xcodeproj/project.pbxproj: * platform/mac/NSScrollerImpDetails.h: Added. * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollbarPartAnimation initWithScrollbarPainter:part:WebCore::scrollAnimator:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPartAnimation setCurrentProgress:]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::notifyPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): (WebCore::ScrollAnimatorMac::didBeginScrollGesture): (WebCore::ScrollAnimatorMac::didEndScrollGesture): (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): (WebCore::ScrollAnimatorMac::updateScrollerStyle): (WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired): * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::scrollbarThickness): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): (WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeMac::hasThumb): (WebCore::ScrollbarThemeMac::minimumThumbLength): (WebCore::ScrollbarThemeMac::updateEnabledState): (WebCore::scrollbarPainterPaint): (WebCore::ScrollbarThemeMac::paint): * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-08-18 Dan Bernstein <mitz@apple.com> <rdar://problem/9973194> Fonts that specify a positive descender value are treated as having descenders ending above the baseline https://bugs.webkit.org/show_bug.cgi?id=66515 Reviewed by Darin Adler. No test because none of the system fonts and test fonts have an incorrectly-specified descender value. * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): If the font specifies a positive descender, assume that it meant the same amount, but negative. This is consistent with what Core Text does. 2011-08-18 Ryosuke Niwa <rniwa@webkit.org> positionForPoint returns wrong VisiblePosition at bidi boundaries https://bugs.webkit.org/show_bug.cgi?id=65356 Reviewed by David Hyatt. The bug was caused by RenderText::positionForPoint's assuming that the position will always reside inside the inline box that contains the point, which is not true at the boundaries of bidi-runs. For example, in aDC12BAb where AB12CD is a RTL text, the offset on the right of A is 7 even though the inline box for "BA" only contains offsets 1, 2, and 3. We must traverse the bidi-run "DC12BA" until the end to obtain the offset 7 from the inline box for "DC". Fixed the bug by introducing createVisiblePositionAfterAdjustingOffsetForBiDi which traverses runs on the left or the right of the position to compute the appropriate offset following the NSTextView convention. This patch also fixes a regression from r74971 that caret is placed incorrectly between inline boxes of LTR or RTL text in a RTL or LTR block respectively. Test: editing/selection/caret-at-bidi-boundary.html * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::offsetForPosition): * rendering/RenderText.cpp: (WebCore::lineDirectionPointFitsInBox): Takes ShouldAffinityBeDownstream instead of EAfinity. (WebCore::createVisiblePositionForBox): (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi): (WebCore::RenderText::positionForPoint): 2011-08-18 Xiaomei Ji <xji@chromium.org> --webkit-visual-word renaming right/leftWordPositionAcrossBoundary https://bugs.webkit.org/show_bug.cgi?id=66436 Reviewed by Ryosuke Niwa. Rename them to right/leftWordPositionIgnoringEditingBoundary. * editing/visible_units.cpp: (WebCore::leftWordPositionIgnoringEditingBoundary): (WebCore::rightWordPositionIgnoringEditingBoundary): (WebCore::leftWordPosition): (WebCore::rightWordPosition): 2011-08-18 Jeff Miller <jeffm@apple.com> Soft link against AVFoundationCF and CoreMedia https://bugs.webkit.org/show_bug.cgi?id=65725 Add new macros to SoftLinking.h to support soft-linking to functions and variables decorated with __declspec(dllimport), and use them to soft-link to AVFoundationCF and CoreMedia. I verified that the WebProcess doesn't load these DLLs until a media element is used. Reviewed by Eric Carlson. No new tests as no change in functionality. * WebCore.vcproj/WebCore.vcproj: Added AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h. * WebCore.vcproj/WebCoreMediaQT.vsprops: Removed DelayLoadDLLs linker option which is no longer needed. * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Added. * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Added. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Stop linking against AVFoundationCF.lib and CoreMedia.lib and include AVFoundationCFSoftLinking.h and CoreMediaSoftLinking.h. * platform/win/SoftLinking.h: Added SOFT_LINK_DLL_IMPORT() and SOFT_LINK_VARIABLE_DLL_IMPORT() macros. 2011-08-18 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Show scrollbar when doing search https://bugs.webkit.org/show_bug.cgi?id=66209 Reviewed by James Robinson. Updated the Lion scrollbar drawing code to force the scrollbar to be visible when we have tickmarks for search results. No tests because there are no Mac 10.7 chromium bots yet. * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): 2011-08-18 James Robinson <jamesr@chromium.org> [chromium] Draw the root/"non-composited content" in compositor side https://bugs.webkit.org/show_bug.cgi?id=58834 Reviewed by Kenneth Russell. Handle the root or non-composited content with a GraphicsLayer rather than special case logic in LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks through the LayerPainterChromium interface out to the WebView. The root layer is special in two ways: *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a draw-time transform. *) The root layer masks the alpha channel and disable blending when drawing because of concerns about subpixel AA trashing the alpha channel. The root layer is always opaque so this is fine. *) The root layer does not have border texels and does have subpixel AA for text. Covered by compositing/ * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scrollPosition): (WebCore::LayerChromium::setScrollPosition): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::viewportWidth): (WebCore::LayerRendererChromium::viewportHeight): * platform/graphics/chromium/NonCompositedContentHost.cpp: Added. (WebCore::NonCompositedContentHost::NonCompositedContentHost): (WebCore::NonCompositedContentHost::~NonCompositedContentHost): (WebCore::NonCompositedContentHost::invalidateRect): (WebCore::NonCompositedContentHost::invalidateEntireLayer): (WebCore::NonCompositedContentHost::setScrollPosition): (WebCore::NonCompositedContentHost::notifyAnimationStarted): (WebCore::NonCompositedContentHost::notifySyncRequired): (WebCore::NonCompositedContentHost::paintContents): (WebCore::NonCompositedContentHost::showDebugBorders): (WebCore::NonCompositedContentHost::showRepaintCounter): * platform/graphics/chromium/NonCompositedContentHost.h: Added. (WebCore::NonCompositedContentHost::create): (WebCore::NonCompositedContentHost::graphicsLayer): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollPosition): (WebCore::CCLayerImpl::setScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportSize): 2011-08-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93354. http://trac.webkit.org/changeset/93354 https://bugs.webkit.org/show_bug.cgi?id=66503 "consensus was not reached" (Requested by senorblanco on #webkit). * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): 2011-08-18 Sadrul Habib Chowdhury <sadrul@chromium.org> GestureRecognizer: Update how gesture-scroll works. Instead of just sending a series of 'GestureUpdate' events, send a single 'GestureBegin' event, followed by a series of 'GestureUpdate' events, and end with a 'GestureEnd' event. https://bugs.webkit.org/show_bug.cgi?id=66267 Reviewed by Adam Barth. * page/EventHandler.cpp: (WebCore::EventHandler::handleGestureEvent): * platform/chromium/GestureRecognizerChromium.cpp: (WebCore::InnerGestureRecognizer::InnerGestureRecognizer): (WebCore::InnerGestureRecognizer::appendScrollGestureBegin): (WebCore::InnerGestureRecognizer::appendScrollGestureEnd): (WebCore::InnerGestureRecognizer::appendScrollGestureUpdate): (WebCore::scrollEnd): (WebCore::isClickOrScroll): (WebCore::inScroll): * platform/chromium/GestureRecognizerChromium.h: (WebCore::InnerGestureRecognizer::firstTouchPosition): 2011-08-18 Sailesh Agrawal <sail@chromium.org> Chromium: Update forked ScrollbarThemeChromiumMac.mm https://bugs.webkit.org/show_bug.cgi?id=65555 Reviewed by James Robinson. Merge recent changes to ScrollbarThemeMac.mm to ScrollbarThemeChromiumMac.mm. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.h: * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterSetEnabled): * platform/chromium/ScrollbarThemeChromiumMac.h: (WebCore::ScrollbarThemeChromiumMac::maxOverlapBetweenPages): * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::registerScrollbar): (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar): (WebCore::toScrollbarPainterKnobStyle): (WebCore::ScrollbarThemeChromiumMac::updateScrollbarOverlayStyle): (WebCore::ScrollbarThemeChromiumMac::updateEnabledState): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-08-18 Justin Novosad <junov@chromium.org> Unwarranted DOM Exception when when canvas2D drawImage is called with src rect out of bounds https://bugs.webkit.org/show_bug.cgi?id=65709 Reviewed by Stephen White. Test: fast/canvas/drawImage-clipped-source.html * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawImage): Removed the unnecessary dom exceptions for out of bounds source rectangles The overloads that receive video and image elements as source images now use the normalized versions of the source rectangle, which GraphicsContext (and its various platform flavors) can handle correctly. The normalized rectangle is the equivalent rectangle with width and height greater than 0. The canvas version of this method, which had better layout test coverage, was already correctly using the normalized rectangle. The newly added layout test verifies correct behavior with negative source rectangle dimensions. * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawNativeImage): Fixed algorithm that adjusts the destination rectangle to match the clipping applied to the source rect. The case of scaled filtered images with source rectangles that overlap the edge of the image was not being handled correctly. This use case was previously unsupported and used to trigger a DOM exception. 2011-08-18 Sheriff Bot <webkit.review.bot@gmail.com> Unreviewed, rolling out r93329. http://trac.webkit.org/changeset/93329 https://bugs.webkit.org/show_bug.cgi?id=66497 Turned text on chromium win blue (Requested by jamesr_ on #webkit). * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerTextureUpdater::prepareToUpdate): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::pushPropertiesTo): (WebCore::LayerChromium::dumpLayerProperties): * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::updateRootLayerContents): (WebCore::LayerRendererChromium::drawRootLayer): (WebCore::LayerRendererChromium::invalidateRootLayerRect): (WebCore::LayerRendererChromium::rootLayerChanged): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::paintLayerContents): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): (WebCore::LayerRendererChromium::dumpRenderSurfaces): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): * platform/graphics/chromium/NonCompositedContentHost.cpp: Removed. * platform/graphics/chromium/NonCompositedContentHost.h: Removed. * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::dumpSurface): * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::createTilerIfNeeded): (WebCore::TiledLayerChromium::tilingTransform): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::CCLayerImpl): * platform/graphics/chromium/cc/CCLayerImpl.h: * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::createRootLayerPainter): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportContentRect): (WebCore::CCLayerTreeHost::viewportScrollPosition): (WebCore::CCLayerTreeHost::viewportVisibleRect): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): 2011-08-18 Ryosuke Niwa <rniwa@webkit.org> SimplifiedBackwardsTextIterator returns incorrect offset with first-letter rule https://bugs.webkit.org/show_bug.cgi?id=66086 Reviewed by Darin Adler. The bug was caused by SimplifiedBackwardsTextIterator's not taking care of first-letter at all. Fixing the bug by detecting RenderTextFragment in handleTextNode. Also added m_shouldHandleFirstLetter to SimplifiedBackwardsTextIterator to keep track of whether or not the next call to handleTextNode needs to process the first-letter part of the text fragment. Test: editing/text-iterator/backward-textiterator-first-letter-crash.html * editing/TextIterator.cpp: (WebCore::firstRenderTextInFirstLetter): Extracted from handleTextNodeFirstLetter. (WebCore::TextIterator::handleTextNodeFirstLetter): Calls firstRenderTextInFirstLetter. (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): (WebCore::SimplifiedBackwardsTextIterator::handleFirstLetter): Added. * editing/TextIterator.h: 2011-08-18 Iain Merrick <husky@google.com> [chromium] Assert that main thread and compositor thread are used safely https://bugs.webkit.org/show_bug.cgi?id=66145 CCLayerTreeHostImplProxy now has public static methods isMainThread() and isImplThread(), and we ASSERT these in various places. If threaded compositing is disabled, we fake isImplThread() by setting a flag for the duration of compositing, so the assert is still valid. Reviewed by James Robinson. Covered by existing tests. * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp: (WebCore::CCCanvasLayerImpl::draw): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::doComposite): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp: (WebCore::CCLayerTreeHostImplProxy::postDrawLayersTaskOnCCThread): (WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::isMainThread): (WebCore::CCLayerTreeHostImplProxy::isImplThread): (WebCore::CCLayerTreeHostImplProxy::setImplThread): (WebCore::CCLayerTreeHostImplProxy::commitOnCCThread): (WebCore::CCLayerTreeHostImplProxy::drawLayersOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsCommitAndRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::setNeedsRedrawOnCCThread): (WebCore::CCLayerTreeHostImplProxy::initImplOnCCThread): (WebCore::CCLayerTreeHostImplProxy::layerTreeHostClosedOnCCThread): * platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.h: * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp: (WebCore::CCPluginLayerImpl::draw): * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp: (WebCore::CCTiledLayerImpl::draw): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::draw): 2011-08-18 Alexey Proskuryakov <ap@apple.com> Regional indicator symbols that are combined should behave as a single character when editing https://bugs.webkit.org/show_bug.cgi?id=65395 Reviewed by Dan Bernstein. Part two: make cursor movement iterator work. This fixes the problem for strings that don't contain more than two flags in a row, as fixing it completely doesn't seem possible with ICU. Test: editing/selection/regional-indicators.html * platform/text/TextBreakIteratorICU.cpp: (WebCore::cursorMovementIterator): Added custom rules for regional indicator symbols. 2011-08-18 Cary Clark <caryclark@google.com> Fix rubber band gutter drawing for Skia on Chromium Mac https://bugs.webkit.org/show_bug.cgi?id=66478 Reviewed by James Robinson. No new tests. The Skia on Chromium Mac platform has not been enabled. This break was detected at compile time; there is no behavior change. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): Convert the CGImage into an SkBitmap if Skia is present. 2011-08-18 Julien Chaffraix <jchaffraix@webkit.org> Implement a faster path for painting tables with overflowing cells https://bugs.webkit.org/show_bug.cgi?id=65491 This change introduces a smarter way of painting if the table is big enough and we have a small amount of overflowing cells in the table. The new path does a binary search of the cells to repaint but adds the overflowing cells to the repainting cells. This saves ~50% when doing programmatic scrolling throught JS on a 500x100 table with some overflowing cells. Also we cap the memory usage to a ratio of the total size of the table to avoid blowing up the memory. Reviewed by David Hyatt. No new tests as the behavior should be the same. * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::RenderTableSection): (WebCore::RenderTableSection::layoutRows): Added some code to accumulate the overflowing cells in an internal HashSet (we don't need to keep them sorted and it makes it easier to use them during painting). If we hit the cap, flip the boolean value and clear the HashSet as the slow path does not care about the cell's information. Make sure that the "has overflowing cells" information is still properly encoded on our 2 values. (WebCore::compareCellPositionsWithOverflowingCells): Added this method as we are doing a more complicated sort: * the old path would sort one (mostly sorted) array by rows only as the stable sort would take care of keeping the column ordering inside a row. * the new path basically has to sort an unsorted array (taken partly from the HashSet). (WebCore::RenderTableSection::paintObject): Tweaked the logic to account for difference between m_forceSlowPaintPathWithOverflowingCell and has some overflowing cells. Also we make sure we don't repaint the same cell twice. (WebCore::RenderTableSection::nodeAtPoint): Changed to hasOverflowingCell(). We don't apply our fast path optimization here. * rendering/RenderTableSection.h: Transformed our original boolean into a HashSet and a boolean. The HashSet holds up the CellStruct that are overflowing until we reach the memory threshold. After this is hit, we just set the boolean to avoid using too much memory. (WebCore::RenderTableSection::hasOverflowingCell): This is the new way to determine if we have any overflowing cell, used only for hit testing. 2011-08-18 Kentaro Hara <haraken@google.com> An EventSource constructor should throw TypeError, when the number of arguments is not enough. https://bugs.webkit.org/show_bug.cgi?id=66454 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/eventsource/eventsource-constructor.html * bindings/js/JSEventSourceCustom.cpp: (WebCore::JSEventSourceConstructor::constructJSEventSource): Changed SyntaxError to TypeError. * bindings/v8/custom/V8EventSourceConstructor.cpp: (WebCore::V8EventSource::constructorCallback): Changed SyntaxError to TypeError. 2011-08-18 Kentaro Hara <haraken@google.com> A SharedWorker constructor should throw TypeError, when the number of arguments is not enough. https://bugs.webkit.org/show_bug.cgi?id=66455 Reviewed by Adam Barth. The spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/workers/shared-worker-constructor.html * bindings/js/JSSharedWorkerCustom.cpp: (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker): Changed SyntaxError to TypeError. * bindings/v8/custom/V8SharedWorkerCustom.cpp: (WebCore::V8SharedWorker::constructorCallback): Changed SyntaxError to TypeError. 2011-08-17 Alejandro G. Castro <alex@igalia.com> [GTK] Fix compilation problems with deprecations in gtk+ https://bugs.webkit.org/show_bug.cgi?id=66073 Reviewed by Martin Robinson. * platform/gtk/GtkAuthenticationDialog.cpp: (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog): Added gtk_box_new conditional compilation for gtk+-3. * platform/gtk/RenderThemeGtk3.cpp: (WebCore::RenderThemeGtk::adjustRepaintRect): (WebCore::RenderThemeGtk::paintSliderTrack): (WebCore::RenderThemeGtk::paintSliderThumb): (WebCore::RenderThemeGtk::adjustSliderThumbSize): Now we have have GTK_TYPE_SCALE in gtk+3. 2011-08-18 Kentaro Hara <haraken@google.com> A Worker constructor should throw TypeError, when the number of arguments is not enough https://bugs.webkit.org/show_bug.cgi?id=66456 Reviewed by Adam Barth. Spec is here: http://www.w3.org/TR/WebIDL/#es-operations. Test: fast/workers/worker-constructor.html * bindings/js/JSWorkerCustom.cpp: (WebCore::JSWorkerConstructor::constructJSWorker): Changed SyntaxError to TypeError. * bindings/v8/custom/V8WorkerCustom.cpp: (WebCore::V8Worker::constructorCallback): Changed SyntaxError to TypeError. 2011-08-18 John Bates <jbates@google.com> Fix logic error causing reverse of desired WebGL rate limiting behavior https://bugs.webkit.org/show_bug.cgi?id=66445 Reviewed by Kenneth Russell. * platform/graphics/chromium/WebGLLayerChromium.cpp: (WebCore::WebGLLayerChromium::setTextureUpdated): 2011-08-18 Levi Weintraub <leviw@chromium.org> Switch RenderTextControl* to new layout types https://bugs.webkit.org/show_bug.cgi?id=66250 Reviewed by Eric Seidel. Convertikng the RenderTextControl* classes to use the LayoutUnit abstraction. No new tests as no change in behavior. * rendering/LayoutTypes.h: (WebCore::layoutMod): Added a function to perform the modulo operation on LayoutUnits. * rendering/RenderTextControl.cpp: (WebCore::RenderTextControl::hitInnerTextElement): * rendering/RenderTextControl.h: * rendering/RenderTextControlMultiLine.cpp: (WebCore::RenderTextControlMultiLine::preferredContentWidth): (WebCore::RenderTextControlMultiLine::baselinePosition): * rendering/RenderTextControlMultiLine.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::layout): (WebCore::RenderTextControlSingleLine::controlClipRect): (WebCore::RenderTextControlSingleLine::preferredContentWidth): (WebCore::RenderTextControlSingleLine::scrollWidth): (WebCore::RenderTextControlSingleLine::scrollHeight): (WebCore::RenderTextControlSingleLine::scrollLeft): (WebCore::RenderTextControlSingleLine::scrollTop): (WebCore::RenderTextControlSingleLine::setScrollLeft): (WebCore::RenderTextControlSingleLine::setScrollTop): * rendering/RenderTextControlSingleLine.h: 2011-08-18 Levi Weintraub <leviw@chromium.org> Switch Inline rendering classes to new layout types https://bugs.webkit.org/show_bug.cgi?id=66239 Reviewed by Eric Seidel. Converting inline rendering classes to use the LayoutUnit abstraction from ints. No new tests as no change in functionality. * rendering/InlineBox.h: (WebCore::InlineBox::logicalFrameRect): (WebCore::InlineBox::baselinePosition): (WebCore::InlineBox::lineHeight): * rendering/InlineFlowBox.h: * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::logicalOverflowRect): (WebCore::InlineTextBox::setLogicalOverflowRect): (WebCore::InlineTextBox::baselinePosition): (WebCore::InlineTextBox::lineHeight): * rendering/InlineTextBox.h: (WebCore::InlineTextBox::logicalTopVisualOverflow): (WebCore::InlineTextBox::logicalBottomVisualOverflow): (WebCore::InlineTextBox::logicalLeftVisualOverflow): (WebCore::InlineTextBox::logicalRightVisualOverflow): * rendering/RenderInline.cpp: (WebCore::RenderInline::culledInlineAbsoluteRects): (WebCore::computeMargin): (WebCore::RenderInline::culledInlineBoundingBox): (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox): (WebCore::RenderInline::linesVisualOverflowBoundingBox): (WebCore::RenderInline::clippedOverflowRectForRepaint): (WebCore::RenderInline::rectWithOutlineForRepaint): (WebCore::RenderInline::computeRectForRepaint): (WebCore::RenderInline::mapLocalToContainer): (WebCore::RenderInline::lineHeight): (WebCore::RenderInline::baselinePosition): (WebCore::RenderInline::addDashboardRegions): * rendering/RenderInline.h: 2011-08-18 Jeffrey Pfau <jpfau@apple.com> New XML parser: add doctype to DOM tree https://bugs.webkit.org/show_bug.cgi?id=66408 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processDOCTYPE): 2011-08-18 James Robinson <jamesr@chromium.org> [chromium] Draw the root/"non-composited content" in compositor side https://bugs.webkit.org/show_bug.cgi?id=58834 Reviewed by Darin Fisher. Handle the root or non-composited content with a GraphicsLayer rather than special case logic in LayerRendererChromium. This layer's client is the NonCompositedContentHost, which routes the paint callbacks through the LayerPainterChromium interface out to the WebView. The root layer is special in two ways: *) The root layer has a scroll offset, which changes how the visibleLayerRect maps to content space and applies a draw-time transform. *) The root layer masks the alpha channel when drawing because of concerns about subpixel AA trashing the alpha channel. The root layer is always opaque so this is fine. *) The root layer does not have border texels and does have subpixel AA for text. Covered by compositing/ * WebCore.gypi: * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/ImageLayerChromium.cpp: (WebCore::ImageLayerChromium::paintContentsIfDirty): * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::scrollPosition): (WebCore::LayerChromium::setScrollPosition): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::releaseTextures): (WebCore::LayerRendererChromium::viewportChanged): (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::getFramebufferPixels): (WebCore::LayerRendererChromium::cleanupSharedObjects): (WebCore::LayerRendererChromium::layerTreeAsText): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore::LayerRendererChromium::rootLayer): (WebCore::LayerRendererChromium::viewportSize): (WebCore::LayerRendererChromium::viewportWidth): (WebCore::LayerRendererChromium::viewportHeight): * platform/graphics/chromium/NonCompositedContentHost.cpp: Added. (WebCore::NonCompositedContentHost::NonCompositedContentHost): (WebCore::NonCompositedContentHost::~NonCompositedContentHost): (WebCore::NonCompositedContentHost::invalidateRect): (WebCore::NonCompositedContentHost::invalidateEntireLayer): (WebCore::NonCompositedContentHost::setScrollPosition): (WebCore::NonCompositedContentHost::notifyAnimationStarted): (WebCore::NonCompositedContentHost::notifySyncRequired): (WebCore::NonCompositedContentHost::paintContents): (WebCore::NonCompositedContentHost::showDebugBorders): (WebCore::NonCompositedContentHost::showRepaintCounter): * platform/graphics/chromium/NonCompositedContentHost.h: Added. (WebCore::NonCompositedContentHost::create): (WebCore::NonCompositedContentHost::graphicsLayer): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::draw): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::scrollPosition): (WebCore::CCLayerImpl::setScrollPosition): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initialize): (WebCore::CCLayerTreeHost::invalidateRootLayerRect): (WebCore::CCLayerTreeHost::setRootLayer): (WebCore::CCLayerTreeHost::setViewport): (WebCore::CCLayerTreeHost::reallocateRenderer): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCLayerTreeHost::rootLayer): (WebCore::CCLayerTreeHost::viewportSize): 2011-08-18 Nico Weber <thakis@chromium.org> Fix "missing return" gcc warning in ScrollAnimatorNone https://bugs.webkit.org/show_bug.cgi?id=66480 Reviewed by Tony Chang. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::curveAt): (WebCore::ScrollAnimatorNone::PerAxisData::curveDerivativeAt): 2011-08-18 James Simonsen <simonjam@chromium.org> Revalidate expired resources if they're requested after the initial document load https://bugs.webkit.org/show_bug.cgi?id=52153 Reviewed by Antti Koivisto. Test: http/tests/cache/subresource-multiple-instances.html * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy): 2011-08-18 Anders Carlsson <andersca@apple.com> Fix clang libc++ C++0x build https://bugs.webkit.org/show_bug.cgi?id=66475 Reviewed by Adam Roben. Remove calls to isnan and isfinite with integer arguments. * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::viewport): 2011-08-18 Andrey Kosyakov <caseq@chromium.org> Web Inspector: [Extensions API] rename webInspector.resources to webInspector.network https://bugs.webkit.org/show_bug.cgi?id=66460 Reviewed by Pavel Feldman. Tests: http/tests/inspector/extensions-network-redirect.html inspector/extensions/extensions-network.html * inspector/front-end/ExtensionAPI.js: (WebInspector.injectedExtensionAPI.InspectorExtensionAPI): (WebInspector.injectedExtensionAPI.Network.requestDispatch): (WebInspector.injectedExtensionAPI): (WebInspector.injectedExtensionAPI.Network.prototype.getHAR): (WebInspector.injectedExtensionAPI.defineDeprecatedProperty.getter): (WebInspector.injectedExtensionAPI.defineDeprecatedProperty): * inspector/front-end/ExtensionServer.js: (WebInspector.ExtensionServer): (WebInspector.ExtensionServer.prototype._inspectedURLChanged): (WebInspector.ExtensionServer.prototype._notifyRequestFinished): (WebInspector.ExtensionServer.prototype._onGetHAR): (WebInspector.ExtensionServer.prototype._onGetResourceContent): (WebInspector.ExtensionServer.prototype._requestId): (WebInspector.ExtensionServer.prototype._requestById): (WebInspector.ExtensionServer.prototype._onAddAuditCategory): (WebInspector.ExtensionServer.prototype._onAddAuditResult): (WebInspector.ExtensionServer.prototype._onStopAuditCategoryRun): (WebInspector.ExtensionServer.prototype.initExtensions): (WebInspector.ExtensionServer.prototype._onmessage): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: extract content loading functions from RawSourceCode to ContentProvider implementations. https://bugs.webkit.org/show_bug.cgi?id=66237 Reviewed by Pavel Feldman. Test: inspector/debugger/content-providers.html * inspector/front-end/SourceFile.js: (WebInspector.RawSourceCode.prototype._loadResourceContent): (WebInspector.RawSourceCode.prototype._loadScriptContent): (WebInspector.RawSourceCode.prototype._loadAndConcatenateScriptsContent): (WebInspector.ScriptContentProvider): (WebInspector.ScriptContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider): (WebInspector.ConcatenatedScriptsContentProvider.prototype.requestContent): (WebInspector.ConcatenatedScriptsContentProvider.prototype._concatenateScriptsContent): (WebInspector.ResourceContentProvider): (WebInspector.ResourceContentProvider.prototype.requestContent): 2011-08-18 Alexandru Chiculita <achicu@adobe.com> [CSSRegions] RenderRegion should not reference a parent RenderFlowThread https://bugs.webkit.org/show_bug.cgi?id=66142 Added code that checks the parent RenderFlowThread of a RenderRegion and creates a dependency for its referenced RenderFlowThread (from CSS style). There are two cases: 1. A RenderRegion tries to display the flow thread that laid it out. In this case the region will be ignored and will not participate in the flow threads regions list. 2. A RenderRegion tries to display a flow thread that contains another region that tries to display the first region's flow thread. This one can be generalized with any number of intermediate flow threads. In this case the recursion is detected and only the first added region will actually be selected. The other region will be ignored. However, when the recursion is removed the invalid regions will be recovered. Reviewed by David Hyatt. Tests: fast/regions/flows-dependency-dynamic-remove.html fast/regions/flows-dependency-same-flow.html * rendering/RenderBlock.cpp: (WebCore::RenderBlock::insertPositionedObject): * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::dependsOn): (WebCore::RenderFlowThread::addRegionToThread): (WebCore::RenderFlowThread::removeRegionFromThread): (WebCore::RenderFlowThread::checkInvalidRegions): (WebCore::RenderFlowThread::addDependencyOnFlowThread): (WebCore::RenderFlowThread::removeDependencyOnFlowThread): (WebCore::RenderFlowThread::pushDependencies): (WebCore::RenderFlowThread::layout): (WebCore::RenderFlowThread::computeLogicalWidth): (WebCore::RenderFlowThread::computeLogicalHeight): (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderObjectChildList.cpp: (WebCore::RenderObjectChildList::removeChildNode): (WebCore::RenderObjectChildList::appendChildNode): * rendering/RenderRegion.cpp: (WebCore::RenderRegion::RenderRegion): (WebCore::RenderRegion::~RenderRegion): (WebCore::RenderRegion::paintReplaced): (WebCore::RenderRegion::nodeAtPoint): (WebCore::RenderRegion::attachRegion): (WebCore::RenderRegion::detachRegion): * rendering/RenderRegion.h: (WebCore::RenderRegion::parentFlowThread): (WebCore::RenderRegion::isValid): (WebCore::RenderRegion::setIsValid): * rendering/RenderTreeAsText.cpp: (WebCore::writeRenderFlowThreads): (WebCore::writeLayers): * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::layout): (WebCore::RenderView::renderFlowThreadWithName): (WebCore::RenderView::layoutRenderFlowThreads): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThreads): (WebCore::RenderView::isRenderFlowThreadOrderDirty): (WebCore::RenderView::setIsRenderFlowThreadOrderDirty): (WebCore::RenderView::renderFlowThreadList): 2011-08-18 Pavel Podivilov <podivilov@chromium.org> Web Inspector: add UISourceCode class. https://bugs.webkit.org/show_bug.cgi?id=66233 This is a next step towards splitting SourceFile into RawSourceCode and UISourceCode. UISourceCode is a part of SourceFile's interface that is visible to ScriptsPanel. UISourceCode represents a single entry in scripts panel's files select. Reviewed by Pavel Feldman. Test: inspector/debugger/ui-source-code.html * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/UISourceCode.js: Added. (WebInspector.UISourceCode): (WebInspector.UISourceCode.prototype.get id): (WebInspector.UISourceCode.prototype.get url): (WebInspector.UISourceCode.prototype.get isContentScript): (WebInspector.UISourceCode.prototype.requestContent): (WebInspector.UISourceCode.prototype._didRequestContent): (WebInspector.ContentProvider): (WebInspector.ContentProvider.prototype.requestContent): * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-08-17 Adam Roben <aroben@apple.com> Make WebCore keep track of the current device scale factor Fixes <http://webkit.org/b/66413> WebCore requires every WebKit port to keep track of the device scale factor Reviewed by Darin Adler. * WebCore.exp.in: Removed Frame::deviceScaleFactorChanged, added Page::setDeviceScaleFactor. * css/MediaQueryEvaluator.cpp: (WebCore::device_pixel_ratioMediaFeatureEval): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): * page/DOMWindow.cpp: (WebCore::DOMWindow::devicePixelRatio): * rendering/RenderInline.cpp: (WebCore::RenderInline::addDashboardRegions): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::deviceScaleFactor): * rendering/RenderObject.cpp: (WebCore::RenderObject::addDashboardRegions): Changed to get the device scale factor from Page. * loader/EmptyClients.h: * page/Chrome.cpp: * page/Chrome.h: * page/ChromeClient.h: Removed Chrome[Client]::deviceScaleFactor. * page/Frame.cpp: * page/Frame.h: Removed deviceScaleFactorChanged. Made deviceOrPageScaleFactorChanged public. * page/Page.cpp: (WebCore::Page::Page): Initialize m_deviceScaleFactor. (WebCore::Page::setDeviceScaleFactor): Added. Code came from Frame::deviceScaleFactorChanged. * page/Page.h: Added m_deviceScaleFactor. (WebCore::Page::deviceScaleFactor): Added simple getter. 2011-08-18 Darin Adler <darin@apple.com> SVG and HTML editing have conflicting inline isWhitespace functions https://bugs.webkit.org/show_bug.cgi?id=65145 Reviewed by Nikolas Zimmermann. Renamed the SVG-specific whitespace functions to call it "SVG space" rather than just "whitespace". An alternative would have been to put the functions into an SVG namespace instead of the top level WebCore namespace. * svg/SVGAnimateMotionElement.cpp: (WebCore::parsePoint): Call skipOptionalSVGSpaces. * svg/SVGAnimationElement.cpp: (WebCore::parseKeySplines): Ditto. * svg/SVGFitToViewBox.cpp: (WebCore::SVGFitToViewBox::parseViewBox): Ditto. * svg/SVGLengthList.cpp: (WebCore::SVGLengthList::parse): Call isSVGSpace and skipOptionalSVGSpacesOrDelimiter. * svg/SVGParserUtilities.cpp: (WebCore::genericParseNumber): Call skipOptionalSVGSpacesOrDelimiter. (WebCore::parseArcFlag): Ditto. (WebCore::parseRect): Call skipOptionalSVGSpaces. (WebCore::pointsListFromSVGData): Ditto. (WebCore::parseGlyphName): Call skipOptionalSVGSpaces, isSVGSpace, and skipOptionalSVGSpacesOrDelimiter. (WebCore::parseDelimitedString): Call skipOptionalSVGSpaces. * svg/SVGParserUtilities.h: (WebCore::isSVGSpace): Renamed from isWhitespace. This better matches the comment which specifically talks about SVG. (WebCore::skipOptionalSVGSpaces): Renamed from skipOptionalSpaces. (WebCore::skipOptionalSVGSpacesOrDelimiter): Renamed from skipOptionalSVGSpacesOrDelimiter. * svg/SVGPathStringSource.cpp: (WebCore::SVGPathStringSource::moveToNextToken): Call skipOptionalSVGSpaces. * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::parsePreserveAspectRatio): Ditto. * svg/SVGStringList.cpp: (WebCore::SVGStringList::parse): Call isSVGSpace and skipOptionalSVGSpacesOrDelimiter. * svg/SVGTransformable.cpp: (WebCore::parseTransformParamList): Call skipOptionalSVGSpaces and skipOptionalSVGSpacesOrDelimiter. (WebCore::SVGTransformable::parseTransformAttribute): Call skipOptionalSVGSpaces. 2011-08-18 Gavin Peters <gavinp@chromium.org> Prepare frames for history navigation. Before beginning an explicit history navigation in a newly initialized frame, it's important to give a "previous" item to avoid crashes, and give a state to the state machine to avoid extra validating loads. https://bugs.webkit.org/show_bug.cgi?id=66322 Reviewed by Darin Fisher. No new tests, as history navigation is very difficult to test in DumpRenderTree. * loader/FrameLoader.cpp: (WebCore::FrameLoader::prepareForHistoryNavigation): * loader/FrameLoader.h: 2011-08-18 Jing Zhao <jingzhao@chromium.org> When changing the size of a menulist from x (x>1) to 1, the first item should be selected. https://bugs.webkit.org/show_bug.cgi?id=66282 Reviewed by Kent Tamura. No new tests since it only changes the behavior in Android Browser. * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::parseMappedAttribute): 2011-08-18 Adam Klein <adamk@chromium.org> Handle "form" attribute updates in parseMappedAttribute() instead of attributeChanged() to better match HTMLElement practices https://bugs.webkit.org/show_bug.cgi?id=66321 Reviewed by Darin Adler. This is simply a cleanup change: there's no need that I can see for HTMLFormControlElement and HTMLObjectElement to override Element::attributeChanged since they can properly handle form attribute changes in parseMappedAttribute, which they also override. Though no change in behavior, I've added test coverage of the moved code to an existing test (fast/forms/form-attribute.html) and added a new test. Test: fast/forms/radio-remove-form-attr.html * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::parseMappedAttribute): * html/HTMLFormControlElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::parseMappedAttribute): * html/HTMLObjectElement.h: 2011-08-18 Chang Shu <cshu@webkit.org> Add support of setPasswordEchoEnabled and setPasswordEchoDuration for password echo feature https://bugs.webkit.org/show_bug.cgi?id=66052 Reviewed by Alexey Proskuryakov. Added runtime settings in WebCore. Added support in window.internals for testing. Tests: editing/input/password-echo-passnode.html editing/input/password-echo-passnode2.html editing/input/password-echo-passnode3.html editing/input/password-echo-textnode.html * page/Settings.cpp: (WebCore::Settings::Settings): * page/Settings.h: (WebCore::Settings::setPasswordEchoEnabled): (WebCore::Settings::passwordEchoEnabled): (WebCore::Settings::setPasswordEchoDurationInSeconds): (WebCore::Settings::passwordEchoDurationInSeconds): * testing/Internals.cpp: (WebCore::Internals::Internals): (WebCore::Internals::setPasswordEchoEnabled): (WebCore::Internals::setPasswordEchoDurationInSeconds): (WebCore::Internals::reset): * testing/Internals.h: * testing/Internals.idl: 2011-08-18 Wyatt Carss <wcarss@chromium.org> Selecting all and inserting text into a page with a frameset leads to a NULL ptr https://bugs.webkit.org/show_bug.cgi?id=66288 Reviewed by Tony Chang. VisibleSelection returns a NoSelection to InsertTextCommand::doApply as a new endingSelection, which isn't a sane state to be in. The code tries to get a position on a higher node for a better selection, but cannot go above the frameset (which exists in place of the body tag), which lacks a renderer, and therefore cannot have a non-NoSelection VisibleSelection. Because this is a rare corner case, it seemed more reasonable to bail out in this circumstance than to change the way VisibleSelection canonicalization works. The new behavior is to delete the content, but insert nothing. I investigated the possibility of trying to move above or below the frameset in this particular case, but there still isn't a renderer, so it didn't prevent the crash. Test: editing/inserting/insert-text-into-empty-frameset-crash.html * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::doApply): 2011-08-18 Takashi Toyoshima <toyoshim@chromium.org> Remove arguments from CloseEvent::create(). https://bugs.webkit.org/show_bug.cgi?id=66294 Reviewed by Kent Tamura. CloseEvent objects are initialized by initCloseEvent() in all cases. Initialization in create() is redundant. No new tests for no functional difference. * websockets/CloseEvent.h: (WebCore::CloseEvent::create): (WebCore::CloseEvent::CloseEvent): * websockets/WebSocket.cpp: (WebCore::WebSocket::didClose): 2011-08-18 Fady Samuel <fsamuel@chromium.org> iframe and frameset scaling is broken https://bugs.webkit.org/show_bug.cgi?id=57785 Reviewed by Simon Fraser. Fixed two iframe and frameset scaling bugs: #1 iframes and frameset backgrounds and scroll areas are doubly scaled when they are styled with -webkit-transform. #2 frameset does not respect -webkit-transform-origin when scaled Tests: fast/frames/frame-set-scaling-3d.html fast/frames/frame-set-scaling-centered.html fast/frames/frame-set-scaling-rotate.html fast/frames/frame-set-scaling-skew.html fast/frames/frame-set-scaling.html fast/frames/iframe-scaling-with-scroll.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::layout): Update the FrameSet's layer transform after we've computed size to correctly account for the transform origin. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::childrenClipRect): The dirty rect should be the document's unscaled size. * rendering/RenderWidget.cpp: (WebCore::RenderWidget::setWidget): (WebCore::RenderWidget::updateWidgetPosition): Don't scale the FrameView rect here. Scaling is done within the FrameView. 2011-08-18 Csaba Osztrogonác <ossy@webkit.org> Unreviewed buildfix after r93268. * dom/Document.cpp: (WebCore::disableRangeMutation): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch RenderBox to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66156 Reviewed by Eric Seidel. Convert RenderBox to new layout abstraction as a part of the ongoing conversion work. No new tests as no new functionality. * rendering/RenderBox.cpp: (WebCore::RenderBox::scrollWidth): (WebCore::RenderBox::scrollHeight): (WebCore::RenderBox::scrollLeft): (WebCore::RenderBox::scrollTop): (WebCore::RenderBox::setScrollLeft): (WebCore::RenderBox::setScrollTop): (WebCore::RenderBox::absoluteRects): (WebCore::RenderBox::absoluteContentBox): (WebCore::RenderBox::absoluteContentQuad): (WebCore::RenderBox::outlineBoundsForRepaint): (WebCore::RenderBox::reflectionBox): (WebCore::RenderBox::reflectedRect): (WebCore::RenderBox::verticalScrollbarWidth): (WebCore::RenderBox::horizontalScrollbarHeight): (WebCore::RenderBox::computeContentBoxLogicalWidth): (WebCore::RenderBox::computeContentBoxLogicalHeight): (WebCore::RenderBox::maskClipRect): (WebCore::RenderBox::repaintLayerRectsForImage): (WebCore::RenderBox::pushContentsClip): (WebCore::RenderBox::overflowClipRect): (WebCore::RenderBox::clipRect): (WebCore::RenderBox::containingBlockLogicalWidthForContent): (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight): (WebCore::RenderBox::positionLineBox): (WebCore::RenderBox::clippedOverflowRectForRepaint): (WebCore::RenderBox::computeRectForRepaint): (WebCore::RenderBox::computeLogicalWidth): (WebCore::RenderBox::computeInlineDirectionMargins): (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::computeLogicalHeightUsing): (WebCore::RenderBox::computePercentageLogicalHeight): (WebCore::RenderBox::computeBlockDirectionMargins): (WebCore::RenderBox::containingBlockLogicalWidthForPositioned): (WebCore::RenderBox::containingBlockLogicalHeightForPositioned): (WebCore::computeInlineStaticDistance): (WebCore::RenderBox::computePositionedLogicalWidth): (WebCore::computeLogicalLeftPositionedOffset): (WebCore::RenderBox::computePositionedLogicalWidthUsing): (WebCore::computeBlockStaticDistance): (WebCore::RenderBox::computePositionedLogicalHeight): (WebCore::computeLogicalTopPositionedOffset): (WebCore::RenderBox::computePositionedLogicalHeightUsing): (WebCore::RenderBox::computePositionedLogicalWidthReplaced): (WebCore::RenderBox::computePositionedLogicalHeightReplaced): (WebCore::RenderBox::localCaretRect): (WebCore::RenderBox::lineHeight): (WebCore::RenderBox::baselinePosition): (WebCore::RenderBox::logicalVisualOverflowRectForPropagation): (WebCore::RenderBox::visualOverflowRectForPropagation): (WebCore::RenderBox::logicalLayoutOverflowRectForPropagation): (WebCore::RenderBox::layoutOverflowRectForPropagation): (WebCore::RenderBox::locationOffsetIncludingFlipping): * rendering/RenderBox.h: (WebCore::RenderBox::borderFitAdjust): (WebCore::RenderBox::intrinsicSize): (WebCore::RenderBox::intrinsicLogicalWidth): (WebCore::RenderBox::intrinsicLogicalHeight): (WebCore::RenderBox::scrollbarLogicalHeight): (WebCore::RenderBox::controlClipRect): (WebCore::RenderBox::firstLineBoxBaseline): (WebCore::RenderBox::lastLineBoxBaseline): 2011-08-17 Annie Sullivan <sullivan@chromium.org> Reduce usages of String::createUninitialized https://bugs.webkit.org/show_bug.cgi?id=66399 Constructs Strings with StringBuilder instead of calling createUninitialized. Reviewed by Adam Barth. No new tests; no functional change. * dom/StyleElement.cpp: (WebCore::StyleElement::process): * dom/Text.cpp: (WebCore::Text::wholeText): * html/parser/HTMLSourceTracker.cpp: (WebCore::HTMLSourceTracker::sourceForToken): * platform/graphics/Font.cpp: (WebCore::Font::normalizeSpaces): * platform/text/TextCodecUserDefined.cpp: (WebCore::TextCodecUserDefined::decode): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch FrameView to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66147 Reviewed by Eric Seidel. Convert Frame & FrameView to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): (WebCore::Frame::documentAtPoint): (WebCore::Frame::rangeForPoint): (WebCore::Frame::setPageAndTextZoomFactors): (WebCore::Frame::scalePage): * page/Frame.h: * page/FrameView.cpp: (WebCore::FrameView::create): (WebCore::FrameView::reset): (WebCore::FrameView::init): (WebCore::FrameView::invalidateRect): (WebCore::FrameView::setFrameRect): (WebCore::FrameView::setMarginWidth): (WebCore::FrameView::setMarginHeight): (WebCore::FrameView::setContentsSize): (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::scrollXForFixedPosition): (WebCore::FrameView::scrollYForFixedPosition): (WebCore::FrameView::scrollOffsetForFixedPosition): (WebCore::FrameView::currentMousePosition): (WebCore::FrameView::scrollContentsFastPath): (WebCore::FrameView::scrollContentsSlowPath): (WebCore::FrameView::setScrollPosition): (WebCore::FrameView::repaintContentRectangle): (WebCore::FrameView::scrollToAnchor): (WebCore::FrameView::performPostLayoutTasks): (WebCore::FrameView::windowClipRect): (WebCore::FrameView::windowClipRectForLayer): (WebCore::FrameView::scrollTo): (WebCore::FrameView::invalidateScrollbarRect): (WebCore::FrameView::getTickmarks): (WebCore::FrameView::windowResizerRect): (WebCore::FrameView::setVisibleScrollerThumbRect): (WebCore::FrameView::paintScrollCorner): (WebCore::FrameView::paintContents): (WebCore::FrameView::paintOverhangAreas): (WebCore::FrameView::forceLayoutForPagination): (WebCore::FrameView::convertFromRenderer): (WebCore::FrameView::convertToRenderer): (WebCore::FrameView::convertToContainingView): (WebCore::FrameView::convertFromContainingView): * page/FrameView.h: (WebCore::FrameView::marginWidth): (WebCore::FrameView::marginHeight): * page/mac/FrameMac.mm: (WebCore::Frame::snapshotDragImage): (WebCore::Frame::nodeImage): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch html/* to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66347 Reviewed by Eric Seidel. Convert HTML* and shadow element to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::invalidateCachedRegion): (WebCore::HTMLAreaElement::mapMouseEvent): (WebCore::HTMLAreaElement::computePath): (WebCore::HTMLAreaElement::computeRect): (WebCore::HTMLAreaElement::getRegion): * html/HTMLAreaElement.h: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::paint): * html/HTMLCanvasElement.h: * html/HTMLMapElement.cpp: (WebCore::HTMLMapElement::mapMouseEvent): * html/HTMLMapElement.h: * html/ImageDocument.cpp: (WebCore::ImageDocumentParser::finish): (WebCore::ImageDocument::scale): (WebCore::ImageDocument::resizeImageToFit): (WebCore::ImageDocument::imageFitsInWindow): * html/ValidationMessage.cpp: (WebCore::adjustBubblePosition): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::size): (WebCore::CanvasRenderingContext2D::drawImage): * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::startDrag): (WebCore::MediaControlPanelElement::continueDrag): (WebCore::MediaControlPanelElement::setPosition): (WebCore::MediaControlPanelElement::defaultEventHandler): * html/shadow/MediaControlElements.h: * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::dragFrom): (WebCore::SliderThumbElement::setPositionFromPoint): * html/shadow/SliderThumbElement.h: * rendering/RenderImage.cpp: (WebCore::RenderImage::nodeAtPoint): 2011-08-17 David Grogan <dgrogan@chromium.org> Change references to leveldb.gyp to leveldatabase.gyp as part of the leveldb refactoring going on in chromium: crbug.com/89378 https://bugs.webkit.org/show_bug.cgi?id=66332 Reviewed by Tony Gentilcore. Tests: new-run-webkit-tests --debug --chromium --no-retry-failures --build-directory=llvm storage/indexeddb * WebCore.gyp/WebCore.gyp: 2011-08-17 Hayato Ito <hayato@chromium.org> Implement proper handling of focus/blur events in regard to shadow DOM boundaries. https://bugs.webkit.org/show_bug.cgi?id=61421 Reviewed by Dimitri Glazkov. Introduces FocusEventDispatchMediator/BlurEventDispatchMediator so that focus/blue events are stopped at the lowest common shadow boundary. * dom/Document.cpp: (WebCore::Document::setFocusedNode): * dom/Event.cpp: (WebCore::FocusEventDispatchMediator::create): (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator): (WebCore::FocusEventDispatchMediator::dispatchEvent): (WebCore::BlurEventDispatchMediator::create): (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator): (WebCore::BlurEventDispatchMediator::dispatchEvent): * dom/Event.h: * dom/Node.cpp: (WebCore::Node::dispatchFocusEvent): (WebCore::Node::dispatchBlurEvent): * dom/Node.h: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::dispatchBlurEvent): * html/HTMLFormControlElement.h: * html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::dispatchFocusEvent): (WebCore::HTMLSelectElement::dispatchBlurEvent): * html/HTMLSelectElement.h: * html/HTMLTextFormControlElement.cpp: (WebCore::HTMLTextFormControlElement::dispatchFocusEvent): (WebCore::HTMLTextFormControlElement::dispatchBlurEvent): * html/HTMLTextFormControlElement.h: * page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode): 2011-08-17 Ben Wells <benwells@chromium.org> Canvas fill and fillRect with SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy have errors https://bugs.webkit.org/show_bug.cgi?id=66036 These modes cannot be passed straight through to the underlying graphics context as the graphics context and the HTML5 canvas spec have different interpretations to them. In the graphics context, the compositing modes are applied just over the area being filled. In the HTML5 spec, the compositing modes are applied over the entire canvas. The SourceIn, DestinationIn, SourceOut, DestinationAtop and Copy modes all need some kind of extra action to just performing the composited fill on the canvas, as they need t he canvas to be cleared outside of the area being filled. Previous to this change the Copy mode did not do this clearing at all. The other modes did but if the transformed path being filled contained anti-aliasing at its edges artifacts were introduced. With this change, Copy now does a complete erase of the canvas before performing a fill as per normal. The other modes use a temporary buffer just big enough for the transformed path (in device coordinates). The fill is first done there in SourceOver mode. Then this is drawn into the canvas context using the appropriate mode, with any areas outside the draw area being cleared. Reviewed by James Robinson. Test: fast/canvas/canvas-composite-transformclip.html * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::fill): (WebCore::CanvasRenderingContext2D::fillRect): (WebCore::CanvasRenderingContext2D::clearCanvas): (WebCore::CanvasRenderingContext2D::transformAreaToDevice): (WebCore::CanvasRenderingContext2D::fillAndDisplayTransparencyElsewhere): * html/canvas/CanvasRenderingContext2D.h: * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch inspector to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66358 Reviewed by Eric Seidel. Convert inspector code to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * inspector/DOMNodeHighlighter.cpp: (WebCore::DOMNodeHighlighter::drawNodeHighlight): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::willPaintImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::willPaint): * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::willPaint): * inspector/InspectorTimelineAgent.h: * inspector/TimelineRecordFactory.cpp: (WebCore::TimelineRecordFactory::createPaintData): * inspector/TimelineRecordFactory.h: 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Editing code to new layout types https://bugs.webkit.org/show_bug.cgi?id=66355 Reviewed by Eric Seidel. Converting remaining editing code to the LayoutUnit abstraction. No new tests, no change in functionality. * editing/Editor.cpp: (WebCore::Editor::rangeForPoint): (WebCore::Editor::insideVisibleArea): (WebCore::Editor::countMatchesForText): * editing/Editor.h: * editing/mac/FrameSelectionMac.mm: (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Accessibility code to new layout types https://bugs.webkit.org/show_bug.cgi?id=66348 Reviewed by Eric Seidel. Converting remaining Accessibility code to the LayoutUnit abstraction. No new tests, no change in functionality * accessibility/AccessibilityImageMapLink.cpp: (WebCore::AccessibilityImageMapLink::elementRect): * accessibility/AccessibilityImageMapLink.h: * accessibility/AccessibilityListBox.cpp: (WebCore::AccessibilityListBox::elementAccessibilityHitTest): * accessibility/AccessibilityListBox.h: * accessibility/AccessibilityListBoxOption.cpp: (WebCore::AccessibilityListBoxOption::elementRect): * accessibility/AccessibilityListBoxOption.h: * accessibility/AccessibilityMenuListOption.cpp: (WebCore::AccessibilityMenuListOption::elementRect): * accessibility/AccessibilityMenuListOption.h: (WebCore::AccessibilityMenuListOption::size): * accessibility/AccessibilityMenuListPopup.h: (WebCore::AccessibilityMenuListPopup::elementRect): (WebCore::AccessibilityMenuListPopup::size): * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::clickPoint): (WebCore::AccessibilityObject::orientation): (WebCore::AccessibilityObject::elementAccessibilityHitTest): * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::accessibilityHitTest): (WebCore::AccessibilityObject::boundingBoxRect): (WebCore::AccessibilityObject::size): (WebCore::AccessibilityObject::boundsForVisiblePositionRange): (WebCore::AccessibilityObject::doAXBoundsForRange): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::isOffScreen): (WebCore::AccessibilityRenderObject::boundingBoxRect): (WebCore::AccessibilityRenderObject::checkboxOrRadioRect): (WebCore::AccessibilityRenderObject::elementRect): (WebCore::AccessibilityRenderObject::size): (WebCore::AccessibilityRenderObject::clickPoint): (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): (WebCore::AccessibilityRenderObject::visiblePositionForPoint): (WebCore::AccessibilityRenderObject::doAXBoundsForRange): * accessibility/AccessibilityRenderObject.h: * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::accessibilityHitTest): (WebCore::AccessibilityScrollView::elementRect): * accessibility/AccessibilityScrollView.h: * accessibility/AccessibilityScrollbar.cpp: (WebCore::AccessibilityScrollbar::elementRect): * accessibility/AccessibilityScrollbar.h: * accessibility/AccessibilitySlider.cpp: (WebCore::AccessibilitySliderThumb::elementRect): (WebCore::AccessibilitySliderThumb::size): * accessibility/AccessibilitySlider.h: * accessibility/AccessibilityTableColumn.cpp: (WebCore::AccessibilityTableColumn::elementRect): (WebCore::AccessibilityTableColumn::size): * accessibility/AccessibilityTableColumn.h: * accessibility/AccessibilityTableHeaderContainer.cpp: (WebCore::AccessibilityTableHeaderContainer::elementRect): (WebCore::AccessibilityTableHeaderContainer::size): * accessibility/AccessibilityTableHeaderContainer.h: * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): (-[AccessibilityObjectWrapper accessibilityShowContextMenu]): 2011-08-17 Emil A Eklund <eae@chromium.org> Switch focus handling to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66331 Reviewed by Eric Seidel. Convert FocusController and SpatialNavigation to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * page/FocusController.cpp: (WebCore::updateFocusCandidateIfNeeded): (WebCore::FocusController::findFocusCandidateInContainer): (WebCore::FocusController::advanceFocusDirectionallyInContainer): (WebCore::FocusController::advanceFocusDirectionally): * page/FocusController.h: * page/SpatialNavigation.cpp: (WebCore::alignmentForRects): (WebCore::start): (WebCore::middle): (WebCore::end): (WebCore::areRectsFullyAligned): (WebCore::areRectsPartiallyAligned): (WebCore::areRectsMoreThanFullScreenApart): (WebCore::below): (WebCore::rightOf): (WebCore::isRectInDirection): (WebCore::hasOffscreenRect): (WebCore::scrollInDirection): (WebCore::deflateIfOverlapped): (WebCore::canScrollInDirection): (WebCore::rectToAbsoluteCoordinates): (WebCore::nodeRectInAbsoluteCoordinates): (WebCore::frameRectInAbsoluteCoordinates): (WebCore::entryAndExitPointsForDirection): (WebCore::distanceDataForNode): (WebCore::canBeScrolledIntoView): (WebCore::virtualRectForDirection): (WebCore::virtualRectForAreaElementAndDirection): * page/SpatialNavigation.h: 2011-08-17 Levi Weintraub <leviw@chromium.org> Switch Document, DocumentMarker, Clipboard, and Range to new layout types https://bugs.webkit.org/show_bug.cgi?id=66330 Reviewed by Eric Seidel. Converting the remaining DOM classes to use the LayoutUnit abstraction. No new tests, no new behavior. * dom/Clipboard.h: (WebCore::Clipboard::dragLocation): * dom/Document.cpp: (WebCore::Document::nodesFromRect): (WebCore::nodeFromPoint): (WebCore::Document::caretRangeFromPoint): (WebCore::Document::prepareMouseEvent): * dom/Document.h: * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::markerContainingPoint): (WebCore::DocumentMarkerController::renderedRectsForMarkers): (WebCore::DocumentMarkerController::invalidateRenderedRectsForMarkersInRect): * dom/DocumentMarkerController.h: * dom/Range.cpp: (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): * dom/RenderedDocumentMarker.h: (WebCore::RenderedDocumentMarker::contains): (WebCore::RenderedDocumentMarker::setRenderedRect): (WebCore::RenderedDocumentMarker::renderedRect): (WebCore::RenderedDocumentMarker::invalidMarkerRect): (WebCore::RenderedDocumentMarker::invalidate): 2011-08-17 Dan Bernstein <mitz@apple.com> Removed an unused setting. Reviewed by Anders Carlsson. * WebCore.exp.in: * page/Settings.cpp: (WebCore::Settings::Settings): Removed initializer for m_needsTigerMailQuirks. * page/Settings.h: Removed accessors. 2011-08-17 Oliver Hunt <oliver@apple.com> Move towards supporting user controlled prototypes on CanvasPixelArray https://bugs.webkit.org/show_bug.cgi?id=66429 Reviewed by Gavin Barraclough. Start using a per-global object structure for canvas pixel array. * bindings/js/JSImageDataCustom.cpp: (WebCore::toJS): 2011-08-17 Luke Macpherson <macpherson@chromium.org> Support cast from CSSPrimitiveValue to unsigned, and use in appropriate places in CSSStyleSelector::applyProperty https://bugs.webkit.org/show_bug.cgi?id=66281 Reviewed by Eric Seidel. No new tests - refactoring only. The return if type!=CSS_NUMBER case becomes an ASSERT because it is unreachable unless there is an error in the parser. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from unsigned to CSSPrimitiveValue (WebCore::CSSPrimitiveValue::operator unsigned): Support cast from CSSPrimitiveValue to unsigned * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for CSSPropertyWebkitBoxFlex, CSSPropertyWebkitBoxFlexGroup and CSSPropertyWebkitBoxOrdinalGroup properties. 2011-08-17 Scott Byer <scottbyer@chromium.org> ScrollAnimatorNone: Remove unused field https://bugs.webkit.org/show_bug.cgi?id=66312 Reviewed by Adam Barth. No functional change; no test needed. * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters): (WebCore::ScrollAnimatorNone::scroll): * platform/ScrollAnimatorNone.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Work-in-progress on Soft link against AVFoundationCF and CoreMedia https://bugs.webkit.org/show_bug.cgi?id=65725 Don't bother with SOFT_LINK_LIBRARY(libdispatch), we're going to continue to statically link to it since the DLL will have already been loaded by other parts of AAS and is guaranteed to be available if AVFoundation is enabled. Reviewed by Anders Carlsson. No new tests; no functional change. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Removed SOFT_LINK_DEBUG_LIBRARY(libdispatch) and SOFT_LINK_LIBRARY(libdispatch). (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable): Don't check for libdispatch. 2011-08-17 Brady Eidson <beidson@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66354 and <rdar://problem/9965209> Regression: On Lion, redirects lose HTTP authentication headers Reviewed by Alexey Proskuryakov and Darin Adler. This changes makes WebCore try to apply basic credentials after a redirect if the redirect is to the same origin, assuming the redirected URL did not contain credentials directly. Tests: http/tests/misc/authentication-redirect-1/authentication-sent-to-redirect-cross-origin.html http/tests/misc/authentication-redirect-2/authentication-sent-to-redirect-same-origin.html http/tests/misc/authentication-redirect-3/authentication-sent-to-redirect-same-origin-with-location-credentials.html * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request. (WebCore::ResourceHandle::createCFURLConnection): Use the applyBasicAuthorizationHeader helper. (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request. * platform/network/mac/ResourceHandleMac.mm: (WebCore::applyBasicAuthorizationHeader): Apply the user/password from a credential to the HTTP headers for a request. (WebCore::ResourceHandle::createNSURLConnection): Use the applyBasicAuthorizationHeader helper. (WebCore::ResourceHandle::willSendRequest): If this is a redirect within the same origin, apply any stored target credentials to the new request. 2011-08-17 Chris Fleizach <cfleizach@apple.com> Accessibility stack exhaustion using role attribute https://bugs.webkit.org/show_bug.cgi?id=65174 Reviewed by Darin Adler. Forgot to commit review comments. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): 2011-08-17 Chris Fleizach <cfleizach@apple.com> Accessibility stack exhaustion using role attribute https://bugs.webkit.org/show_bug.cgi?id=65174 Make sure we do not call accessibilityIsIgnored() during the AccessibilityObject creation flow. That can lead to loops. Reviewed by Darin Adler. Tests: accessibility/crash-determining-aria-role-when-label-present.html * accessibility/AccessibilityObject.cpp: (WebCore::createARIARoleMap): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::remapAriaRoleDueToParent): (WebCore::AccessibilityRenderObject::determineAriaRoleAttribute): * accessibility/AccessibilityRenderObject.h: 2011-08-17 James Robinson <jamesr@chromium.org> [chromium] Crash if compositing is disabled during updateLayers() https://bugs.webkit.org/show_bug.cgi?id=66353 Reviewed by Kenneth Russell. If compositing is turned off during LayerRendererChromium::updateLayers(), the rootLayer() will become null. Sicne CCLayerTreeHost::doComposite() calls updateLayers() and then drawLayers() without checking for this case, drawLayers() has to return without doing anything if the root layer is null. Crash fixed based on crash reports. No known reliably repro case, unfortunately. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawLayers): 2011-08-17 Dan Bernstein <mitz@apple.com> <rdar://problem/9971293> Mid-word breaks can occur in the middle of a surrogate pair https://bugs.webkit.org/show_bug.cgi?id=66402 Reviewed by Dave Hyatt. Test: fast/text/midword-break-before-surrogate-pair-2.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::LineBreaker::nextLineBreak): Just never allow a mid-word break before a trailing surrogate. 2011-08-16 Chang Shu <cshu@webkit.org> Support reset in WebCore::Internals https://bugs.webkit.org/show_bug.cgi?id=66307 Reviewed by Dimitri Glazkov. New tests will be added when function reset is implemented. Added framework code in WebCoreTestSupport. The real implementation of Internals::reset() depends on the need from the settings that require a reset. * testing/Internals.cpp: (WebCore::Internals::reset): * testing/Internals.h: * testing/js/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/js/WebCoreTestSupport.h: * testing/v8/WebCoreTestSupport.cpp: (WebCoreTestSupport::resetInternalsObject): * testing/v8/WebCoreTestSupport.h: 2011-08-17 Tony Chang <tony@chromium.org> Fix chromium mac compile. MediaPlayerPrivateAVFoundationObjC.* moved and the WebCore.gypi file wasn't updated. * WebCore.gypi: 2011-08-17 Abhishek Arya <inferno@chromium.org> Crash in Document::recalcStyleSelector https://bugs.webkit.org/show_bug.cgi?id=66335 Reviewed by Simon Fraser. When node is getting destroyed and its removedFromDocument is not called due to entire document structure torn down(using removeAllChildren), make sure to clear out the stylesheet candidate node from document's structures in its destructor. Test: svg/dom/stylesheet-candidate-node-crash-main.html * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::~ProcessingInstruction): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::~HTMLLinkElement): * html/HTMLStyleElement.cpp: (WebCore::HTMLStyleElement::~HTMLStyleElement): * svg/SVGStyleElement.cpp: (WebCore::SVGStyleElement::~SVGStyleElement): 2011-08-17 Sam White <samuel.white@rochester.edu> AccessibilityObject levels are inconsistent https://bugs.webkit.org/show_bug.cgi?id=66180 Updated accessibilityTable to return level values consistent with other accessibilityObjects that return level values. This means a value of 0 is now only returned when tableLevel() is called on a non-table element. Reviewed by Chris Fleizach. Test: platform/mac/accessibility/element-level.html * accessibility/AccessibilityTable.cpp: (WebCore::AccessibilityTable::tableLevel): * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper accessibilityAttributeValue:]): 2011-08-17 Ryosuke Niwa <rniwa@webkit.org> An arrow key collapses directionless selection range in the wrong direction in BiDi https://bugs.webkit.org/show_bug.cgi?id=64626 Reviewed by Darin Adler. The bug was caused by willBeModified's always using block direction to determine the direction to which the selection is collapsed. Fixed the bug by calling directionOfSelection in willBeModified, which will return the text direction of the surrounding context when the start and the end have the same direction. When the text directions at the start and at the end of selection do not match, it uses the block's text direction. Test: editing/selection/collapse-selection-in-bidi.html * editing/FrameSelection.cpp: (WebCore::FrameSelection::directionOfSelection): Added. (WebCore::FrameSelection::willBeModified): Calls directionOfSelection. (WebCore::FrameSelection::modifyMovingRight): Ditto. (WebCore::FrameSelection::modifyMovingLeft): Ditto. * editing/FrameSelection.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Some AVFoundation source files should be in platform-specific directories https://bugs.webkit.org/show_bug.cgi?id=66352 Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf, and moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/. While I was at it, added svn:eol-style property to the MediaPlayerPrivateAVFoundationObjC.* files. Also, for some reason, Visual Studio decided to re-sort a couple files in \inspector\front-end\ in WebCore.vcproj, even though I just re-sorted the project in r93215. Reviewed by Eric Carlson. No new tests; no functional change. * WebCore.vcproj/WebCore.vcproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.* files to platform/graphics/avfoundation/cf. * WebCore.vcproj/WebCoreMediaQT.vsprops: Added $(ProjectDir)..\platform\graphics\avfoundation\cf to include paths. * WebCore.xcodeproj/project.pbxproj: Moved platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.* files to platform/graphics/avfoundation/objc/. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Removed. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm: Removed. * platform/graphics/avfoundation/cf: Added. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp. * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.h. * platform/graphics/avfoundation/objc: Added. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h. * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Copied from Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm. 2011-08-17 Luke Macpherson <macpherson@chromium.org> Only set m_fontDirty if TextSizeAdjust is actually changed. https://bugs.webkit.org/show_bug.cgi?id=66022 Reviewed by Darin Adler. No new tests. Refactoring only. Reduces instances where the font information is dirtied to save recalculation where it is not necessary. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Call new setTextSizeAdjust function. * css/CSSStyleSelector.h: (WebCore::CSSStyleSelector::setTextSizeAdjust): Add wrapper for RenderStyle::setTextSizeAdjust() that automatically updates m_fontDirty. * rendering/style/RenderStyle.h: (WebCore::RenderStyle::setTextSizeAdjust): Make setTextSizeAdjust return true if the unlderlying value was changed. 2011-08-17 Kenichi Ishibashi <bashi@chromium.org> [Chromium] Crash in HarfbuzzFace::~HarfbuzzFace https://bugs.webkit.org/show_bug.cgi?id=66211 Holds Skia's unique font ID instead of FontPlatformData to avoid accessing freed FontPlatformData. Reviewed by Tony Chang. No new tests; no functional change. * platform/graphics/chromium/HarfbuzzSkia.cpp: (WebCore::releaseCachedHarfbuzzFace): Changed the argument. (WebCore::HarfbuzzFace::HarfbuzzFace): Changed to have Skia's font uniqueID instead of FontPlatformData. (WebCore::HarfbuzzFace::~HarfbuzzFace): Uses m_uniqueID to call releaseCachedHarfbuzzFace. * platform/graphics/chromium/HarfbuzzSkia.h: 2011-08-17 Jeff Miller <jeffm@apple.com> Re-sort the WebCore project with Visual Studio after recent changes that I assume were done by manually editing the XML. * WebCore.vcproj/WebCore.vcproj: 2011-08-17 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Fix implementation of wkScrollbarMinimumTotalLengthNeededForThumb to match WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=66311 Reviewed by Dimitri Glazkov. Updated wkScrollbarMinimumTotalLengthNeededForThumb() based on the latest disassembly of libWebKitSystemInterfaceLion.a. * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarMinimumTotalLengthNeededForThumb): 2011-08-17 Steve Block <steveblock@google.com> Unreviewed, rolling out r93186. http://trac.webkit.org/changeset/93186 https://bugs.webkit.org/show_bug.cgi?id=66114 Breaks LayoutTests on Chromium canary bots * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): * platform/graphics/chromium/cc/CCLayerImpl.h: 2011-08-17 Ryosuke Niwa <rniwa@webkit.org> Get rid of calls to deprecatedNode and deprecatedEditingOffset in AccessibilityRenderObject.cpp and InsertTextCommand.cpp https://bugs.webkit.org/show_bug.cgi?id=66014 Reviewed by Hajime Morita. Removed calls to deprecatedNode and deprecatedEditingOffsets in the following files. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::indexForVisiblePosition): Calls Position::rootEditableElement and Range::setEnd(const Position&, ExceptionCode) instead of manually pulling deprecatedNode and deprecatedEditingOffset. (WebCore::AccessibilityRenderObject::index): Abstracted the logic to loop through render objects from deprecatedNodes' renderer to m_renderer as renderObjectContainsPosition. * dom/Position.h: (WebCore::Position::rootEditableElement): Added. * dom/Range.cpp: (WebCore::Range::setStart): Added. (WebCore::Range::setEnd): Added. * dom/Range.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::insertTab): * editing/RenderedPosition.cpp: (WebCore::renderObjectContainsPosition): Extracted from AccessibilityRenderObject::index. * editing/RenderedPosition.h: 2011-08-17 Sailesh Agrawal <sail@chromium.org> Chromium Mac: Fix issue where scrollbar wouldn't be drawn until page finished loading https://bugs.webkit.org/show_bug.cgi?id=66238 Reviewed by Dimitri Glazkov. Overlay scrollbars were not visible if the user scrolled a page while the page was loading. The sequence of events necessary to reproduce this bug were: 1. -[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:] is called 2. animation is delayed because shouldSuspendScrollAnimations() is true 3. ScrollAnimatorChromiumMac::scroll() is called before the ScrollAnimatorChromiumMac::m_initialScrollbarPaintTimer is fired. 4. At this point the scrollbar painter assumes the scrollbar is already visible (because of 1.) so the scrollbar's alpha stays at 0. Thus the scrollbar isn't visible until the page finishes loading. It turns out that the root problem was that when the initialScrollbarPainterTimer fired I wasn't flashing the scrollbar correctly. My implementation of wkScrollbarPainterForceFlashScrollers() just called flashScrollers. The Safari implementation of this function also calls hideOverlayScrollers. Calling hideOverlayScrollers causes the alpha to change to 0 which prevents step 4 from happening. Also, now that wkScrollbarPainterForceFlashScrollers is working correctly I don't need the extra logic I added to the initialScrollbarPainterTimer handler. That logic restarted the timer if shouldSuspendScrollAnimations() was true. But this isn't necessary since calling wkScrollbarPainterForceFlashScrollers() causes -[ScrollbarPainterDelegate setUpAnimation:...] to be called which does the exact same thing. Removing the extra logic reverts http://trac.webkit.org/changeset/92316. * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::initialScrollbarPaintTimerFired): * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm: (wkScrollbarPainterForceFlashScrollers): 2011-08-16 Andrey Kosyakov <caseq@chromium.org> Web Inspector: maintain visible view hierarchy and dispatch common view events automatically https://bugs.webkit.org/show_bug.cgi?id=66131 Reviewed by Pavel Feldman. Test: inspector/view-events.html - added a notion of an optional parent to a View - maintain a list of View children - dispatch common view events, such as show/hide/resize automatically through the hierarchy of visible views. - promoted Panel's logic of (re)storing scroll positions to view - demoted inheritScrollPositionFromView to a couple of views that need it. * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype.onResize): * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.populateStatusBar): (WebInspector.ConsoleView.prototype.elementsToRestoreScrollPositionsFor): * inspector/front-end/CookieItemsView.js: (WebInspector.CookieItemsView.prototype.onResize): (WebInspector.SimpleCookiesTable.prototype.onResize): * inspector/front-end/DOMStorageItemsView.js: (WebInspector.DOMStorageItemsView.prototype.onResize): * inspector/front-end/DetailedHeapshotView.js: (WebInspector.DetailedHeapshotView.prototype.onResize): * inspector/front-end/Drawer.js: (WebInspector.Drawer.prototype.set visibleView): (WebInspector.Drawer.prototype.show): (WebInspector.Drawer.prototype.hide): (WebInspector.Drawer.prototype.onResize): (WebInspector.Drawer.prototype._animateDrawerHeight.animationFinished): (WebInspector.Drawer.prototype._animateDrawerHeight): (WebInspector.Drawer.prototype._statusBarDragging): (WebInspector.Drawer.prototype._endStatusBarDragging): * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.onResize): * inspector/front-end/ExtensionPanel.js: * inspector/front-end/FontView.js: (WebInspector.FontView.prototype.onResize): * inspector/front-end/IFrameView.js: (WebInspector.IFrameView): * inspector/front-end/NetworkItemView.js: (WebInspector.NetworkItemView.prototype._installHighlightSupport): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): (WebInspector.NetworkLogView.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.NetworkLogView.prototype.onResize): (WebInspector.NetworkLogView.prototype.wasShown): (WebInspector.NetworkLogView.prototype.willHide): (WebInspector.NetworkPanel): (WebInspector.NetworkPanel.prototype.show): (WebInspector.NetworkPanel.prototype._showResource): (WebInspector.NetworkPanel.prototype._closeVisibleResource): * inspector/front-end/Panel.js: (WebInspector.Panel.prototype.show): (WebInspector.Panel.prototype.hide): (WebInspector.Panel.prototype.performSearch.processChunk): (WebInspector.Panel.prototype.performSearch): (WebInspector.Panel.prototype.updateSidebarWidth): * inspector/front-end/PanelEnablerView.js: (WebInspector.PanelEnablerView.prototype.show): (WebInspector.PanelEnablerView.prototype.onResize): * inspector/front-end/ProfileView.js: (WebInspector.CPUProfileView.prototype.onResize): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): * inspector/front-end/ResourceCookiesView.js: (WebInspector.ResourceCookiesView.prototype.onResize): * inspector/front-end/ResourcePreviewView.js: (WebInspector.ResourcePreviewView.prototype.contentLoaded): * inspector/front-end/ResourceResponseView.js: (WebInspector.ResourceResponseView.prototype.contentLoaded): * inspector/front-end/ResourceTimingView.js: (WebInspector.ResourceTimingView.prototype.show): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.show): (WebInspector.ResourcesPanel.prototype._innerShowView): (WebInspector.ResourcesPanel.prototype.closeVisibleView): (WebInspector.ResourcesPanel.prototype.updateMainViewWidth): (WebInspector.FrameResourceTreeElement.prototype._recreateSourceView): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.show): (WebInspector.ScriptsPanel.prototype._createSourceFrame): (WebInspector.ScriptsPanel.prototype._removeSourceFrame): (WebInspector.ScriptsPanel.prototype.setSidebarWidth): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.willHide): (WebInspector.SourceFrame.prototype.clearMessages): (WebInspector.SourceFrame.prototype._setTextViewerDecorations): (WebInspector.SourceFrame.prototype.inheritScrollPositions): * inspector/front-end/TabbedPane.js: (WebInspector.TabbedPane.prototype.appendTab): * inspector/front-end/TextViewer.js: (WebInspector.TextViewer.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.TextViewer.prototype.inheritScrollPositions): (WebInspector.TextViewer.prototype.onResize): * inspector/front-end/TimelinePanel.js: (WebInspector.TimelinePanel.prototype.onResize): (WebInspector.TimelinePanel.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.TimelinePanel.prototype.show): * inspector/front-end/View.js: (WebInspector.View): (WebInspector.View.prototype.wasShown): (WebInspector.View.prototype.willHide): (WebInspector.View.prototype._innerShow): (WebInspector.View.prototype.show): (WebInspector.View.prototype._innerHide): (WebInspector.View.prototype.hide): (WebInspector.View.prototype._detach): (WebInspector.View.prototype.elementsToRestoreScrollPositionsFor): (WebInspector.View.prototype.storeScrollPositions): (WebInspector.View.prototype.restoreScrollPositions): (WebInspector.View.prototype.addChildView): (WebInspector.View.prototype.removeChildView): (WebInspector.View.prototype.onResize): (WebInspector.View.prototype.doResize): (WebInspector.View.prototype.dispatchToSelfAndVisibleChildren): (WebInspector.View.prototype.dispatchToVisibleChildren): * inspector/front-end/inspector.js: (WebInspector.windowResize): 2011-08-16 Luke Macpherson <macpherson@chromium.org> Represent RenderStyle::textOverflow property using an enum instead of a bool. https://bugs.webkit.org/show_bug.cgi?id=66356 Reviewed by Dan Bernstein. No new tests - no behavioral changes. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Support cast from TextOverflow to CSSPrimitiveValue. (WebCore::CSSPrimitiveValue::operator TextOverflow): Support cast from CSSPrimitiveValue to TextOverflow. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro for text overflow. * rendering/style/RenderStyle.h: (WebCore::InheritedFlags::textOverflow): Return TextOverflow enum. (WebCore::InheritedFlags::setTextOverflow): Accept TextOverflow enum parameter. (WebCore::InheritedFlags::initialTextOverflow): Return TextOverflowClip. * rendering/style/RenderStyleConstants.h: Define TextOverflow enum. * rendering/style/StyleRareNonInheritedData.h: Change representation of text overflow from bool to one-bit unsigned. 2011-08-16 Jeff Miller <jeffm@apple.com> Apple's Windows production build should fail to compile if AVFoundation is not enabled https://bugs.webkit.org/show_bug.cgi?id=66339 Generate a compile-time error for Production builds if !USE(AVFOUNDATION). Reviewed by Darin Adler. * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationCF.cpp: Generate a compile-time error for Production builds if !USE(AVFOUNDATION). 2011-08-16 David Levin <levin@chromium.org> REGRESSION (r89086): All worker xhr requests trigger preflight requests. https://bugs.webkit.org/show_bug.cgi?id=66340 Reviewed by Adam Barth. Test coming in a more comprehensive patch shortly. This is just a very targetted patch to allow for easier merging. * loader/CrossOriginAccessControl.cpp: (WebCore::isOnAccessControlSimpleRequestHeaderWhitelist): Add referer to the list of whitelisted headers. It can't be set by xhr so it is ok to whitelist it, but it is set before calling this function. This is similar to what is done for "origin" in here. 2011-08-16 Shawn Singh <shawnsingh@chromium.org> Computing screen-space transform for LayerChromium and CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=66114 Reviewed by James Robinson. Test: compositing/backface-visibility-hierarchical-transform.html Added a data member to LayerChromium and CCLayerImpl that holds the screen-space transform. The transform is computed in calculateDrawTransformsAndVisibility(), which is used during updating (LayerChromium) and drawing (CCLayerImpl). This transform will also be used for other things, such as HUD drawing, in upcoming patches. Also fixed a FIXME in LayerRendererChromium::drawLayer, which was not computing the entire hierarchy of transforms to determine back-face visibility. Now it simply uses the screen space transform. * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::screenSpaceDrawTransform): (WebCore::LayerChromium::setScreenSpaceDrawTransform): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayers): (WebCore::LayerRendererChromium::drawLayersInternal): (WebCore::LayerRendererChromium::drawLayer): (WebCore::calculateDrawTransformsAndVisibility): * platform/graphics/chromium/cc/CCLayerImpl.h: (WebCore::CCLayerImpl::screenSpaceDrawTransform): (WebCore::CCLayerImpl::setScreenSpaceDrawTransform): 2011-08-16 Hayato Ito <hayato@chromium.org> Implement proper handling of events which happen in children of shadow hosts. https://bugs.webkit.org/show_bug.cgi?id=66285 Reviewed by Dimitri Glazkov. Fix the issue where a shadow host stops an event propagation if an event happens at the children of shadow hosts, outside of the shadow root. Test: fast/dom/shadow/shadow-contents-event.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): 2011-08-16 Per-Erik Brodin <per-erik.brodin@ericsson.com> Make it possible to explicitly prevent a preflight via ThreadableLoaderOptions https://bugs.webkit.org/show_bug.cgi?id=65694 Reviewed by Alexey Proskuryakov. No new tests since there is no change in behavior. * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::start): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): * loader/ThreadableLoader.h: (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): * notifications/Notification.cpp: (WebCore::Notification::startLoading): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::createRequest): 2011-08-16 Scott Byer <scottbyer@chromium.org> Fix spelling error. https://bugs.webkit.org/show_bug.cgi?id=66261 Reviewed by Adam Barth. No functional change, no tests needed. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scroll): (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimator::notifyPositionChanged): * platform/ScrollAnimator.h: * platform/ScrollAnimatorNone.cpp: (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorNone::animationTimerFired): * platform/ScrollAnimatorWin.cpp: (WebCore::ScrollAnimatorWin::scrollToOffsetWithoutAnimation): (WebCore::ScrollAnimatorWin::animateScroll): * platform/chromium/ScrollAnimatorChromiumMac.h: * platform/chromium/ScrollAnimatorChromiumMac.mm: (WebCore::ScrollAnimatorChromiumMac::immediateScrollToPoint): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorChromiumMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorChromiumMac::notifyPositionChanged): * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimatorMac::immediateScrollToPoint): (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX): (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY): (WebCore::ScrollAnimatorMac::notifyPositionChanged): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> ASSERT in fast/css/custom-font-xheight.html https://bugs.webkit.org/show_bug.cgi?id=66328 Reviewed by Dan Bernstein. In r93140 the temporary font created for a remote CSS font face was created without being retained. We need to protect the font from being purged while we hold onto it, so add a font cache purge preventer. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. Take 4. Namespace the now public enum as FontCache::ShouldRetain. * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData): 2011-08-15 Stephen White <senorblanco@chromium.org> Canvas resizing can be slow https://bugs.webkit.org/show_bug.cgi?id=66251 Canvas resizing was slow due to re-allocation of the ImageBuffer on each size change (width or height). This was introduced inadvertently by calls to isAccelerated() during canvas reset(). Since we won't know if we have successfully accelerated until ImageBuffer creation, move the compositor invalidation to createImageBuffer() as well. This patch also attempts to unify the Skia and CG accelerated canvas paths. The DrawingBuffer used by the Skia path is now owned by ImageBuffer[Skia], similar to how the IOSurface is owned by ImageBuffer[CG]. Some of the logic for when to accelerate was moved into HTMLCanvasElement and unified with the CG path. Acceleration is also now enabled by the same "Accelerated" ImageBuffer create flag used by the CG path. DrawingBuffer is now re-created even for a same-size change (same as the memory buffer), but we speed it up by calling GraphicsContext3D::texImage2D() with a NULL pixels ptr instead of GraphicsContext3D::teximage2DResourceSafe() (no need to clear it, since it's done with a glClear anyway). Reviewed by Kenneth Russell. Covered by existing tests in fast/canvas and canvas/philip. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::reset): Don't call isAccelerated() from reset(), since we don't want to inadvertently create the ImageBuffer. Also, since we won't know if we have successfully accelerated until createImageBuffer() is called, defer the compositor invalidation to createImageBuffer() as well. (WebCore::HTMLCanvasElement::shouldAccelerate): Unify the CG and Skia ports' logic for when to accelerate (Skia logic moved in from CanvasRenderingContext2D). (WebCore::HTMLCanvasElement::createImageBuffer): Use the unified shouldAccelerate() logic, and pass it as a flag to ImageBuffer. Do compositor invalidation as well. * html/HTMLCanvasElement.h: (WebCore::HTMLCanvasElement::hasCreatedImageBuffer): Expose hasCreatedImageBuffer() publically, so CanvasRenderingContext2D::isAccelerated() doesn't inadvertently create it. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): Remove all acceleration setting and resetting, since it's now done during ImageBuffer creation. (WebCore::CanvasRenderingContext2D::isAccelerated): Check if the image buffer was created, so we don't inadvertently create it here. (WebCore::CanvasRenderingContext2D::paintsIntoCanvasBuffer): Don't call GraphicsContext3D::paintsIntoCanvasBuffer(), since its WebViewImpl may be null. Ask the render tree instead. (WebCore::CanvasRenderingContext2D::reset): Don't reset acceleration here, since we don't own it anymore. (WebCore::CanvasRenderingContext2D::platformLayer): Call into the ImageBuffer to get our PlatformLayer. * html/canvas/CanvasRenderingContext2D.h: Remove m_drawingBuffer, and all acceleration-related calls. * platform/graphics/GraphicsContext.cpp: * platform/graphics/GraphicsContext.h: Remove setGraphicsContext3D(), and paintsIntoImageBuffer(). * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::platformLayer): Implement a dummy platformLayer() call for non-skia ports. * platform/graphics/ImageBuffer.h: Declare a platformLayer() call (USE(ACCELERATED_COMPOSITING) only). * platform/graphics/chromium/ImageBufferDataSkia.h: Add a DrawingBuffer data member. * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::reset): Use texImage2D() with a NULL ptr, not texImage2DResourceSafe(). Since we immediately clear the framebuffer via glClear(), this whole resource safe business is overkill. * platform/graphics/skia/GraphicsContextSkia.cpp: Remove setGraphicsContext3D() and paintsIntoImageBuffer(). This functionality is handled by ImageBuffer now. * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::ImageBuffer): Give the ImageBufferData ownership of the DrawingBuffer. (WebCore::ImageBuffer::platformLayer): Implement an accessor for the DrawingBuffer's PlatformLayer. * platform/graphics/skia/PlatformContextSkia.cpp: (WebCore::PlatformContextSkia::setGraphicsContext3D): * platform/graphics/skia/PlatformContextSkia.h: Remove isPathSkiaSafe() extern (unused). Remove paintsIntoImageBuffer() (now unused). Remove IntSize param from setGraphicsContext3D() (unused). 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. Take 3. Include the proper includes! * platform/graphics/FontCache.h: 2011-08-16 Mihnea Ovidenie <mihnea@adobe.com> Unmatrix algorithm implementation is wrong https://bugs.webkit.org/show_bug.cgi?id=66080 Reviewed by Dean Jackson. Current version of the algorithm negates only the scaleX while it should negate also scaleY and scaleZ when appropriate. Test: animations/animation-matrix-negative-scale-unmatrix.html * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::decompose): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. This just makes the troublesome enum public. If this fixes the build I will file a follow-up bug to clean-up these build issues and either keep the enum public and cleanup other functions or restore the enum to private. There is no harm in making the enum public right now. * platform/graphics/FontCache.h: 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Chromium Windows build fix after r93140. * platform/graphics/FontCache.h: 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Unreviewed Windows and Chromium Windows build fix after r93140. * platform/graphics/FontCache.h: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::FontCache::fontDataFromDescriptionAndLogFont): (WebCore::getLastResortFallbackFontProc): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/win/FontCacheWin.cpp: (WebCore::FontCache::fontDataFromDescriptionAndLogFont): (WebCore::FontCache::getLastResortFallbackFont): 2011-08-16 Adam Roben <aroben@apple.com> Make placeholder text remain visible until a character is typed on Windows Fixes <http://webkit.org/b/66319> Placeholder text in text fields disappears when the field is focused on Windows, which doesn't match Lion or Windows native text fields Covered by existing tests (which are currently failing on the bots until this patch lands). Reviewed by Dave Hyatt. * rendering/RenderThemeSafari.h: (WebCore::RenderThemeSafari::shouldShowPlaceholderWhenFocused): * rendering/RenderThemeWin.h: (WebCore::RenderThemeWin::shouldShowPlaceholderWhenFocused): Added overrides to return true. 2011-08-16 David Hyatt <hyatt@apple.com> https://bugs.webkit.org/show_bug.cgi?id=66254 Make region invalidation and repainting work properly. We do this by making RenderFlowThreads into repaint containers and then issuing new repaints in the regions that contain the invalidated flow thread content. Reviewed by Simon Fraser. Added new tests in fast/repaint. * rendering/RenderFlowThread.cpp: (WebCore::RenderFlowThread::repaintRectangleInRegions): * rendering/RenderFlowThread.h: * rendering/RenderObject.cpp: (WebCore::RenderObject::enclosingRenderFlowThread): (WebCore::RenderObject::containerForRepaint): (WebCore::RenderObject::repaintUsingContainer): * rendering/RenderObject.h: * rendering/RenderView.cpp: (WebCore::RenderView::RenderView): (WebCore::RenderView::renderFlowThreadWithName): * rendering/RenderView.h: (WebCore::RenderView::hasRenderFlowThreads): 2011-08-16 Joseph Pecoraro <joepeck@webkit.org> Abandoned Memory: Temporary CSS Fonts May Never Be Purged https://bugs.webkit.org/show_bug.cgi?id=66153 Reviewed by Dan Bernstein. While a remote CSS font face is loading we fallback to a temporary font. We don't want to retain the fallback font because noone takes ownership of the temporary font. This patch adds a way to get an uncached fallback font, which plumbs the ShouldRetain enum through the different platform implementations of getLastResortFallbackFont. No new tests, no functional change. * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::getFontData): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getNonRetainedLastResortFallbackFont): * platform/graphics/FontCache.h: * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::fontDataFromDescriptionAndLogFont): (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData): (WebCore::getLastResortFallbackFontProc): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/chromium/FontCacheLinux.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/freetype/FontCacheFreeType.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/haiku/FontCacheHaiku.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/mac/FontCacheMac.mm: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/pango/FontCachePango.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/qt/FontCacheQt.cpp: (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/win/FontCacheWin.cpp: (WebCore::fontDataFromDescriptionAndLogFont): (WebCore::FontCache::getLastResortFallbackFont): * platform/graphics/wince/FontCacheWinCE.cpp: * platform/graphics/wx/FontCacheWx.cpp: (WebCore::FontCache::getLastResortFallbackFont): 2011-08-16 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Rubber banding gutter drawing https://bugs.webkit.org/show_bug.cgi?id=66226 Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to draw the overhang areas. Move default implementation to ScrollbarThemeComposite::paintOverhangAreas(). Add a different implementation for Chromium Mac. Reviewed by Dimitri Glazkov. No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::paintOverhangAreas): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paintOverhangAreas): * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-12 Wyatt Carss <wcarss@chromium.org> Programmatically set selection should not have direction on Mac https://bugs.webkit.org/show_bug.cgi?id=60529 Reviewed by Ryosuke Niwa. Modified default value of VisibleSelection->m_isDirectional from 'true' to 'false' by adding a defaulted argument to several VisibleSelection constructors to make programmatic selection be directionless by default on Mac. Also modified several calls to VisibleSelection's constructors to correctly preserve directionality. Near the end of FrameSelection::modify (presently FrameSelection.cpp:869) a call to setExtent triggers an editing delegate that uses the FrameSelection. The direction here should have been preserved from before, but setIsDirectional was not called until after FrameSelection.cpp:869. It has been moved up to make things behave. * WebCore.exp.in: * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::doApply): (WebCore::ApplyBlockElementCommand::formatSelection): * editing/ApplyStyleCommand.cpp: (WebCore::ApplyStyleCommand::updateStartEnd): * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply): * editing/CompositeEditCommand.cpp: (WebCore::CompositeEditCommand::moveParagraphWithClones): (WebCore::CompositeEditCommand::moveParagraphs): (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): * editing/CreateLinkCommand.cpp: (WebCore::CreateLinkCommand::doApply): * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete): (WebCore::DeleteSelectionCommand::doApply): * editing/Editor.cpp: (WebCore::Editor::selectionForCommand): * editing/FrameSelection.cpp: (WebCore::shouldAlwaysUseDirectionalSelection): (WebCore::FrameSelection::FrameSelection): (WebCore::FrameSelection::moveTo): (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded): (WebCore::FrameSelection::modify): (WebCore::FrameSelection::setBase): (WebCore::FrameSelection::setExtent): * editing/FrameSelection.h: * editing/InsertLineBreakCommand.cpp: (WebCore::InsertLineBreakCommand::doApply): * editing/InsertListCommand.cpp: (WebCore::InsertListCommand::doApply): * editing/InsertParagraphSeparatorCommand.cpp: (WebCore::InsertParagraphSeparatorCommand::doApply): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): (WebCore::InsertTextCommand::doApply): * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::completeHTMLReplacement): * editing/TypingCommand.cpp: (WebCore::TypingCommand::makeEditableRootEmpty): (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::VisibleSelection): * editing/VisibleSelection.h: * page/EventHandler.cpp: (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): (WebCore::EventHandler::updateSelectionForMouseDrag): 2011-08-16 Jeffrey Pfau <jpfau@apple.com> New XML parser: Add document fragment parser https://bugs.webkit.org/show_bug.cgi?id=66317 Reviewed by Adam Barth. * dom/DocumentFragment.cpp: (WebCore::DocumentFragment::parseXML): * xml/parser/NewXMLDocumentParser.cpp: (WebCore::NewXMLDocumentParser::NewXMLDocumentParser): (WebCore::NewXMLDocumentParser::parseDocumentFragment): * xml/parser/NewXMLDocumentParser.h: (WebCore::NewXMLDocumentParser::create): * xml/parser/XMLTokenizer.h: * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::XMLTreeBuilder): (WebCore::XMLTreeBuilder::pushCurrentNode): * xml/parser/XMLTreeBuilder.h: (WebCore::XMLTreeBuilder::create): (WebCore::XMLTreeBuilder::NodeStackItem::node): 2011-08-16 Jeffrey Pfau <jpfau@apple.com> New XML parser: Replace assertions regarding character data in the prolog with proper checks https://bugs.webkit.org/show_bug.cgi?id=66269 Reviewed by Adam Barth. This patch checks for character data in the prolog (which is illegal in XML) and discards it, instead of failing an assertion. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processProcessingInstruction): (WebCore::XMLTreeBuilder::processXMLDeclaration): (WebCore::XMLTreeBuilder::processDOCTYPE): (WebCore::XMLTreeBuilder::enterText): (WebCore::XMLTreeBuilder::failOnText): * xml/parser/XMLTreeBuilder.h: 2011-08-16 Alexander Pavlov <apavlov@chromium.org> Web Inspector: word wrap long edits https://bugs.webkit.org/show_bug.cgi?id=65512 Reviewed by Pavel Feldman. * inspector/front-end/inspector.css: (.styles-section .properties li.child-editing): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: convert DOM breakpoint types to strings. https://bugs.webkit.org/show_bug.cgi?id=66304 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::domTypeForName): (WebCore::InspectorDOMDebuggerAgent::setDOMBreakpoint): (WebCore::InspectorDOMDebuggerAgent::removeDOMBreakpoint): * inspector/InspectorDOMDebuggerAgent.h: * inspector/front-end/DOMBreakpointsSidebarPane.js: (WebInspector.DOMBreakpointsSidebarPane): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: force pseudo element state when checking it in the styles sidebar. https://bugs.webkit.org/show_bug.cgi?id=66292 This reverts http://trac.webkit.org/changeset/89132 and introduces InspectorInstrumentation calls from the CSSStyleSelector for pseudo state processing. These calls are very fast: they are guarded with the inline checks for the front-end count. Reviewed by David Hyatt. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::initForStyleResolve): (WebCore::CSSStyleSelector::styleRulesForElement): (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): (WebCore::CSSStyleSelector::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkSelector): (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): * css/CSSStyleSelector.h: * inspector/InspectorCSSAgent.cpp: (WebCore::computePseudoClassMask): (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::clearFrontend): (WebCore::InspectorCSSAgent::forcePseudoState): (WebCore::InspectorCSSAgent::getStylesForNode): (WebCore::InspectorCSSAgent::didRemoveDocument): (WebCore::InspectorCSSAgent::didRemoveDOMNode): (WebCore::InspectorCSSAgent::clearPseudoState): * inspector/InspectorCSSAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::disconnectFrontend): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::forcePseudoStateImpl): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::forcePseudoState): 2011-08-16 Tony Chang <tony@chromium.org> Unreviewed, rolling out r93114. http://trac.webkit.org/changeset/93114 https://bugs.webkit.org/show_bug.cgi?id=66226 broke the chromium mac compile * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: * platform/ScrollbarThemeComposite.cpp: * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): * platform/mac/ScrollbarThemeMac.h: 2011-08-16 Alexei Svitkine <asvitkine@chromium.org> Chromium Mac: Rubber banding gutter drawing https://bugs.webkit.org/show_bug.cgi?id=66226 Make ScrollView::paintOverhangAreas() use the ScrollbarTheme::nativeTheme() to draw the overhang areas. Move default implementation to ScrollbarThemeComposite::paintOverhangAreas(). Add a different implementation for Chromium Mac. Reviewed by Dimitri Glazkov. No new tests since this is just refactoring code and adding a Chromium-specific path for overhang drawing. * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollbarTheme.h: (WebCore::ScrollbarTheme::paintOverhangAreas): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paintOverhangAreas): * platform/ScrollbarThemeComposite.h: * platform/chromium/ScrollbarThemeChromiumMac.h: * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::ScrollbarThemeChromiumMac): (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paintTickmarks): (WebCore::ScrollbarThemeChromiumMac::paintOverhangAreas): 2011-08-16 Luke Macpherson <macpherson@chromium.org> Support cast between CSSPrimitiveValue and ETransformStyle3D and use in CSSStyleSelector. https://bugs.webkit.org/show_bug.cgi?id=66273 Reviewed by Simon Fraser. No new tests - no functionality changed - refactoring only. * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Define cast from CSSPrimitiveValue to ETransformStyle3D. (WebCore::CSSPrimitiveValue::operator ETransformStyle3D): Define cast from ETransformStyle3D to CSSPrimitiveValue. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use appropriate macro to handle CSSPropertyWebkitTransformStyle. 2011-08-16 Luke Macpherson <macpherson@chromium.org> Use appropriate macro to handle CSSPropertyWebkitContentOrder in CSSStyleSelector::applyProperty() https://bugs.webkit.org/show_bug.cgi?id=66279 Reviewed by Simon Fraser. No new tests - no functionality changed - simple refactoring only. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): Use HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE macro to handle CSSPropertyWebkitContentOrder. This works because PrimitiveValue now supports cast to int. 2011-08-16 Eric Carlson <eric.carlson@apple.com> [REGRESSION] Media controls should always be enabled when scripting is disabled https://bugs.webkit.org/show_bug.cgi?id=66303 Reviewed by Dimitri Glazkov. Tests: media/video-controls-no-scripting-iframe.html media/video-controls-no-scripting.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::attributeChanged): Move the controls enabling/disabling code to configureMediaControls. (WebCore::HTMLMediaElement::prepareForLoad): Call configureMediaControls. (WebCore::HTMLMediaElement::configureMediaControls): New, move code duplicated in attributeChanged and preDispatchEventHandler here. (WebCore::HTMLMediaElement::preDispatchEventHandler): Move the controls enabling/disabling code to configureMediaControls. * html/HTMLMediaElement.h: 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: hide non-conservative methods from the protocol documentation. https://bugs.webkit.org/show_bug.cgi?id=66301 Reviewed by Yury Semikhatsky. * inspector/Inspector.json: 2011-08-16 Andras Becsi <abecsi@webkit.org> Web Inspector: nuke background events collection (dead feature) https://bugs.webkit.org/show_bug.cgi?id=66296 Fix the GTK build after r93095. Unreviewed build fix. No new tests neede. * GNUmakefile.list.am: Remove nonexistent sources. 2011-08-16 Andras Becsi <abecsi@webkit.org> Reviewed by Csaba Osztrogonác. Need AtomicStrings for the various font family names https://bugs.webkit.org/show_bug.cgi?id=28024 Unify the usage of '-webkit' prefixed font family names by using global AtomicStrings. Use a .in file to generate the needed sources through make_names.pl. No new tests needed. * CMakeLists.txt: * CodeGenerators.pri: * DerivedSources.make: * GNUmakefile.am: * GNUmakefile.list.am: * WebCore.gyp/WebCore.gyp: * WebCore.gyp/scripts/action_makenames.py: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * css/CSSComputedStyleDeclaration.cpp: (WebCore::identifierForFamily): * css/CSSFontSelector.cpp: (WebCore::CSSFontSelector::addFontFaceRule): (WebCore::fontDataForGenericFamily): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::applyProperty): * css/WebKitFontFamilyNames.in: Added. * dom/make_names.pl: * page/Frame.cpp: (WebCore::Frame::Frame): * platform/graphics/FontCache.cpp: (WebCore::FontCache::getFontData): * platform/graphics/FontDescription.h: (WebCore::FontDescription::useFixedDefaultSize): 2011-08-16 Pavel Feldman <pfeldman@google.com> Web Inspector: nuke background events collection (dead feature) https://bugs.webkit.org/show_bug.cgi?id=66296 Reviewed by Yury Semikhatsky. * CMakeLists.txt: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/EventsCollector.cpp: Removed. * inspector/EventsCollector.h: Removed. * inspector/Inspector.json: * inspector/InspectorFrontendProxy.cpp: Removed. * inspector/InspectorFrontendProxy.h: Removed. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::setFrontend): (WebCore::InspectorResourceAgent::clearFrontend): (WebCore::InspectorResourceAgent::InspectorResourceAgent): * inspector/InspectorResourceAgent.h: * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView): 2011-08-16 Lindsay Mathieson <lindsay.mathieson@gmail.com> [Qt] Missing spell check support https://bugs.webkit.org/show_bug.cgi?id=44114 Reviewed by Benjamin Poulain. Add drawErrorUnderline() from Cairo to render the line for text checking on the Qt port. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::drawErrorUnderline): (WebCore::GraphicsContext::drawLineForTextChecking): 2011-08-15 MORITA Hajime <morrita@google.com> REGRESSION(r70598): [Chromium] Style changes in textInput event can prevent from updating <textarea> value. https://bugs.webkit.org/show_bug.cgi?id=66216 Reviewed by Ryosuke Niwa. Element::spellcheckAttributeState() uses Element::hasAttribute(), which calls updateStyleAttribute(), which potentially makes style dirty. But that is problematic since Editor calls spellcheckAttributeState() during the spell-checking phase and make the style dirty, which can trigger re-layout, which wipes the shadow tree of a textarea out by pre-committed "value" text. This change removes the hasAttribute() call from spellcheckAttributeState(). Test: editing/input/style-change-during-input.html * dom/Element.cpp: (WebCore::Element::spellcheckAttributeState): 2011-08-15 Gyuyoung Kim <gyuyoung.kim@samsung.com> [CMAKE] Wrap files of websocket and worker in each macro. https://bugs.webkit.org/show_bug.cgi?id=65012 Move files of web socket and workers into each macro block in CMakeList.txt. And, header files related to WORKER and SHARED_WORKER are wrapped by macro in cpp files. Reviewed by Daniel Bates. * CMakeLists.txt: * UseJSC.cmake: * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSWorkerContextBase.cpp: * bindings/js/ScriptState.cpp: * bindings/js/WorkerScriptController.cpp: 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: add xml namespace to the default map of namespaces https://bugs.webkit.org/show_bug.cgi?id=66266 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::NodeStackItem::NodeStackItem): 2011-08-15 Hayato Ito <hayato@chromium.org> Fix crash when mouse moves from <summary> element to parent <details> element. https://bugs.webkit.org/show_bug.cgi?id=66210 Reviewed by Dimitri Glazkov. This is a regression caused by r92922, which wrongly assumes that a shadow host always has a shadow root as an immediate child in ancestors chain. This assumption does not apply to <details> element. <details> element is implemented as a shadow host, but may have a <summary> element as an immediate child element in ancestors chain. Test: fast/dom/shadow/details-summary-mouseover.html * dom/EventDispatcher.cpp: (WebCore::EventDispatcher::adjustToShadowBoundaries): 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: Use xmlnsAtom instead of redundant xmlnsPrefix https://bugs.webkit.org/show_bug.cgi?id=66264 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::processNamespaces): (WebCore::XMLTreeBuilder::processAttributes): 2011-08-15 Emil A Eklund <eae@chromium.org> Switch Element/Node to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66260 Reviewed by Eric Seidel. Convert Element, Node, ElementRareData and ContainerNode to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * dom/ContainerNode.cpp: (WebCore::ContainerNode::getLowerRightCorner): (WebCore::ContainerNode::getRect): * dom/ContainerNode.h: * dom/Element.cpp: (WebCore::Element::scrollIntoView): (WebCore::Element::scrollIntoViewIfNeeded): (WebCore::adjustForLocalZoom): (WebCore::Element::boundsInWindowSpace): (WebCore::Element::getClientRects): (WebCore::Element::getBoundingClientRect): (WebCore::Element::screenRect): (WebCore::Element::minimumSizeForResizing): (WebCore::Element::setMinimumSizeForResizing): * dom/Element.h: * dom/ElementRareData.h: * dom/Node.cpp: (WebCore::Node::getRect): (WebCore::Node::renderRect): (WebCore::Node::hasNonEmptyBoundingBox): * dom/Node.h: 2011-08-15 Alexey Proskuryakov <ap@apple.com> Regional indicator symbols that are combined should behave as a single character when editing https://bugs.webkit.org/show_bug.cgi?id=65395 Reviewed by Dan Bernstein. Part one: make backspace work. Test: editing/deleting/regional-indicators.html * rendering/RenderText.cpp: (WebCore::isRegionalIndicator): (WebCore::RenderText::previousOffsetForBackwardDeletion): Added a special case for regional indicator symbols. 2011-08-15 Jeffrey Pfau <jpfau@apple.com> New XML parser: Re-entering a character node should not clobber the buffered characters https://bugs.webkit.org/show_bug.cgi?id=66257 Reviewed by Adam Barth. * xml/parser/XMLTreeBuilder.cpp: (WebCore::XMLTreeBuilder::enterText): 2011-08-15 Dmitry Titov <dimich@chromium.org> FrameLoaderClient::transferLoadingResourceFromPage does not have enough parameters https://bugs.webkit.org/show_bug.cgi?id=66165 Reviewed by Darin Fisher. No new tests since no change in behavior. The original issue is only reproducible on Chromium in multi-process mode and is tested there by a browsertest. * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::transferLoadingResourcesFromPage): Passing ResourceLoader* into the FrameLoaderClient notification. Also, fixed the bug where the same ResourceRequest was passed for all subresources. * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::transferLoadingResourceFromPage): * loader/FrameLoader.cpp: (WebCore::FrameLoader::dispatchTransferLoadingResourceFromPage): * loader/FrameLoader.h: * loader/FrameLoaderClient.h: * loader/ResourceLoadNotifier.cpp: (WebCore::ResourceLoadNotifier::dispatchTransferLoadingResourceFromPage): * loader/ResourceLoadNotifier.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::init): * loader/ResourceLoader.h: (WebCore::ResourceLoader::originalRequest): Added the originalRequest() accessor that returns the request as it existed before redirects (but after client's will SendRequest). This is to be able to pass the original request for loading subresources into FrameLoaderClient::transferLoadingResourceFromPage, since that one is used to invoke assignIdentifierToInitialRequest, which needs original request. 2011-08-15 Mark Hahnenberg <mhahnenberg@apple.com> Refactor JS objects to allocate in static create methods rather than constructors https://bugs.webkit.org/show_bug.cgi?id=65347 Reviewed by Geoffrey Garen. No new tests. Removed all calls to deprecatedGetDOMObject from initialization lists as part of a larger refactoring to get rid of all allocation during initialization. * bindings/js/JSDOMBinding.h: * bridge/c/CRuntimeObject.cpp: (JSC::Bindings::CRuntimeObject::CRuntimeObject): * bridge/c/CRuntimeObject.h: (JSC::Bindings::CRuntimeObject::create): * bridge/c/c_instance.cpp: (JSC::Bindings::CRuntimeMethod::create): (JSC::Bindings::CRuntimeMethod::CRuntimeMethod): * bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaRuntimeMethod::create): (JavaRuntimeMethod::JavaRuntimeMethod): * bridge/jni/jsc/JavaRuntimeObject.cpp: (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject): * bridge/jni/jsc/JavaRuntimeObject.h: (JSC::Bindings::JavaRuntimeObject::create): * bridge/objc/objc_runtime.h: (JSC::Bindings::ObjcFallbackObjectImp::create): * bridge/objc/objc_runtime.mm: (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp): * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtRuntimeObject::create): (JSC::Bindings::QtRuntimeObject::QtRuntimeObject): * bridge/qt/qt_pixmapruntime.cpp: (JSC::Bindings::QtPixmapRuntimeObject::create): (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject): * bridge/qt/qt_runtime.cpp: (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod): (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod): (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod): * bridge/qt/qt_runtime.h: (JSC::Bindings::QtRuntimeMetaMethod::create): (JSC::Bindings::QtRuntimeConnectionMethod::create): * bridge/runtime_array.cpp: (JSC::RuntimeArray::RuntimeArray): * bridge/runtime_array.h: (JSC::RuntimeArray::create): * bridge/runtime_object.cpp: 2011-08-15 Adam Roben <aroben@apple.com> Update pages' style and content scale when the window's backing scale factor changes Unfortunately, I couldn't think of a way to test this in an automated fashion. Fixes <http://webkit.org/b/66229> <rdar://problem/9906269> WebKit doesn't react to device scale factor changes Reviewed by Simon Fraser. * WebCore.exp.in: Export Frame::deviceOrScaleFactorChanged. * page/Frame.cpp: (WebCore::Frame::deviceScaleFactorChanged): * page/Frame.h: Added this new function. We recalc style so that, e.g., device-scale-factor-dependent media queries will be reevaluated, and we tell compositing layers about the new scale factor so they can rerender at the new resolution. 2011-08-15 Cary Clark <caryclark@google.com> Revise Skia on Chrome Mac to return fallback fonts. https://bugs.webkit.org/show_bug.cgi?id=62986 Reviewed by Darin Fisher. Since Skia on Chrome Mac uses CoreText to determine text metrics, CG font architecture is used to return fallback fonts. This improves many existing layout tests, including justify-ideograph-simple and t0905-c414-flt-04-c * platform/graphics/skia/FontSkia.cpp: (WebCore::Font::canReturnFallbackFontsForComplexText): 2011-08-15 Aaron Boodman <aa@chromium.org> Pass additional details to client in didCreateIsolatedContext https://bugs.webkit.org/show_bug.cgi?id=66037 Reviewed by Darin Fisher. * bindings/v8/IsolatedWorld.cpp: (WebCore::IsolatedWorld::IsolatedWorld): * bindings/v8/IsolatedWorld.h: (WebCore::IsolatedWorld::create): (WebCore::IsolatedWorld::id): * bindings/v8/V8IsolatedContext.cpp: (WebCore::V8IsolatedContext::V8IsolatedContext): * bindings/v8/V8IsolatedContext.h: * bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::evaluateInIsolatedWorld): * loader/EmptyClients.h: (WebCore::EmptyFrameLoaderClient::didCreateIsolatedScriptContext): * loader/FrameLoaderClient.h: 2011-08-15 Chris Rogers <crogers@google.com> Add shell implementation for Web Audio API's MediaElementAudioSourceNode https://bugs.webkit.org/show_bug.cgi?id=66175 Reviewed by Kenneth Russell. Test: webaudio/mediaelementaudiosourcenode.html * DerivedSources.make: * WebCore.gypi: * WebCore.xcodeproj/project.pbxproj: * html/HTMLMediaElement.idl: * webaudio/AudioContext.cpp: (WebCore::AudioContext::createMediaElementSource): * webaudio/AudioContext.h: * webaudio/AudioContext.idl: * webaudio/AudioNode.h: * webaudio/MediaElementAudioSourceNode.cpp: Added. (WebCore::MediaElementAudioSourceNode::create): (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): (WebCore::MediaElementAudioSourceNode::process): (WebCore::MediaElementAudioSourceNode::reset): * webaudio/MediaElementAudioSourceNode.h: Added. (WebCore::MediaElementAudioSourceNode::mediaElement): * webaudio/MediaElementAudioSourceNode.idl: Added. 2011-08-15 Emil A Eklund <eae@chromium.org> Switch mouse events to to new layout types https://bugs.webkit.org/show_bug.cgi?id=66179 Reviewed by Eric Seidel. Convert mouse events to new layout abstraction as a part of the ongoing conversion work. No new tests, no new functionality. * dom/MouseRelatedEvent.cpp: (WebCore::contentsScrollOffset): (WebCore::MouseRelatedEvent::MouseRelatedEvent): (WebCore::MouseRelatedEvent::initCoordinates): (WebCore::MouseRelatedEvent::computePageLocation): (WebCore::MouseRelatedEvent::computeRelativePosition): (WebCore::MouseRelatedEvent::pageLocation): * dom/MouseRelatedEvent.h: (WebCore::MouseRelatedEvent::screenLocation): (WebCore::MouseRelatedEvent::clientLocation): (WebCore::MouseRelatedEvent::absoluteLocation): (WebCore::MouseRelatedEvent::setAbsoluteLocation): * page/EventHandler.cpp: (WebCore::EventHandler::clear): (WebCore::EventHandler::handleMousePressEventSingleClick): (WebCore::selectionExtentRespectingEditingBoundary): (WebCore::EventHandler::hitTestResultAtPoint): (WebCore::EventHandler::currentMousePosition): (WebCore::documentPointForWindowPoint): (WebCore::EventHandler::handleMousePressEvent): (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::handleWheelEvent): (WebCore::EventHandler::sendContextMenuEvent): (WebCore::EventHandler::sendContextMenuEventForKey): (WebCore::EventHandler::fakeMouseMoveEventTimerFired): (WebCore::EventHandler::dragHysteresisExceeded): (WebCore::EventHandler::handleDrag): (WebCore::EventHandler::handleTouchEvent): * page/EventHandler.h: * platform/PlatformMouseEvent.h: (WebCore::PlatformMouseEvent::PlatformMouseEvent): (WebCore::PlatformMouseEvent::pos): (WebCore::PlatformMouseEvent::x): (WebCore::PlatformMouseEvent::y): (WebCore::PlatformMouseEvent::globalX): (WebCore::PlatformMouseEvent::globalY): * platform/mac/PlatformMouseEventMac.mm: (WebCore::globalPoint): (WebCore::pointForEvent): (WebCore::globalPointForEvent): 2011-08-15 Ryosuke Niwa <rniwa@webkit.org> webkit-indent-blockquote is unnecessary https://bugs.webkit.org/show_bug.cgi?id=66195 Reviewed by Tony Chang. Stop adding class="webkit-indent-blockquote" on blockquotes created by execCommand('Indent') and execCommand('Outdent'). Also removed the code to add the class attribute in ApplyBlockElementCommand since no other class inherited from ApplyBlockElementCommand uses this feature. * editing/ApplyBlockElementCommand.cpp: (WebCore::ApplyBlockElementCommand::ApplyBlockElementCommand): (WebCore::ApplyBlockElementCommand::createBlockElement): * editing/ApplyBlockElementCommand.h: * editing/IndentOutdentCommand.cpp: (WebCore::IndentOutdentCommand::IndentOutdentCommand): 2011-08-15 Levi Weintraub <leviw@chromium.org> Switch remaining SVG Rendering methods to LayoutUnits https://bugs.webkit.org/show_bug.cgi?id=66169 Reviewed by Eric Seidel. Changing remaining integer SVG methods to use the LayoutUnits abstraction. No tests as no change in functionality. * rendering/svg/RenderSVGBlock.cpp: (WebCore::RenderSVGBlock::visualOverflowRect): * rendering/svg/RenderSVGBlock.h: * rendering/svg/RenderSVGContainer.cpp: (WebCore::RenderSVGContainer::paint): * rendering/svg/RenderSVGForeignObject.cpp: (WebCore::RenderSVGForeignObject::paint): (WebCore::RenderSVGForeignObject::clippedOverflowRectForRepaint): (WebCore::RenderSVGForeignObject::computeRectForRepaint): * rendering/svg/RenderSVGHiddenContainer.cpp: (WebCore::RenderSVGHiddenContainer::paint): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::linesBoundingBox): * rendering/svg/RenderSVGInlineText.h: * rendering/svg/RenderSVGModelObject.cpp: (WebCore::RenderSVGModelObject::outlineBoundsForRepaint): * rendering/svg/RenderSVGPath.cpp: (WebCore::RenderSVGPath::paint): * rendering/svg/RenderSVGRoot.cpp: (WebCore::RenderSVGRoot::localToBorderBoxTransform): (WebCore::RenderSVGRoot::parentOriginToBorderBox): (WebCore::RenderSVGRoot::borderOriginToContentBox): (WebCore::RenderSVGRoot::localToRepaintContainerTransform): (WebCore::RenderSVGRoot::localToParentTransform): (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint): (WebCore::RenderSVGRoot::computeRectForRepaint): * rendering/svg/RenderSVGRoot.h: * rendering/svg/RenderSVGText.cpp: (WebCore::RenderSVGText::paint): * rendering/svg/SVGInlineFlowBox.cpp: (WebCore::SVGInlineFlowBox::paint): * rendering/svg/SVGInlineTextBox.cpp: (WebCore::SVGInlineTextBox::paint): * rendering/svg/SVGRenderSupport.cpp: (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint): (WebCore::SVGRenderSupport::computeRectForRepaint): * rendering/svg/SVGRenderSupport.h: * rendering/svg/SVGRootInlineBox.cpp: (WebCore::SVGRootInlineBox::paint): (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation): (WebCore::SVGRootInlineBox::layoutChildBoxes): (WebCore::SVGRootInlineBox::layoutRootBox): (WebCore::SVGRootInlineBox::closestLeafChildForPosition): * rendering/svg/SVGRootInlineBox.h: 2011-08-12 Jeff Miller <jeffm@apple.com> MediaPlayerPrivateAVFoundationCF::playerItemStatus() should return MediaPlayerAV