2012-04-15 MORITA Hajime Unreviewed attempt to chromium-win build fix. * editing/DictationAlternative.h: 2012-04-15 Noel Gordon Align JSC/V8 bindings canvas.toDataURL() code flows https://bugs.webkit.org/show_bug.cgi?id=84003 Reviewed by Eric Seidel. Align JSC/V8 bindings canvas.toDataURL() code flow so that the binding code implementations read alike. No new tests. Covered by existing cnavas toDataURL tests. * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::toDataURL): 2012-04-15 Jia Pu Introducing DictationCommand. https://bugs.webkit.org/show_bug.cgi?id=83549 Reviewed by Hajime Morita. No new tests. This patch doesn't introduce any change of new functionality. It prepares for additional changes which will inlude tests. On OS X, alternative dictation results need to be stored as document markers. This patch introduces following changes to achieve this: 1. Added DictationMarkDetails to store non-string type maker detail. 2. Introduce DictationCommand, which is similor to TypingCommand, but allows inserting text with attached markers. 3. Added Editor::insertDictatedText as interaface to WebKit and WebKit2. 4. Added struct DictationAlternative to pass dictation related info from WebKit to WebCore. Several fragments of code in TypingCommand can be also used by DictationCommand. So this patch introduced a new class, TextInsertionBaseCommand. It's a subclass of CompositeEditCommmand, and base class of both TypingCommand and DictationCommand. This patch also extends InsertTextCommand class. Its constructor will take an TextInsertionMarkerSupplier object. After text is inserted to a node, InsertTextCommand would give marker supplier a chance to add document markers to the inserted text. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::eventTargetNodeForDocument): Moved this function from EventHandler so that it can be used by AlternativeTextController. (WebCore): * dom/Document.h: (WebCore): * dom/DocumentMarker.cpp: (WebCore::DocumentMarker::DocumentMarker): New constructor that takes a pointer to DocumentMarkerDetails object. (WebCore): * dom/DocumentMarker.h: (WebCore::DocumentMarker::AllMarkers::AllMarkers): (DocumentMarker): * dom/DocumentMarkerController.cpp: (WebCore::DocumentMarkerController::addMarker): (WebCore): * dom/DocumentMarkerController.h: (DocumentMarkerController): * dom/TextEvent.cpp: (WebCore::TextEvent::createForDictation): (WebCore): (WebCore::TextEvent::TextEvent): * dom/TextEvent.h: Added member variable for dictation alternatives. (TextEvent): (WebCore::TextEvent::isDictation): (WebCore::TextEvent::dictationAlternatives): * dom/TextEventInputType.h: * editing/AlternativeTextController.cpp: (WebCore::AlternativeTextController::AlternativeTextController): (WebCore::AlternativeTextController::insertDictatedText): Used by Editor::insertDictatedText(). (WebCore): * editing/AlternativeTextController.h: (WebCore): (DictationMarkerDetails): (WebCore::DictationMarkerDetails::create): (WebCore::DictationMarkerDetails::originalText): (WebCore::DictationMarkerDetails::dictationContext): (WebCore::DictationMarkerDetails::DictationMarkerDetails): (AlternativeTextController): * editing/CompositeEditCommand.h: (WebCore::CompositeEditCommand::isDictationCommand): * editing/DictationAlternative.cpp: Added. (WebCore): (WebCore::DictationAlternative::DictationAlternative): * editing/DictationAlternative.h: Added. Data structure for passing dictation related data from WebKit to WebCore. (DictationAlternative): (WebCore): * editing/DictationCommand.cpp: Added. (WebCore): (DictationCommandLineOperation): (WebCore::DictationCommandLineOperation::DictationCommandLineOperation): (WebCore::DictationCommandLineOperation::operator()): (DictationMarkerSupplier): (WebCore::DictationMarkerSupplier::create): (WebCore::DictationMarkerSupplier::addMarkersToTextNode): (WebCore::DictationMarkerSupplier::DictationMarkerSupplier): (WebCore::DictationCommand::DictationCommand): (WebCore::DictationCommand::insertText): (WebCore::DictationCommand::doApply): (WebCore::DictationCommand::insertTextRunWithoutNewlines): (WebCore::DictationCommand::insertParagraphSeparator): (WebCore::DictationCommand::collectDictationAlternativesInRange): * editing/DictationCommand.h: Added. (WebCore): (DictationCommand): (WebCore::DictationCommand::isDictationCommand): (WebCore::DictationCommand::create): * editing/EditingAllInOne.cpp: * editing/Editor.cpp: (WebCore::Editor::insertDictatedText): Main interface that allows WebKit passes in text with attached dictation information. (WebCore): (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::updateMarkersForWordsAffectedByEditing): * editing/Editor.h: (Editor): * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::InsertTextCommand): (WebCore): (WebCore::InsertTextCommand::doApply): * editing/InsertTextCommand.h: (WebCore): (TextInsertionMarkerSupplier): Interface to allow caller of InsertTextCommand to add document markers to inserted text. (WebCore::TextInsertionMarkerSupplier::~TextInsertionMarkerSupplier): (WebCore::TextInsertionMarkerSupplier::TextInsertionMarkerSupplier): (WebCore::InsertTextCommand::createWithMarkerSupplier): (InsertTextCommand): * editing/TextInsertionBaseCommand.cpp: Added. This class contains functions shared by TypingCommand and DictationCommand. (WebCore): (WebCore::TextInsertionBaseCommand::TextInsertionBaseCommand): (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand): (WebCore::dispatchBeforeTextInsertedEvent): (WebCore::canAppendNewLineFeedToSelection): * editing/TextInsertionBaseCommand.h: Added. (WebCore): (TextInsertionBaseCommand): (WebCore::TextInsertionBaseCommand::~TextInsertionBaseCommand): (WebCore::forEachLineInString): * editing/TypingCommand.cpp: (TypingCommandLineOperation): (WebCore::TypingCommandLineOperation::TypingCommandLineOperation): (WebCore::TypingCommandLineOperation::operator()): (WebCore::TypingCommand::TypingCommand): (WebCore::TypingCommand::insertText): (WebCore::TypingCommand::insertLineBreak): (WebCore::TypingCommand::insertParagraphSeparator): * editing/TypingCommand.h: * page/EventHandler.cpp: * rendering/InlineTextBox.cpp: (WebCore::lineStyleForMarkerType): (WebCore::InlineTextBox::paintDocumentMarker): Renamed existing function to reflect new funcationality. (WebCore::InlineTextBox::paintDocumentMarkers): * rendering/InlineTextBox.h: (InlineTextBox): * testing/Internals.cpp: (WebCore::markerTypesFrom): 2012-04-15 James Robinson [chromium] LayerRendererChromium shouldn't know anything about CCLayerImpl https://bugs.webkit.org/show_bug.cgi?id=83415 Reviewed by Adrienne Walker. This removes all knowledge of CCLayerImpl from LayerRendererChromium. The most significant move code-wise is moving the HUD up to live on CCLayerTreeHostImpl, since it's aware of the layer tree. This involves two changes. First, CCHeadsUpDisplay is in charge of populating a ManagedTexture but the actual drawing code now lives in LayerRendererChromium. Second, since we don't recreate CCLayerTreeHostImpl on a lost context, the font atlas ownership is much simpler. Now a CCFontAtlas is created on the main thread if needed and passed asynchronously to the CCHeadsUpDisplay which takes ownership of the atlas. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::~LayerRendererChromium): (WebCore::LayerRendererChromium::beginDrawingFrame): (WebCore::LayerRendererChromium::drawHeadsUpDisplay): (WebCore): (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::swapBuffers): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromiumClient): (LayerRendererChromium): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore::CCHeadsUpDisplay::setFontAtlas): (WebCore): (WebCore::CCHeadsUpDisplay::enabled): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::draw): (WebCore::CCHeadsUpDisplay::drawHudContents): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore): (WebCore::CCHeadsUpDisplay::create): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::calculateRenderPasses): (WebCore::CCLayerTreeHostImpl::prepareToDraw): (WebCore::CCLayerTreeHostImpl::drawLayers): (WebCore::CCLayerTreeHostImpl::swapBuffers): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::CCLayerTreeHostImpl::setFullRootLayerDamage): (WebCore::CCLayerTreeHostImpl::layerTreeAsText): (WebCore): (WebCore::CCLayerTreeHostImpl::setFontAtlas): (WebCore::CCLayerTreeHostImpl::dumpRenderSurfaces): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::rootLayer): * platform/graphics/chromium/cc/CCProxy.h: (WebCore): (CCProxy): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::recreateContext): (WebCore::CCSingleThreadProxy::setFontAtlas): (WebCore): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::setFontAtlas): (WebCore): (WebCore::CCThreadProxy::setFontAtlasOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): 2012-04-15 Antti Koivisto Capture CSS parser context https://bugs.webkit.org/show_bug.cgi?id=83998 Reviewed by Andreas Kling. Currently the CSS parser calls to the Document and StyleSheetInternal objects to get settings, base URL etc. The required information should be passed in on parser construction instead. The parser should not need to know about the document at all. The patch adds CSSParserContext struct that captures the parsing context. StyleSheetInternal saves the parsing context and reuses it for any further parsing. If the same stylesheet source is parsed with an identical context then the resulting stylesheet structure will be identical. This will allow sharing parsed stylesheets in the future. * css/CSSGrammar.y: * css/CSSImportRule.cpp: (WebCore::StyleRuleImport::setCSSStyleSheet): * css/CSSMediaRule.cpp: (WebCore::CSSMediaRule::insertRule): * css/CSSPageRule.cpp: (WebCore::CSSPageRule::setSelectorText): * css/CSSParser.cpp: (WebCore): (WebCore::strictCSSParserContext): (WebCore::CSSParserContext::CSSParserContext): (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseKeyframeRule): (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseSelector): (WebCore::CSSParser::completeURL): (WebCore::CSSParser::parseContent): (WebCore::CSSParser::parseAttr): (WebCore::CSSParser::parseFillImage): (WebCore::CSSParser::parseFontFaceSrcURI): (WebCore::CSSParser::parseFontFaceSrc): (WebCore::CSSParser::parseBorderImage): (WebCore::CSSParser::parseImageSet): (WebCore::CSSParser::parseCustomFilter): (WebCore::CSSParser::parseFilter): (WebCore::CSSParser::cssRegionsEnabled): (WebCore::CSSParser::parseFlowThread): (WebCore::CSSParser::createMediaRule): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::createFontFaceRule): (WebCore::CSSParser::createPageRule): (WebCore::CSSParser::createKeyframe): * css/CSSParser.h: (CSSParser): (WebCore::CSSParser::inStrictMode): (WebCore::CSSParser::inQuirksMode): (WebCore::CSSParser::validUnit): * css/CSSParserMode.h: (WebCore): (CSSParserContext): * css/CSSRule.h: (WebCore::CSSRule::parserContext): (CSSRule): * css/CSSStyleRule.cpp: (WebCore::CSSStyleRule::setSelectorText): * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): (WebCore::StyleSheetInternal::parseString): (WebCore::StyleSheetInternal::parseStringAtLine): (WebCore): (WebCore::StyleSheetInternal::updateBaseURL): (WebCore::StyleSheetInternal::completeURL): (WebCore::CSSStyleSheet::insertRule): * css/CSSStyleSheet.h: (StyleSheetInternal): (WebCore::StyleSheetInternal::parserContext): (WebCore::StyleSheetInternal::charset): (WebCore::StyleSheetInternal::setFinalURL): (WebCore::StyleSheetInternal::baseURL): * css/CSSValuePool.cpp: * css/StylePropertySet.cpp: (WebCore::StylePropertySet::parseDeclaration): * css/WebKitCSSKeyframesRule.cpp: (WebCore::WebKitCSSKeyframesRule::insertRule): * dom/Document.cpp: (WebCore::Document::webkitGetFlowByName): (WebCore::Document::pageUserSheet): (WebCore::Document::pageGroupUserSheets): * dom/Element.cpp: (WebCore::Element::webkitMatchesSelector): * dom/Node.cpp: (WebCore::Node::querySelector): (WebCore::Node::querySelectorAll): * dom/ProcessingInstruction.cpp: (WebCore::ProcessingInstruction::parseStyleSheet): * dom/StyleElement.cpp: (WebCore::StyleElement::createSheet): * html/HTMLLinkElement.cpp: (WebCore::HTMLLinkElement::setCSSStyleSheet): * html/shadow/ContentSelectorQuery.cpp: (WebCore::ContentSelectorQuery::ContentSelectorQuery): * inspector/InspectorStyleSheet.cpp: (WebCore::InspectorStyle::setPropertyText): (WebCore::InspectorStyleSheet::reparseStyleSheet): (WebCore::InspectorStyleSheet::ensureSourceData): (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): 2012-04-15 Noel Gordon [Cairo] Separate image encoding from dataURL construction https://bugs.webkit.org/show_bug.cgi?id=83975 Reviewed by Martin Robinson. Remove the implicit assumption that a dataURL is the only desired output format of the image encoding phase. No new tests. Covered by existing canvas toDataURL tests. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::writeFunction): Rename closure to output. (WebCore::encodeImage): Output the encoded image to the provided Vector. PNG format is only supported per the Cairo encoding MIMETypeRegistry. (WebCore): (WebCore::ImageBuffer::toDataURL): Refactor to use encodeImage(). 2012-04-15 Yuta Kitamura Leak in WebSocketChannel with workers/worker-reload.html (part 2) https://bugs.webkit.org/show_bug.cgi?id=83749 Reviewed by David Levin. Second attempt to remove leaks around WorkerThreadableWebSocketChannel. No new tests, as this patch does not impose any functional change. * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp: (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper): (WebCore::ThreadableWebSocketChannelClientWrapper::failedWebSocketChannelCreation): (WebCore::ThreadableWebSocketChannelClientWrapper::setFailedWebSocketChannelCreation): * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Add a boolean flag indicating whether Bridge::initialize() has exited without receiving a pointer to the peer object. * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask): (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::performTask): Kick mainThreadDestroy() to delete the peer if the bridge has failed to receive a pointer to the peer (waitForMethodCompletion() exited due to message queue's termination). (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): * Modules/websockets/WorkerThreadableWebSocketChannel.h: (WorkerThreadableWebSocketChannel): Make WorkerContextDidInitializeTask an inner class of WorkerThreadableWebSocketChannel so it can refer WorkerThreadableWebSocketChannel's static member function (mainThreadDestroy()). 2012-04-14 Emil A Eklund Fix pixelSnapping for CalendarPicker, MediaControl and ScrollbarPart https://bugs.webkit.org/show_bug.cgi?id=83929 Reviewed by Eric Seidel. Update CalendarPickerElement and MediaControlElements to use pixelSnappedSize in preparation for turning on subpixel support. Update RenderScrollbarPart to pixel snap rect before painting to ensure that it is painted on device pixel boundaries. No new tests, no change in functionality. * html/shadow/CalendarPickerElement.cpp: (WebCore::CalendarPickerElement::openPopup): * html/shadow/MediaControlElements.cpp: (WebCore::RenderMediaVolumeSliderContainer::layout): * rendering/RenderScrollbarPart.cpp: (WebCore::RenderScrollbarPart::paintIntoRect): 2012-04-14 Kent Tamura Day of week labels are wrong if WebCore::firstDayOfWeek() is not 0 https://bugs.webkit.org/show_bug.cgi?id=83990 Reviewed by Kentaro Hara. We passed the "weekStartDay" property value as a string. CalendarPickerElement::writeDocument() created: weekStartDay: "1", and the JavaScript code used it in the following code: dayLabels[(weekStartDay + i) % 7] If weekStartDay was "1", the expression (weekStartDay + i) produced "10", "11", "12", ... We expected "1", "2", "3", ... We need to pass the "weekStartDay" property as a number. No new tests because we have no ways to test this for now. We'll introduce tests for the calendar picker later. * html/shadow/CalendarPickerElement.cpp: (WebCore::addProperty): Add addProperty() function for a number. (WebCore::CalendarPickerElement::writeDocument): Pass a number, not a serialized number. 2012-04-14 Joe Thomas Viewport-percentage Length units does not work for Replaced elements size https://bugs.webkit.org/show_bug.cgi?id=83425 Reviewed by Antti Koivisto. Added the support for viewport-percentage length units while calculating the width/height of replaced elements. Tests: css3/viewport-percentage-lengths/viewport-percentage-image-size.html * platform/Length.h: (WebCore::Length::isSpecified): * rendering/RenderBox.cpp: (WebCore::RenderBox::computeReplacedLogicalWidthUsing): 2012-04-14 Joe Thomas CSSStyleDeclaration.getPropertyValue() for 'border-radius' returns null when value is set https://bugs.webkit.org/show_bug.cgi?id=80736 Reviewed by Antti Koivisto. Added support for fetching the value of 'border-radius' CSS property which was missing. Test: fast/css/border-radius-property-value.html * css/StylePropertySet.cpp: (WebCore::StylePropertySet::getPropertyValue): 2012-04-14 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=83826 Wrong Font code path was chosen after r114032. The TextRun constructor has an additional argument that needs to be included if rounding hacks are mentioned. Reviewed by Dan Bernstein. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::drawTextInternal): * rendering/RenderListBox.cpp: (WebCore::RenderListBox::paintItemForeground): * rendering/break_lines.cpp: (WebCore::nextBreakablePosition): 2012-04-14 Noel Gordon [Cairo] ImageBuffer::toDataURL(): improve error handling, add mimeType ASSERTs https://bugs.webkit.org/show_bug.cgi?id=83569 Reviewed by Eric Seidel. No new tests. Covered by exiting fast/canvas/*toDataURL* tests. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::writeFunction): Return write success or failure with the appropriate cairo status code per http://cairographics.org/manual/cairo-PNG-Support.html (WebCore::ImageBuffer::toDataURL): Add mimeType ASSERT()s. ensures that a valid mimeType (supported by the port) is sent to toDataURL() calls. Check for encoding failure and return "data:," if so. 2012-04-13 David Reveman [Chromium] Avoid unnecessary full tile updates for checkerboard tiles. https://bugs.webkit.org/show_bug.cgi?id=83804 Reviewed by James Robinson. Cleanup code that determines if we need to use a buffered update and avoid buffering of tiles that are not in use by the impl thread. Tests: CCLayerTreeHostTestAtomicCommitWithPartialUpdate.runMultiThread TiledLayerChromiumTest.partialUpdates * platform/graphics/chromium/TiledLayerChromium.cpp: (UpdatableTile): (WebCore::UpdatableTile::UpdatableTile): (WebCore::TiledLayerChromium::pushPropertiesTo): (WebCore::TiledLayerChromium::tileOnlyNeedsPartialUpdate): (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate): (WebCore::TiledLayerChromium::updateTiles): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::bufferedUpdates): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): 2012-04-13 Dana Jansens [chromium] Cleanup texture memory eviction when LayerTreeHost becomes invisible https://bugs.webkit.org/show_bug.cgi?id=83899 Reviewed by Adrienne Walker. When a LTH becomes invisible, the texture eviction is spread out across two different functions and is not entirely clear. We move all the logic together into a single place in didBecomeInvisibleOnImplThread() and make the consequences of the current code more clear. Covered by existing tests. * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): 2012-04-13 Sheriff Bot Unreviewed, rolling out r114036. http://trac.webkit.org/changeset/114036 https://bugs.webkit.org/show_bug.cgi?id=83969 Breaks gmail.com causing it to never finish loading (Requested by danakj on #webkit). * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): (GenerateImplementation): * bindings/scripts/CodeGeneratorV8.pm: (GenerateNamedConstructorCallback): (GenerateImplementation): * bindings/scripts/IDLAttributes.txt: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObj::createPrototype): * bindings/scripts/test/JS/JSTestObj.h: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/V8/V8Float64Array.cpp: (WebCore): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: (WebCore): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestEventTarget.cpp: (WebCore): * bindings/scripts/test/V8/V8TestInterface.cpp: (WebCore): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: (WebCore): * bindings/scripts/test/V8/V8TestNode.cpp: (WebCore): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: (WebCore): * bindings/v8/NPV8Object.cpp: (WebCore::npObjectTypeInfo): * bindings/v8/V8BindingPerContextData.cpp: (WebCore::V8BindingPerContextData::init): (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): * bindings/v8/V8BindingPerContextData.h: (V8BindingPerContextData): * bindings/v8/V8HiddenPropertyName.h: (WebCore): * bindings/v8/WrapperTypeInfo.h: (WrapperTypeInfo): * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: (WebCore): * dom/NodeList.idl: 2012-04-13 Alexandre Elias [chromium] Add null pointer check to animatePageScale https://bugs.webkit.org/show_bug.cgi?id=83940 Reviewed by James Robinson. Add null pointer check to startPageScaleAnimation. If the root scroll layer goes away in the middle of a page scale animation, there can be a null pointer access here. No new tests. * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::animatePageScale): 2012-04-13 Dana Jansens [chromium] Replicas should be included in the computed occlusion https://bugs.webkit.org/show_bug.cgi?id=82262 Reviewed by Adrienne Walker. When merging a surface's occlusion up to its target, make a copy of it where the replica will be as well, and make sure that occlusion from a RenderSurface does not leave its clipRect. Unit test: CCOcclusionTrackerTestReplicaDoesOcclude CCOcclusionTrackerTestReplicaWithClipping CCOcclusionTrackerTestSurfaceChildOfSurface * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::hasReplica): (WebCore): * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::transformSurfaceOpaqueRegion): (WebCore::::leaveToTargetRenderSurface): 2012-04-13 Raymond Liu AudioContext createChannelMerger() method should have optional argument for number of inputs. https://bugs.webkit.org/show_bug.cgi?id=83759 Reviewed by Chris Rogers. Check https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html for the optional argument. Test: webaudio/audiochannelmerger-basic.html * Modules/webaudio/AudioChannelMerger.cpp: (WebCore): (WebCore::AudioChannelMerger::create): (WebCore::AudioChannelMerger::AudioChannelMerger): * Modules/webaudio/AudioChannelMerger.h: (AudioChannelMerger): * Modules/webaudio/AudioContext.cpp: (WebCore::AudioContext::createChannelMerger): (WebCore): * Modules/webaudio/AudioContext.h: (AudioContext): * Modules/webaudio/AudioContext.idl: 2012-04-13 Dana Jansens [chromium] Remove viewport memory restrictions https://bugs.webkit.org/show_bug.cgi?id=83316 Reviewed by Adrienne Walker. We remove the memory restriction on web pages based on viewport size on desktop. This is causing pages that have complex use of layers to end up hitting our memory limits, and moreso when the window is small. Page complexity is not really a function of the viewport size. We drop the mininum memory limit entirely, and just evict all unprotected textures instead. Covered by existing tests. * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::highLimitBytes): (WebCore::TextureManager::reclaimLimitBytes): * platform/graphics/chromium/TextureManager.h: (TextureManager): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::beginCommitOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread): (WebCore::CCLayerTreeHost::updateLayers): 2012-04-13 Ken Buchanan Optimize tracking of intruding floats being removed from RenderBlock during layout https://bugs.webkit.org/show_bug.cgi?id=82928 Reviewed by David Hyatt. Performance tweaks in RenderBlock layout as a follow up to r112935. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::clearFloats): 2012-04-13 Mihnea Ovidenie [CSSRegions]Implement NamedFlow::contentNodes attribute https://bugs.webkit.org/show_bug.cgi?id=80134 Reviewed by David Hyatt. The named flow content nodes collection contains those nodes with webkitFlowInto property set to 'flow'. In the list, the nodes are placed in document order. Nodes with display:none are also part of the list. The list of nodes is returned as a static node list. The content nodes are stored in RenderNamedFlowThread. The content nodes are added to the list in NodeRenderingContext::moveToFlowThreadIfNeeded and removed from the list in Element::detach. When an element -webkit-flow-into property is changed, the element is detached and attached. I have also added a bit in NodeFlags to mark that an element is part of a named flow (and the corresponding inNamedFlow/setInNamedFlow/clearInNamedFlow functions). Test: fast/regions/webkit-named-flow-content-nodes.html * dom/Document.cpp: (WebCore::Document::webkitGetFlowByName): * dom/Document.h: * dom/Element.cpp: (WebCore::Element::detach): * dom/Node.h: (WebCore::Node::inNamedFlow): (WebCore::Node::setInNamedFlow): (WebCore::Node::clearInNamedFlow): (Node): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded): * dom/WebKitNamedFlow.cpp: (WebCore::WebKitNamedFlow::contentNodes): (WebCore): * dom/WebKitNamedFlow.h: (WebKitNamedFlow): * dom/WebKitNamedFlow.idl: * rendering/FlowThreadController.cpp: (WebCore::FlowThreadController::registerNamedFlowContentNode): (WebCore): (WebCore::FlowThreadController::unregisterNamedFlowContentNode): * rendering/FlowThreadController.h: (FlowThreadController): * rendering/RenderNamedFlowThread.cpp: (WebCore): (WebCore::RenderNamedFlowThread::registerNamedFlowContentNode): (WebCore::RenderNamedFlowThread::unregisterNamedFlowContentNode): * rendering/RenderNamedFlowThread.h: (WebCore): (RenderNamedFlowThread): (WebCore::RenderNamedFlowThread::contentNodes): (WebCore::RenderNamedFlowThread::hasContentNode): 2012-04-13 Jessie Berlin Remove the calls to CRASH() from ResourceLoader.cpp. https://bugs.webkit.org/show_bug.cgi?id=83962 Reviewed by Alexey Proskuryakov. They were added in r91316 to aid debugging for the issue fixed in r105556 and r106130. * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest): (WebCore::ResourceLoader::didSendData): (WebCore::ResourceLoader::didReceiveResponse): (WebCore::ResourceLoader::didReceiveData): (WebCore::ResourceLoader::didFinishLoading): (WebCore::ResourceLoader::didFail): (WebCore::ResourceLoader::wasBlocked): (WebCore::ResourceLoader::cannotShowURL): (WebCore::ResourceLoader::shouldUseCredentialStorage): (WebCore::ResourceLoader::willCacheResponse): 2012-04-13 Xiaomei Ji REGRESSION(r102190) [chromium] text rendering (font and font size) in some Arabic/Persian page is wrong when using certain fonts https://bugs.webkit.org/show_bug.cgi?id=83523 Reviewed by Kent Tamura. Revert r102190. Convert characters being treatAsSpace to white space. * platform/graphics/chromium/UniscribeHelper.cpp: (WebCore::UniscribeHelper::fillRuns): (WebCore::UniscribeHelper::adjustSpaceAdvances): 2012-04-13 Timothy Hatcher Change how the Web Insector is installed on Mac builds. Reviewed by Mark Rowe. * WebCore.xcodeproj/project.pbxproj: Updated Copy Inspector Resources and Streamline Inspector Source build phases. 2012-04-13 Jer Noble Video at apple.com gets standard controls in addition to custom controls after returning from full screen https://bugs.webkit.org/show_bug.cgi?id=83939 Reviewed by Eric Carlson. No new tests; DRT and WKTR don't have the infrastructure to test full-screen animation related bugs. Instead of asking the media element whether it is in full screen or not, rely on when the media root element was told that it enteredFullscreen() or exitedFullscreen(), which may occur at a different time than the media element due to animations. * html/shadow/MediaControlRootElement.cpp: (WebCore::MediaControlRootElement::reset): (WebCore::MediaControlRootElement::playbackStarted): (WebCore::MediaControlRootElement::enteredFullscreen): (WebCore::MediaControlRootElement::exitedFullscreen): (WebCore::MediaControlRootElement::defaultEventHandler): (WebCore::MediaControlRootElement::startHideFullscreenControlsTimer): (WebCore::MediaControlRootElement::hideFullscreenControlsTimerFired): * html/shadow/MediaControlRootElement.h: (MediaControlRootElement): Added m_isFullscreen; 2012-04-13 Jer Noble fullscreen/video-controls-drag.html failing on Mac https://bugs.webkit.org/show_bug.cgi?id=81176 Reviewed by Eric Carlson. No new tests. Fixes fullscreen/video-controls-drag.html. Regressed in r110409. When the -webkit-media-controls-panel were changed from position:absolute to position:relative, this broke dragging of the controls in fullscreen, which relies on the panel being absolutely positioned to do its drag positioning. Change the way drag positioning is calculated to accommodate position:relative. * css/fullscreenQuickTime.css: (video:-webkit-full-screen::-webkit-media-controls-panel): Instead of bottom:50px, use margin-bottom:50px to push panel up from the bottom of the screen. * html/shadow/MediaControlElements.cpp: (WebCore::MediaControlPanelElement::startDrag): Do not ask for the current renderer location. (WebCore::MediaControlPanelElement::continueDrag): Use the delta between the event locations only to calculate the new panel position. * html/shadow/MediaControlElements.h: 2012-04-13 Simon Fraser Compositing layers not updated after scroll in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=83945 Reviewed by James Robinson. Fix the WebKit1 code path to correctly update compositing layers after a scroll, by calling updateFixedElementsAfterScrolling() from scrollPositionChangedViaPlatformWidget(). Covered by existing tests. * page/FrameView.cpp: (WebCore::FrameView::scrollPositionChangedViaPlatformWidget): 2012-04-13 Dean Jackson Don't process filters if the input region is exceptionally large. https://bugs.webkit.org/show_bug.cgi?id=83317 Reviewed by Simon Fraser. An extremely large element causes problems with filters, either by taking too long to compute the output or using too much memory. The filter engine already has some constants for maximum expected size. Make sure the render tree checks them before deciding to apply effects. Tests: css3/filters/huge-region-composited.html css3/filters/huge-region.html * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::apply): * rendering/FilterEffectRenderer.cpp: (WebCore): (WebCore::isFilterSizeValid): (WebCore::FilterEffectRenderer::build): (WebCore::FilterEffectRenderer::updateBackingStore): (WebCore::FilterEffectRendererHelper::beginFilterEffect): * rendering/FilterEffectRenderer.h: (FilterEffectRenderer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateOrRemoveFilterEffect): 2012-04-13 Anna Cavender Queue the cuechange event on HTMLTrackElement for proper sorting. https://bugs.webkit.org/show_bug.cgi?id=83858 Reviewed by Eric Carlson. No new tests. Updates to media/track/track-cues-cuechange.html and media/track/track-mode.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Add HTMLTrackElement's cuechange event to the event queue rather than firing it synchronously. * html/track/LoadableTextTrack.cpp: Remove fireCueChangeEvent() as it is no longer used. * html/track/LoadableTextTrack.h: Ditto. * html/track/TextTrack.h: (TextTrack): Ditto. 2012-04-11 Antonio Gomes Be more restrictive when adding ScrollableArea's to FrameView's ScrollableArea's map https://bugs.webkit.org/show_bug.cgi?id=79611 Reviewed by James Robinson. Source/WebCore: As of today, any FrameView attached to the Widget-tree or any RenderLayer whose corresponding RenderBox's style has a 'overflow' property set to 'auto' is cached in its containing scrollable areas set. We could be more restrictive about what we in fact want to cache as scrollable areas, by checking if the element as an overflow (i.e. more content than its viewport). * page/FrameView.cpp: (WebCore::FrameView::setFrameRect): Whenever the viewport changes, check if we have an scrollable/overflowed content, and update the cache accordingly. (WebCore::FrameView::setContentsSize): Whenever the contents size changes, check if we have a scrollable/overflowed content, and update the cache accordingly. (WebCore::FrameView::calculateScrollbarModesForLayout): Introduces a way to query for the scrollbars by only taking into account the "rules" set by the web author. For that, a new enum was added called SrollbarModesCalculationStrategy, which allows callers to discard for example client-side scrollbar policies in order to verify if a given frameview is scrollable or not. (WebCore::FrameView::updateScrollableAreaSet): Take into account various factors before considering a FrameView as scrollable. If in the end it is, it gets added to its parent FrameView scrollable areas map, otherwise removed. (WebCore): (WebCore::FrameView::addScrollableArea): Became unneeded, thus removed. (WebCore::FrameView::removeScrollableArea): Whenever a FrameView is removed from the Widget-tree, remove it from the cache. * page/FrameView.h: (FrameView): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateScrollbarsAfterLayout): Update scrollable area set after layout. (WebCore::RenderLayer::updateScrollbarsAfterStyleChange): Update scrollable area set after style changes. (WebCore::RenderLayer::styleChanged): Removed the scrollable areas logic detection from it. (WebCore::RenderLayer::updateScrollableAreaSet): Updates the containing FrameView scrollable areas cache only when needed (i.e. an overflow exists). (WebCore): * rendering/RenderLayer.h: (RenderLayer): * testing/Internals.cpp: (WebCore::Internals::numberOfScrollableAreas): (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: Tests: fast/scrolling/scrollable-area-frame-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-overflow-hidden.html fast/scrolling/scrollable-area-frame-overried-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-scrolling-no-overried-inherited-visibility-hidden.html fast/scrolling/scrollable-area-frame-scrolling-no-visibility-hidden-child.html fast/scrolling/scrollable-area-frame-scrolling-no.html fast/scrolling/scrollable-area-frame-scrolling-yes-display-none.html fast/scrolling/scrollable-area-frame-scrolling-yes.html fast/scrolling/scrollable-area-frame-visibility-hidden-child.html fast/scrolling/scrollable-area-frame-zero-size-and-border.html fast/scrolling/scrollable-area-frame.html fast/scrolling/scrollable-area-overflow-auto-display-none-in-parent.html fast/scrolling/scrollable-area-overflow-auto-display-none.html fast/scrolling/scrollable-area-overflow-auto-visibility-hidden-in-parent.html fast/scrolling/scrollable-area-overflow-auto-visibility-hidden.html fast/scrolling/scrollable-area-overflow-auto-visibility-override.html fast/scrolling/scrollable-area-overflow-auto-visibility-visible.html fast/scrolling/scrollable-area-overflow-auto.html fast/scrolling/scrollable-area-overflow-not-set.html fast/scrolling/scrollable-area-overflow-visible.html 2012-04-13 Antti Koivisto Track rem unit usage in StyleSheetInternal https://bugs.webkit.org/show_bug.cgi?id=83923 Reviewed by Andreas Kling. Currently CSSParser sets usesRemUnits flag directly to Document. It should be set to the stylesheet instead so parser does not need to know about the document. This also avoids setting the flag unnecessarily when the stylesheet is not used. * css/CSSGrammar.y: * css/CSSStyleSheet.cpp: (WebCore::StyleSheetInternal::StyleSheetInternal): * css/CSSStyleSheet.h: (WebCore::StyleSheetInternal::parserSetUsesRemUnits): (WebCore::StyleSheetInternal::usesRemUnits): (StyleSheetInternal): * dom/Document.cpp: (WebCore): (WebCore::checkUsesRemUnits): (WebCore::Document::updateActiveStylesheets): * dom/Document.h: (WebCore::Document::usesRemUnits): 2012-04-11 James Robinson [chromium] Remove unused compositeToTexture / compositeOffscreen setting https://bugs.webkit.org/show_bug.cgi?id=83733 Reviewed by Adrienne Walker. Remove compositeOffscreen setting and implementation. This was an experiment that is no longer needed. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::finishDrawingFrame): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore::CCSettings::CCSettings): (CCSettings): 2012-04-13 Alexey Proskuryakov REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached https://bugs.webkit.org/show_bug.cgi?id=83925 Reviewed by Antti Koivisto. Added subtests to http/tests/cache/subresource-expiration-2.html. * platform/network/ResourceResponseBase.cpp: (WebCore::ResourceResponseBase::parseCacheControlDirectives): Honor first max-age instead of the last. New behavior matches both Firefox and IE. 2012-04-13 James Robinson [chromium] Move WebVideoFrame into Platform and remove WebCore::VideoFrameChromium wrapper API https://bugs.webkit.org/show_bug.cgi?id=83851 Reviewed by Adam Barth. Remove VideoFrameChromium wrapper and converts WebCore code to using the Platform WebVideoFrame API directly. Some utility code that previously existed on VideoFrameChromium and only had one caller, such as doing width/height adjustements for YV12 frames, is moved into the calling code (CCVideoLayerImpl). Covered by existing media/ and compositing/ layout tests. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawYUV): (WebCore::LayerRendererChromium::drawRGBA): (WebCore::LayerRendererChromium::copyFrameToTextures): * platform/graphics/chromium/LayerRendererChromium.h: * platform/graphics/chromium/VideoFrameProvider.h: (VideoFrameProvider): * platform/graphics/chromium/cc/CCVideoDrawQuad.cpp: (WebCore::CCVideoDrawQuad::create): (WebCore::CCVideoDrawQuad::CCVideoDrawQuad): * platform/graphics/chromium/cc/CCVideoDrawQuad.h: (WebKit): (CCVideoDrawQuad): (WebCore::CCVideoDrawQuad::frame): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore): (WebCore::convertVFCFormatToGC3DFormat): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::videoFrameDimension): (WebCore::hasPaddingBytes): (WebCore::CCVideoLayerImpl::computeVisibleSize): (WebCore::CCVideoLayerImpl::reserveTextures): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (WebKit): 2012-04-13 Rob Flack Chromium: Should enable -webkit-image-set https://bugs.webkit.org/show_bug.cgi?id=81859 Reviewed by Adam Barth. Test: fast/css/image-set-parsing.html * WebCore.gypi: 2012-04-12 Michael Nordman [chromium] Now that the chromium port is using a different dom_storage backend library in its main browser process, there are a handful of files that should no longer be included in the build, and a few files than should be deleted outright, and the webkit api should be modified to reflect the new (and smaller) contract between the embedder and webkit/webcore. https://bugs.webkit.org/show_bug.cgi?id=83807 Reviewed by Adam Barth. No new tests, existing tests apply. * WebCore.gyp/WebCore.gyp: Exclude several files from the WebCore/storage directory. * storage/StorageEventDispatcher.h: Delete a stale comment. 2012-04-13 Sheriff Bot Unreviewed, rolling out r114140. http://trac.webkit.org/changeset/114140 https://bugs.webkit.org/show_bug.cgi?id=83921 Fails fast/css/image-set-parsing.html test it attempts to introduce. (Requested by scheib on #webkit). * WebCore.gypi: 2012-04-13 Dan Bernstein Pixel access canvas APIs do not operate at backing store resolution https://bugs.webkit.org/show_bug.cgi?id=83836 Reviewed by Darin Adler. Test: fast/canvas/2d.imageDataHD.html Added getImageDataHD and putImageDataHD functions to CanvasRenderingContext2D, as proposed in . The functions are prefixed with “webkit” for now. * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::getImageData): Added this cover function that calls through to getImageData with LogicalCoordinateSystem. (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Added. Calls through to getImageData with BackingStoreCoordinateSystem. (WebCore::CanvasRenderingContext2D::getImageData): Added a CoordinateSystem parameter to this now-private function. It is passed through to ImageBuffer::getUnmultipliedImageData(). (WebCore::CanvasRenderingContext2D::putImageData): Added this cover function that calls through to putImageData with LogicalCoordinateSystem. (WebCore::CanvasRenderingContext2D::webkitPutImageDataHD): Added. Calls through to putImageData with BackingStoreCoordinateSystem. (WebCore::CanvasRenderingContext2D::putImageData): Added a CoordinateSystem parameter to this function. It is passed through to ImageBuffer::putByteArray, and used to compute the rect to invalidate after the drawing operation. * html/canvas/CanvasRenderingContext2D.h: * html/canvas/CanvasRenderingContext2D.idl: Added webkitPutImageDataHD() and webkitGetImageDataHD(). * platform/graphics/ImageBuffer.h: Added a CoordinateSystem enum with the values LogicalCoordinateSystem and BackingStoreCoordinateSystem. Added a CoordinateSystem parameter, which defaults to LogicalCoordinateSystem, to getUnmultipliedImageData, getPremultipliedImageData, and putByteArray. * platform/graphics/cairo/ImageBufferCairo.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): Now uses the CoordinateSystem parameter to decide whether to ask ImageBufferDaya::getData() to apply the resolution scale or not. (WebCore::ImageBuffer::getPremultipliedImageData): Ditto. (WebCore::ImageBuffer::putByteArray): Now uses the CoordinateSystem parameter to decide whether to maintain the resolution scale while drawing or not. (WebCore::ImageBuffer::toDataURL): * platform/graphics/gtk/ImageBufferGtk.cpp: (WebCore::ImageBuffer::toDataURL): * platform/graphics/qt/ImageBufferQt.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/skia/ImageBufferSkia.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/wince/ImageBufferWinCE.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): * platform/graphics/wx/ImageBufferWx.cpp: (WebCore::ImageBuffer::getUnmultipliedImageData): (WebCore::ImageBuffer::getPremultipliedImageData): (WebCore::ImageBuffer::putByteArray): (WebCore::ImageBuffer::toDataURL): 2012-04-12 Shawn Singh [chromium] Support CCHeadsUpDisplay in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=67499 Reviewed by James Robinson. No new tests because this code is debugging code itself. The last item that was needed to make the CCHeadsUpDisplay work in threaded compositing mode was to remove the font rendering code used on the impl-side thread. To solve this, this patch adds a CCFontAtlas that is initialized on the main thread (where the font rendering takes place). Then, when the HUD draws text on the impl thread, it uses the font atlas directly. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/cc/CCFontAtlas.cpp: Added. (WebCore): (WebCore::CCFontAtlas::CCFontAtlas): (WebCore::wrapPositionIfNeeded): (WebCore::CCFontAtlas::generateAtlasForFont): (WebCore::CCFontAtlas::initialize): (WebCore::CCFontAtlas::drawText): (WebCore::CCFontAtlas::drawOneLineOfTextInternal): (WebCore::CCFontAtlas::drawDebugAtlas): * platform/graphics/chromium/cc/CCFontAtlas.h: Added. (WebCore): (CCFontAtlas): (WebCore::CCFontAtlas::create): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawFPSCounter): (WebCore::CCHeadsUpDisplay::drawFPSCounterText): (WebCore::CCHeadsUpDisplay::drawPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::create): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (WebCore::CCLayerTreeHost::headsUpDisplayFontAtlas): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::recreateContext): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): 2012-04-13 Rob Flack Chromium: Should enable -webkit-image-set https://bugs.webkit.org/show_bug.cgi?id=81859 Reviewed by Adam Barth. Test: fast/css/image-set-parsing.html * WebCore.gypi: 2012-04-13 Pavel Feldman Web Inspector: do not attempt to load content from resource until request finished loading. https://bugs.webkit.org/show_bug.cgi?id=83896 Reviewed by Yury Semikhatsky. When we stop in the inline script on reload, we should only show concatenated script content. When we resume, we should replace UI source code with the actual HTML content. We should not attempt to fetch resource content until request finished loading. I regressed it in the Request extraction and now am bringing it back. * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype._finishedLoading): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): 2012-04-13 Pavel Feldman Web Inspector: follow up to r114116 - fixing QT test https://bugs.webkit.org/show_bug.cgi?id=83892 Reviewed by Yury Semikhatsky. Requesting content for the scripts exclusively via the page agent now. * inspector/front-end/Resource.js: (WebInspector.Resource.prototype.get content): (WebInspector.Resource.prototype.get contentEncoded): (WebInspector.Resource.prototype.requestContent): (WebInspector.ResourceRevision.prototype.requestContent): 2012-04-13 Yi Shen InsertHTML fails to insert h6 if the insertion point is before some text. https://bugs.webkit.org/show_bug.cgi?id=82689 Reviewed by Ryosuke Niwa. Added the missing h6 tag for the isHeaderElement. No new tests: updated existing test (editing/execCommand/4128080-1.html) * editing/ReplaceSelectionCommand.cpp: (WebCore::isHeaderElement): 2012-04-13 Yury Semikhatsky Web Inspector: exception in heap profiler when expanding a class in summary view https://bugs.webkit.org/show_bug.cgi?id=83883 Moved all DOM-specific inspector utilities into DOMExtension.js Merged BinarySearch.js and PartialQuickSort.js into utilities.js, HeapSnapshotWorker.js now imports utilities.js which contains all required routines. Reviewed by Pavel Feldman. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/compile-front-end.py: * inspector/front-end/BinarySearch.js: Removed. * inspector/front-end/DOMExtension.js: Copied from Source/WebCore/inspector/front-end/utilities.js. (Node.prototype.rangeOfWord): (Node.prototype.traverseNextTextNode): (Node.prototype.rangeBoundaryForOffset): (Element.prototype.removeStyleClass): (Element.prototype.removeMatchingStyleClasses): (Element.prototype.addStyleClass): (Element.prototype.hasStyleClass): (Element.prototype.positionAt): (Element.prototype.pruneEmptyTextNodes): (Element.prototype.isScrolledToBottom): (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): (Node.prototype.enclosingNodeOrSelfWithNodeName): (Node.prototype.enclosingNodeOrSelfWithClass): (Node.prototype.enclosingNodeWithClass): (Element.prototype.query): (Element.prototype.removeChildren): (Element.prototype.isInsertionCaretInside): (Element.prototype.createChild): (Element.prototype.totalOffsetLeft): (Element.prototype.totalOffsetTop): (Element.prototype.totalOffset): (Element.prototype.scrollOffset): (AnchorBox): (Element.prototype.offsetRelativeToWindow): (Element.prototype.boxInWindow): (Element.prototype.setTextAndTitle): (Event.prototype.consume): (Text.prototype.select): (Element.prototype.selectionLeftOffset): (Node.prototype.isAncestor): (Node.prototype.isDescendant): (Node.prototype.isSelfOrAncestor): (Node.prototype.isSelfOrDescendant): (Node.prototype.traverseNextNode): (Node.prototype.traversePreviousNode): (HTMLTextAreaElement.prototype.moveCursorToEnd): (isEnterKey): (consumeEvent): (highlightSearchResult): (highlightSearchResults): (highlightRangesWithStyleClass): (applyDomChanges): (revertDomChanges): * inspector/front-end/HeapSnapshot.js: Fixed a couple of js compiler warnings by describing structure of heap snapshot header in the protocol. (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk): * inspector/front-end/HeapSnapshotWorker.js: * inspector/front-end/PartialQuickSort.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/utilities.js: (.): 2012-04-13 Sheriff Bot Unreviewed, rolling out r114103. http://trac.webkit.org/changeset/114103 https://bugs.webkit.org/show_bug.cgi?id=83884 New breakpoint UI looks bad / needs polish. (Requested by pfeldman_ on #webkit). * inspector/front-end/Images/breakpointConditionalCounterBorder.png: * inspector/front-end/Images/breakpointCounterBorder.png: * inspector/front-end/Images/programCounterBorder.png: * inspector/front-end/textViewer.css: (.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number-outer): 2012-04-13 Jason Liu [BlackBerry] Sign in cookie for ESPN.com does not retain login account (for fantasy sports). https://bugs.webkit.org/show_bug.cgi?id=83760 Reviewed by George Staikos. When we update cookies' database, protocol shouldn't be checked since it is not a cookie's key. ESPN.com's https cookies should replace old http cookies if they have the same keys(name, path, domain). We must restart the browser to test, so have to write a manual test case. Test: ManualTests/blackberry/http-cookie-database-set.php * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp: (WebCore::CookieDatabaseBackingStore::invokeOpen): 2012-04-12 Jocelyn Turcotte [Qt] Use QQuickFlickable::setPixelAligned instead of doing pixel-alignment when rendering. https://bugs.webkit.org/show_bug.cgi?id=83770 Reviewed by Kenneth Rohde Christiansen. Revert the previous way of dealing with things. The problem is that different layers would end up rounding in different directions, and would cause jittering between layers or with the QQuickWebPage's background. * platform/graphics/texmap/TextureMapperGL.cpp: (WebCore::TextureMapperGL::drawTexture): 2012-04-13 Pavel Feldman Web Inspector: introduce ParsedURL type, clean up url and displayName mess in Resource and NetworkRequest. https://bugs.webkit.org/show_bug.cgi?id=83871 Reviewed by Yury Semikhatsky. There is a number of random properties created on Resource and NetworkRequest that represent various url fragments. Display name is being based on them and sometimes requires fake Resource instance to be created. This change (officially) introduces WebInspector.ParsedURL as a type that encapsulates this complexity. This change also moves documentURL property into the Resource and NetworkRequest constructors and brushes up factory methods used to create the objects. * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.GzipRule.prototype._shouldCompress): (WebInspector.AuditRules.CookieSizeRule.prototype.processCookies): * inspector/front-end/Database.js: (WebInspector.Database.prototype.get displayDomain): * inspector/front-end/JavaScriptContextManager.js: (WebInspector.FrameEvaluationContext.prototype.get displayName): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkDispatcher.prototype.webSocketCreated): (WebInspector.NetworkDispatcher.prototype._createNetworkRequest): (get WebInspector): * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkLogView.prototype._highlightNthMatchedRequest): (WebInspector.NetworkDataGridNode.prototype._refreshNameCell): * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest): (WebInspector.NetworkRequest.prototype.set url): (WebInspector.NetworkRequest.prototype.get documentURL): (WebInspector.NetworkRequest.prototype.get parsedURL): (WebInspector.NetworkRequest.prototype.get displayName): (WebInspector.NetworkRequest.prototype.get folder): * inspector/front-end/RequestHeadersView.js: (WebInspector.RequestHeadersView.prototype._refreshUrlFragment): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get parsedURL): (WebInspector.Resource.prototype.get frameId): (WebInspector.Resource.prototype.get loaderId): (WebInspector.Resource.prototype.get displayName): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype._onRequestUpdateDropped): (WebInspector.ResourceTreeModel.prototype._addFramesRecursively): (WebInspector.ResourceTreeModel.prototype._createResourceFromFramePayload): (WebInspector.ResourceTreeFrame.prototype._addRequest): * inspector/front-end/ResourceUtils.js: (WebInspector.ParsedURL): (WebInspector.ParsedURL.prototype.get displayName): (String.prototype.asParsedURL): (WebInspector.displayDomain): (WebInspector.resourceURLForRelatedNode.callback): (WebInspector.resourceURLForRelatedNode): * inspector/front-end/ResourcesPanel.js: (WebInspector.FrameTreeElement.prototype.frameNavigated): (WebInspector.ApplicationCacheManifestTreeElement): (WebInspector.ApplicationCacheFrameTreeElement.prototype._refreshTitles): * inspector/front-end/utilities.js: 2012-04-13 Pavel Feldman Web Inspector: extracting NetworkRequest from Resource (step 3) https://bugs.webkit.org/show_bug.cgi?id=83802 Reviewed by Yury Semikhatsky. This change extracts NetworkRequest from the Resource. It is now clear that these two should have super class that would be responsible for parsing URL and would define the requestContent signature. Corresponding patch will follow. * inspector/front-end/NetworkManager.js: * inspector/front-end/NetworkRequest.js: (WebInspector.NetworkRequest): (WebInspector.NetworkRequest.prototype.get requestId): (WebInspector.NetworkRequest.prototype.set requestId): (WebInspector.NetworkRequest.prototype.get url): (WebInspector.NetworkRequest.prototype.get frameId): (WebInspector.NetworkRequest.prototype.get loaderId): (WebInspector.NetworkRequest.prototype.get startTime): (WebInspector.NetworkRequest.prototype.set startTime): (WebInspector.NetworkRequest.prototype.get responseReceivedTime): (WebInspector.NetworkRequest.prototype.set responseReceivedTime): (WebInspector.NetworkRequest.prototype.get endTime): (WebInspector.NetworkRequest.prototype.set endTime): (WebInspector.NetworkRequest.prototype.get duration): (WebInspector.NetworkRequest.prototype.get latency): (WebInspector.NetworkRequest.prototype.get receiveDuration): (WebInspector.NetworkRequest.prototype.get resourceSize): (WebInspector.NetworkRequest.prototype.set resourceSize): (WebInspector.NetworkRequest.prototype.get transferSize): (WebInspector.NetworkRequest.prototype.increaseTransferSize): (WebInspector.NetworkRequest.prototype.get finished): (WebInspector.NetworkRequest.prototype.set finished): (WebInspector.NetworkRequest.prototype.get failed): (WebInspector.NetworkRequest.prototype.set failed): (WebInspector.NetworkRequest.prototype.get canceled): (WebInspector.NetworkRequest.prototype.set canceled): (WebInspector.NetworkRequest.prototype.get cached): (WebInspector.NetworkRequest.prototype.set cached): (WebInspector.NetworkRequest.prototype.get timing): (WebInspector.NetworkRequest.prototype.set timing): (WebInspector.NetworkRequest.prototype.get mimeType): (WebInspector.NetworkRequest.prototype.set mimeType): (WebInspector.NetworkRequest.prototype.get displayName): (WebInspector.NetworkRequest.prototype.get folder): (WebInspector.NetworkRequest.prototype.get displayDomain): (WebInspector.NetworkRequest.prototype.get type): (WebInspector.NetworkRequest.prototype.set type): (WebInspector.NetworkRequest.prototype.get redirectSource): (WebInspector.NetworkRequest.prototype.set redirectSource): (WebInspector.NetworkRequest.prototype.get requestHeaders): (WebInspector.NetworkRequest.prototype.set requestHeaders): (WebInspector.NetworkRequest.prototype.get requestHeadersText): (WebInspector.NetworkRequest.prototype.set requestHeadersText): (WebInspector.NetworkRequest.prototype.get requestHeadersSize): (WebInspector.NetworkRequest.prototype.requestHeaderValue): (WebInspector.NetworkRequest.prototype.get requestCookies): (WebInspector.NetworkRequest.prototype.get requestFormData): (WebInspector.NetworkRequest.prototype.set requestFormData): (WebInspector.NetworkRequest.prototype.get requestHttpVersion): (WebInspector.NetworkRequest.prototype.get responseHeaders): (WebInspector.NetworkRequest.prototype.set responseHeaders): (WebInspector.NetworkRequest.prototype.get responseHeadersText): (WebInspector.NetworkRequest.prototype.set responseHeadersText): (WebInspector.NetworkRequest.prototype.get responseHeadersSize): (WebInspector.NetworkRequest.prototype.responseHeaderValue): (WebInspector.NetworkRequest.prototype.get responseCookies): (WebInspector.NetworkRequest.prototype.get queryParameters): (WebInspector.NetworkRequest.prototype.get formParameters): (WebInspector.NetworkRequest.prototype.get responseHttpVersion): (WebInspector.NetworkRequest.prototype._parseParameters): (WebInspector.NetworkRequest.prototype._headerValue): (WebInspector.NetworkRequest.prototype.get content): (WebInspector.NetworkRequest.prototype.get contentEncoded): (WebInspector.NetworkRequest.prototype.requestContent): (WebInspector.NetworkRequest.prototype.isHttpFamily): (WebInspector.NetworkRequest.prototype.requestContentType): (WebInspector.NetworkRequest.prototype.isPingRequest): (WebInspector.NetworkRequest.prototype.hasErrorStatusCode): (WebInspector.NetworkRequest.prototype.populateImageSource): (WebInspector.NetworkRequest.prototype._contentURL): (WebInspector.NetworkRequest.prototype._innerRequestContent.onResourceContent): (WebInspector.NetworkRequest.prototype._innerRequestContent): (WebInspector.NetworkRequest.prototype.setResource): (WebInspector.NetworkRequest.prototype.resource): * inspector/front-end/RawSourceCode.js: (WebInspector.RawSourceCode): (WebInspector.RawSourceCode.prototype._resourceAdded): (WebInspector.RawSourceCode.prototype.forceUpdateSourceMapping): (WebInspector.RawSourceCode.prototype._createContentProvider): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.displayName): (WebInspector.Resource.prototype.get request): (WebInspector.Resource.prototype.set url): (WebInspector.Resource.prototype.get type): (WebInspector.Resource.prototype.get mimeType): (WebInspector.Resource.prototype.set mimeType): (WebInspector.Resource.prototype.get content): (WebInspector.Resource.prototype.get contentEncoded): (WebInspector.Resource.prototype.requestContent): (WebInspector.Resource.prototype._innerRequestContent.callback): (WebInspector.Resource.prototype._innerRequestContent): (WebInspector.ResourceRevision.prototype.requestContent.callbackWrapper): (WebInspector.ResourceRevision.prototype.requestContent): * inspector/front-end/ResourceScriptMapping.js: (WebInspector.ResourceScriptMapping.prototype.addScript): 2012-04-13 Mike Reed use getClipDeviceBounds, rather than (deprecated) getTotalClip https://bugs.webkit.org/show_bug.cgi?id=83808 Reviewed by Stephen White. Equivalent functionality, existing tests apply. * platform/graphics/skia/OpaqueRegionSkia.cpp: (WebCore::OpaqueRegionSkia::didDraw): 2012-04-13 Thiago Marcos P. Santos [EFL] Add API for color chooser https://bugs.webkit.org/show_bug.cgi?id=83692 Added new API to enable browsers to display a custom color picker when an input field of type "color" is activated. Reviewed by Kenneth Rohde Christiansen. * PlatformEfl.cmake: * platform/efl/ColorChooserEfl.cpp: Added. (WebCore): (WebCore::ColorChooserEfl::ColorChooserEfl): (WebCore::ColorChooserEfl::~ColorChooserEfl): (WebCore::ColorChooserEfl::setSelectedColor): (WebCore::ColorChooserEfl::endChooser): * platform/efl/ColorChooserEfl.h: Added. (WebCore): (ColorChooserEfl): 2012-04-13 Zalan Bujtas Enabling/disabling delegates scrolling when page has no composited content asserts on WK1. https://bugs.webkit.org/show_bug.cgi?id=83860 Reviewed by Kenneth Rohde Christiansen. WK2 has compositing mode on all the time, while Wk1 turns it on only when the page has composited content. This patch ensures that, when delegates scrolling behavior is changed, backing stores are cleared only when there's an actual composition, similarly to what CachedFrame does. Test: fast/viewport/scroll-delegates-switch-on-page-with-no-composition-mode-asserts.html * page/FrameView.cpp: (WebCore::FrameView::delegatesScrollingDidChange): 2012-04-13 Vivek Galatage Web Inspector: Line number is not displayed while debugging javascript https://bugs.webkit.org/show_bug.cgi?id=83786 Reviewed by Pavel Feldman. Changed the textViewer.css to start displaying the line number with appropriate color property. Added outline property for enhanced view No additional test cases required for the above fix. * inspector/front-end/Images/breakpointConditionalCounterBorder.png: * inspector/front-end/Images/breakpointCounterBorder.png: * inspector/front-end/Images/programCounterBorder.png: * inspector/front-end/textViewer.css: (.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint.webkit-execution-line .webkit-line-number-outer): (.webkit-breakpoint-conditional.webkit-execution-line .webkit-line-number-outer): 2012-04-13 Kent Tamura Add a runtime flag for https://bugs.webkit.org/show_bug.cgi?id=83853 Reviewed by Adam Barth. * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::inputTypeDateEnabled): Added. (WebCore::RuntimeEnabledFeatures::setInputTypeDateEnabled): Added. * html/InputType.cpp: (WebCore::createInputTypeFactoryMap): Don't register type=date if !RuntimeEnabledFeatures::inputTypeDateEnabled() 2012-04-13 Adam Barth JSDocument::setLocation does too much bare-handed lifting https://bugs.webkit.org/show_bug.cgi?id=83850 Reviewed by Sam Weinig. As part of auditing all the ways of kicking off a navigation, I happened to read JSDocument::setLocation, which uses very old patterns. This patch updates it to do things the "modern" way. There shouldn't be any behavior change. * bindings/js/JSDocumentCustom.cpp: (WebCore::JSDocument::setLocation): 2012-04-13 Shinya Kawanaka Background width (or height) is wrong if width (or height) * zoom < 1. https://bugs.webkit.org/show_bug.cgi?id=83350 Reviewed by Nikolas Zimmermann. calculateImageIntrinsicDimension will return wrong size if the calculated size is 0. 0 is used for expressing unspecfied, so the method returns the box width(height) instead. Since CachedImage has already similar code, we moved it to IntSize and shared it. Tests: fast/css/zoom-background-repeat-x-expected.html fast/css/zoom-background-repeat-x.html fast/css/zoom-background-repeat-y-expected.html fast/css/zoom-background-repeat-y.html * loader/cache/CachedImage.cpp: (WebCore::CachedImage::imageSizeForRenderer): * platform/graphics/IntSize.h: (IntSize): (WebCore::IntSize::scale): (WebCore::IntSize::clampToMinimumSize): * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::calculateImageIntrinsicDimensions): 2012-04-13 Adam Barth Prepare submitForm for seamless navigation https://bugs.webkit.org/show_bug.cgi?id=83838 Reviewed by Ryosuke Niwa. Previously, FrameLoader::submitForm called FrameTree::find and Document::canNavigate separately. This patch refactors this function to call findFrameForNavigation, which does both checks. This doesn't change any behavior today, but it prepares us to implement seamless navigation. Once the seamless branch lands, this change will be tested by seamless-form-* in https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless For context, see: https://github.com/eseidel/webkit/commit/3f27340577ac91b2cc0a834dd2c6fdfcac296c32 * loader/FrameLoader.cpp: (WebCore::FrameLoader::submitForm): 2012-04-13 Kent Tamura Should clear an invalid string in a date field on blur https://bugs.webkit.org/show_bug.cgi?id=83863 Reviewed by Kentaro Hara. Test: fast/forms/date/input-date-commit-valid-only.html * html/DateInputType.cpp: (WebCore::DateInputType::handleBlurEvent): Reset the visible value. The code is same as NumberInputType::handleBlurEvent(). 2012-04-12 Kent Tamura Calendar Picker: remove unnecessary code from calendarPicker.{css,js} https://bugs.webkit.org/show_bug.cgi?id=83685 Reviewed by Kentaro Hara. Remove the followings from input files: - multi line comments /*...*/ (.js and .css) - single line comment //... (.js) - repeating whitespace (.js and .css) - leading and trailing whitespace (.js and .css) - empty lines (.js and .css) This doesn't work for arbitrary JavaScript or CSS inputs, but works well for expected input files like css/make-css-file-arrays.pl * make-file-arrays.py: (strip_whitespace_and_comments): (main): 2012-04-12 Sailesh Agrawal Chromium: Fix scrollbar tickmark drawing on Mountain Lion https://bugs.webkit.org/show_bug.cgi?id=83844 Reviewed by James Robinson. On Mountain Lion overlay scrollbars have a new expanded mode. In expanded mode the scrolllbar is slightly wider which causes the tickmarks to look incorrect. Fix was to explicitly enter expanded mode to get the correct look. Screenshots: broken: http://i.imgur.com/PDKYH.png fixed: http://i.imgur.com/utp0Y.png * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): Called setExpanded if API is available. * platform/mac/NSScrollerImpDetails.h: Exposed the isExpanded: API. 2012-04-12 Kent Tamura LocalizedDateICU should ignore timezones https://bugs.webkit.org/show_bug.cgi?id=83859 Reviewed by Hajime Morita. udat_parse() and udat_format() shift the input date by the offset of the default timezone. We don't need this behavior for type=date. So we specify "GMT" to udat_open(). No new tests. This behavior depends on the timezone setting of the local machine. * platform/text/LocalizedDateICU.cpp: (WebCore::createShortDateFormatter): Added. Common factory functio for UDateFormat. Use "GMT" instead of the default timezone. (WebCore::parseLocalizedDate): Use createShortDateFormatter(). (WebCore::formatLocalizedDate): ditto. 2012-04-12 Adam Barth Prepare window.location for seamless navigation https://bugs.webkit.org/show_bug.cgi?id=83843 Reviewed by Eric Seidel. This patch refactors window.location to flow through FrameLoader::findFrameForNavigation, which is where we're going to implement the seamless navigation redirect. This patch shouldn't cause any observable changes in behavior today, but it will make all the seamless-window-location* tests in https://github.com/eseidel/webkit/tree/seamless/LayoutTests/fast/frames/seamless pass once we merge the seamlesss branch. See https://github.com/eseidel/webkit/commit/a6e708fa6c643b156397e9a287b40a0868c7959c for context. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::setLocation): * bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::V8DOMWindow::locationAccessorSetter): * page/Location.cpp: (WebCore::Location::setHref): (WebCore::Location::setProtocol): (WebCore::Location::setHost): (WebCore::Location::setHostname): (WebCore::Location::setPort): (WebCore::Location::setPathname): (WebCore::Location::setSearch): (WebCore::Location::setHash): (WebCore::Location::assign): (WebCore::Location::replace): (WebCore::Location::setLocation): (WebCore): * page/Location.h: (Location): 2012-04-12 Dana Jansens [chromium] Background filters for composited layers https://bugs.webkit.org/show_bug.cgi?id=80046 Reviewed by Adrienne Walker. Adds background filters to LayerChromium/CCLayerImpl. These filters are applied to any pixels in the contents behind the layer and seen through it. This is done by adding a backgroundTexture() to the render surface, which holds the read-back contents of the target framebuffer, background filter applied, in the surface's own coordinate space. Then this is drawn back into the frame buffer before the contents of the surface itself is drawn. Tests: platform/chromium/compositing/filters/background-filter-blur-off-axis.html platform/chromium/compositing/filters/background-filter-blur-outsets.html platform/chromium/compositing/filters/background-filter-blur.html * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::setBackgroundFilters): (WebCore): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): (WebCore::LayerChromium::backgroundFilters): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawBackgroundFilters): (WebCore): (WebCore::LayerRendererChromium::drawRenderSurfaceQuad): (WebCore::LayerRendererChromium::getFramebufferTexture): (WebCore::LayerRendererChromium::isCurrentRenderSurface): (WebCore::LayerRendererChromium::useRenderSurface): (WebCore::LayerRendererChromium::useManagedTexture): (WebCore::LayerRendererChromium::bindFramebufferToTexture): (WebCore::LayerRendererChromium::setScissorToRect): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::setBackgroundFilters): (WebCore::RenderSurfaceChromium::backgroundFilters): (RenderSurfaceChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setBackgroundFilters): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): (WebCore::CCLayerImpl::backgroundFilters): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::drawableContentRect): (WebCore::CCRenderSurface::prepareBackgroundTexture): (WebCore): (WebCore::CCRenderSurface::releaseBackgroundTexture): (WebCore::CCRenderSurface::computeDeviceTransform): (WebCore::CCRenderSurface::computeDeviceBoundingBox): (WebCore::CCRenderSurface::computeReadbackDeviceBoundingBox): (WebCore::CCRenderSurface::readbackDeviceContentRect): (WebCore::copyTextureToFramebuffer): (WebCore::CCRenderSurface::copyDeviceToBackgroundTexture): (WebCore::getSkBitmapTextureId): (WebCore::CCRenderSurface::drawContents): (WebCore::CCRenderSurface::drawReplica): (WebCore::CCRenderSurface::drawLayer): (WebCore::CCRenderSurface::drawSurface): (WebCore::CCRenderSurface::applyFilters): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): (WebCore::CCRenderSurface::setBackgroundFilters): (WebCore::CCRenderSurface::backgroundFilters): (WebCore::CCRenderSurface::backgroundTexture): * testing/Internals.cpp: (WebCore): (WebCore::Internals::setBackgroundBlurOnNode): * testing/Internals.h: (Internals): * testing/Internals.idl: 2012-04-12 Adam Barth Remove V8DOMWindowShell::setLocation https://bugs.webkit.org/show_bug.cgi?id=83833 Reviewed by Eric Seidel. V8DOMWindowShell::setLocation is only used by document.location. It's more direct for document.location to call Location::setHref directly. This integrates correctly with the navigation rules for