2011-01-25 Dimitri Glazkov Reviewed by Kent Tamura. Reduce ref-count churn in shadowPseudoId. https://bugs.webkit.org/show_bug.cgi?id=53136 Refactoring, so no new tests. * dom/Element.h: (WebCore::Element::shadowPseudoId): Changed signature to use const AtomicString& * html/ValidationMessage.cpp: (WebCore::ElementWithPseudoId::shadowPseudoId): Ditto. * html/shadow/SliderThumbElement.cpp: (WebCore::SliderThumbElement::shadowPseudoId): Ditto, plus moved from the header file. * html/shadow/SliderThumbElement.h: Ditto. * rendering/MediaControlElements.cpp: (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Ditto. (WebCore::MediaControlTimelineElement::shadowPseudoId): Ditto. (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Ditto. (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Ditto. * rendering/MediaControlElements.h: Ditto. 2011-01-26 Dave Hyatt Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=46421, make multi-column layout work with vertical text. Added new tests in fast/multicol/vertical-lr and fast/multicol/vertical-rl. * css/html.css: Update p, blockquote and h1-h6 to respect directionality so that column layout tests that use those elements work properly. * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Fix a flipping bug with the computation of lineTopIncludingMargins where it could be incorrectly shrunk in some cases (causing lines to all stack on top of one another). * rendering/InlineTextBox.h: (WebCore::InlineTextBox::calculateBoundaries): Fix calculateBoundaries to be physical rather than logical. * rendering/LayoutState.cpp: (WebCore::LayoutState::addForcedColumnBreak): * rendering/LayoutState.h: Rename childY to childLogicalOffset. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::layoutBlock): (WebCore::RenderBlock::addOverflowFromChildren): (WebCore::RenderBlock::addOverflowFromFloats): (WebCore::RenderBlock::collapseMargins): (WebCore::RenderBlock::estimateLogicalTopPosition): (WebCore::RenderBlock::layoutBlockChild): (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded): (WebCore::RenderBlock::paintColumnRules): (WebCore::RenderBlock::paintColumnContents): (WebCore::RenderBlock::paintFloats): (WebCore::RenderBlock::selectionGaps): (WebCore::RenderBlock::removeFloatingObjectsBelow): (WebCore::RenderBlock::addOverhangingFloats): (WebCore::RenderBlock::hitTestFloats): (WebCore::RenderBlock::hitTestColumns): (WebCore::RenderBlock::calcColumnWidth): (WebCore::RenderBlock::desiredColumnWidth): (WebCore::RenderBlock::columnRectAt): (WebCore::RenderBlock::layoutColumns): (WebCore::RenderBlock::adjustPointToColumnContents): (WebCore::RenderBlock::adjustRectForColumns): (WebCore::RenderBlock::flipForWritingModeIncludingColumns): (WebCore::RenderBlock::adjustForColumns): (WebCore::RenderBlock::adjustForBorderFit): (WebCore::RenderBlock::nextPageLogicalTop): (WebCore::RenderBlock::applyBeforeBreak): (WebCore::RenderBlock::applyAfterBreak): (WebCore::RenderBlock::adjustForUnsplittableChild): (WebCore::RenderBlock::adjustLinePositionForPagination): * rendering/RenderBlock.h: (WebCore::RenderBlock::logicalRightOffsetForContent): (WebCore::RenderBlock::logicalLeftOffsetForContent): (WebCore::RenderBlock::leftForFloatIncludingMargin): (WebCore::RenderBlock::topForFloatIncludingMargin): * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::layoutInlineChildren): (WebCore::RenderBlock::determineStartPosition): Reworking of all the RenderBlock column functions to support flipping and vertical modes. * rendering/RenderBox.cpp: (WebCore::RenderBox::offsetFromContainer): (WebCore::RenderBox::flipForWritingModeIncludingColumns): Patch offsetFromContainer to be aware of flipped block writing modes when dealing with column layouts. * rendering/RenderBox.h: (WebCore::RenderBox::clientLogicalBottom): Fix a bug in clientLogicalBottom where it didn't add in the right border/padding. * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::layoutBlock): Better terminology for pagination. * rendering/RenderInline.cpp: (WebCore::RenderInline::offsetFromContainer): (WebCore::RenderInline::mapLocalToContainer): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintChildLayerIntoColumns): (WebCore::RenderLayer::hitTestChildLayerColumns): (WebCore::RenderLayer::localBoundingBox): (WebCore::RenderLayer::boundingBox): Patch painting in RenderLayers to be vertical-text-aware. * rendering/RenderObject.cpp: (WebCore::RenderObject::mapLocalToContainer): Add code to be flipped block-aware with columns. * rendering/RenderTable.cpp: (WebCore::RenderTable::layout): * rendering/RenderTableRow.cpp: (WebCore::RenderTableRow::layout): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::layoutRows): Fix pagination to use better terminology. * rendering/RenderText.cpp: (WebCore::RenderText::absoluteQuads): (WebCore::RenderText::absoluteQuadsForRange): Fix a bug where vertical text wasn't taken into account. 2011-01-26 Dimitri Glazkov Unreviewed, rolling out r76719. http://trac.webkit.org/changeset/76719 https://bugs.webkit.org/show_bug.cgi?id=53122 Broke a bunch of media tests in Chromium/Qt/GTK. 2011-01-26 Tony Chang Reviewed by Ryosuke Niwa. [gtk] strip NUL characters when copying text/html on GTK+ https://bugs.webkit.org/show_bug.cgi?id=52508 Putting NUL characters in the text/html clipboard doesn't work in WebKit GTK+ (the pasted value is truncated at the NUL). Since we're already stripping this character for plain text (for Windows), strip it in text/html too. * editing/MarkupAccumulator.h: mark function as virtual * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendString): (WebCore::StyledMarkupAccumulator::takeResults): strip nulls 2011-01-26 Mario Sanchez Prada Reviewed by Martin Robinson. [GTK] Reliable crash with getTextAtOffset() https://bugs.webkit.org/show_bug.cgi?id=53131 Properly calculate length in bytes for a UTF8 substring. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (utf8Substr): Use character instead of bytes as units to calculate the length in bytes for the UTF8 string. 2011-01-25 Dimitri Glazkov Reviewed by Kent Tamura. Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId. https://bugs.webkit.org/show_bug.cgi?id=53122 This is the first step in converting HTMLMediaElement to the new shadow DOM. Should not regress any existing tests. No observable change in behavior. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors. (WebCore::nameToPseudoTypeMap): Ditto. (WebCore::CSSSelector::extractPseudoType): Ditto. * css/CSSSelector.h: Ditto. * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline. * rendering/MediaControlElements.cpp: (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement, which is now replaced with virtual shadowPseudoId on each corresponding class. (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline. (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set display type in constructor. (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added. (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added to disambiguate from the MediaControlMuteButtonElement. (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added. (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added. (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added. (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added. (WebCore::MediaControlSeekForwardButtonElement::create): Added. (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added. (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added. (WebCore::MediaControlSeekBackButtonElement::create): Added. (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added. (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added. (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added. (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added. (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added. (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlTimelineElement::shadowPseudoId): Added. (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added. (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as constructor argument. (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added. * rendering/MediaControlElements.h: (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added. (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added. * rendering/RenderMedia.cpp: (WebCore::RenderMedia::createMuteButton): Changed to use new constructor. (WebCore::RenderMedia::createSeekBackButton): Ditto. (WebCore::RenderMedia::createSeekForwardButton): Ditto. (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto. * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used. 2011-01-26 Kenneth Russell Reviewed by James Robinson. Fix multisampling support in DrawingBuffer https://bugs.webkit.org/show_bug.cgi?id=53154 In DrawingBuffer's multisampling code path, fixed enum usage and a bug where it would incorrectly redefine the depth and stencil buffers. Hooked up multisampling code path in Chromium port. Tested manually with some accelerated 2D canvas content. Multisampling isn't being switched on for the accelerated 2D canvas at the current time because it will increase fill rate requirements and cause a large number of rebaselines. * platform/graphics/Extensions3D.h: * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::publishToPlatformLayer): * platform/graphics/chromium/Extensions3DChromium.h: * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::create): (WebCore::DrawingBuffer::reset): * platform/graphics/opengl/Extensions3DOpenGL.cpp: (WebCore::Extensions3DOpenGL::supports): 2011-01-26 Tony Chang Unreviewed. [chromium] revert r68310 because of race conditions detected by tsans https://bugs.webkit.org/show_bug.cgi?id=53185 Causes stability problems for Chromium, http://crbug.com/70589 * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp: (WebCore::SQLiteFileSystem::registerSQLiteVFS): 2011-01-26 Justin Schuh Reviewed by Adam Barth. Make fireEventsAndUpdateStyle use stack local vectors. https://bugs.webkit.org/show_bug.cgi?id=46760 Test: animations/animation-add-events-in-handler.html * page/animation/AnimationController.cpp: (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): 2011-01-26 Nate Chapin Reviewed by Adam Barth. Remove m_URL from FrameLoader and depend on Document::url() instead. FrameLoader::url() will be removed in a followup patch. https://bugs.webkit.org/show_bug.cgi?id=41165 Refactor only, no new tests. * WebCore.exp.in: * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::updateURLForPushOrReplaceState): * loader/DocumentWriter.cpp: (WebCore::DocumentWriter::begin): * loader/FrameLoader.cpp: (WebCore::FrameLoader::iconURL): (WebCore::FrameLoader::didOpenURL): (WebCore::FrameLoader::didExplicitOpen): (WebCore::FrameLoader::receivedFirstData): (WebCore::FrameLoader::url): (WebCore::FrameLoader::setOutgoingReferrer): (WebCore::FrameLoader::startIconLoader): (WebCore::FrameLoader::commitIconURLToIconDatabase): (WebCore::FrameLoader::finishedParsing): (WebCore::FrameLoader::checkIfDisplayInsecureContent): (WebCore::FrameLoader::checkIfRunInsecureContent): (WebCore::FrameLoader::updateFirstPartyForCookies): (WebCore::FrameLoader::loadInSameDocument): (WebCore::FrameLoader::commitProvisionalLoad): (WebCore::FrameLoader::open): (WebCore::FrameLoader::shouldScrollToAnchor): * loader/FrameLoader.h: Rename setURL() to setOutgoingReferrer(). 2011-01-25 Brian Weinstein Reviewed by Antti Koivisto. Crashes loading pages when cancelling subresource loads through WebKit https://bugs.webkit.org/show_bug.cgi?id=53123 Fix a crash that happened when cancelling subresource loads through WebKit. When a load is cancelled synchronously (via the WebKit client), CachedResourceLoader::requestResource can be called recursively on the same function, either leading to infinite recursion, or deleting an object when it is not done being used. The fix for this was to call checkForPendingPreloads and servePendingRequests asynchronously when CachedResourceLoader::loadDone was called synchronously (due to the load being cancelled synchronously). Test: fast/loader/willSendRequest-null-for-preload.html * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::setRequest): Only dispatch didReceiveServerRedirectForProvisionalLoadForFrame if our new URL is non-null. * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): Initialize our timer. (WebCore::CachedResourceLoader::loadDone): If the CachedResource we were passed in was 0, that means this function was called synchronously from CachedResourceRequest::load, and we don't want to call into checkForPendingPreloads synchronously, so put it on a 0-delay timer to make the calls to checkForPendingPreloads and servePendingRequests asynchronous. (WebCore::CachedResourceLoader::loadDonePendingActionTimerFired): Call checkForPendingPreloads and servePendingRequests. (WebCore::CachedResourceLoader::checkForPendingPreloads): m_pendingPreloads is now a Deque instead of a Vector, so use Deque methods. * loader/cache/CachedResourceLoader.h: Add the timer, the timer callback function, and make m_pendingPreloads a Deque. 2011-01-25 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: evaluate in console may not work when window.console is substituted or deleted. https://bugs.webkit.org/show_bug.cgi?id=53072 Test: inspector/console-substituted.html * inspector/InjectedScriptSource.js: (.): 2011-01-26 Carlos Garcia Campos Reviewed by Martin Robinson. [cairo] Use CAIRO_OPERATOR_DARKEN when available https://bugs.webkit.org/show_bug.cgi?id=53084 Use CAIRO_OPERATOR_DARKEN for CompositePlusDarker instead of CAIRO_OPERATOR_SATURATE when building with cairo version >= 1.10. * platform/graphics/cairo/CairoUtilities.cpp: (WebCore::toCairoOperator): 2011-01-26 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: visualize \n in strings as unicode cr symbol in stack variables sidebar. https://bugs.webkit.org/show_bug.cgi?id=53162 * inspector/front-end/ObjectPropertiesSection.js: (WebInspector.ObjectPropertyTreeElement.prototype.update): 2011-01-26 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: size is wrong for cached resources in Network panel - Set the size for 304/not modified resources from cached resource. - Add response headers size to resource transfer size. https://bugs.webkit.org/show_bug.cgi?id=52886 * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::didReceiveResponse): * inspector/front-end/Resource.js: (WebInspector.Resource): (WebInspector.Resource.prototype.get transferSize): (WebInspector.Resource.prototype.set responseHeaders): (WebInspector.Resource.prototype._headersSize): (WebInspector.Resource.prototype._mimeTypeIsConsistentWithType): 2011-01-26 Carol Szabo Reviewed by Simon Hausmann. Fixed TiledBacking store to take into account new dirty regions caused by paint time layouts. Flawed rendering design for QtWebKit resulting in artifacts being displayed https://bugs.webkit.org/show_bug.cgi?id=49184 There are no new tests as this patch aims at fixing flicker that happen randomly, mostly on slow hardware, thus are hard to reproduce consistently in an automated test. This patch does not fully address the said bug but it is a step in the right direction. A full solution to the bug, as currently perceived, requires either a Qt GUI API change, a performance hit for QtWebKit, or a hack, until a full solution is provided this patch is progress. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::updateTileBuffers): Changed to take into account newly dirtied areas created during tile update initiated layouts during the same update. 2011-01-26 Patrick Gansterer Reviewed by Andreas Kling. [SKIA] Remove "current path" of GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=53124 * platform/graphics/GraphicsContext.h: * platform/graphics/skia/GraphicsContextSkia.cpp: (WebCore::GraphicsContext::clipPath): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::strokePath): * platform/graphics/skia/PathSkia.cpp: (WebCore::Path::strokeBoundingRect): * platform/graphics/skia/PlatformContextSkia.cpp: * platform/graphics/skia/PlatformContextSkia.h: 2011-01-26 Zalan Bujtas Reviewed by Andreas Kling. [Qt] Path::normalAngleAtLength() returns incorrect value on ACID3. QPainterPath returns angle values with the origo being at the top left corner, we need to account for this in normalAngleAtLength(). This Regressed with r66979. No new tests as this is already covered by ACID3. * platform/graphics/qt/PathQt.cpp: (WebCore::Path::normalAngleAtLength): 2011-01-26 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: live edit does not update source snippet. https://bugs.webkit.org/show_bug.cgi?id=53097 * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._scriptSourceChanged): 2011-01-26 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: Incorrect on-hover evaluation of a variable named 'profile'. https://bugs.webkit.org/show_bug.cgi?id=53018 * inspector/InjectedScript.cpp: (WebCore::InjectedScript::evaluate): (WebCore::InjectedScript::evaluateOnCallFrame): (WebCore::InjectedScript::getCompletions): (WebCore::InjectedScript::getCompletionsOnCallFrame): * inspector/InjectedScript.h: * inspector/InjectedScriptSource.js: (.): * inspector/Inspector.idl: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorRuntimeAgent.cpp: (WebCore::InspectorRuntimeAgent::evaluate): (WebCore::InspectorRuntimeAgent::getCompletions): * inspector/InspectorRuntimeAgent.h: * inspector/front-end/ConsoleView.js: (WebInspector.ConsoleView.prototype.completions): (WebInspector.ConsoleView.prototype.evalInInspectedWindow): (WebInspector.ConsoleView.prototype._enterKeyPressed): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame.updatingCallbackWrapper): (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame): * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype._showPopup): * inspector/front-end/WatchExpressionsSidebarPane.js: (WebInspector.WatchExpressionsSection.prototype.update): 2011-01-26 Hironori Bono Reviewed by Kent Tamura. A speculative fix for Bug 52422 - [chromium] More crash in FontFallbackList::determinePitch(const Font* font) https://bugs.webkit.org/show_bug.cgi?id=52422 My previous change may not work on non-US Windows whose system fonts have localized aliases matching to the system locale because of a font-name mismatch in createFontIndirectAndGetWinName(). This change tries all the fonts installed in a PC and returns the first font that we can create without errors. * platform/graphics/chromium/FontCacheChromiumWin.cpp: (WebCore::GetLastResortFallbackFontProcData::GetLastResortFallbackFontProcData): Added a struct used for getLastResortFallbackFontProc(). (WebCore::getLastResortFallbackFontProc): Added a callback for EnumFontFamilies(). (WebCore::FontCache::getLastResortFallbackFont): Use EnumFontFamilies() to find a last-resort font. 2011-01-26 James Robinson Reviewed by Nate Chapin. Add a DOMTimeStamp parameter to the requestAnimationFrame callback https://bugs.webkit.org/show_bug.cgi?id=53142 This adds a DOMTimeStamp parameter to the requestAnimationFrame callback to more closely match mozilla's proposal. This is useful if the page has multiple imperative animations and wants to ensure that they all remain synchronized. If each callback used Date.now() to update its animation state, they would potentially be out of sync with each other. If they use the timestamp then all callbacks for the same "frame" will update to the same state. Test: fast/animation/request-animation-frame-timestamps.html * bindings/scripts/CodeGeneratorV8.pm: * bindings/scripts/test/V8/V8TestCallback.cpp: (WebCore::V8TestCallback::callbackWithClass2Param): * dom/Document.cpp: (WebCore::Document::serviceScriptedAnimations): * dom/Document.h: * dom/RequestAnimationFrameCallback.h: * dom/RequestAnimationFrameCallback.idl: * page/FrameView.cpp: (WebCore::FrameView::serviceScriptedAnimations): * page/FrameView.h: 2011-01-25 Yuzo Fujishima Unreviewed attempt to fix compilation error for Chromium Clang. * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::advance): 2011-01-25 Ned Holbrook Reviewed by Dan Bernstein. ComplexTextController incorrectly conflates string length and range of indexes https://bugs.webkit.org/show_bug.cgi?id=52760 Test: fast/text/offsetForPosition-complex-fallback.html * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::offsetForPosition): (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): (WebCore::ComplexTextController::ComplexTextRun::setIsNonMonotonic): (WebCore::ComplexTextController::advance): * platform/graphics/mac/ComplexTextController.h: (WebCore::ComplexTextController::ComplexTextRun::create): (WebCore::ComplexTextController::ComplexTextRun::indexEnd): * platform/graphics/mac/ComplexTextControllerATSUI.cpp: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): * platform/graphics/mac/ComplexTextControllerCoreText.cpp: (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): 2011-01-25 Sam Weinig Reviewed by David Hyatt. Scrollbars don't work correctly for top-to-bottom text in an overflow: scroll area https://bugs.webkit.org/show_bug.cgi?id=53048 Test: fast/overflow/overflow-rtl-vertical-origin.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollPosition): (WebCore::RenderLayer::updateScrollInfoAfterLayout): Take the scroll origin into account when calculating scrollbars in more places. 2011-01-25 Steve Falkenburg Windows production build fix. Use correct configuration-specific path in makefile. * WebCore.vcproj/WebCore.make: 2011-01-25 Kent Tamura Reviewed by Dimitri Glazkov. Radio button group state is not restored correctly https://bugs.webkit.org/show_bug.cgi?id=50442 Fixes a bug that radio button states are not restored correctly in a case that non-first radio button in a group is checked. If "checked" attribute is present, the radio button is checked and other radio buttons in the group are unchecked. This behavior disturbs form state restoring. This patch changes this behavior so that the "checked" attribute handling is delayed after form state restoring. Test: fast/forms/state-restore-radio-group.html * html/HTMLFormControlElement.h: Make finishParsingChildren() protected so that HTMLInpuElement can call it. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::HTMLInputElement): - Add createdByParser parameter. - Initialize m_stateRestored and m_parsingInProgress. (WebCore::HTMLInputElement::create): Sync with the constructor. (WebCore::HTMLInputElement::restoreFormControlState): Set m_stateRestored in order to refer it in finishParsingChildren(). (WebCore::HTMLInputElement::parseMappedAttribute): Don't call setChecked() during parsing. Move setNeedsValidityCheck() to setChecked(). (WebCore::HTMLInputElement::finishParsingChildren): Call setChecked() if form state is not restored. (WebCore::HTMLInputElement::setChecked): Move setNeedsValidityCheck() from parseMappedAttribute() because finishParsingChildren() also needs to call setNeedsValidityCheck(). * html/HTMLInputElement.h: - Remove the default value of HTMLFormElement* of the HTMLInputElement constructor, and add createdByParser parameter. - Introduce m_parsingInProgress and m_stateRestored. * html/HTMLIsIndexElement.cpp: (WebCore::HTMLIsIndexElement::HTMLIsIndexElement): Sync with the HTMLInputElement constructor change. * html/HTMLTagNames.in: Add constructorNeedsCreatedByParser flag. * rendering/MediaControlElements.cpp: (WebCore::MediaControlInputElement::MediaControlInputElement): Sync with the HTMLInputElement constructor change. * rendering/ShadowElement.cpp: (WebCore::ShadowInputElement::ShadowInputElement): ditto. * rendering/ShadowElement.h: (WebCore::ShadowElement::ShadowElement): ditto. 2011-01-25 Kent Tamura Reviewed by Dimitri Glazkov. HTMLFormElement::checkValidity() returns incorrect result if 'invalid' events are canceled. https://bugs.webkit.org/show_bug.cgi?id=52565 * html/HTMLFormElement.cpp: (WebCore::HTMLFormElement::validateInteractively): Check checkInvalidControlsAndCollectUnhandled() result instead of checking emptiness of unhandled invalid controls list. (WebCore::HTMLFormElement::checkValidity): ditto. (WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled): Renamed from collectUnhandledInvalidControls(). Returns true if there is any invalid control regardless of event canceling. * html/HTMLFormElement.h: Rename collectUnhandledInvalidControls() to checkInvalidControlsAndCollectUnhandled(). 2011-01-25 Kent Tamura Reviewed by Dimitri Glazkov. Range and number inputs should reject increment and decrement by keyboard or mouse wheel if they are disabled or read-only https://bugs.webkit.org/show_bug.cgi?id=53151 * html/RangeInputType.cpp: (WebCore::RangeInputType::handleKeydownEvent): Check disabled() and readOnly(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): ditto. (WebCore::TextFieldInputType::handleWheelEventForSpinButton): ditto. 2011-01-25 Kent Tamura Reviewed by Dimitri Glazkov. API to support localized numbers for https://bugs.webkit.org/show_bug.cgi?id=45730 Introduce platform/text/LocalizedNumber.h, and LocalizedNumberNone.cpp, which is an empty implementation of the functions in LocalizedNumber.h. We use LocalizedNumberNone.cpp in all platforms for now. A string in a type=number field is parsed as a localized number first. If the parsing fails, it is parsed as the HTML5 number. We introduce HTMLInputElement::visibleValue(). It represents a value which should be drawn by a renderer. HTMLInputElement::value() always returns a number formatted for HTML5, and visibleValue() may return a localized number. No new tests because this doesn't change any behavior. * Android.mk: Add LocalizedNumber.h and/or LocalizedNumberNone.cpp. * CMakeLists.txt: ditto. * GNUmakefile.am: ditto. * WebCore.gypi: ditto. * WebCore.pro: ditto. * WebCore.vcproj/WebCore.vcproj: ditto. * WebCore.xcodeproj/project.pbxproj: ditto. * dom/InputElement.h: Add visibleValue(). * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::visibleValue): Added. Just call InputType::visibleValue(). * html/HTMLInputElement.h: Declare visibleValue(). * html/InputType.cpp: (WebCore::InputType::visibleValue): Add the default implementation of visibleValue(), which returns HTMLInputElement::value(). * html/InputType.h: Add declarations. * html/NumberInputType.cpp: (WebCore::isHTMLNumberCharacter): Renamed from isNumberCharacter(). (WebCore::isNumberCharacter): Calls isLocalizedNumberCharacter() and isHTMLNumberCharacter(). (WebCore::NumberInputType::visibleValue): Returns a localized number string produced by formatLocalizedNumber(). (WebCore::NumberInputType::isAcceptableValue): Calls parseLocalizedNumber(). (WebCore::NumberInputType::sanitizeValue): Calls parseLocalizedNumber(). * html/NumberInputType.h: Add declarations. * platform/text/LocalizedNumber.h: Added. * platform/text/LocalizedNumberNone.cpp: Added. (WebCore::parseLocalizedNumber): (WebCore::formatLocalizedNumber): (WebCore::isLocalizedNumberCharacter): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::updateFromElement): Calls InputElement::visibleValue() instead of value(). * wml/WMLInputElement.h: (WebCore::WMLInputElement::visibleValue): Added. It just calls value(). 2011-01-25 Alexey Proskuryakov Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=53143 Add IntRectHash * WebCore.xcodeproj/project.pbxproj: * platform/graphics/IntRectHash.h: Added. * platform/graphics/IntSizeHash.h: Don't do "using WebCore::IntSize"! 2011-01-25 Ilya Sherman Reviewed by Ryosuke Niwa. Remove trailing whitespace in HTMLInputElement.cpp https://bugs.webkit.org/show_bug.cgi?id=53152 * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::updateCheckedRadioButtons): (WebCore::HTMLInputElement::applyStep): (WebCore::HTMLInputElement::updateFocusAppearance): (WebCore::HTMLInputElement::mapToEntry): (WebCore::HTMLInputElement::setAutofilled): (WebCore::HTMLInputElement::willMoveToNewOwnerDocument): (WebCore::HTMLInputElement::didMoveToNewOwnerDocument): 2011-01-25 Mike Reed Reviewed by James Robinson. DrawingBufer::reset() today checks if the new size is the same as its m_size, and if so, returns immediately. This does not match the semantics of , which wants to clear its contents anytime the size is specified. https://bugs.webkit.org/show_bug.cgi?id=53149 Test: Covered by existing tests using gpu. * platform/graphics/chromium/DrawingBufferChromium.cpp: (WebCore::DrawingBuffer::DrawingBuffer): * platform/graphics/gpu/DrawingBuffer.cpp: (WebCore::DrawingBuffer::reset): 2011-01-25 Cris Neckar Reviewed by Adam Barth. Add a hashset of DOMURLs to ScriptExecutionContext to track back references. https://bugs.webkit.org/show_bug.cgi?id=53038 Test: fast/dom/window-domurl-crash.html * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::~ScriptExecutionContext): (WebCore::ScriptExecutionContext::createdDomUrl): (WebCore::ScriptExecutionContext::destroyedDomUrl): * dom/ScriptExecutionContext.h: (WebCore::ScriptExecutionContext::domUrls): * html/DOMURL.cpp: (WebCore::DOMURL::DOMURL): (WebCore::DOMURL::~DOMURL): (WebCore::DOMURL::contextDestroyed): * html/DOMURL.h: (WebCore::DOMURL::scriptExecutionContext): 2011-01-23 Antti Koivisto Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=52983 Eliminate m_tagHistory pointer from CSSSelector Keep the component selectors in the array in CSSSelectorList instead of maintaining a linked list between them. This allows eliminating m_tagHistory pointer, shrinking CSSSelector by 25% (selection performance seems to improve some too due to better locality). * WebCore.xcodeproj/project.pbxproj: Make CSSSelector.h a private header. * css/CSSGrammar.y: Use CSSParserSelector during parsing to keep the tag history in a linked list. This is flattened to an array after parsing. Use accessors for setting selector values. Use OwnPtr in selector vector. * css/CSSPageRule.cpp: (WebCore::CSSPageRule::CSSPageRule): * css/CSSPageRule.h: (WebCore::CSSPageRule::create): Simplify. * css/CSSParser.cpp: (WebCore::CSSParser::~CSSParser): (WebCore::CSSParser::createFloatingSelector): (WebCore::CSSParser::sinkFloatingSelector): (WebCore::CSSParser::createStyleRule): (WebCore::CSSParser::updateSpecifiersWithElementName): (WebCore::CSSParser::createPageRule): * css/CSSParser.h: (WebCore::CSSParser::reusableSelectorVector): CSSSelector -> CSSParserSelector. Use OwnPtr in selector vector. * css/CSSParserValues.cpp: (WebCore::CSSParserSelector::CSSParserSelector): (WebCore::CSSParserSelector::~CSSParserSelector): * css/CSSParserValues.h: (WebCore::CSSParserSelector::releaseSelector): (WebCore::CSSParserSelector::setTag): (WebCore::CSSParserSelector::setValue): (WebCore::CSSParserSelector::setAttribute): (WebCore::CSSParserSelector::setArgument): (WebCore::CSSParserSelector::setSimpleSelector): (WebCore::CSSParserSelector::setMatch): (WebCore::CSSParserSelector::setRelation): (WebCore::CSSParserSelector::setForPage): (WebCore::CSSParserSelector::pseudoType): (WebCore::CSSParserSelector::isUnknownPseudoElement): (WebCore::CSSParserSelector::isSimple): (WebCore::CSSParserSelector::tagHistory): (WebCore::CSSParserSelector::setTagHistory): Linked list used during parsing. Avoid recursive destruction. * css/CSSSelector.cpp: (WebCore::CSSSelector::extractPseudoType): (WebCore::CSSSelector::operator==): (WebCore::CSSSelector::selectorText): (WebCore::CSSSelector::setSimpleSelector): * css/CSSSelector.h: (WebCore::CSSSelector::CSSSelector): (WebCore::CSSSelector::~CSSSelector): (WebCore::CSSSelector::tagHistory): (WebCore::CSSSelector::tag): (WebCore::CSSSelector::value): (WebCore::CSSSelector::setTag): (WebCore::CSSSelector::isLastInTagHistory): (WebCore::CSSSelector::setNotLastInTagHistory): (WebCore::CSSSelector::RareData::RareData): (WebCore::CSSSelector::RareData::~RareData): (WebCore::CSSSelector::createRareData): (WebCore::CSSSelector::setValue): Remove m_tagHistory. Keep m_value in the union with the rare data pointer instead. Make m_value and m_tag private, implement accessors. Add a new bit to indicate end of the tag history (multipart selector). Eliminate complex destruction. Selectors are now deleted as an array or by a CSSParserSelector chain. * css/CSSSelectorList.cpp: (WebCore::CSSSelectorList::adoptSelectorVector): Flatten everything to an array. (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()): * css/CSSSelectorList.h: (WebCore::CSSSelectorList::hasOneSelector): (WebCore::CSSSelectorList::next): Skip over the subparts of multipart selectors to find the next selector. * css/CSSStyleRule.h: (WebCore::CSSStyleRule::adoptSelectorVector): CSSSelector -> CSSParserSelector. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): (WebCore::CSSRuleSet::addRule): (WebCore::collectIdsAndSiblingRulesFromList): (WebCore::CSSStyleSelector::matchPageRulesForList): * dom/Node.cpp: (WebCore::Node::querySelector): * dom/SelectorNodeList.cpp: (WebCore::createSelectorNodeList): Use accessors. 2011-01-25 James Simonsen Reviewed by Tony Chang. [Chromium] Support small caps in complex text on linux https://bugs.webkit.org/show_bug.cgi?id=53051 * platform/graphics/chromium/ComplexTextControllerLinux.cpp: (WebCore::ComplexTextController::nextScriptRun): Break runs at small caps boundaries. (WebCore::ComplexTextController::setupFontForScriptRun): Setup small caps font data if needed. * platform/graphics/chromium/ComplexTextControllerLinux.h: Store small caps text in separate string. 2011-01-25 Steve Falkenburg Rubber-stamped by Adam Roben. Windows production build fix. Use correct environment variable escaping * WebCore.vcproj/WebCore.make: 2011-01-25 Adam Barth Reviewed by Eric Seidel. Empty URLs are never display isolated https://bugs.webkit.org/show_bug.cgi?id=53053 This check mirrors the check in the local case. There isn't a good way to test this with a LayoutTest, but it is tested in Chromium (where this registry is used). * platform/SchemeRegistry.cpp: (WebCore::SchemeRegistry::shouldTreatURLSchemeAsDisplayIsolated): 2011-01-25 Sam Weinig Reviewed by Anders Carlsson. Pipe a timestamp down into the PlatformWheelEvent for the Mac. https://bugs.webkit.org/show_bug.cgi?id=53111 * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (WebCore::PlatformWheelEvent::timestamp): Add timestamp member. * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): Initialize the timestamp from the event. 2011-01-25 Sheriff Bot Unreviewed, rolling out r76625. http://trac.webkit.org/changeset/76625 https://bugs.webkit.org/show_bug.cgi?id=53119 "incorrect pixel test results" (Requested by rniwa on #webkit). * rendering/RenderBox.cpp: (WebCore::RenderBox::localCaretRect): 2011-01-25 Patrick Gansterer Unreviewed WinCE build fix for r76614. * platform/FileSystem.h: 2011-01-21 Levi Weintraub Reviewed by Darin Adler. Adding border and padding to the calculation of the local caret rect for RenderBoxes. Undo moves caret to invalid position https://bugs.webkit.org/show_bug.cgi?id=49744 Tests: editing/selection/caret-painting-after-paste-undo-rtl.html editing/selection/caret-painting-after-paste-undo.html * rendering/RenderBox.cpp: (WebCore::RenderBox::localCaretRect): 2011-01-25 Sam Weinig Reviewed by Anders Carlsson. Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac. https://bugs.webkit.org/show_bug.cgi?id=53107 * platform/PlatformWheelEvent.h: (WebCore::PlatformWheelEvent::PlatformWheelEvent): (WebCore::PlatformWheelEvent::hasPreciseScrollingDeltas): * platform/mac/WheelEventMac.mm: (WebCore::PlatformWheelEvent::PlatformWheelEvent): 2011-01-20 Jer Noble Reviewed by Eric Carlson. REGRESSION (r72119): Audio never plays on Star Wars intro animation https://bugs.webkit.org/show_bug.cgi?id=52467 QuickTime's eat/m4a movie importer compontent doesn't list audio/m4a as a mime type which it supports, though it handles .m4a files just fine. Change the way we build the list of supported MIME Types through a new WebKitSystemInterface function. Caused by r72119, which adds system-specific extension->MIME entries to the cache before global entries, and the system-specific entries include QuickTime's registry entries which contain the audio/m4a MIME type, while its components do not. Test: media/audio-mpeg4-supported.html * WebCore.vcproj/QTMovieWinCommon.vsprops: * platform/graphics/win/QTMovie.cpp: (getMIMETypeCallBack): (initializeSupportedTypes): (QTMovie::countSupportedTypes): gSupportedTypes is now a CFArrayRef. (QTMovie::getSupportedType): Ditto. 2011-01-25 Hans Wennborg Reviewed by Jeremy Orlow. IndexedDB: Remove PlatformBridge::idbShutdown() https://bugs.webkit.org/show_bug.cgi?id=53077 Since Chromium r72157, this is not used anymore. The previous use was to signal to the embedder that IndexedDB was shutting down, but we agreed it is better if the embedder keeps track of that itself. No new tests: this does not change any functionality. * platform/chromium/PlatformBridge.h: * storage/IDBFactoryBackendInterface.cpp: * storage/IDBFactoryBackendInterface.h: (WebCore::IDBFactoryBackendInterface::~IDBFactoryBackendInterface): * storage/chromium/IDBFactoryBackendInterface.cpp: 2011-01-25 Darin Adler Reviewed by Anders Carlsson. WebKit is using CSBackupSetItemExcluded incorrectly https://bugs.webkit.org/show_bug.cgi?id=53095 rdar://problem/8790540 * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::performOpenInitialization): Added code to exclude the database from backup one time, and record inside the database that this has been done. (WebCore::IconDatabase::wasExcludedFromBackup): Added. (WebCore::IconDatabase::setWasExcludedFromBackup): Added. * loader/icon/IconDatabase.h: Added new functions above. * platform/FileSystem.cpp: (WebCore::canExcludeFromBackup): Added. (WebCore::excludeFromBackup): Added. * platform/FileSystem.h: Added canExcludeFromBackup, excludeFromBackup, and pathAsURL functions. Cleaned up ifdefs and comments a bit and sorted things alphabetically, particularly platform-specific sections. * platform/cf/FileSystemCF.cpp: (WebCore::pathAsURL): Added. * platform/mac/FileSystemMac.mm: (WebCore::canExcludeFromBackup): Added. (WebCore::excludeFromBackup): Added. * platform/network/cf/FormDataStreamCFNet.cpp: (WebCore::advanceCurrentStream): Changed to call pathAsURL. * platform/network/mac/FormDataStreamMac.mm: (WebCore::advanceCurrentStream): Ditto. 2011-01-25 Helder Correia Reviewed by Dirk Schulze. REGRESSION(75139): SVG gradients are not applied to texts https://bugs.webkit.org/show_bug.cgi?id=52531 CGContextConcatCTM should use the CGLayer context, not the GraphicsContext. Also, the CTM needs to be adjusted (translated). This fixes SVG text gradient fill. Test: svg/css/composite-shadow-text.svg * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::fillRect): 2011-01-25 Benjamin Kalman Reviewed by Ryosuke Niwa. Cannot extend or modify forward by word over a non-contenteditable region https://bugs.webkit.org/show_bug.cgi?id=53070 Test: editing/selection/extend-forward-by-word-over-non-editable.html Change all instances of honorEditableBoundaryAtOrAfter to honorEditableBoundaryAtOrBefore and vice versa in the functions which determine the end/start of words/lines/sentences in visible_units.cpp. This fixes the bug where moving forwards by a word over a non-contenteditable region would place the cursor inside that region, and then get moved back to the start of the word due to honorEditableBoundaryAtOrBefore. The cursor is now moved to the end of the region (which is effectively a noop in this case). * editing/visible_units.cpp: Change all instances of honorEditableBoundaryAtOrAfter to honorEditableBoundaryAtOrBefore and vice versa. (WebCore::previousWordPosition): (WebCore::nextWordPosition): (WebCore::startOfLine): (WebCore::endOfLine): (WebCore::previousSentencePosition): (WebCore::nextSentencePosition): (WebCore::logicalStartOfLine): (WebCore::logicalEndOfLine): 2011-01-25 Yael Aharon Unreviewed build fix. After r76466, efsrv.lib is used unconditionally. Don't guard it with ENABLE_NETSCAPE_PLUGIN_API. * WebCore.pro: 2011-01-24 Zhenyao Mo Reviewed by Kenneth Russell. Style cleanup for WebGLRenderingContext https://bugs.webkit.org/show_bug.cgi?id=52352 * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.h: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): (WebCore::WebGLRenderingContext::blendFunc): (WebCore::WebGLRenderingContext::createShader): (WebCore::WebGLRenderingContext::deleteBuffer): (WebCore::WebGLRenderingContext::deleteShader): (WebCore::WebGLRenderingContext::deleteTexture): (WebCore::WebGLRenderingContext::disableVertexAttribArray): (WebCore::WebGLRenderingContext::validateIndexArrayPrecise): (WebCore::WebGLRenderingContext::validateRenderingState): (WebCore::WebGLRenderingContext::enableVertexAttribArray): (WebCore::WebGLRenderingContext::getUniform): (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLUniformLocation.cpp: * html/canvas/WebGLUniformLocation.h: 2011-01-24 Chris Marrin Reviewed by Eric Seidel. Change ENABLE_3D_CANVAS to ENABLE_WEBGL https://bugs.webkit.org/show_bug.cgi?id=53041 * Configurations/FeatureDefines.xcconfig: * DerivedSources.cpp: * GNUmakefile.am: * WebCore.pro: * bindings/generic/RuntimeEnabledFeatures.h: * bindings/js/JSArrayBufferCustom.cpp: * bindings/js/JSCanvasRenderingContextCustom.cpp: (WebCore::toJS): * bindings/js/JSDOMWindowCustom.cpp: * bindings/js/JSDataViewCustom.cpp: * bindings/js/JSDocumentCustom.cpp: * bindings/js/JSFloat32ArrayCustom.cpp: * bindings/js/JSHTMLCanvasElementCustom.cpp: (WebCore::JSHTMLCanvasElement::getContext): * bindings/js/JSInt16ArrayCustom.cpp: * bindings/js/JSInt32ArrayCustom.cpp: * bindings/js/JSInt8ArrayCustom.cpp: * bindings/js/JSUint16ArrayCustom.cpp: * bindings/js/JSUint32ArrayCustom.cpp: * bindings/js/JSUint8ArrayCustom.cpp: * bindings/js/JSWebGLRenderingContextCustom.cpp: * bindings/js/JSXMLHttpRequestCustom.cpp: (WebCore::JSXMLHttpRequest::markChildren): (WebCore::JSXMLHttpRequest::send): (WebCore::JSXMLHttpRequest::response): * bindings/v8/custom/V8ArrayBufferCustom.cpp: * bindings/v8/custom/V8ArrayBufferViewCustom.h: * bindings/v8/custom/V8DataViewCustom.cpp: * bindings/v8/custom/V8DocumentCustom.cpp: (WebCore::V8Document::getCSSCanvasContextCallback): * bindings/v8/custom/V8Float32ArrayCustom.cpp: * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp: (WebCore::V8HTMLCanvasElement::getContextCallback): * bindings/v8/custom/V8Int16ArrayCustom.cpp: * bindings/v8/custom/V8Int32ArrayCustom.cpp: * bindings/v8/custom/V8Int8ArrayCustom.cpp: * bindings/v8/custom/V8Uint16ArrayCustom.cpp: * bindings/v8/custom/V8Uint32ArrayCustom.cpp: * bindings/v8/custom/V8Uint8ArrayCustom.cpp: * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: * bindings/v8/custom/V8XMLHttpRequestCustom.cpp: (WebCore::V8XMLHttpRequest::responseAccessorGetter): (WebCore::V8XMLHttpRequest::sendCallback): * features.pri: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::getContext): (WebCore::HTMLCanvasElement::reset): * html/HTMLCanvasElement.h: * html/canvas/ArrayBuffer.cpp: * html/canvas/ArrayBuffer.idl: * html/canvas/ArrayBufferView.cpp: * html/canvas/ArrayBufferView.idl: * html/canvas/DataView.cpp: * html/canvas/DataView.idl: * html/canvas/Float32Array.cpp: * html/canvas/Float32Array.idl: * html/canvas/Int16Array.cpp: * html/canvas/Int16Array.idl: * html/canvas/Int32Array.cpp: * html/canvas/Int32Array.idl: * html/canvas/Int8Array.cpp: * html/canvas/Int8Array.idl: * html/canvas/OESStandardDerivatives.cpp: * html/canvas/OESStandardDerivatives.idl: * html/canvas/OESTextureFloat.cpp: * html/canvas/OESTextureFloat.idl: * html/canvas/Uint16Array.cpp: * html/canvas/Uint16Array.idl: * html/canvas/Uint32Array.cpp: * html/canvas/Uint32Array.idl: * html/canvas/Uint8Array.cpp: * html/canvas/Uint8Array.idl: * html/canvas/WebGLActiveInfo.idl: * html/canvas/WebGLBuffer.cpp: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextAttributes.cpp: * html/canvas/WebGLContextAttributes.idl: * html/canvas/WebGLContextEvent.idl: * html/canvas/WebGLExtension.cpp: * html/canvas/WebGLFramebuffer.cpp: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLGetInfo.cpp: * html/canvas/WebGLObject.cpp: * html/canvas/WebGLProgram.cpp: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLRenderbuffer.cpp: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLRenderingContext.cpp: * html/canvas/WebGLRenderingContext.idl: * html/canvas/WebGLShader.cpp: * html/canvas/WebGLShader.idl: * html/canvas/WebGLTexture.cpp: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLUniformLocation.cpp: * html/canvas/WebGLUniformLocation.idl: * html/canvas/WebKitLoseContext.cpp: * html/canvas/WebKitLoseContext.idl: * page/DOMWindow.idl: * platform/graphics/ANGLEWebKitBridge.cpp: * platform/graphics/GraphicsContext3D.cpp: * platform/graphics/cg/GraphicsContext3DCG.cpp: * platform/graphics/gpu/DrawingBuffer.cpp: * platform/graphics/gpu/mac/DrawingBufferMac.mm: * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/mac/WebGLLayer.mm: * platform/graphics/opengl/Extensions3DOpenGL.cpp: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/qt/Extensions3DQt.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: * platform/graphics/qt/GraphicsLayerQt.cpp: (WebCore::GraphicsLayerQtImpl::GraphicsLayerQtImpl): (WebCore::GraphicsLayerQtImpl::paint): (WebCore::GraphicsLayerQtImpl::flushChanges): * platform/graphics/qt/GraphicsLayerQt.h: * platform/graphics/skia/GraphicsContext3DSkia.cpp: * platform/graphics/texmap/GraphicsLayerTextureMapper.h: * rendering/RenderLayerBacking.cpp: (WebCore::isAcceleratedCanvas): (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): (WebCore::RenderLayerBacking::containsPaintedContent): (WebCore::RenderLayerBacking::contentChanged): * webaudio/AudioBuffer.cpp: * webaudio/AudioBuffer.idl: * webaudio/RealtimeAnalyser.cpp: * webaudio/RealtimeAnalyser.h: * webaudio/RealtimeAnalyserNode.h: * webaudio/RealtimeAnalyserNode.idl: * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::setResponseType): (WebCore::XMLHttpRequest::clearResponse): (WebCore::XMLHttpRequest::didReceiveData): * xml/XMLHttpRequest.h: 2011-01-25 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Prepare for landing of detailed heap snapshots. - Introduce Preferences.detailedHeapProfiles flag for controlling querying of detailed heap snapshots. - Add boilerplate code for the new view. - Factor out common code. https://bugs.webkit.org/show_bug.cgi?id=52624 * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * bindings/js/ScriptProfiler.h: (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl): (WebCore::ScriptProfiler::takeHeapSnapshot): * bindings/v8/ScriptProfiler.cpp: (WebCore::ScriptProfiler::takeHeapSnapshot): * bindings/v8/ScriptProfiler.h: (WebCore::ScriptProfiler::HeapSnapshotControl::~HeapSnapshotControl): * inspector/Inspector.idl: * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::takeHeapSnapshot): * inspector/InspectorProfilerAgent.h: * inspector/front-end/DetailedHeapshotView.js: Added. (WebInspector.DetailedHeapshotView): (WebInspector.DetailedHeapshotView.prototype.get statusBarItems): (WebInspector.DetailedHeapshotView.prototype.get profile): (WebInspector.DetailedHeapshotView.prototype.set profile): (WebInspector.DetailedHeapshotView.prototype.show): (WebInspector.DetailedHeapshotView.prototype.hide): (WebInspector.DetailedHeapshotProfileType): (WebInspector.DetailedHeapshotProfileType.prototype.get buttonTooltip): (WebInspector.DetailedHeapshotProfileType.prototype.get buttonStyle): (WebInspector.DetailedHeapshotProfileType.prototype.buttonClicked): (WebInspector.DetailedHeapshotProfileType.prototype.get welcomeMessage): (WebInspector.DetailedHeapshotProfileType.prototype.createSidebarTreeElementForProfile): (WebInspector.DetailedHeapshotProfileType.prototype.createView): * inspector/front-end/HeapSnapshot.js: Added. (WebInspector.HeapSnapshotEdgesIterator): (WebInspector.HeapSnapshotEdgesIterator.prototype.get done): (WebInspector.HeapSnapshotEdgesIterator.prototype.get isElement): (WebInspector.HeapSnapshotEdgesIterator.prototype.get isHidden): (WebInspector.HeapSnapshotEdgesIterator.prototype.get name): (WebInspector.HeapSnapshotEdgesIterator.prototype.next): (WebInspector.HeapSnapshotEdgesIterator.prototype.get node): (WebInspector.HeapSnapshotEdgesIterator.prototype.get nodeIndex): (WebInspector.HeapSnapshotEdgesIterator.prototype._getNameOrIndex): (WebInspector.HeapSnapshotEdgesIterator.prototype._getType): (WebInspector.HeapSnapshotNodeWrapper): (WebInspector.HeapSnapshotNodeWrapper.prototype.get edges): (WebInspector.HeapSnapshotNodeWrapper.prototype.get edgesCount): (WebInspector.HeapSnapshotNodeWrapper.prototype.get instancesCount): (WebInspector.HeapSnapshotNodeWrapper.prototype.get isHidden): (WebInspector.HeapSnapshotNodeWrapper.prototype.get name): (WebInspector.HeapSnapshotNodeWrapper.prototype.get selfSize): (WebInspector.HeapSnapshotNodeWrapper.prototype._getName): (WebInspector.HeapSnapshotNodeWrapper.prototype._getEdges): (WebInspector.HeapSnapshotNodeWrapper.prototype._getType): (WebInspector.HeapSnapshot): (WebInspector.HeapSnapshot.prototype._init): (WebInspector.HeapSnapshot.prototype.get rootEdges): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked): * inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel.prototype._setRecordingProfile): (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress): (WebInspector.ProfilerDispatcher.prototype.setRecordingProfile): (WebInspector.ProfilerDispatcher.prototype.reportHeapSnapshotProgress): * inspector/front-end/Settings.js: * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: * inspector/front-end/inspector.js: (WebInspector._createPanels): 2011-01-25 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: remove "attached" state related methods from InspectorAgent https://bugs.webkit.org/show_bug.cgi?id=53086 * WebCore.exp.in: * inspector/InspectorAgent.cpp: * inspector/InspectorAgent.h: * inspector/InspectorFrontendClientLocal.cpp: (WebCore::InspectorFrontendClientLocal::changeAttachedWindowHeight): (WebCore::InspectorFrontendClientLocal::restoreAttachedWindowHeight): * inspector/InspectorSettings.cpp: (WebCore::InspectorSettings::InspectorSettings): * inspector/InspectorSettings.h: 2011-01-25 Qi Zhang Reviewed by Laszlo Gombos. [Symbian] RVCT fails to compile [U|I]nt[8|16|32]Array.h https://bugs.webkit.org/show_bug.cgi?id=51873 Replace the using declaration, because it doesn't compile on RVCT, and WINSCW has the same issue. No new functionality so no new tests. * html/canvas/Int32Array.h: (WebCore::Int32Array::set): * html/canvas/Int8Array.h: (WebCore::Int8Array::set): * html/canvas/Uint16Array.h: (WebCore::Uint16Array::set): * html/canvas/Uint32Array.h: (WebCore::Uint32Array::set): * html/canvas/Uint8Array.h: (WebCore::Uint8Array::set): 2011-01-25 Zoltan Herczeg Reviewed by Dirk Schulze. Repaint SVG elements with filter instead of relayout where possible https://bugs.webkit.org/show_bug.cgi?id=52200 This patch allows repainting of filters, when their attribute changes does not require relayout. Existing dynamic-update tests cover this feature. * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::clearResult): Clearing the currently stored image before repainting. * platform/graphics/filters/FilterEffect.h: * rendering/RenderObject.h: (WebCore::RenderObject::isSVGResourceFilter): Not only the filter primitives, but filters should also be detected to allow safe testing and casting. * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::buildPrimitives): Passing the renderer. (WebCore::RenderSVGResourceFilter::applyResource): determineFilterPrimitiveSubregion does not require the filter anymore. (WebCore::RenderSVGResourceFilter::postApplyResource): Repaint if lastEffect->hasResult() is false. (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): Searching for all FilterEffects, whose created by the current FilterElement, and clearing all resulting images depending on those FilterEffects. * rendering/svg/RenderSVGResourceFilter.h: (WebCore::RenderSVGResourceFilter::isSVGResourceFilter): * rendering/svg/RenderSVGResourceFilterPrimitive.cpp: (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): The filter argument is unnecessary anymore. But is is still kept as a static member, since the primitive renderer still does not know about the FilterEffect objects. * rendering/svg/RenderSVGResourceFilterPrimitive.h: (WebCore::RenderSVGResourceFilterPrimitive::RenderSVGResourceFilterPrimitive): (WebCore::RenderSVGResourceFilterPrimitive::primitiveAttributeChanged): Calls RenderSVGResourceFilter::primitiveAttributeChanged. * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute): Setting the new attribute value for each FilterEffect. (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): * svg/SVGFEDiffuseLightingElement.h: Calling primitiveAttributeChanged. * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute): This function will be removed when all FilterElement implements their setFilterEffectAttribute * svg/SVGFilterPrimitiveStandardAttributes.h: (WebCore::SVGFilterPrimitiveStandardAttributes::primitiveAttributeChanged): * svg/graphics/filters/SVGFilterBuilder.cpp: (WebCore::SVGFilterBuilder::appendEffectToEffectReferences): The renderers are assigned to the filter effects. (WebCore::SVGFilterBuilder::clearEffects): (WebCore::SVGFilterBuilder::clearResultsRecursive): Recursively clearing the result images for those filters, whose depend on the starting filter. * svg/graphics/filters/SVGFilterBuilder.h: (WebCore::SVGFilterBuilder::effectReferences): 'get' is unnecessary (WebCore::SVGFilterBuilder::effectByRenderer): returns the FilterEffect belongs to this RenderObject. 2011-01-25 Dirk Schulze Reviewed by Nikolas Zimmermann. SVG is missing to-animation support for Path https://bugs.webkit.org/show_bug.cgi?id=52982 SVG was missing 'to' animation support for SVG paths. Even the fallback to discrete animation did not work and an assert was thrown, because of the missing m_fromPath. This also influences a test of the W3C test suite. Subtest 2 of animate-elem-83-t.svg passes now. Test: svg/animations/animate-path-to-animation.html * svg/SVGAnimateElement.cpp: (WebCore::SVGAnimateElement::calculateAnimatedValue): Take the value of the last SVGAnimateElement for m_fromPath, since 'to' animations are accumulative. (WebCore::SVGAnimateElement::calculateFromAndToValues): Added support for 'to' animations. (WebCore::SVGAnimateElement::resetToBaseValue): Set m_animatedPath on the first animation element to baseVal. * svg/SVGPathByteStream.h: (WebCore::SVGPathByteStream::copySVGPathByteStream): Return copy of current byte stream. 2011-01-25 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: bind resources to URLs upon adding them into the tree. https://bugs.webkit.org/show_bug.cgi?id=53013 * inspector/front-end/AuditRules.js: (WebInspector.AuditRules.UnusedCssRule.prototype.doRun.evalCallback.selectorsCallback): * inspector/front-end/CSSStyleModel.js: (WebInspector.CSSStyleModel.prototype._styleSheetChanged.callback): (WebInspector.CSSStyleModel.prototype._styleSheetChanged): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype._parsedScriptSource): * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager.prototype._processCachedResources): (WebInspector.NetworkManager.prototype.inflightResourceForURL): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype.willSendRequest): (WebInspector.NetworkDispatcher.prototype.markResourceAsCached): (WebInspector.NetworkDispatcher.prototype.didReceiveResponse): (WebInspector.NetworkDispatcher.prototype.didReceiveContentLength): (WebInspector.NetworkDispatcher.prototype.didFinishLoading): (WebInspector.NetworkDispatcher.prototype.didFailLoading): (WebInspector.NetworkDispatcher.prototype.willSendWebSocketHandshakeRequest): (WebInspector.NetworkDispatcher.prototype.didReceiveWebSocketHandshakeResponse): (WebInspector.NetworkDispatcher.prototype.didCloseWebSocket): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._startResource): (WebInspector.NetworkDispatcher.prototype._finishResource): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel.prototype.addResourceToFrame): (WebInspector.ResourceTreeModel.prototype._bindResourceURL): (WebInspector.ResourceTreeModel.prototype._clearResources): (WebInspector.ResourceTreeModel.prototype._unbindResourceURL): * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.canShowSourceLine): (WebInspector.ResourcesPanel.prototype.showSourceLine): * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._parsedScriptSource): (WebInspector.ScriptsPanel.prototype._addScript): 2011-01-25 Nikolas Zimmermann Reviewed by Dirk Schulze. Introduce FontMetrics abstraction https://bugs.webkit.org/show_bug.cgi?id=51456 Use accurate floating-point metrics for SVG Font calculations instead of casting float -> integer. This hopefully fixes differences between 32/64 bit bots. Needs new layout test results for several platforms, which need to be taken from the bots landing afterwards. * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): (WebCore::SimpleFontData::initCharWidths): 2011-01-24 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: debugger and browser debugger agents should manage sticky breakpoints independently. https://bugs.webkit.org/show_bug.cgi?id=52999 * inspector/Inspector.idl: * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::enableDebugger): (WebCore::InspectorAgent::inspectedURLWithoutFragment): * inspector/InspectorAgent.h: * inspector/InspectorBrowserDebuggerAgent.cpp: (WebCore::InspectorBrowserDebuggerAgent::setAllBrowserBreakpoints): (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged): (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint): * inspector/InspectorBrowserDebuggerAgent.h: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::setAllJavaScriptBreakpoints): (WebCore::InspectorDebuggerAgent::inspectedURLChanged): (WebCore::InspectorDebuggerAgent::restoreBreakpoints): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorState.cpp: (WebCore::InspectorState::InspectorState): * inspector/InspectorState.h: * inspector/front-end/BreakpointManager.js: (WebInspector.BreakpointManager): (WebInspector.BreakpointManager.prototype._projectChanged): (WebInspector.BreakpointManager.prototype._saveBreakpoints): (WebInspector.BreakpointManager.prototype._pushBreakpointsToBackend): 2011-01-25 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Crash in some pages containing flash https://bugs.webkit.org/show_bug.cgi?id=53016 Flash plugin can produce X errors that are handled by the GDK X error handler, which exits the process. Since we don't want to crash due to flash bugs, we install a custom error handler to show a warning when a X error happens without aborting. * plugins/gtk/PluginPackageGtk.cpp: (WebCore::webkitgtkXError): (WebCore::PluginPackage::load): 2011-01-25 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Implement spin buttons in RenderThemeGtk https://bugs.webkit.org/show_bug.cgi?id=51454 Paint inner up/down buttons for spin button elements when building with GTK+ 3.x. Test results will land with the GTK+ 2.x version of this patch. * platform/gtk/RenderThemeGtk.h: * platform/gtk/RenderThemeGtk2.cpp: (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle): (WebCore::RenderThemeGtk::paintInnerSpinButton): * platform/gtk/RenderThemeGtk3.cpp: (WebCore::spinButtonArrowSize): (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle): (WebCore::paintSpinArrowButton): (WebCore::RenderThemeGtk::paintInnerSpinButton): 2011-01-24 Mihai Parparita Unreviewed. Missed move of one m_deleted use to be outside NDEBUG block in r76575. * loader/cache/CachedResource.cpp: (WebCore::CachedResource::~CachedResource): 2011-01-24 Mihai Parparita Reviewed by Tony Chang. Add runtime checks for invariants in memory cache https://bugs.webkit.org/show_bug.cgi?id=53059 To help track down bug 53045, add some CRASH calls in addition to ASSERTs, so that we can track down failures in reliability bots. Just some checks, no new tests necessary. * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage): * loader/cache/CachedResource.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::~CachedResource): 2011-01-24 Simon Fraser Reviewed by Dan Bernstein. Leaking CSSRuleDataList objects https://bugs.webkit.org/show_bug.cgi?id=53062 Fix leaked CSSRuleDataLists added to the m_pseudoRules hash. * css/CSSStyleSelector.cpp: (WebCore::CSSRuleSet::~CSSRuleSet): 2011-01-24 Simon Fraser Reviewed by Eric Seidel. Refcount Images used in rendering code https://bugs.webkit.org/show_bug.cgi?id=52701 Change StyleImage::image(RenderObject*, const IntSize&) and CSSImageGeneratorValue::image(RenderObject*, const IntSize&) to return PassRefPtr, and adjust other code accordingly. This allows us to return one-time images, for example for CSS gradients whose appearance may change depending on factors other than the renderer and the destination size. * css/CSSCanvasValue.cpp: (WebCore::CSSCanvasValue::image): * css/CSSCanvasValue.h: * css/CSSGradientValue.cpp: (WebCore::CSSGradientValue::image): * css/CSSGradientValue.h: * css/CSSImageGeneratorValue.h: * rendering/RenderBoxModelObject.cpp: (WebCore::RenderBoxModelObject::paintFillLayerExtended): (WebCore::RenderBoxModelObject::paintNinePieceImage): * rendering/RenderImage.cpp: (WebCore::RenderImage::paintReplaced): (WebCore::RenderImage::paintIntoRect): * rendering/RenderImageResource.h: (WebCore::RenderImageResource::image): * rendering/RenderImageResourceStyleImage.h: (WebCore::RenderImageResourceStyleImage::image): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/style/StyleCachedImage.cpp: (WebCore::StyleCachedImage::image): * rendering/style/StyleCachedImage.h: * rendering/style/StyleGeneratedImage.cpp: (WebCore::StyleGeneratedImage::image): * rendering/style/StyleGeneratedImage.h: * rendering/style/StyleImage.h: * rendering/style/StylePendingImage.h: (WebCore::StylePendingImage::image): * rendering/svg/RenderSVGImage.cpp: (WebCore::RenderSVGImage::paint): 2011-01-24 Tony Chang Unreviewed, round ascent and descent to match old code. * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): 2011-01-24 Simon Fraser Reviewed by Chris Marrin. perspective() transform function should take lengths https://bugs.webkit.org/show_bug.cgi?id=52683 The argument to the perspective() transform function should be a Length, rather than a bare number. Bare numbers are still accepted (and treated as px), but this behavior is deprecated. Test: animations/3d/transform-perspective.html transforms/3d/general/3dtransform-values.html * css/CSSParser.cpp: (WebCore::CSSParser::parseTransform): Check the units for the perspective() function. Allow bare numbers for backwards compatibility. * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::createTransformOperations): Convert value to Length. * platform/graphics/transforms/PerspectiveTransformOperation.cpp: (WebCore::clampToPostiveInteger): Helper. (WebCore::PerspectiveTransformOperation::blend): Blend via Lengths. * platform/graphics/transforms/PerspectiveTransformOperation.h: (WebCore::PerspectiveTransformOperation::create): double -> Length. (WebCore::PerspectiveTransformOperation::perspective): Ditto. (WebCore::PerspectiveTransformOperation::isIdentity): Ditto. (WebCore::PerspectiveTransformOperation::apply): Ditto. (WebCore::PerspectiveTransformOperation::PerspectiveTransformOperation): Assert that the Length is a fixed type. 2011-01-24 Kent Tamura Reviewed by Dimitri Glazkov. [Windows] Textfield s have different widths. https://bugs.webkit.org/show_bug.cgi?id=48405 - Apply the padding override for type=text to other textfield types too. - Reset margin value of outer spin button, which is not used in Windows. - Don't add inner spin button width to the preferred text field width. Text fields should have the identical widths regardless of the existence of spin buttons. Test: fast/forms/input-widths.html * css/themeWin.css: (input[type="week"]): (input[type="week"]:disabled): (input[type="search"]::-webkit-search-cancel-button): (input::-webkit-outer-spin-button): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::preferredContentWidth): Don't add inner spin button width to the preferred width. 2011-01-24 Kent Tamura Reviewed by Dimitri Glazkov. Some bugs of search cancel button and spin button about state change in an event handler. https://bugs.webkit.org/show_bug.cgi?id=46950 Fix the following problems: * Type=search field didn't release event capturing * Assertion failure when an input field with spin buttons was changed to another type on focus event. * A input field with spin button didn't release event capturing when it was changed to another type on focus event. Tests: fast/forms/input-number-change-type-on-focus.html fast/forms/search-hide-cancel-on-cancel.html * rendering/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): - Make the variable 'input' RefPtr. It makes the code simpler. - Remove visibility check on mouseup event. We should release capturing anyway because the cancel button may be invisible if JavaScript code called by the focus event removes the input value. (WebCore::SpinButtonElement::detach): - Release capturing on detach because it is possible that a spin button node is detached while it is capturing events. (WebCore::SpinButtonElement::defaultEventHandler): Take a reference to this and check renderer() after some functions which may run JavaScript code. (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Make the variable 'input' RefPtr to align other functions in this file. (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto. * rendering/TextControlInnerElements.h: Declare SpinButtonElement::detach(). 2011-01-24 Ryosuke Niwa Reviewed by Ojan Vafai. Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace. https://bugs.webkit.org/show_bug.cgi?id=52781 The bug was caused by stringWithRebalancedWhitespace's replacing the space at the beginning of a paragraph and the end of a paragraph by a non-breaking space after it replaced two consecutive spaces by a space and non-breaking space pattern, thereby replacing more spaces by non-breaking spaces than needed. Rewrote the function using Vector to fix the bug. New function no longer calls String::replace multiple times but instead it traverses through the string and replaces a space that immediately follows another space or appears at the beginning of a paragraph or at the end of a paragraph by a non-break space. * editing/CompositeEditCommand.cpp: * editing/htmlediting.cpp: (WebCore::stringWithRebalancedWhitespace): Written. * editing/htmlediting.h: (WebCore::isWhitespace): Removed from CompositeEditCommand.cpp 2011-01-24 Kenneth Russell Reviewed by James Robinson. Web Audio API: port FFTFrame to FFTW https://bugs.webkit.org/show_bug.cgi?id=52989 Ported FFTFrame class to the open-source FFTW library. Tested with unit tests from Chris Rogers. Made preliminary changes to GYP files for conditional compilation of these files; will need to be adjusted once FFTW is integrated as third-party source. * WebCore.gyp/WebCore.gyp: * WebCore.gypi: * platform/audio/FFTFrame.h: * platform/audio/fftw: Added. * platform/audio/fftw/FFTFrameFFTW.cpp: Added. (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::multiply): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): (WebCore::FFTFrame::cleanup): (WebCore::FFTFrame::realData): (WebCore::FFTFrame::imagData): (WebCore::FFTFrame::fftwPlanForSize): 2011-01-24 Anders Carlsson Reviewed by Dan Bernstein. Reset the page scale factor on standard frame loads https://bugs.webkit.org/show_bug.cgi?id=53058 Add a symbol needed by WebKit2. * WebCore.exp.in: 2011-01-24 Ryosuke Niwa Reviewed by Eric Seidel. Stop instantiating legacy editing positions in InsertTextCommand, MoveSelectionCommand, ReplaceSelectionCommand, SelectionController, SpellChecker, TypingCommand, and markup.cpp https://bugs.webkit.org/show_bug.cgi?id=52676 Stop instantiating legacy editing positions in the following files. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::prepareForTextInsertion): (WebCore::InsertTextCommand::performTrivialReplace): (WebCore::InsertTextCommand::input): (WebCore::InsertTextCommand::insertTab): * editing/MoveSelectionCommand.cpp: (WebCore::MoveSelectionCommand::doApply): * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): (WebCore::ReplaceSelectionCommand::mergeEndIfNeeded): (WebCore::ReplaceSelectionCommand::doApply): (WebCore::ReplaceSelectionCommand::shouldRemoveEndBR): (WebCore::ReplaceSelectionCommand::performTrivialReplace): * editing/SelectionController.cpp: (WebCore::SelectionController::setSelectionFromNone): * editing/SpellChecker.cpp: (WebCore::SpellChecker::didCheck): * editing/TypingCommand.cpp: (WebCore::TypingCommand::makeEditableRootEmpty): (WebCore::TypingCommand::deleteKeyPressed): (WebCore::TypingCommand::forwardDeleteKeyPressed): * editing/markup.cpp: (WebCore::StyledMarkupAccumulator::appendText): (WebCore::StyledMarkupAccumulator::serializeNodes): (WebCore::highestAncestorToWrapMarkup): (WebCore::createMarkup): 2011-01-24 Peter Kasting Reviewed by Darin Adler. Roll back r67261 ("Don't fire onclick on middle clicks") due to regressions. https://bugs.webkit.org/show_bug.cgi?id=46733 * html/HTMLAnchorElement.cpp: (WebCore::isLinkClick): * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::preDispatchEventHandler): (WebCore::HTMLInputElement::postDispatchEventHandler): (WebCore::HTMLInputElement::defaultEventHandler): * page/EventHandler.cpp: (WebCore::EventHandler::handleMouseDoubleClickEvent): (WebCore::EventHandler::handleMouseReleaseEvent): 2011-01-24 Martin Robinson Reviewed by Eric Seidel. [GTK] Many DOM XHTML tests time out https://bugs.webkit.org/show_bug.cgi?id=52553 Properly handle the situation where a synchronous load fails before the inner event loop has started. In this case, we simply do not run the inner event loop, or else it will block indefinitely (since no GIO or libsoup callbacks will fire). * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): Bail out of a synchronous load if it fails up front. 2011-01-24 Zhenyao Mo Reviewed by Eric Seidel. Cleanup WebGLGetInfo and related get*Parameter helpers in WebGLRenderingContext https://bugs.webkit.org/show_bug.cgi?id=52338 Removed the long/unsigned long types and corresponding get functions and use int/unsigned int instead. * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::toJS): * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp: (WebCore::toV8Object): * html/canvas/WebGLGetInfo.cpp: (WebCore::WebGLGetInfo::WebGLGetInfo): (WebCore::WebGLGetInfo::getInt): (WebCore::WebGLGetInfo::getUnsignedInt): * html/canvas/WebGLGetInfo.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getBufferParameter): (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): (WebCore::WebGLRenderingContext::getParameter): (WebCore::WebGLRenderingContext::getProgramParameter): (WebCore::WebGLRenderingContext::getRenderbufferParameter): (WebCore::WebGLRenderingContext::getShaderParameter): (WebCore::WebGLRenderingContext::getTexParameter): (WebCore::WebGLRenderingContext::getUniform): (WebCore::WebGLRenderingContext::getVertexAttrib): (WebCore::WebGLRenderingContext::getIntParameter): (WebCore::WebGLRenderingContext::getUnsignedIntParameter): * html/canvas/WebGLRenderingContext.h: 2011-01-24 Zhenyao Mo Reviewed by Darin Adler. Remove sizeInBytes from GraphicsContext3D's various implementations https://bugs.webkit.org/show_bug.cgi?id=52339 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::sizeInBytes): * platform/graphics/GraphicsContext3D.h: * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: * platform/graphics/qt/GraphicsContext3DQt.cpp: 2011-01-24 Adam Roben Windows Production build fix * WebCore.vcproj/WebCore.make: Update for move of WebCore into Source. 2011-01-24 Anton Muhin Reviewed by Nate Chapin. [v8] Refactoring: extract IntrusiveDOMWrapperMap into a seprate class and files. https://bugs.webkit.org/show_bug.cgi?id=52911 Plain refactoring, covered by the existing tests. * WebCore.gypi: IntrusiveDOMWrapperMap.h added. * bindings/v8/DOMDataStore.cpp: IntrusiveDOMWrapperMap is moved out of DOMDataStore class. * bindings/v8/DOMDataStore.h: IntrusiveDOMWrapperMap is moved out of DOMDataStore class. * bindings/v8/IntrusiveDOMWrapperMap.h: Added. (WebCore::ChunkedTable::ChunkedTable): (WebCore::ChunkedTable::add): (WebCore::ChunkedTable::remove): (WebCore::ChunkedTable::clear): (WebCore::ChunkedTable::visit): (WebCore::ChunkedTable::Chunk::Chunk): (WebCore::ChunkedTable::clearEntries): (WebCore::ChunkedTable::visitEntries): (WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap): (WebCore::IntrusiveDOMWrapperMap::get): (WebCore::IntrusiveDOMWrapperMap::set): (WebCore::IntrusiveDOMWrapperMap::contains): (WebCore::IntrusiveDOMWrapperMap::visit): (WebCore::IntrusiveDOMWrapperMap::removeIfPresent): (WebCore::IntrusiveDOMWrapperMap::clear): (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::move): (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::clear): (WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit): * bindings/v8/StaticDOMDataStore.h: include added. 2011-01-24 Shane Stephens Reviewed by Chris Marrin. TransformationMatrix multiply operations apply operands in wrong order. https://bugs.webkit.org/show_bug.cgi?id=52780 Rename TranformationMatrix::multLeft into multiply (the method does a multRight, not a multLeft). Remove TransformationMatrix::multiply, which was actually doing a multLeft. Fix TransformationMatrix::operator* and operator*= such that the operand is applied to the right-hand side of the matrix that the method is called on. i.e., previously "a * b" used to compute "b * a", and "a *= b" used to store "b * a" in "a". This has now been fixed so "a * b" computes "a * b" and "a *= b" stores "a * b" in "a". Convert all call sites for these methods to provide operands in the correct order. No new tests as patch adds no new functionality. * css/WebKitCSSMatrix.cpp: (WebCore::WebKitCSSMatrix::multiply): * platform/graphics/transforms/Matrix3DTransformOperation.h: (WebCore::Matrix3DTransformOperation::apply): * platform/graphics/transforms/MatrixTransformOperation.h: (WebCore::MatrixTransformOperation::apply): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::scaleNonUniform): (WebCore::TransformationMatrix::scale3d): (WebCore::TransformationMatrix::rotate3d): (WebCore::TransformationMatrix::skew): (WebCore::TransformationMatrix::applyPerspective): (WebCore::TransformationMatrix::multiply): (WebCore::TransformationMatrix::recompose): * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::operator*=): (WebCore::TransformationMatrix::operator*): * rendering/RenderLayer.cpp: (WebCore::transparencyClipBox): * rendering/RenderObject.cpp: (WebCore::RenderObject::getTransformFromContainer): * rendering/TransformState.cpp: (WebCore::TransformState::applyTransform): (WebCore::HitTestingTransformState::applyTransform): 2011-01-24 Andrei Popescu Reviewed by Nate Chapin. IndexedDatabase methods should not take arguments of type OptionsObject https://bugs.webkit.org/show_bug.cgi?id=53012 This patch reverts all IDB methods, except IDBDatabase::createObjectStore and IDBObjectStore::createIndex, to using a plain list of arguments instead of grouping the various parameters inside a single OptionsObject argument. This decision was made on public-webapps@w3.org mailing list. We also add support (v8 only for now) for passing DOMStringList objects as arguments to native methods. The code for obtaining a DOMStringList object from a JS array of strings existed already in OptionsObject.cpp, I just copied it to V8Bindings.cpp and taught the v8 code generator how to use it. * bindings/scripts/CodeGeneratorV8.pm: * bindings/v8/V8Binding.cpp: (WebCore::v8ValueToWebCoreDOMStringList): * bindings/v8/V8Binding.h: * storage/IDBDatabase.cpp: (WebCore::IDBDatabase::transaction): * storage/IDBDatabase.h: (WebCore::IDBDatabase::transaction): * storage/IDBDatabase.idl: * storage/IDBIndex.cpp: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * storage/IDBIndex.h: (WebCore::IDBIndex::openCursor): (WebCore::IDBIndex::openKeyCursor): * storage/IDBIndex.idl: * storage/IDBObjectStore.cpp: (WebCore::IDBObjectStore::openCursor): * storage/IDBObjectStore.h: (WebCore::IDBObjectStore::openCursor): * storage/IDBObjectStore.idl: 2011-01-24 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: extract dispatch API from network manager. https://bugs.webkit.org/show_bug.cgi?id=53009 * WebCore.xcodeproj/project.pbxproj: * inspector/front-end/NetworkManager.js: (WebInspector.NetworkManager): (WebInspector.NetworkManager.prototype.reset): (WebInspector.NetworkManager.prototype.requestContent): (WebInspector.NetworkManager.prototype._processCachedResources): (WebInspector.NetworkDispatcher): (WebInspector.NetworkDispatcher.prototype._updateResourceWithRequest): (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse): (WebInspector.NetworkDispatcher.prototype._updateResourceWithCachedResource): (WebInspector.NetworkDispatcher.prototype.identifierForInitialRequest): (WebInspector.NetworkDispatcher.prototype.willSendRequest): (WebInspector.NetworkDispatcher.prototype.didReceiveResponse): (WebInspector.NetworkDispatcher.prototype.didLoadResourceFromMemoryCache): (WebInspector.NetworkDispatcher.prototype.didCommitLoadForFrame): (WebInspector.NetworkDispatcher.prototype.didCreateWebSocket): (WebInspector.NetworkDispatcher.prototype._appendRedirect): (WebInspector.NetworkDispatcher.prototype._startResource): (WebInspector.NetworkDispatcher.prototype._updateResource): (WebInspector.NetworkDispatcher.prototype._finishResource): (WebInspector.NetworkDispatcher.prototype._addFramesRecursively): (WebInspector.NetworkDispatcher.prototype._dispatchEventToListeners): (WebInspector.NetworkDispatcher.prototype._createResource): * inspector/front-end/Resource.js: (WebInspector.Resource.prototype._innerRequestContent): * inspector/front-end/ResourceTreeModel.js: (WebInspector.ResourceTreeModel): (WebInspector.ResourceTreeModel.prototype.reset): (WebInspector.ResourceTreeModel.prototype.unbindResourceURL): 2011-01-24 Yury Semikhatsky Reviewed by Pavel Feldman. Web Inspector: [JSC] remove ScriptDebugServer::pageCreated https://bugs.webkit.org/show_bug.cgi?id=53007 It's impossible to create "provisional" inspector for pages which are not yet created so there is no need to listen for page creation in ScriptDebugServer. * bindings/js/ScriptDebugServer.cpp: * bindings/js/ScriptDebugServer.h: * page/Page.cpp: (WebCore::Page::Page): 2011-01-24 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: [REGRESSION] AppCache view on resources panel is broken. https://bugs.webkit.org/show_bug.cgi?id=53002 * inspector/front-end/ApplicationCacheItemsView.js: (WebInspector.ApplicationCacheItemsView.prototype._update): * inspector/front-end/DOMAgent.js: (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync): 2011-01-24 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Fix warnings about unregistering an invalid timer https://bugs.webkit.org/show_bug.cgi?id=53006 The ShadowBuffer's purge timer ID was initialized with 0 which lead to us calling QObject::killTimer(0), causing some qWarnings. * platform/graphics/qt/ContextShadowQt.cpp: (WebCore::ShadowBuffer::ShadowBuffer): (WebCore::ShadowBuffer::schedulePurge): 2011-01-21 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Fix heap snapshot table sorting. Fix table sorting to avoid qsort instability artefacts. https://bugs.webkit.org/show_bug.cgi?id=52914 * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._sortData): (WebInspector.HeapSnapshotDataGridList.propertyComparator.comparator): (WebInspector.HeapSnapshotDataGridList.propertyComparator): 2011-01-24 Mikhail Naganov Reviewed by Yury Semikhatsky. Web Inspector: Find duplicate strings in localizedStrings.js, update it. https://bugs.webkit.org/show_bug.cgi?id=53005 * English.lproj/localizedStrings.js: 2011-01-24 Pavel Podivilov Unreviewed, build fix for r76509. * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setBreakpoint): 2011-01-24 Pavel Podivilov Unreviewed, build fix for r76509. * bindings/js/ScriptDebugServer.h: 2011-01-24 Pavel Podivilov Reviewed by Yury Semikhatsky. Web Inspector: set breakpoints by line:column. https://bugs.webkit.org/show_bug.cgi?id=52615 * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): (WebCore::ScriptDebugServer::removeBreakpoint): (WebCore::ScriptDebugServer::hasBreakpoint): (WebCore::ScriptDebugServer::clearBreakpoints): * bindings/js/ScriptDebugServer.h: * bindings/v8/DebuggerScript.js: (): * bindings/v8/ScriptDebugServer.cpp: (WebCore::ScriptDebugServer::setBreakpoint): * bindings/v8/ScriptDebugServer.h: * inspector/Inspector.idl: * inspector/InspectorBrowserDebuggerAgent.cpp: (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint): * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setStickyBreakpoint): (WebCore::InspectorDebuggerAgent::setBreakpoint): (WebCore::InspectorDebuggerAgent::restoreBreakpoint): (WebCore::InspectorDebuggerAgent::didParseSource): * inspector/InspectorDebuggerAgent.h: * inspector/ScriptBreakpoint.cpp: Removed. * inspector/ScriptBreakpoint.h: (WebCore::ScriptBreakpoint::ScriptBreakpoint): * inspector/front-end/Breakpoint.js: (WebInspector.Breakpoint): (WebInspector.Breakpoint.prototype.get url): * inspector/front-end/BreakpointManager.js: (WebInspector.JavaScriptBreakpoint.prototype._serializeToJSON): * inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel.prototype.continueToLine): (WebInspector.DebuggerModel.prototype.setBreakpoint): (WebInspector.DebuggerModel.prototype._breakpointSetOnBackend): (WebInspector.DebuggerDispatcher.prototype.breakpointResolved): 2011-01-24 Peter Beverloo Reviewed by Pavel Feldman. Web Inspector: recognize application/x-font-woff as a valid mime-type. https://bugs.webkit.org/show_bug.cgi?id=52977 No new tests. * inspector/front-end/inspector.js: 2011-01-24 Pavel Podivilov Unreviewed, fix for r76497. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.show): 2011-01-24 Andreas Kling Reviewed by Tor Arne Vestbø. [Qt] Use rad2deg() from WTF instead of rolling our own. https://bugs.webkit.org/show_bug.cgi?id=52993 * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::rotate): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc): 2011-01-24 Sergio Villar Senin Reviewed by Martin Robinson. [Gtk] ResourceHandleSoup: do not wait for streams to close to issue didFinishLoading https://bugs.webkit.org/show_bug.cgi?id=52885 No new tests as it does not change functionality. We will not wait for the the input stream to close to issue didFinishLoading to WebCore. We expect a subtle performance improvement with this patch when loading complex web pages, as we wouldn't have to wait for the stream to close (which involves creating a thread among other things). * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::closeCallback): (WebCore::readCallback): 2011-01-21 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: eliminate SourceView and ScriptView classes. https://bugs.webkit.org/show_bug.cgi?id=52896 SourceView and ScriptView delegate everything to SourceFrame and should be eliminated. * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * inspector/front-end/GoToLineDialog.js: (WebInspector.GoToLineDialog.prototype._highlightSelectedLine): * inspector/front-end/ResourceView.js: (WebInspector.ResourceView.createResourceView): (WebInspector.ResourceView.resourceViewTypeMatchesResource): (WebInspector.SourceFrameContentProviderForResource): Moved from SourceView. * inspector/front-end/ResourcesPanel.js: (WebInspector.ResourcesPanel.prototype.show): (WebInspector.ResourcesPanel.prototype._applyDiffMarkup): (WebInspector.FrameResourceTreeElement.prototype._errorsWarningsUpdated): * inspector/front-end/ScriptView.js: Removed. * inspector/front-end/ScriptsPanel.js: (WebInspector.ScriptsPanel.prototype._scriptSourceChanged): (WebInspector.ScriptsPanel.prototype._sourceFrameForScriptOrResource): (WebInspector.ScriptsPanel.prototype._showScriptOrResource): (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions): (WebInspector.ScriptsPanel.prototype._formatScript): (WebInspector.SourceFrameContentProviderForScript): Moved from ScriptView. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame): (WebInspector.SourceFrame.prototype.show): (WebInspector.SourceFrame.prototype.hide): (WebInspector.SourceFrame.prototype.hasContent): (WebInspector.SourceFrame.prototype._createTextViewer): (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): * inspector/front-end/SourceView.js: Removed. * inspector/front-end/WebKit.qrc: * inspector/front-end/inspector.html: 2011-01-24 Andras Becsi Reviewed by Csaba Osztrogonác. [Qt] Move project files into Source https://bugs.webkit.org/show_bug.cgi?id=52891 No new tests needed. * WebCore.pri: * WebCore.pro: 2011-01-24 Kent Tamura Unreviewed, trivial fix. Fix a Chromium-only assertion failure by r76491. https://bugs.webkit.org/show_bug.cgi?id=38982 Separate icon loading from the FileChooser constructor in order to avoid ref() before adoptRef(). * platform/FileChooser.cpp: (WebCore::FileChooser::FileChooser): (WebCore::FileChooser::initialize): (WebCore::FileChooser::create): * platform/FileChooser.h: 2011-01-24 MORITA Hajime Reviewed by Kent Tamura. TextControlInnerElement::m_shadowParent should be removed. https://bugs.webkit.org/show_bug.cgi?id=52998 No new tests. No behavioral change. * rendering/TextControlInnerElements.cpp: (WebCore::TextControlInnerElement::TextControlInnerElement): * rendering/TextControlInnerElements.h: 2011-01-24 Yury Semikhatsky Reviewed by Pavel Feldman. REGRESSION (r72895): console.trace crashes https://bugs.webkit.org/show_bug.cgi?id=52981 - Use local RefPtr variable for accessing PassRefPtr arguments to make sure the PassRefPtr has non-null value. - Use PassRefPtr for objects whos ownership is passed to the inspector. * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * inspector/InspectorConsoleInstrumentation.h: Added. Extract inline methods called from the console into their own header to reduce compilation time of other classes that depend on the inspector instrumentation. (WebCore::InspectorInstrumentation::addMessageToConsole): (WebCore::InspectorInstrumentation::consoleCount): (WebCore::InspectorInstrumentation::startConsoleTiming): (WebCore::InspectorInstrumentation::stopConsoleTiming): (WebCore::InspectorInstrumentation::consoleMarkTimeline): (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole): (WebCore::InspectorInstrumentation::addProfile): (WebCore::InspectorInstrumentation::profilerEnabled): (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName): * inspector/InspectorDatabaseInstrumentation.h: Added. Extract inline methods called from the datanase code into their own header to reduce compilation time of other classes that depend on the inspector instrumentation. (WebCore::InspectorInstrumentation::didOpenDatabase): * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::addMessageToConsoleImpl): (WebCore::InspectorInstrumentation::consoleCountImpl): (WebCore::InspectorInstrumentation::stopConsoleTimingImpl): (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl): (WebCore::InspectorInstrumentation::addProfileImpl): (WebCore::InspectorInstrumentation::didOpenDatabaseImpl): * inspector/InspectorInstrumentation.h: * page/Console.cpp: use RefPtr local variable instead of accessing PassRefPtr argument directly. (WebCore::Console::addMessage): (WebCore::Console::trace): (WebCore::Console::count): (WebCore::Console::markTimeline): (WebCore::Console::profileEnd): (WebCore::Console::timeEnd): (WebCore::Console::group): (WebCore::Console::groupCollapsed): * storage/Database.cpp: (WebCore::Database::openDatabase): 2010-01-24 Kent Tamura Reviewed by Darin Fisher. [Chromium] Support icon loading for https://bugs.webkit.org/show_bug.cgi?id=38982 An icon data in Chromium port is represented as WebCore::Image. We don't need OS-specific code anymore. * WebCore.gypi: * platform/graphics/Icon.h: (WebCore::Icon::create): Add Chromium-specific factory. * platform/graphics/chromium/IconChromium.cpp: Added. * platform/graphics/chromium/IconChromiumLinux.cpp: Removed. * platform/graphics/chromium/IconChromiumMac.cpp: Removed. * platform/graphics/chromium/IconChromiumWin.cpp: Removed. * platform/graphics/chromium/PlatformIcon.h: 2011-01-21 Pavel Podivilov Reviewed by Pavel Feldman. Web Inspector: move search functions from SourceView to SourceFrame. https://bugs.webkit.org/show_bug.cgi?id=52895 This is the last step before eliminating SourceView and ScriptView since this classes just delegate everything to SourceFrame. * inspector/front-end/SourceFrame.js: (WebInspector.SourceFrame.prototype.set visible): (WebInspector.SourceFrame.prototype._clearLineHighlight): (WebInspector.SourceFrame.prototype._createTextViewer): (WebInspector.SourceFrame.prototype.performSearch.doFindSearchMatches): (WebInspector.SourceFrame.prototype.performSearch): (WebInspector.SourceFrame.prototype.searchCanceled): (WebInspector.SourceFrame.prototype.jumpToFirstSearchResult): (WebInspector.SourceFrame.prototype.jumpToLastSearchResult): (WebInspector.SourceFrame.prototype.jumpToNextSearchResult): (WebInspector.SourceFrame.prototype.jumpToPreviousSearchResult): (WebInspector.SourceFrame.prototype.showingFirstSearchResult): (WebInspector.SourceFrame.prototype.showingLastSearchResult): (WebInspector.SourceFrame.prototype._jumpToSearchResult): * inspector/front-end/SourceView.js: (WebInspector.SourceView.prototype.hide): (WebInspector.SourceView.prototype.searchCanceled): (WebInspector.SourceView.prototype.performSearch): (WebInspector.SourceView.prototype.jumpToFirstSearchResult): (WebInspector.SourceView.prototype.jumpToLastSearchResult): (WebInspector.SourceView.prototype.jumpToNextSearchResult): (WebInspector.SourceView.prototype.jumpToPreviousSearchResult): (WebInspector.SourceView.prototype.showingFirstSearchResult): (WebInspector.SourceView.prototype.showingLastSearchResult): (WebInspector.SourceView.prototype.clearMessages): 2011-01-24 Sheriff Bot Unreviewed, rolling out r76463. http://trac.webkit.org/changeset/76463 https://bugs.webkit.org/show_bug.cgi?id=52993 It broke canvas/philip/tests/2d.path.stroke.skew.html (Requested by Ossy on #webkit). * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::rotate): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc): 2011-01-23 Andrey Kosyakov Reviewed by Pavel Feldman. Web Inspector: summary bar is not resized properly with the rest of network panel https://bugs.webkit.org/show_bug.cgi?id=52881 * inspector/front-end/NetworkPanel.js: (WebInspector.NetworkPanel.prototype.updateSidebarWidth): (WebInspector.NetworkPanel.prototype._positionSummaryBar): (WebInspector.NetworkPanel.prototype._toggleGridMode): 2011-01-19 MORITA Hajime Reviewed by Ryosuke Niwa. Space and tab characters "sent" by an input method give totally different results than typing them directly https://bugs.webkit.org/show_bug.cgi?id=5241 * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to distinguish text input which is originated by composition. * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing range of string on text node, instead of surrounding part of that. Test: editing/inserting/insert-composition-whitespace.html * dom/TextEvent.h: (WebCore::TextEvent::isComposition): * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType * editing/CompositeEditCommand.cpp: (WebCore::containsOnlyWhitespace): (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor): (WebCore::CompositeEditCommand::canRebalance): (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string. * editing/CompositeEditCommand.h: * editing/Editor.cpp: (WebCore::Editor::insertTextForConfirmedComposition): Added. (WebCore::Editor::insertTextWithoutSendingTextEvent): (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition(). (WebCore::Editor::setComposition): * editing/Editor.h: * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::input): * editing/InsertTextCommand.h: * editing/TypingCommand.cpp: (WebCore::TypingCommand::TypingCommand): (WebCore::TypingCommand::insertText): (WebCore::TypingCommand::insertTextRunWithoutNewlines): * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType (WebCore::TypingCommand::setCompositionType): Added. (WebCore::TypingCommand::create): 2011-01-23 Mark Rowe Follow-up to r76477. Fix the scripts that detect problematic code such as static initializers and destructors, weak vtables, inappropriate files in the framework wrappers, and public headers including private headers. These had all been broken since the projects were moved in to the Source directory as the paths to the scripts were not updated at that time. Stop copying an IDL file in to the framework wrapper. Doing that doesn't even make sense. * WebCore.xcodeproj/project.pbxproj: 2011-01-23 Mark Rowe Build fix after r76459. Static member variables or globals of types that have constructors or destructors are bad as they generate static initializers and destructors. This is code that is run either at link time when the library is loaded in to memory or at application termination time. Both of these are terrible for performance and are thus outlawed in WebKit code. The typical solution is to replace the static member or global with a function that allocates the necessary variable on the heap. The variable is leaked to prevent it from being destroyed at application termination time. The DEFINE_STATIC_LOCAL macro wraps this in to a concise little package, but sadly fails to work in this case due to the type containing multiple template parameters. * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::inspectorAgents): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::bindInspectorAgent): (WebCore::InspectorInstrumentation::unbindInspectorAgent): (WebCore::InspectorInstrumentation::inspectorAgentForPage): 2011-01-21 Vangelis Kokkevis Reviewed by Kenneth Russell. [chromium] Add support for -webkit-mask properties to the accelerated compositing path. https://bugs.webkit.org/show_bug.cgi?id=49780 Tests: Existing tests in LayoutTests/compositing/masks * platform/graphics/chromium/ContentLayerChromium.cpp: (WebCore::ContentLayerChromium::draw): (WebCore::ContentLayerChromium::unreserveContentsTexture): (WebCore::ContentLayerChromium::bindContentsTexture): * platform/graphics/chromium/ContentLayerChromium.h: * platform/graphics/chromium/GraphicsLayerChromium.cpp: (WebCore::GraphicsLayerChromium::setMaskLayer): * platform/graphics/chromium/GraphicsLayerChromium.h: * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): * platform/graphics/chromium/LayerChromium.h: (WebCore::LayerChromium::setMaskLayer): (WebCore::LayerChromium::maskLayer): (WebCore::LayerChromium::unreserveContentsTexture): (WebCore::LayerChromium::bindContentsTexture): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::updateLayersRecursive): * platform/graphics/chromium/LayerTexture.cpp: (WebCore::LayerTexture::bindTexture): * platform/graphics/chromium/RenderSurfaceChromium.cpp: (WebCore::RenderSurfaceChromium::SharedValues::SharedValues): (WebCore::RenderSurfaceChromium::SharedValues::~SharedValues): (WebCore::RenderSurfaceChromium::RenderSurfaceChromium): (WebCore::RenderSurfaceChromium::draw): * platform/graphics/chromium/RenderSurfaceChromium.h: (WebCore::RenderSurfaceChromium::SharedValues::maskShaderProgram): (WebCore::RenderSurfaceChromium::SharedValues::maskShaderSamplerLocation): (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMaskSamplerLocation): (WebCore::RenderSurfaceChromium::SharedValues::maskShaderMatrixLocation): (WebCore::RenderSurfaceChromium::SharedValues::maskShaderAlphaLocation): 2011-01-23 Patrick Gansterer Reviewed by Darin Adler. Use WTF::StringHasher in WebCore https://bugs.webkit.org/show_bug.cgi?id=52934 * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::urlHostHash): * platform/LinkHash.cpp: (WebCore::visitedLinkHashInline): * platform/cf/BinaryPropertyList.cpp: (WebCore::IntegerArrayHash::hash): * platform/graphics/wx/FontPlatformDataWx.cpp: (WebCore::FontPlatformData::computeHash): * platform/network/ProtectionSpaceHash.h: (WebCore::ProtectionSpaceHash::hash): 2011-01-23 Patrick Gansterer Reviewed by David Kilzer. Add an overload to base64Encode with String output https://bugs.webkit.org/show_bug.cgi?id=50122 This change removes duplicated code. * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::resourceContentBase64): * page/DOMWindow.cpp: (WebCore::DOMWindow::btoa): * platform/graphics/skia/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/graphics/win/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/graphics/wince/FontCustomPlatformData.cpp: (WebCore::createUniqueFontName): * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::encodeBasicAuthorization): * platform/network/mac/ResourceHandleMac.mm: (WebCore::encodeBasicAuthorization): * platform/text/Base64.cpp: (WebCore::base64Encode): * platform/text/Base64.h: (WebCore::base64Encode): * platform/wince/KeygenWinCE.cpp: (WebCore::WebCore::signedPublicKeyAndChallengeString): 2011-01-23 Patrick Gansterer Reviewed by David Kilzer. Add String::containsOnlyLatin1() https://bugs.webkit.org/show_bug.cgi?id=52979 Use String::containsOnlyLatin1() instead of isSafeToConvertCharList(). * page/DOMWindow.cpp: (WebCore::DOMWindow::btoa): (WebCore::DOMWindow::atob): 2011-01-23 Patrick Gansterer Reviewed by Andreas Kling. [CMake] Add missing CodeGenerator dependencies https://bugs.webkit.org/show_bug.cgi?id=52976 * CMakeLists.txt: 2011-01-23 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt][Symbian] Fix --minimal build https://bugs.webkit.org/show_bug.cgi?id=52839 Some of the plugins' functionality is reimplemented in Symbian specific files. Some of this functionality should be compiled in even if the guard NETSCAPE_PLUGIN_API is turned off. This patch moves that functionality out of the NETSCAPE_PLUGIN_API guard. Build fix so no new tests. * WebCore.pro: * plugins/symbian/PluginPackageSymbian.cpp: 2011-01-23 Andreas Kling Reviewed by Tor Arne Vestbø. [Qt] Use rad2deg() from WTF instead of rolling our own. * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::rotate): * platform/graphics/qt/PathQt.cpp: (WebCore::Path::addArc): 2011-01-23 Kenneth Rohde Christiansen Reviewed by Andreas Kling. Viewport meta: Always adjust device dimensions to the device pixel ratio. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): 2011-01-23 Andreas Kling Reviewed by Kenneth Rohde Christiansen. Don't scale absolute geometry specified by viewport meta tag. * dom/ViewportArguments.cpp: (WebCore::computeViewportAttributes): 2011-01-23 Ilya Tikhonovsky Unreviewed build fix. Web Inspector: looks like efl doesn't regenerate InspectorBackendDispatcher. Touch Inspector.idl. * inspector/Inspector.idl: 2011-01-22 Ilya Tikhonovsky Reviewed by Pavel Feldman. Web Inspector: next step in splitting InspectorController. Splitting InspectorController is a bit tricky process. As a first step I'll do the next things: 1) rename existing InspectorController to InspectorAgent; 2) s/nspectorController/nspectorAgent/g everywhere in WebCore/inspector but InspectorInstrumentation; 3) create a fake InspectorController derived from the InspectorAgent for the rest of WebCore and WebKit; The second step is a migration of a small set of functions described in bug 52510 from InspectorAgent to InspectorController. As far as the second step will have significant changes in the functions' implementation I'll do it as a separate patch. https://bugs.webkit.org/show_bug.cgi?id=52955 * CMakeLists.txt: * GNUmakefile.am: * WebCore.exp.in: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSInjectedScriptHostCustom.cpp: (WebCore::JSInjectedScriptHost::nodeForId): (WebCore::JSInjectedScriptHost::selectDOMStorage): * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: (WebCore::V8InjectedScriptHost::nodeForIdCallback): * inspector/CodeGeneratorInspector.pm: * inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::InjectedScriptHost): (WebCore::InjectedScriptHost::clearConsoleMessages): (WebCore::InjectedScriptHost::databaseForId): (WebCore::InjectedScriptHost::selectDatabase): (WebCore::InjectedScriptHost::selectDOMStorage): (WebCore::InjectedScriptHost::injectedScriptForMainFrame): (WebCore::InjectedScriptHost::inspectorDOMAgent): (WebCore::InjectedScriptHost::frontend): (WebCore::InjectedScriptHost::didCreateWorker): (WebCore::InjectedScriptHost::didDestroyWorker): * inspector/InjectedScriptHost.h: (WebCore::InjectedScriptHost::create): (WebCore::InjectedScriptHost::inspectorAgent): (WebCore::InjectedScriptHost::disconnectController): * inspector/InspectorAgent.cpp: Copied from Source/WebCore/inspector/InspectorController.cpp. (WebCore::InspectorAgent::InspectorAgent): (WebCore::InspectorAgent::~InspectorAgent): (WebCore::InspectorAgent::inspectedPageDestroyed): (WebCore::InspectorAgent::enabled): (WebCore::InspectorAgent::inspectorStartsAttached): (WebCore::InspectorAgent::setInspectorStartsAttached): (WebCore::InspectorAgent::setInspectorAttachedHeight): (WebCore::InspectorAgent::inspectorAttachedHeight): (WebCore::InspectorAgent::searchingForNodeInPage): (WebCore::InspectorAgent::restoreInspectorStateFromCookie): (WebCore::InspectorAgent::inspect): (WebCore::InspectorAgent::focusNode): (WebCore::InspectorAgent::highlight): (WebCore::InspectorAgent::highlightDOMNode): (WebCore::InspectorAgent::highlightFrame): (WebCore::InspectorAgent::hideHighlight): (WebCore::InspectorAgent::mouseDidMoveOverElement): (WebCore::InspectorAgent::handleMousePress): (WebCore::InspectorAgent::setInspectorFrontendClient): (WebCore::InspectorAgent::didClearWindowObjectInWorld): (WebCore::InspectorAgent::setSearchingForNode): (WebCore::InspectorAgent::connectFrontend): (WebCore::InspectorAgent::show): (WebCore::InspectorAgent::showPanel): (WebCore::InspectorAgent::close): (WebCore::InspectorAgent::disconnectFrontend): (WebCore::InspectorAgent::resourceAgent): (WebCore::InspectorAgent::releaseFrontendLifetimeAgents): (WebCore::InspectorAgent::populateScriptObjects): (WebCore::InspectorAgent::pushDataCollectedOffline): (WebCore::InspectorAgent::restoreDebugger): (WebCore::InspectorAgent::restoreProfiler): (WebCore::InspectorAgent::unbindAllResources): (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::mainResourceFiredDOMContentEvent): (WebCore::InspectorAgent::mainResourceFiredLoadEvent): (WebCore::InspectorAgent::isMainResourceLoader): (WebCore::InspectorAgent::willSendRequest): (WebCore::InspectorAgent::ensureSettingsLoaded): (WebCore::InspectorAgent::startTimelineProfiler): (WebCore::InspectorAgent::stopTimelineProfiler): (WebCore::PostWorkerNotificationToFrontendTask::create): (WebCore::PostWorkerNotificationToFrontendTask::PostWorkerNotificationToFrontendTask): (WebCore::PostWorkerNotificationToFrontendTask::performTask): (WebCore::InspectorAgent::postWorkerNotificationToFrontend): (WebCore::InspectorAgent::didCreateWorker): (WebCore::InspectorAgent::didDestroyWorker): (WebCore::InspectorAgent::didOpenDatabase): (WebCore::InspectorAgent::getCookies): (WebCore::InspectorAgent::buildArrayForCookies): (WebCore::InspectorAgent::buildObjectForCookie): (WebCore::InspectorAgent::deleteCookie): (WebCore::InspectorAgent::didUseDOMStorage): (WebCore::InspectorAgent::didCreateWebSocket): (WebCore::InspectorAgent::willSendWebSocketHandshakeRequest): (WebCore::InspectorAgent::didReceiveWebSocketHandshakeResponse): (WebCore::InspectorAgent::didCloseWebSocket): (WebCore::InspectorAgent::isRecordingUserInitiatedProfile): (WebCore::InspectorAgent::startUserInitiatedProfiling): (WebCore::InspectorAgent::stopUserInitiatedProfiling): (WebCore::InspectorAgent::profilerEnabled): (WebCore::InspectorAgent::enableProfiler): (WebCore::InspectorAgent::disableProfiler): (WebCore::InspectorAgent::showAndEnableDebugger): (WebCore::InspectorAgent::enableDebugger): (WebCore::InspectorAgent::disableDebugger): (WebCore::InspectorAgent::resume): (WebCore::InspectorAgent::setAllBrowserBreakpoints): (WebCore::InspectorAgent::evaluateForTestInFrontend): (WebCore::InspectorAgent::didEvaluateForTestInFrontend): (WebCore::quadToPath): (WebCore::drawOutlinedQuad): (WebCore::drawOutlinedQuadWithClip): (WebCore::drawHighlightForBox): (WebCore::drawHighlightForLineBoxesOrSVGRenderer): (WebCore::convertFromFrameToMainFrame): (WebCore::frameToMainFrameOffset): (WebCore::InspectorAgent::drawNodeHighlight): (WebCore::InspectorAgent::drawElementTitle): (WebCore::InspectorAgent::openInInspectedWindow): (WebCore::InspectorAgent::addScriptToEvaluateOnLoad): (WebCore::InspectorAgent::removeAllScriptsToEvaluateOnLoad): (WebCore::InspectorAgent::setInspectorExtensionAPI): (WebCore::InspectorAgent::inspectedURL): (WebCore::InspectorAgent::reloadPage): (WebCore::InspectorAgent::setExtraHeaders): * inspector/InspectorAgent.h: Copied from Source/WebCore/inspector/InspectorController.h. (WebCore::InspectorAgent::inspectorBackendDispatcher): (WebCore::InspectorAgent::inspectorClient): (WebCore::InspectorAgent::injectedScriptHost): (WebCore::InspectorAgent::inspectedPage): (WebCore::InspectorAgent::hideDOMNodeHighlight): (WebCore::InspectorAgent::hideFrameHighlight): (WebCore::InspectorAgent::frontend): (WebCore::InspectorAgent::inspectorController): (WebCore::InspectorAgent::inspectorAgent): (WebCore::InspectorAgent::consoleAgent): (WebCore::InspectorAgent::cssAgent): (WebCore::InspectorAgent::domAgent): (WebCore::InspectorAgent::injectedScriptAgent): (WebCore::InspectorAgent::runtimeAgent): (WebCore::InspectorAgent::timelineAgent): (WebCore::InspectorAgent::databaseAgent): (WebCore::InspectorAgent::domStorageAgent): (WebCore::InspectorAgent::fileSystemAgent): (WebCore::InspectorAgent::browserDebuggerAgent): (WebCore::InspectorAgent::debuggerAgent): (WebCore::InspectorAgent::profilerAgent): (WebCore::InspectorAgent::applicationCacheAgent): (WebCore::InspectorAgent::hasInspectorFrontendClient): (WebCore::InspectorAgent::hasFrontend): (WebCore::InspectorAgent::startProfiling): (WebCore::InspectorAgent::stopProfiling): (WebCore::InspectorAgent::debuggerEnabled): (WebCore::InspectorAgent::state): (WebCore::InspectorAgent::settings): * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): (WebCore::InspectorApplicationCacheAgent::getApplicationCaches): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorBrowserDebuggerAgent.cpp: (WebCore::InspectorBrowserDebuggerAgent::InspectorBrowserDebuggerAgent): (WebCore::InspectorBrowserDebuggerAgent::inspectedURLChanged): (WebCore::InspectorBrowserDebuggerAgent::restoreStickyBreakpoint): (WebCore::InspectorBrowserDebuggerAgent::setDOMBreakpoint): (WebCore::InspectorBrowserDebuggerAgent::removeDOMBreakpoint): (WebCore::InspectorBrowserDebuggerAgent::willInsertDOMNode): (WebCore::InspectorBrowserDebuggerAgent::willRemoveDOMNode): (WebCore::InspectorBrowserDebuggerAgent::willModifyDOMAttr): (WebCore::InspectorBrowserDebuggerAgent::descriptionForDOMEvent): (WebCore::InspectorBrowserDebuggerAgent::pauseOnNativeEventIfNeeded): (WebCore::InspectorBrowserDebuggerAgent::willSendXMLHttpRequest): * inspector/InspectorBrowserDebuggerAgent.h: (WebCore::InspectorBrowserDebuggerAgent::create): * inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::InspectorConsoleAgent): (WebCore::InspectorConsoleAgent::~InspectorConsoleAgent): (WebCore::InspectorConsoleAgent::clearConsoleMessages): (WebCore::InspectorConsoleAgent::addMessageToConsole): (WebCore::InspectorConsoleAgent::resourceRetrievedByXMLHttpRequest): (WebCore::InspectorConsoleAgent::didReceiveResponse): (WebCore::InspectorConsoleAgent::didFailLoading): (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled): (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled): (WebCore::InspectorConsoleAgent::addConsoleMessage): * inspector/InspectorConsoleAgent.h: * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): * inspector/InspectorController.h: * inspector/InspectorDatabaseAgent.cpp: * inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::create): (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::~InspectorDebuggerAgent): (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame): (WebCore::InspectorDebuggerAgent::getCompletionsOnCallFrame): (WebCore::InspectorDebuggerAgent::currentCallFrames): * inspector/InspectorDebuggerAgent.h: * inspector/InspectorFileSystemAgent.cpp: (WebCore::InspectorFileSystemAgentCallbacks::didOpenFileSystem): (WebCore::InspectorFileSystemAgent::InspectorFileSystemAgent): (WebCore::InspectorFileSystemAgent::stop): (WebCore::InspectorFileSystemAgent::getFileSystemPathAsync): (WebCore::InspectorFileSystemAgent::didGetFileSystemPath): (WebCore::InspectorFileSystemAgent::didGetFileSystemError): * inspector/InspectorFileSystemAgent.h: (WebCore::InspectorFileSystemAgent::create): * inspector/InspectorFrontendHost.cpp: (WebCore::InspectorFrontendHost::setExtensionAPI): * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::create): (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): (WebCore::InspectorProfilerAgent::addProfileFinishedMessageToConsole): (WebCore::InspectorProfilerAgent::addStartProfilingMessageToConsole): (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling): (WebCore::InspectorProfilerAgent::stopUserInitiatedProfiling): * inspector/InspectorProfilerAgent.h: 2011-01-22 Chris Rogers Rubber-stamped by Anders Carlsson. Fix FFTFrameStub to compile properly https://bugs.webkit.org/show_bug.cgi?id=52969 No new tests since this is a build fix. * platform/audio/FFTFrameStub.cpp: (WebCore::FFTFrame::FFTFrame): 2011-01-22 Andrei Popescu Reviewed by Jeremy Orlow. IndexedDB corrupts data on disk https://bugs.webkit.org/show_bug.cgi?id=52890 We need to store the SerializedScriptValues on disk in a BLOB column rather than TEXT. Test: storage/indexeddb/data-corruption.html * platform/sql/SQLiteStatement.cpp: (WebCore::SQLiteStatement::bindBlob): (WebCore::SQLiteStatement::getColumnBlobAsString): (WebCore::SQLiteStatement::getColumnBlobAsVector): * platform/sql/SQLiteStatement.h: * storage/IDBCursorBackendImpl.cpp: (WebCore::IDBCursorBackendImpl::loadCurrentRow): * storage/IDBFactoryBackendImpl.cpp: (WebCore::runCommands): (WebCore::createTables): (WebCore::createMetaDataTable): (WebCore::migrateDatabase): * storage/IDBObjectStoreBackendImpl.cpp: (WebCore::IDBObjectStoreBackendImpl::getInternal): (WebCore::putObjectStoreData): 2011-01-22 Nikolas Zimmermann Not reviewed. Fix WinCE build. * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::GraphicsContext::drawText): * rendering/RenderThemeWinCE.cpp: (WebCore::RenderThemeWinCE::adjustMenuListButtonStyle): 2011-01-22 Nikolas Zimmermann Reviewed by Dirk Schulze. REGRESSION: Vertical line metrics incorrect https://bugs.webkit.org/show_bug.cgi?id=52960 SimpleFontDataMac.mm contains a hack to modifiy lineGap/descent for the 'Hiragino' font. That didn't influence the lineSpacing so far, but does now, causing regressions. Restore old line spacing behaviour to fix the regression. Covered by existing fast/blockflow, fast/repaint and fast/text/international test cases. * platform/graphics/FontMetrics.h: (WebCore::FontMetrics::FontMetrics): (WebCore::FontMetrics::floatLineSpacing): (WebCore::FontMetrics::setLineSpacing): (WebCore::FontMetrics::lineSpacing): (WebCore::FontMetrics::reset): * platform/graphics/SimpleFontData.cpp: (WebCore::SimpleFontData::SimpleFontData): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/chromium/SimpleFontDataLinux.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/haiku/SimpleFontDataHaiku.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformInit): * platform/graphics/pango/SimpleFontDataPango.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/qt/SimpleFontDataQt.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/SimpleFontDataCGWin.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/SimpleFontDataCairoWin.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::SimpleFontData::initGDIFont): * platform/graphics/wince/SimpleFontDataWinCE.cpp: (WebCore::SimpleFontData::platformInit): * platform/graphics/wx/SimpleFontDataWx.cpp: (WebCore::SimpleFontData::platformInit): 2011-01-22 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] fast/backgrounds/svg-as-mask.html fails https://bugs.webkit.org/show_bug.cgi?id=52906 Transparency layers should start out with in SourceOver mode with alpha 1.0 (modeled after CGContextBeginTransparencyLayer.) * platform/graphics/qt/TransparencyLayer.h: (WebCore::TransparencyLayer::TransparencyLayer): 2011-01-22 Nikolas Zimmermann Not reviewed. Introduce FontMetrics abstraction https://bugs.webkit.org/show_bug.cgi?id=51456 Fix Chromium/Win build. * platform/graphics/chromium/UniscribeHelperTextRun.cpp: s/->/./ (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): 2011-01-21 Nikolas Zimmermann Reviewed by Dirk Schulze. Introduce FontMetrics abstraction https://bugs.webkit.org/show_bug.cgi?id=51456 Encapsulate ascent/descent/lineHeight/lineGap methods in a single FontMetrics class, instead of having to define them in both Font & SimpleFontData. Changed to store floating point values as default, in order to get accurate information for small sized fonts. All these methods now have floating-point and integer versions. Whenever an integer variant of these functions is called, lroundf() is used to round the value. This makes it possible to support small font-sizes for SVG in a follow-up patch, as well as fixing rounding issues when using SVG Fonts. Shouldn't affect existing tests. * GNUmakefile.am: Add FontMetrics.h to build. * WebCore.gypi: Ditto. * WebCore.pro: Ditto. * WebCore.vcproj/WebCore.vcproj: Ditto. * WebCore.xcodeproj/project.pbxproj: Ditto. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: Use style->fontMetrics() instead of style->font() to access the metrics. (baselinePositionForAccessibilityRenderObject): * css/CSSPrimitiveValue.cpp: (WebCore::CSSPrimitiveValue::computeLengthDouble): * html/canvas/CanvasRenderingContext2D.cpp: Ditto. (WebCore::CanvasRenderingContext2D::drawTextInternal): * inspector/InspectorController.cpp: Ditto. (WebCore::InspectorController::drawElementTitle): * platform/chromium/PopupMenuChromium.cpp: Ditto. (WebCore::PopupListBox::paintRow): (WebCore::PopupListBox::getRowHeight): * platform/graphics/Font.h: Remove ascent/descent/height/lineGap/lineSpacing/xHeight/unitsPerEm accessor... (WebCore::Font::fontMetrics): ... and only expose a single FontMetrics object here. * platform/graphics/FontFastPath.cpp: Use fontMetrics() to query metrics information. (WebCore::Font::emphasisMarkAscent): (WebCore::Font::emphasisMarkDescent): (WebCore::Font::emphasisMarkHeight): (WebCore::Font::floatWidthForSimpleText): * platform/graphics/FontMetrics.h: Added. (WebCore::FontMetrics::FontMetrics): Creates a FontMetrics object, stored in SimpleFontData. (WebCore::FontMetrics::unitsPerEm): Returns an unsigned describing the unitsPerEm. (WebCore::FontMetrics::setUnitsPerEm): Sets the unitsPerEm value. (WebCore::FontMetrics::floatAscent): Returns the stored m_ascent float. (WebCore::FontMetrics::setAscent): Sets the stored m_ascent float. (WebCore::FontMetrics::floatDescent): Returns the stored m_descent float. (WebCore::FontMetrics::setDescent): Sets the stored m_descent float. (WebCore::FontMetrics::floatHeight): Returns floatAscent() + floatDescent(). (WebCore::FontMetrics::floatLineGap): Returns the stored m_lineGap float. (WebCore::FontMetrics::setLineGap): Sets the stored m_lineGap float. (WebCore::FontMetrics::floatLineSpacing): Returns the stored m_lineSpacing float. (WebCore::FontMetrics::setLineSpacing): Sets the stored m_lineSpacing float. (WebCore::FontMetrics::xHeight): Returns the stored m_xHeight float (no integer version available, hence no 'float' prefix). (WebCore::FontMetrics::setXHeight): Sets the stored m_xHeight float. (WebCore::FontMetrics::ascent): Returns a rounded version of ascent(). (WebCore::FontMetrics::descent): Ditto (for descent). (WebCore::FontMetrics::height): Returns ascent() + descent(). (WebCore::FontMetrics::lineGap): Returns a rounded version of lineGap(). (WebCore::FontMetrics::lineSpacing): Ditto (for lineSpacing). (WebCore::FontMetrics::reset): Nulls all members, used only by the platform variants of SimpleFontData. * platform/graphics/SimpleFontData.cpp: Adapt SVG Fonts code, to initialize the FontMetrics object, as the m_ascent/etc.. members are gone. (WebCore::SimpleFontData::SimpleFontData): (WebCore::SimpleFontData::initCharWidths): * platform/graphics/SimpleFontData.h: Remove ascent/descent/height/lineSpacing/lineGap/xHeight/unitsPerEm accessors, and members, just store a FontMetrics object and expose it. (WebCore::SimpleFontData::fontMetrics): (WebCore::SimpleFontData::avgCharWidth): * platform/graphics/chromium/FontChromiumWin.cpp: Use fontMetrics() to query font metrics. (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::estimateTextBounds): (WebCore::TransparencyAwareFontPainter::TransparencyAwareGlyphPainter::drawGlyphs): (WebCore::TransparencyAwareFontPainter::TransparencyAwareUniscribePainter::estimateTextBounds): (WebCore::Font::drawComplexText): * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp: Adapt platform code, to initialize the FontMetrics object. (WebCore::SimpleFontData::platformInit): * platform/graphics/chromium/SimpleFontDataLinux.cpp: Ditto. (WebCore::SimpleFontData::platformInit): * platform/graphics/chromium/UniscribeHelperTextRun.cpp: Use fontMetrics() to query font metrics. (WebCore::UniscribeHelperTextRun::UniscribeHelperTextRun): (WebCore::UniscribeHelperTextRun::nextWinFontData): * platform/graphics/freetype/SimpleFontDataFreeType.cpp: Adapt platform code, to initialize the FontMetrics object. (WebCore::SimpleFontData::platformInit): * platform/graphics/haiku/SimpleFontDataHaiku.cpp: Ditto. (WebCore::SimpleFontData::platformInit): * platform/graphics/mac/FontComplexTextMac.cpp: Use fontMetrics() to query font metrics. (WebCore::Font::floatWidthForComplexText): * platform/graphics/mac/FontMac.mm: Ditto. (WebCore::showGlyphsWithAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: Adapt platform code, to initialize the FontMetrics object. (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformCharWidthInit): * platform/graphics/pango/SimpleFontDataPango.cpp: Ditto. (WebCore::SimpleFontData::platformInit): * platform/graphics/qt/SimpleFontDataQt.cpp: Ditto. (+ Switch to QFontMetricsF to get floating-point accurancy.) (WebCore::SimpleFontData::platformInit): * platform/graphics/win/FontCGWin.cpp: Use fontMetrics() to query font metrics. (WebCore::drawGDIGlyphs): * platform/graphics/win/FontWin.cpp: Ditto. (WebCore::Font::floatWidthForComplexText): * platform/graphics/win/SimpleFontDataCGWin.cpp: Adapt platform code, to initialize the FontMetrics object. (WebCore::SimpleFontData::platformInit): (WebCore::SimpleFontData::platformBoundsForGlyph): * platform/graphics/win/SimpleFontDataCairoWin.cpp: Ditto. (WebCore::SimpleFontData::platformInit): * platform/graphics/win/SimpleFontDataWin.cpp: Ditto. (WebCore::SimpleFontData::initGDIFont): * platform/graphics/wince/GraphicsContextWinCE.cpp: Use fontMetrics() to query font metrics. (WebCore::GraphicsContext::drawText): * platform/graphics/wince/SimpleFontDataWinCE.cpp: Adapt platform code, to initialize the FontMetrics object. (WebCore::SimpleFontData::platformInit): * platform/graphics/wx/SimpleFontDataWx.cpp: Ditto. (WebCore::SimpleFontData::platformInit): * platform/win/PopupMenuWin.cpp: Use style->fontMetrics() instead of style->font() to access the metrics. (WebCore::PopupMenuWin::calculatePositionAndSize): (WebCore::PopupMenuWin::paint): * rendering/EllipsisBox.cpp: Ditto. (WebCore::EllipsisBox::paint): (WebCore::EllipsisBox::nodeAtPoint): * rendering/InlineBox.cpp: Ditto. (WebCore::InlineBox::logicalHeight): * rendering/InlineFlowBox.cpp: Ditto. (WebCore::verticalPositionForBox): (WebCore::InlineFlowBox::computeLogicalBoxHeights): (WebCore::InlineFlowBox::placeBoxesInBlockDirection): * rendering/InlineTextBox.cpp: Ditto. (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::paintDecoration): (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): (WebCore::InlineTextBox::paintCompositionUnderline): * rendering/RenderBlock.cpp: Ditto. (WebCore::RenderBlock::baselinePosition): (WebCore::RenderBlock::firstLineBoxBaseline): (WebCore::RenderBlock::lastLineBoxBaseline): * rendering/RenderBox.cpp: Ditto. (WebCore::RenderBox::localCaretRect): * rendering/RenderEmbeddedObject.cpp: Ditto. (WebCore::RenderEmbeddedObject::paintReplaced): * rendering/RenderImage.cpp: Ditto. (WebCore::RenderImage::setImageSizeForAltText): (WebCore::RenderImage::paintReplaced): * rendering/RenderInline.cpp: Ditto. (WebCore::RenderInline::baselinePosition): * rendering/RenderListBox.cpp: Ditto. (WebCore::RenderListBox::paintItemForeground): (WebCore::RenderListBox::itemHeight): * rendering/RenderListMarker.cpp: Ditto. (WebCore::RenderListMarker::paint): (WebCore::RenderListMarker::layout): (WebCore::RenderListMarker::computePreferredLogicalWidths): (WebCore::RenderListMarker::updateMargins): (WebCore::RenderListMarker::getRelativeMarkerRect): * rendering/RenderTextControl.cpp: Ditto. (WebCore::RenderTextControl::paintPlaceholder): * rendering/RenderTextControlSingleLine.cpp: Ditto. (WebCore::RenderTextControlSingleLine::createInnerTextStyle): * rendering/RenderThemeWin.cpp: Ditto. (WebCore::RenderThemeWin::adjustMenuListButtonStyle): * rendering/mathml/RenderMathMLFraction.cpp: Ditto. (WebCore::RenderMathMLFraction::baselinePosition): * rendering/style/RenderStyle.h: Add "const FontMetrics& fontMetrics() const" accessor. (WebCore::InheritedFlags::fontMetrics): (WebCore::InheritedFlags::computedLineHeight): * rendering/svg/RenderSVGInlineText.cpp: Use style->fontMetrics() instead of style->font() to access the metrics. (WebCore::RenderSVGInlineText::positionForPoint): * rendering/svg/SVGInlineTextBox.cpp: Ditto. (WebCore::SVGInlineTextBox::selectionRectForTextFragment): (WebCore::positionOffsetForDecoration): (WebCore::SVGInlineTextBox::paintDecorationWithStyle): (WebCore::SVGInlineTextBox::paintTextWithShadows): (WebCore::SVGInlineTextBox::calculateBoundaries): * rendering/svg/SVGTextLayoutEngineBaseline.cpp: Ditto. (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift): (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift): (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphAdvanceAndOrientation): * rendering/svg/SVGTextLayoutEngineSpacing.cpp: Ditto. (WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning): * rendering/svg/SVGTextMetrics.cpp: Ditto. (WebCore::SVGTextMetrics::SVGTextMetrics): * rendering/svg/SVGTextQuery.cpp: Ditto. (WebCore::calculateGlyphBoundaries): * svg/SVGFontFaceElement.cpp: (WebCore::SVGFontFaceElement::unitsPerEm): Rename defaultUnitsPerEm global to gDefaultUnitsPerEm. * svg/SVGLength.cpp: Use style->fontMetrics() instead of style->font() to access the metrics. (WebCore::SVGLength::convertValueFromUserUnitsToEXS): (WebCore::SVGLength::convertValueFromEXSToUserUnits): 2011-01-22 Ryosuke Niwa Reviewed by Eric Seidel. Stop instantiating legacy editing positions in VisibleSelection, visible_units.cpp, Frame, and RenderBlock https://bugs.webkit.org/show_bug.cgi?id=52759 Stopped instantiating legacy editing positions in the following files. * editing/VisibleSelection.cpp: (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries): * editing/visible_units.cpp: (WebCore::previousBoundary): (WebCore::previousLinePosition): (WebCore::nextLinePosition): (WebCore::startOfBlock): * page/Frame.cpp: (WebCore::Frame::visiblePositionForPoint): * rendering/RenderBlock.cpp: Removed RenderBlock::positionForRenderer because it was not called anywhere. * rendering/RenderBlock.h: Ditto. 2011-01-22 Adrienne Walker Reviewed by James Robinson. [chromium] Fix compositor repaints for offscreen fixed elements https://bugs.webkit.org/show_bug.cgi?id=52681 The fast path scrolling was clipping offscreen invalidations. Additionally, the compositor was ignoring all invalidations that were entirely out of the content rect. Test: compositing/ to verify this caused no regressions. Tested fix manually in browser as I could not generate a LayoutTest that reproduced the bug in run-webkit-tests. * page/FrameView.cpp: (WebCore::FrameView::scrollContentsFastPath): * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::invalidateRootLayerRect): 2011-01-22 Alexey Proskuryakov Reviewed by Dan Bernstein. https://bugs.webkit.org/show_bug.cgi?id=52951 WebKit2 generates a bad PDF for cross process messaging * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Use a correct offset to actually draw inside the requested rectangle. 2011-01-21 Yury Semikhatsky Reviewed by Adam Barth. Regression: new window.onerror() implementation leaks cross-origin Javascript errors https://bugs.webkit.org/show_bug.cgi?id=52903 In case of an exception in a script from different domain only generic message will be passed to window.onerror hander. Tests: http/tests/security/cross-origin-script-window-onerror-redirected.html http/tests/security/cross-origin-script-window-onerror.html * bindings/js/CachedScriptSourceProvider.h: use URL from the resource response to make sure we do all cross origin checks agains real script URL, not the original URL which may have resulted in a sequence of redirects to different domains. (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): * bindings/v8/ScriptSourceCode.h: same for v8. (WebCore::ScriptSourceCode::url): * dom/ScriptExecutionContext.cpp: (WebCore::ScriptExecutionContext::dispatchErrorEvent): in case the error occurred in a script we cannot access provide concise "Script error." message without any information about the error source. This is what Firefox does in this case. 2011-01-21 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt] Always set composition mode through GraphicsContext https://bugs.webkit.org/show_bug.cgi?id=52940 GraphicsContext tracks the current composition mode so we should never call through to the QPainter directly. * platform/graphics/GraphicsContext.h: * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::toQtCompositionMode): Changed this method to a static inline since it's only used by GraphicsContextQt.cpp now. * platform/graphics/qt/ImageQt.cpp: (WebCore::Image::drawPattern): (WebCore::BitmapImage::draw): 2011-01-21 Dan Bernstein Reviewed by Adele Peterson. Inconsistent handling of no-break space in justification logic https://bugs.webkit.org/show_bug.cgi?id=52938 Test: fast/text/justify-nbsp.html * rendering/RenderBlockLineLayout.cpp: (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Count no-break space as a space when computing the distribution of space between text boxes on the line. 2011-01-21 Charlie Reis Reviewed by Darin Fisher. Crash in WebCore::HistoryController::itemsAreClones https://bugs.webkit.org/show_bug.cgi?id=52819 Adds sanity checks to help diagnose the crash. * loader/HistoryController.cpp: 2011-01-21 Andreas Kling Reviewed by Ariya Hidayat. [Qt] Let QPainter decide whether a composition mode is supported or not Lacking Porter-Duff support in the paint engine shouldn't exclude the Source and Source-Over modes (and has nothing to do with the blend and raster-op modes.) Delegate this decision to QPainter instead (this will cause warnings if an unsupported mode is used, but that's a good thing.) * platform/graphics/qt/GraphicsContextQt.cpp: (WebCore::GraphicsContext::clearRect): (WebCore::GraphicsContext::setPlatformCompositeOperation): * platform/graphics/qt/TransparencyLayer.h: (WebCore::TransparencyLayer::TransparencyLayer): 2011-01-21 Chris Rogers Reviewed by Kenneth Russell. fix audio build: header file should be "Noncopyable.h" and not "NonCopyable.h" https://bugs.webkit.org/show_bug.cgi?id=52933 No new tests since this just fixes the build * webaudio/RealtimeAnalyser.h: 2011-01-21 Chris Rogers Reviewed by Kenneth Russell. Fix audio build: change ChromiumBridge to PlatformBridge https://bugs.webkit.org/show_bug.cgi?id=52928 No new tests since audio API is not yet implemented. * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): 2011-01-21 Chris Rogers Reviewed by Kenneth Russell. Add FFTFrameStub to avoid link errors during bringup on platforms without an FFT implementation https://bugs.webkit.org/show_bug.cgi?id=52922 No new tests since audio API is not yet implemented. * WebCore.gypi: * platform/audio/FFTFrameStub.cpp: Added. (WebCore::FFTFrame::FFTFrame): (WebCore::FFTFrame::~FFTFrame): (WebCore::FFTFrame::multiply): (WebCore::FFTFrame::doFFT): (WebCore::FFTFrame::doInverseFFT): (WebCore::FFTFrame::cleanup): (WebCore::FFTFrame::realData): (WebCore::FFTFrame::imagData): 2011-01-21 Tony Chang Reviewed by Sam Weinig. reduce number of FrameLoaderClient::didChangeScrollOffset calls https://bugs.webkit.org/show_bug.cgi?id=52915 Only notify of changes in scroll offset when there actually is a change. This regressed in r76291. Covered by Chromium browser_tests. * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): 2011-01-21 Pavel Feldman Reviewed by Yury Semikhatsky. Web Inspector: ~InspectorResourceAgent crashes on closing inspected page. https://bugs.webkit.org/show_bug.cgi?id=52900 * inspector/InspectorController.cpp: (WebCore::InspectorController::~InspectorController): (WebCore::InspectorController::inspectedPageDestroyed): 2011-01-21 Chris Rogers Reviewed by Darin Fisher. Add run-time enable support for the web audio API https://bugs.webkit.org/show_bug.cgi?id=52741 No new tests since audio API is not yet implemented. * WebCore.exp.in: * bindings/generic/RuntimeEnabledFeatures.cpp: * bindings/generic/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setWebkitAudioContextEnabled): (WebCore::RuntimeEnabledFeatures::webkitAudioContextEnabled): * page/DOMWindow.idl: * page/Settings.cpp: (WebCore::Settings::Settings): (WebCore::Settings::setWebAudioEnabled): * page/Settings.h: (WebCore::Settings::webAudioEnabled): 2011-01-21 Martin Robinson Reviewed by Xan Lopez. [GTK] Menulist text often collides with separator https://bugs.webkit.org/show_bug.cgi?id=51155 Move menulist rendering to RenderThemeGtk and correct padding code for separators in menulists. * platform/gtk/RenderThemeGtk.cpp: (WebCore::RenderThemeGtk::RenderThemeGtk): Initialize new widget members. (WebCore::RenderThemeGtk::getComboBoxSeparatorWidth): Added. (WebCore::RenderThemeGtk::comboBoxArrowSize): Added. (WebCore::getButtonInnerBorder): Added. (WebCore::RenderThemeGtk::getComboBoxPadding): Do this manually instead of using Mozilla code. (WebCore::RenderThemeGtk::paintMenuList): Ditto. (WebCore::setupWidget): Abstracted this part of the setupWidgetAndAddToContainer out to handle child widgets of comboboxes. (WebCore::RenderThemeGtk::setupWidgetAndAddToContainer): Abstracted out setupWidget. (WebCore::RenderThemeGtk::gtkContainer): Added. (WebCore::getGtkComboBoxButton): Added. (WebCore::getGtkComboBoxPieces): Added. (WebCore::RenderThemeGtk::gtkComboBox): Call setupWidget here. (WebCore::RenderThemeGtk::refreshComboBoxChildren): Added. (WebCore::RenderThemeGtk::gtkComboBoxButton): Added. (WebCore::RenderThemeGtk::gtkComboBoxArrow): Added. (WebCore::RenderThemeGtk::gtkComboBoxSeparator): Added. * platform/gtk/RenderThemeGtk.h: Added new members and methods. * platform/gtk/WidgetRenderingContext.h: Added new members and methods. * platform/gtk/WidgetRenderingContextGtk2.cpp: (WebCore::WidgetRenderingContext::gtkPaintArrow): (WebCore::WidgetRenderingContext::gtkPaintVLine): * platform/gtk/WidgetRenderingContextGtk3.cpp: (WebCore::WidgetRenderingContext::gtkPaintArrow): (WebCore::WidgetRenderingContext::gtkPaintVLine): * platform/gtk/gtk2drawing.c: Removed code for drawing menulists and buttons. (moz_gtk_init): (moz_gtk_get_widget_border): (moz_gtk_widget_paint): * platform/gtk/gtk3drawing.c: (moz_gtk_init): (moz_gtk_get_widget_border): (moz_gtk_widget_paint): * platform/gtk/gtkdrawing.h: 2011-01-21 Sam Weinig Fix chromium mac build. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::scrollbarStateToThemeState): (WebCore::ScrollbarThemeChromiumMac::paint): 2011-01-21 Sam Weinig Fix the windows build. * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::paint): 2011-01-21 Chris Rogers Reviewed by Kenneth Russell. Add chromium bundled audio spatialization resources to WebAudio.grd https://bugs.webkit.org/show_bug.cgi?id=52651 No new tests since audio API is not yet implemented. * WebCore.gyp/WebCore.gyp: * platform/audio/chromium/AudioBusChromium.cpp: (WebCore::AudioBus::loadPlatformResource): 2011-01-21 Xiyuan Xia Reviewed by Tony Chang. Use WebThemeEngine for relevant RenderTheme parts for chromium/linux. https://bugs.webkit.org/show_bug.cgi?id=52826 * platform/chromium/ChromiumBridge.h: * 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/RenderThemeChromiumLinux.h: * rendering/RenderThemeChromiumSkia.cpp: (WebCore::RenderThemeChromiumSkia::setCheckboxSize): (WebCore::RenderThemeChromiumSkia::setSizeIfAuto): (WebCore::RenderThemeChromiumSkia::indeterminateProgressValueRectFor): * rendering/RenderThemeChromiumSkia.h: 2011-01-21 Sam Weinig Reviewed by Anders Carlsson. Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship" https://bugs.webkit.org/show_bug.cgi?id=52779 Rename ScrollbarClient -> ScrollableArea. - Also replaces Scrollbar::setClient with Scrollbar::disconnectFromScrollableArea since that was its only use case. * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilityScrollbar.cpp: (WebCore::AccessibilityScrollbar::setValue): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::SelectorChecker::checkScrollbarPseudoClass): * page/FrameView.h: * platform/PopupMenuClient.h: * platform/ScrollAnimator.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimator::ScrollAnimator): (WebCore::ScrollAnimator::scroll): (WebCore::ScrollAnimator::notityPositionChanged): * platform/ScrollAnimator.h: * platform/ScrollAnimatorWin.cpp: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorWin::ScrollAnimatorWin): (WebCore::ScrollAnimatorWin::scroll): * platform/ScrollAnimatorWin.h: * platform/ScrollView.cpp: (WebCore::ScrollView::scroll): (WebCore::ScrollView::updateScrollbars): (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/ScrollableArea.cpp: Copied from WebCore/platform/ScrollbarClient.cpp. (WebCore::ScrollableArea::ScrollableArea): (WebCore::ScrollableArea::~ScrollableArea): (WebCore::ScrollableArea::scroll): (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation): (WebCore::ScrollableArea::scrollToXOffsetWithoutAnimation): (WebCore::ScrollableArea::scrollToYOffsetWithoutAnimation): (WebCore::ScrollableArea::setScrollOffsetFromAnimation): * platform/ScrollableArea.h: Copied from WebCore/platform/ScrollbarClient.h. * platform/Scrollbar.cpp: (WebCore::Scrollbar::createNativeScrollbar): (WebCore::Scrollbar::Scrollbar): (WebCore::Scrollbar::offsetDidChange): (WebCore::Scrollbar::autoscrollPressedPart): (WebCore::Scrollbar::moveThumb): (WebCore::Scrollbar::mouseMoved): (WebCore::Scrollbar::isWindowActive): (WebCore::Scrollbar::invalidateRect): (WebCore::Scrollbar::convertToContainingView): (WebCore::Scrollbar::convertFromContainingView): * platform/Scrollbar.h: (WebCore::Scrollbar::disconnectFromScrollableArea): (WebCore::Scrollbar::scrollableArea): * platform/ScrollbarClient.cpp: Removed. * platform/ScrollbarClient.h: Removed. * platform/ScrollbarThemeComposite.cpp: * platform/chromium/FramelessScrollView.h: * platform/chromium/ScrollbarThemeChromium.cpp: (WebCore::ScrollbarThemeChromium::paintTickmarks): * platform/efl/ScrollbarEfl.cpp: (Scrollbar::createNativeScrollbar): (ScrollbarEfl::ScrollbarEfl): (scrollbarEflEdjeMessage): * platform/efl/ScrollbarEfl.h: * platform/gtk/MainFrameScrollbarGtk.cpp: (MainFrameScrollbarGtk::create): (MainFrameScrollbarGtk::MainFrameScrollbarGtk): (MainFrameScrollbarGtk::gtkValueChanged): * platform/gtk/MainFrameScrollbarGtk.h: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollAnimatorMac.mm: (WebCore::ScrollAnimator::create): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::scroll): * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::paint): * platform/qt/ScrollbarQt.cpp: (WebCore::Scrollbar::contextMenu): * platform/win/PopupMenuWin.cpp: (WebCore::PopupMenuWin::scrollToRevealSelection): (WebCore::PopupMenuWin::wndProc): * platform/win/PopupMenuWin.h: * platform/win/ScrollbarThemeSafari.cpp: (WebCore::ScrollbarThemeSafari::paintTrackBackground): (WebCore::ScrollbarThemeSafari::paintButton): (WebCore::ScrollbarThemeSafari::paintThumb): * platform/wx/ScrollbarThemeWx.cpp: (WebCore::ScrollbarThemeWx::paint): * rendering/RenderDataGrid.h: * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollToOffset): (WebCore::RenderLayer::destroyScrollbar): (WebCore::RenderLayer::scroll): * rendering/RenderLayer.h: * rendering/RenderListBox.cpp: (WebCore::RenderListBox::scrollToRevealElementAtListIndex): (WebCore::RenderListBox::scroll): (WebCore::RenderListBox::logicalScroll): (WebCore::RenderListBox::setScrollTop): (WebCore::RenderListBox::destroyScrollbar): * rendering/RenderListBox.h: * rendering/RenderMenuList.cpp: (WebCore::RenderMenuList::createScrollbar): * rendering/RenderMenuList.h: * rendering/RenderScrollbar.cpp: (WebCore::RenderScrollbar::createCustomScrollbar): (WebCore::RenderScrollbar::RenderScrollbar): * rendering/RenderScrollbar.h: * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::createScrollbar): * rendering/RenderTextControlSingleLine.h: 2011-01-21 Darin Adler Fix Leopard build. * rendering/mathml/RenderMathMLFraction.cpp: (WebCore::RenderMathMLFraction::layout): Use ceilf instead of ceil. 2011-01-21 Anton Muhin Reviewed by Nate Chapin. [v8] Properly deal with the case when conversion to string throws an exception for HTMLCollection accessors https://bugs.webkit.org/show_bug.cgi?id=52901 Test: fast/dom/htmlcollection-conversion-throws-exception.html * bindings/v8/custom/V8HTMLCollectionCustom.cpp: (WebCore::getItem): 2011-01-21 Adam Roben Separate flushing layer changes from rendering in CACFLayerTreeHost Old model: 1) A change is made to a GraphicsLayer. 2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which schedules the render timer. 3) The timer fires, which calls through to CACFLayerTreeHost::render, which performs the flush and then renders. New model: 1) A change is made to a GraphicsLayer. 2) CACFLayerTreeHost::flushPendingGraphicsLayerChangesSoon is called, which tells the new LayerChangesFlusher singleton that this host has changes that need to be flushed. 3) LayerChangesFlusher sets up a Windows hook that will get called on the next iteration of the message loop. 4) LayerChangesFlusher's hook is called, which calls through to CACFLayerTreeHost::flushPendingLayerChangesNow. 5) CACFLayerTreeHost::flushPendingLayerChangesNow schedules the render timer so the changes that were just flushed to the context will be rendered. When a change is made to a PlatformCALayer that doesn't have a corresponding GraphicsLayer (e.g., for rendering