2011-02-01 Adam Barth Reviewed by Alexey Proskuryakov. Improve readability of updateWidget by converting bool parameter to an enum https://bugs.webkit.org/show_bug.cgi?id=53576 As requested on webkit-dev. * html/HTMLEmbedElement.cpp: (WebCore::HTMLEmbedElement::updateWidget): * html/HTMLEmbedElement.h: * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updateWidget): * html/HTMLMediaElement.h: * html/HTMLObjectElement.cpp: (WebCore::HTMLObjectElement::updateWidget): * html/HTMLObjectElement.h: * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): * html/HTMLPlugInImageElement.h: * page/FrameView.cpp: (WebCore::FrameView::updateWidget): 2011-02-01 James Robinson Reviewed by Adam Barth. [v8] Increase V8 native->js recursion limit to match document.write() recursion limit https://bugs.webkit.org/show_bug.cgi?id=53566 A recursion limit of 22 is necessary to pass fast/dom/Document/document-write-recursion.html. Other than being large enough for this one test case, this limit is arbitrary. * bindings/v8/V8Proxy.h: 2011-02-01 Adam Barth Reviewed by Andreas Kling. Remove useless comment https://bugs.webkit.org/show_bug.cgi?id=53549 The reason for this parameter is captured in plugins/netscape-plugin-setwindow-size.html, which is a better place to capture it than in this comment (which otherwise just re-iterates the name of the parameter). * html/HTMLPlugInImageElement.cpp: (WebCore::HTMLPlugInImageElement::updateWidgetIfNecessary): 2011-02-01 James Simonsen Reviewed by Tony Gentilcore. [WebTiming] Remove asserts that verify timestamp order https://bugs.webkit.org/show_bug.cgi?id=53548 Covered by existing tests. * loader/FrameLoader.cpp: (WebCore::FrameLoader::stopLoading): Remove assert. * page/DOMWindow.cpp: (WebCore::DOMWindow::dispatchTimedEvent): Ditto. 2011-02-01 Dimitri Glazkov Add the 'default_targets' enclosure to the flags. * WebCore.gyp/WebCore.gyp: Did it. 2011-02-01 Mihai Parparita Reviewed by James Robinson. Async event handlers should not fire within a modal dialog https://bugs.webkit.org/show_bug.cgi?id=53202 Asychronous events that use EventQueue would currently fire while a modal dialog (e.g. window.alert()) was up. Change EventQueue to use a SuspendableTimer (which automatically gets suspended while dialogs are up and in other cases where JS execution is not allowed). Test: fast/events/scroll-event-during-modal-dialog.html * dom/Document.cpp: (WebCore::Document::Document): * dom/EventQueue.cpp: (WebCore::EventQueueTimer::EventQueueTimer): (WebCore::EventQueueTimer::fired): (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::pendingEventTimerFired): * dom/EventQueue.h: (WebCore::EventQueue::create): * page/SuspendableTimer.cpp: (WebCore::SuspendableTimer::SuspendableTimer): (WebCore::SuspendableTimer::suspend): (WebCore::SuspendableTimer::resume): * page/SuspendableTimer.h: 2011-02-01 Patrick Gansterer Reviewed by Andreas Kling. Change wrong PLATFORM(WIN) to USE(WININET) https://bugs.webkit.org/show_bug.cgi?id=53547 * platform/network/ResourceHandle.h: 2011-02-01 Beth Dakin 32-bit build fix. * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): 2011-01-25 Martin Robinson Reviewed by Gustavo Noronha Silva. [GTK] Two tests crash after r76555 https://bugs.webkit.org/show_bug.cgi?id=53057 Instead of creating synchronous ResourceHandles manually, use the ::create factory. This ensures that ::start() is not called when there is a scheduled failure and also reduces code duplication. * platform/network/soup/ResourceHandleSoup.cpp: (WebCore::ResourceHandle::loadResourceSynchronously): Use the ::create factory method. 2011-02-01 Martin Robinson Reviewed by Eric Seidel. [GTK] GObject DOM bindings do no support the CallWith attribute https://bugs.webkit.org/show_bug.cgi?id=53331 Disable building GObject DOM bindings for IndexedDB because we do not support the CallWith attribute at this time. * bindings/gobject/GNUmakefile.am: Disable building bindings for the IndexedDB API. 2011-02-01 Darin Adler Reviewed by Brady Eidson. Fix a couple loose ends from the back/forward tree encode/decode work https://bugs.webkit.org/show_bug.cgi?id=53537 * history/HistoryItem.cpp: (WebCore::HistoryItem::encodeBackForwardTreeNode): Remove extra copy of original URL string; no need to encode it twice. (WebCore::HistoryItem::decodeBackForwardTree): Ditto. * history/HistoryItem.h: Removed declaration for function that is no longer defined nor used. 2011-02-01 Tony Chang Reviewed by Kent Tamura. [chromium] disable arm uninitialized variable warnings https://bugs.webkit.org/show_bug.cgi?id=53553 We just got another error: third_party/WebKit/Source/WebCore/css/CSSPrimitiveValue.cpp:123:error: 'colorTransparent.unstatic.4879' may be used uninitialized in this function * WebCore.gyp/WebCore.gyp: 2011-02-01 chris reiss Reviewed by Adam Barth. Self-replicating code makes Safari hang and eventually crash https://bugs.webkit.org/show_bug.cgi?id=15123 Here we are replicating the Firefox safeguard against recursive document.write( ) 's. See https://bug197052.bugzilla.mozilla.org/attachment.cgi?id=293907 in bug https://bugzilla.mozilla.org/show_bug.cgi?id=197052 . Firefox does two things - a) imposes a recursion limit of 20 on document.write( ) and b) once that limit is passed, panics all the way the call stack (rather than just returning one level.) To see why this is necessary, consider the script : This will create a tree both broad and deep as the script keeps appending itself to the text. If we just return one level after the recursion limit is reached, we still allow millions of copies to duplicate (and execute). The recursion is fortunately depth-first, so as soon as we cross this limit, we panic up the callstack to prevent this situation. (IE apparently does the same thing, with a lower recursion limit.) Test: fast/dom/Document/document-write-recursion.html Test: fast/dom/Document/document-close-iframe-load.html Test: fast/dom/Document/document-close-nested-iframe-load.html * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::write): * dom/Document.h: 2011-02-01 Johnny Ding Reviewed by Darin Adler. Don't set user gesture in HTMLAnchorElement's click handler because the click handler can be triggered by untrusted event. https://bugs.webkit.org/show_bug.cgi?id=53424 Test: fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html * html/HTMLAnchorElement.cpp: (WebCore::handleLinkClick): 2011-02-01 Csaba Osztrogonác Unreviewed Qt buildfix after r77286. https://bugs.webkit.org/show_bug.cgi?id=53520 Remove the physical terminology from IntRect and FloatRect. * platform/graphics/TiledBackingStore.cpp: (WebCore::TiledBackingStore::createTiles): 2011-02-01 Sam Weinig Fix Mac production builds. * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollbarThemeMac.h: 2011-02-01 Darin Adler Reviewed by Chris Fleizach. REGRESSION: Removing focus from area element causes unwanted scrolling https://bugs.webkit.org/show_bug.cgi?id=50169 Test: fast/images/imagemap-scroll.html * html/HTMLAreaElement.cpp: (WebCore::HTMLAreaElement::setFocus): Added override. Calls the new RenderImage::areaElementFocusChanged function. (WebCore::HTMLAreaElement::updateFocusAppearance): Removed the code here that calls setNeedsLayout on the image's renderer. This was an attempt to cause repaint of the renderer, but this function does not need to do that. Also changed this to use the imageElement function to avoid repeating code. * html/HTMLAreaElement.h: Updated for above changes. * rendering/RenderImage.cpp: (WebCore::RenderImage::paint): Updated for name change. (WebCore::RenderImage::paintAreaElementFocusRing): Renamed this from paintFocusRing, because it only paints area focus rings, and should not be confused with paintFocusRing functions in other classes. Also removed the unused style argument. Removed the code that used an HTMLCollection to see if the focused area element is for this image and instead just call imageElement on the area element. (WebCore::RenderImage::areaElementFocusChanged): Added. Calls repaint. * rendering/RenderImage.h: Added a public areaElementFocusChanged function for HTMLAreaElement to call. Made the paintFocusRing function private, renamed it to paintAreaElementFocusRing, and removed its unused style argument. 2011-02-01 Patrick Gansterer Unreviewed WinCE build fix for r77286. * platform/graphics/wince/GraphicsContextWinCE.cpp: (WebCore::TransparentLayerDC::TransparentLayerDC): 2011-02-01 Chris Fleizach Reviewed by Darin Adler. AX: AXPosition of AXScrollArea is wrong https://bugs.webkit.org/show_bug.cgi?id=53511 AccessibilityScrollView needed to return a valid documentFrameView() object. At the same time, the code from document() should be consolidated in AccessibilityObject, so all objects can use it. Test: platform/mac/accessibility/webkit-scrollarea-position.html * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::document): * accessibility/AccessibilityObject.h: * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::accessibilityHitTest): (WebCore::AccessibilityScrollView::documentFrameView): * accessibility/AccessibilityScrollView.h: 2011-02-01 Zhenyao Mo Reviewed by Kenneth Russell. getUniform should support SAMPLER_2D or SAMPLER_CUBE https://bugs.webkit.org/show_bug.cgi?id=52190 * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::getUniform): 2011-02-01 Zhenyao Mo Reviewed by Darin Adler. Fix the incorrect usage of RetainPtr cases in GraphicsContext3DCG.cpp https://bugs.webkit.org/show_bug.cgi?id=53531 With this fix, running WebGL conformance tests should no longer crash randomly. * platform/graphics/cg/GraphicsContext3DCG.cpp: (WebCore::GraphicsContext3D::getImageData): 2011-02-01 Dimitri Glazkov One more Chromium build fix after r77286. * platform/chromium/ScrollbarThemeChromiumMac.mm: (WebCore::ScrollbarThemeChromiumMac::paint): Changed to not use topLeft(). 2011-02-01 Sam Weinig Fix the build for Beth. * platform/mac/ScrollAnimatorMac.mm: (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): 2011-02-01 Sam Weinig Reviewed by Beth Dakin. Part 2 for Adopt WKScrollbarPainterController Use header detection to define scrollbar painting controller #define. * WebCore.exp.in: * platform/mac/ScrollAnimatorMac.h: * platform/mac/ScrollbarThemeMac.h: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: 2011-02-01 David Hyatt Reviewed by Oliver Hunt. https://bugs.webkit.org/show_bug.cgi?id=53520 Remove the physical terminology from IntRect and FloatRect. Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes, we need to update our terminology to be more accurate. I'm borrowing a page from AppKit here (which also supports flipped NSViews) and renaming right() and bottom() to maxX() and maxY(). These terms remain accurate even for flipped rectangles. * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): * accessibility/mac/AccessibilityObjectWrapper.mm: (-[AccessibilityObjectWrapper position]): * dom/ClientRect.h: (WebCore::ClientRect::right): (WebCore::ClientRect::bottom): * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::convertLogicalToDevice): * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::normalizeRect): * inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::drawElementTitle): * page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): * page/DragController.cpp: (WebCore::dragLocForSelectionDrag): * page/EventHandler.cpp: (WebCore::EventHandler::sendContextMenuEventForKey): * page/PrintContext.cpp: (WebCore::PrintContext::computePageRectsWithPageSizeInternal): (WebCore::PrintContext::pageNumberForElement): * page/SpatialNavigation.cpp: (WebCore::end): (WebCore::areRectsFullyAligned): (WebCore::areRectsMoreThanFullScreenApart): (WebCore::below): (WebCore::rightOf): (WebCore::isRectInDirection): (WebCore::entryAndExitPointsForDirection): (WebCore::virtualRectForDirection): * page/WindowFeatures.cpp: (WebCore::WindowFeatures::WindowFeatures): * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/Scrollbar.cpp: (WebCore::Scrollbar::setFrameRect): * platform/ScrollbarThemeComposite.cpp: (WebCore::ScrollbarThemeComposite::splitTrack): * platform/chromium/ScrollbarThemeChromium.cpp: (WebCore::ScrollbarThemeChromium::paintTickmarks): * platform/graphics/FloatQuad.h: (WebCore::FloatQuad::FloatQuad): * platform/graphics/FloatRect.cpp: (WebCore::FloatRect::intersects): (WebCore::FloatRect::contains): (WebCore::FloatRect::intersect): (WebCore::FloatRect::unite): (WebCore::enclosingIntRect): * platform/graphics/FloatRect.h: (WebCore::FloatRect::maxX): (WebCore::FloatRect::maxY): (WebCore::FloatRect::contains): * platform/graphics/IntRect.cpp: (WebCore::IntRect::intersects): (WebCore::IntRect::contains): (WebCore::IntRect::intersect): (WebCore::IntRect::unite): * platform/graphics/IntRect.h: (WebCore::IntRect::maxX): (WebCore::IntRect::maxY): (WebCore::IntRect::shiftXEdgeTo): (WebCore::IntRect::shiftMaxXEdgeTo): (WebCore::IntRect::shiftYEdgeTo): (WebCore::IntRect::shiftMaxYEdgeTo): (WebCore::IntRect::contains): * platform/graphics/WidthIterator.cpp: (WebCore::WidthIterator::advance): * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::drawRect): (WebCore::GraphicsContext::fillPath): (WebCore::GraphicsContext::fillRect): * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::getImageData): (WebCore::putImageData): * platform/graphics/cg/ImageCG.cpp: (WebCore::BitmapImage::draw): * platform/graphics/filters/FilterEffect.cpp: (WebCore::FilterEffect::copyImageBytes): * platform/graphics/mac/ComplexTextController.cpp: (WebCore::ComplexTextController::adjustGlyphsAndAdvances): * platform/graphics/mac/SimpleFontDataMac.mm: (WebCore::SimpleFontData::platformBoundsForGlyph): * platform/graphics/transforms/AffineTransform.cpp: (WebCore::AffineTransform::mapRect): * platform/graphics/win/FontCGWin.cpp: (WebCore::drawGDIGlyphs): * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp: (WebCore::MediaPlayerPrivate::paint): * platform/gtk/RenderThemeGtk.cpp: (WebCore::centerRectVerticallyInParentInputElement): * platform/mac/WidgetMac.mm: (WebCore::Widget::paint): * rendering/InlineFlowBox.cpp: (WebCore::InlineFlowBox::addBoxShadowVisualOverflow): (WebCore::InlineFlowBox::addTextBoxVisualOverflow): * rendering/InlineTextBox.cpp: (WebCore::InlineTextBox::selectionRect): (WebCore::InlineTextBox::paint): (WebCore::InlineTextBox::positionForOffset): * rendering/RenderBlock.cpp: (WebCore::RenderBlock::addOverflowFromChildren): (WebCore::RenderBlock::paintChildren): (WebCore::RenderBlock::paintEllipsisBoxes): (WebCore::RenderBlock::inlineSelectionGaps): (WebCore::RenderBlock::adjustPointToColumnContents): (WebCore::RenderBlock::flipForWritingModeIncludingColumns): (WebCore::RenderBlock::adjustForColumns): * rendering/RenderBlock.h: (WebCore::RenderBlock::FloatingObject::right): (WebCore::RenderBlock::FloatingObject::bottom): * rendering/RenderBox.cpp: (WebCore::RenderBox::reflectedRect): (WebCore::RenderBox::localCaretRect): (WebCore::RenderBox::addShadowOverflow): (WebCore::RenderBox::addLayoutOverflow): (WebCore::RenderBox::visualOverflowRectForPropagation): (WebCore::RenderBox::layoutOverflowRectForPropagation): (WebCore::RenderBox::flipForWritingMode): * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::paintColumnBorder): (WebCore::RenderFrameSet::paintRowBorder): * rendering/RenderInline.cpp: (WebCore::RenderInline::paintOutlineForLine): * rendering/RenderLayer.cpp: (WebCore::RenderLayer::getRectToExpose): (WebCore::cornerRect): (WebCore::RenderLayer::positionOverflowControls): (WebCore::RenderLayer::overflowBottom): (WebCore::RenderLayer::overflowRight): (WebCore::RenderLayer::paintResizer): * rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::rangeIntersectsRect): (WebCore::RenderLineBoxList::paint): * rendering/RenderListItem.cpp: (WebCore::RenderListItem::positionListMarker): * rendering/RenderListMarker.cpp: (WebCore::RenderListMarker::paint): * rendering/RenderObject.cpp: (WebCore::RenderObject::repaintAfterLayoutIfNeeded): * rendering/RenderOverflow.h: (WebCore::RenderOverflow::RenderOverflow): (WebCore::RenderOverflow::addLayoutOverflow): (WebCore::RenderOverflow::addVisualOverflow): (WebCore::RenderOverflow::setLayoutOverflow): (WebCore::RenderOverflow::setVisualOverflow): (WebCore::RenderOverflow::resetLayoutOverflow): * rendering/RenderReplaced.cpp: (WebCore::RenderReplaced::shouldPaint): * rendering/RenderScrollbarTheme.cpp: (WebCore::RenderScrollbarTheme::constrainTrackRectToTrackPieces): * rendering/RenderTable.cpp: (WebCore::RenderTable::paint): * rendering/RenderTableCell.cpp: (WebCore::RenderTableCell::paint): * rendering/RenderTableSection.cpp: (WebCore::RenderTableSection::paintObject): * rendering/RenderText.cpp: (WebCore::RenderText::absoluteQuads): * rendering/RenderTextControlSingleLine.cpp: (WebCore::RenderTextControlSingleLine::forwardEvent): * rendering/RenderThemeMac.mm: (WebCore::RenderThemeMac::paintMenuListButtonGradients): (WebCore::RenderThemeMac::paintMenuListButton): (WebCore::RenderThemeMac::paintSliderTrack): * rendering/RenderView.cpp: (WebCore::RenderView::computeRectForRepaint): (WebCore::RenderView::docBottom): (WebCore::RenderView::docRight): * rendering/RootInlineBox.cpp: (WebCore::RootInlineBox::paddedLayoutOverflowRect): * rendering/svg/RenderSVGInlineText.cpp: (WebCore::RenderSVGInlineText::localCaretRect): 2011-02-01 Beth Dakin Reviewed by Sam Weinig. Fix for Adopt WKScrollbarPainterController Lots of new WebCoreSystemInterface functions to export. * WebCore.exp.in: * platform/mac/WebCoreSystemInterface.h: * platform/mac/WebCoreSystemInterface.mm: Let the scrollAnimator know when the mouse has moved anywhere inside the page, and when the mouse has moved in or out of the window. * page/EventHandler.cpp: (WebCore::EventHandler::mouseMoved): (WebCore::EventHandler::updateMouseEventTargetNode): Let the scrollAnimator know when the window has become active or inactive. * page/FocusController.cpp: (WebCore::FocusController::setActive): Let the scrollAnimator know when all of these things are happening. * page/FrameView.cpp: (WebCore::FrameView::setContentsSize): (WebCore::FrameView::didMoveOnscreen): (WebCore::FrameView::willMoveOffscreen): (WebCore::FrameView::currentMousePosition): (WebCore::FrameView::contentsResized): New functions called through WebKit2 that allow the scrollAnimator to know when a live resize starts and ends. (WebCore::FrameView::willStartLiveResize): (WebCore::FrameView::willEndLiveResize): * page/FrameView.h: New functions on ScrollAnimator that pass information to the WKPainterController when we're using one. * platform/ScrollAnimator.h: (WebCore::ScrollAnimator::scrollableArea): (WebCore::ScrollAnimator::contentAreaWillPaint): (WebCore::ScrollAnimator::mouseEnteredContentArea): (WebCore::ScrollAnimator::mouseExitedContentArea): (WebCore::ScrollAnimator::mouseMovedInContentArea): (WebCore::ScrollAnimator::willStartLiveResize): (WebCore::ScrollAnimator::contentsResized): (WebCore::ScrollAnimator::willEndLiveResize): (WebCore::ScrollAnimator::contentAreaDidShow): (WebCore::ScrollAnimator::contentAreaDidHide): (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): (WebCore::ScrollAnimatorMac::scrollbarPainterDelegate): (WebCore::ScrollAnimatorMac::setPainterForPainterController): (WebCore::ScrollAnimatorMac::removePainterFromPainterController): (WebCore::ScrollAnimatorMac::notityPositionChanged): (WebCore::ScrollAnimatorMac::contentAreaWillPaint): (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): (WebCore::ScrollAnimatorMac::mouseExitedContentArea): (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): (WebCore::ScrollAnimatorMac::willStartLiveResize): (WebCore::ScrollAnimatorMac::contentsResized): (WebCore::ScrollAnimatorMac::willEndLiveResize): (WebCore::ScrollAnimatorMac::contentAreaDidShow): (WebCore::ScrollAnimatorMac::contentAreaDidHide): Let the scrollAnimator know when this is happening. * platform/ScrollView.cpp: (WebCore::ScrollView::paint): New function lets the scrollAnimator get the current mouse position. * platform/ScrollView.h: (WebCore::ScrollView::currentMousePosition): New function that returns the scrollAnimator when needed. * platform/ScrollableArea.h: (WebCore::ScrollableArea::scrollAnimator): Keep track of if we're in a live resize using a new memeber variable. * platform/mac/ScrollAnimatorMac.h: (WebCore::ScrollAnimatorMac::inLiveResize): * platform/mac/ScrollAnimatorMac.mm: (WebCore::view): New delegates for the WKPainter and WKPainterController (-[ScrollbarPainterControllerDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterControllerDelegate contentAreaRectForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate inLiveResizeForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]): (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]): (-[ScrollKnobAnimation initWithScrollbarPainter:forScrollAnimator:WebCore::animateKnobAlphaTo:duration:]): (-[ScrollKnobAnimation setCurrentProgress:]): (-[ScrollbarPainterDelegate initWithScrollAnimator:WebCore::]): (-[ScrollbarPainterDelegate convertRectToBacking:]): (-[ScrollbarPainterDelegate convertRectFromBacking:]): (-[ScrollbarPainterDelegate layer]): (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): (-[ScrollbarPainterDelegate scrollerImp:overlayScrollerStateChangedTo:]): Get the WKScrollbarPainterRefs to synch up with the WKScrollbarPainterControllerRefs when appropriate * platform/mac/ScrollbarThemeMac.h: * platform/mac/ScrollbarThemeMac.mm: (WebCore::ScrollbarThemeMac::registerScrollbar): (WebCore::ScrollbarThemeMac::unregisterScrollbar): (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): (WebCore::ScrollbarThemeMac::usesOverlayScrollbars): Implement ScrollableArea's virtual function contentsSize() for access through the scrollAnimator. * rendering/RenderLayer.h: (WebCore::RenderLayer::contentsSize): 2011-02-01 Carol Szabo Reviewed by David Hyatt. layoutTestController.counterValueForElementById does not return the correct value https://bugs.webkit.org/show_bug.cgi?id=53037 Test: fast/css/counters/deep-before.html * rendering/RenderTreeAsText.cpp: (WebCore::counterValueForElement): Modified to use the newly available RenderObject::beforePseudoElement() and RenderObject::afterPseudoElement() instead of the old imperfect algorithm to find the before and after pseudo elements. 2011-02-01 Anton Muhin Reviewed by Adam Barth. Allow access for security origin same as this. https://bugs.webkit.org/show_bug.cgi?id=53440 Hard to test as newly added path currently is never hit. * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::canAccess): allow access if this == other 2011-01-31 Oliver Hunt Reviewed by Geoffrey Garen. Update JSObject storage for new marking API https://bugs.webkit.org/show_bug.cgi?id=53467 Update WebCore to handle new anonymous slot behaviour. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::setWindow): * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::initScript): * bindings/scripts/CodeGeneratorJS.pm: 2011-02-01 Xiaomei Ji Reviewed by David Hyatt. Fix a text rendering problem when enclosing block is RTL and text runs are in different directionality. https://bugs.webkit.org/show_bug.cgi?id=34176 The problem happens in the following example scenario (ABC represents Hebrew characters):
this is a test ABC
The line consists of 3 text runs -- TextRun1 TextRun2 TextRun3. In which TextRun1 and TextRun2's bidi level are 2, and TextRun3's bidi level is 1. TextRun2 and TextRun3's least common ancestor is not a sibling of TextRun1. The visual bidi run order of the text runs is TextRun3 TextRun1 TextRun2. Inside RenderBlock::constructLine(), when RenderBlock::createLineBoxes() creates InlineFlowBox for TextRun2, it should check an InlineFlowBox for the run's render object's ancestor (not only its parent) has already been constructed or has something following it on the line, in which case, create a new box for TextRun2 instead of sharing the same box with TextRun3. In other words, the following 2 div should render the same results (ABC represents Hebrew characters).
this is a test ABC
this is a Test ABC
Test: fast/dom/34176.html * rendering/RenderBlockLineLayout.cpp: (WebCore::parentIsConstructedOrHaveNext): (WebCore::RenderBlock::createLineBoxes): 2011-02-01 Abhishek Arya Reviewed by Dan Bernstein. Do not add a node in the document's stylesheet candidate node list if the node is already removed from document. https://bugs.webkit.org/show_bug.cgi?id=53441 Test: fast/css/stylesheet-candidate-nodes-crash.xhtml * dom/Document.cpp: (WebCore::Document::addStyleSheetCandidateNode): 2011-02-01 Dave Hyatt Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work with vertical text. Change printing functions to check writing-mode and properly swap width and height as needed. Fix the setScrollOrigin function so that the origin doesn't cause scroll spasming during printing (this is only partially successful, but it's better than it was). Rewrite computePageRects to handle both RTL documents properly as well as vertical text documents properly. * WebCore.exp.in: * page/FrameView.cpp: (WebCore::FrameView::adjustViewSize): (WebCore::FrameView::forceLayoutForPagination): * page/PrintContext.cpp: (WebCore::PrintContext::computePageRects): (WebCore::PrintContext::computePageRectsWithPageSizeInternal): (WebCore::PrintContext::computeAutomaticScaleFactor): (WebCore::PrintContext::spoolPage): (WebCore::PrintContext::spoolRect): * page/PrintContext.h: * page/mac/WebCoreFrameView.h: * platform/ScrollView.cpp: (WebCore::ScrollView::wheelEvent): * platform/ScrollView.h: * platform/mac/ScrollViewMac.mm: (WebCore::ScrollView::platformSetScrollOrigin): * rendering/RenderView.cpp: (WebCore::RenderView::layout): 2011-02-01 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: Fix profiles reset to avoid clearing heap profiles in Chromium. https://bugs.webkit.org/show_bug.cgi?id=53500 * inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::resetFrontendProfiles): 2011-02-01 Mikhail Naganov Reviewed by Pavel Feldman. Web Inspector: [Chromium] Landing detailed heap snapshots, part 1. https://bugs.webkit.org/show_bug.cgi?id=53173 Adding code for accessing heap snapshot data and performing graph calculations. * English.lproj/localizedStrings.js: * inspector/front-end/HeapSnapshot.js: (WebInspector.HeapSnapshotArraySlice): Helper class to avoid array contents copying. (WebInspector.HeapSnapshotEdge): Wrapper for accessing graph edge properties. (WebInspector.HeapSnapshotEdgeIterator): (WebInspector.HeapSnapshotNode): Wrapper for accessing graph node properties. (WebInspector.HeapSnapshotNodeIterator): (WebInspector.HeapSnapshot): Wrapper for the heap snapshot. (WebInspector.HeapSnapshotFilteredOrderedIterator): (WebInspector.HeapSnapshotEdgesProvider): (WebInspector.HeapSnapshotNodesProvider): (WebInspector.HeapSnapshotPathFinder): * inspector/front-end/HeapSnapshotView.js: (WebInspector.HeapSnapshotView.prototype._convertSnapshot): 2011-02-01 Adam Roben Fix linker warnings in Release_LTCG builds * WebCore.vcproj/WebCore.vcproj: Exclude EventNames.cpp and EventTarget.cpp from all configurations, since they get pulled in via DOMAllInOne.cpp. 2011-02-01 Alexander Pavlov Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] Wrongly labelled context-menu item for links in Web Inspector's side-pane https://bugs.webkit.org/show_bug.cgi?id=53482 * English.lproj/localizedStrings.js: * inspector/front-end/ElementsPanel.js: (WebInspector.ElementsPanel.prototype.populateHrefContextMenu): * inspector/front-end/inspector.js: (WebInspector.resourceForURL): (WebInspector.openLinkExternallyLabel): 2011-02-01 Anton Muhin Reviewed by Adam Barth. Propagate parent document security origin to newly create Document XML response https://bugs.webkit.org/show_bug.cgi?id=53444 Covered by the existing tests. * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::responseXML): 2011-02-01 Yury Semikhatsky Unreviewed. Rollout r77230 which caused many layout tests crashes on Chromium Debug bots. Async event handlers should not fire within a modal dialog https://bugs.webkit.org/show_bug.cgi?id=53202 * dom/Document.cpp: (WebCore::Document::Document): * dom/EventQueue.cpp: (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::pendingEventTimerFired): * dom/EventQueue.h: 2011-02-01 Zoltan Herczeg Reviewed by Dirk Schulze. LightElement changes does not require relayout. https://bugs.webkit.org/show_bug.cgi?id=53232 When an attribute of a LightElement changes, it send an update message to the lighting filters to update its corresponding LightSource objects, and repaint the filters. Duplicated 'id' attributes removed from svg-filter-animation.svg. Existing dynamic-update tests covers this feature. 5x speedup on manual-tests/svg-filter-animation.svg * manual-tests/svg-filter-animation.svg: * platform/graphics/filters/DistantLightSource.h: * platform/graphics/filters/FEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::setLightingColor): (WebCore::FEDiffuseLighting::setSurfaceScale): (WebCore::FEDiffuseLighting::setDiffuseConstant): (WebCore::FEDiffuseLighting::setKernelUnitLengthX): (WebCore::FEDiffuseLighting::setKernelUnitLengthY): * platform/graphics/filters/FEDiffuseLighting.h: * platform/graphics/filters/LightSource.cpp: (WebCore::PointLightSource::setX): (WebCore::PointLightSource::setY): (WebCore::PointLightSource::setZ): (WebCore::SpotLightSource::setX): (WebCore::SpotLightSource::setY): (WebCore::SpotLightSource::setZ): (WebCore::SpotLightSource::setPointsAtX): (WebCore::SpotLightSource::setPointsAtY): (WebCore::SpotLightSource::setPointsAtZ): (WebCore::SpotLightSource::setSpecularExponent): (WebCore::SpotLightSource::setLimitingConeAngle): (WebCore::DistantLightSource::setAzimuth): (WebCore::DistantLightSource::setElevation): (WebCore::LightSource::setAzimuth): (WebCore::LightSource::setElevation): (WebCore::LightSource::setX): (WebCore::LightSource::setY): (WebCore::LightSource::setZ): (WebCore::LightSource::setPointsAtX): (WebCore::LightSource::setPointsAtY): (WebCore::LightSource::setPointsAtZ): (WebCore::LightSource::setSpecularExponent): (WebCore::LightSource::setLimitingConeAngle): * platform/graphics/filters/LightSource.h: * platform/graphics/filters/PointLightSource.h: * platform/graphics/filters/SpotLightSource.h: * rendering/svg/RenderSVGResourceFilter.cpp: (WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): * svg/SVGFEDiffuseLightingElement.cpp: (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute): (WebCore::SVGFEDiffuseLightingElement::lightElementAttributeChanged): (WebCore::SVGFEDiffuseLightingElement::build): (WebCore::SVGFEDiffuseLightingElement::findLightElement): (WebCore::SVGFEDiffuseLightingElement::findLight): * svg/SVGFEDiffuseLightingElement.h: * svg/SVGFELightElement.cpp: (WebCore::SVGFELightElement::svgAttributeChanged): * svg/SVGFilterPrimitiveStandardAttributes.cpp: (WebCore::SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute): * svg/SVGFilterPrimitiveStandardAttributes.h: 2011-02-01 Roland Steiner Reviewed by Dimitri Glazkov. Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files https://bugs.webkit.org/show_bug.cgi?id=53289 Moving the nested class DocumentOrderedMap from Document into separate files, updating code where necessary. No new tests. (refactoring) * Android.mk: * CMakeLists.txt: * GNUMakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::getElementById): (WebCore::Document::getImageMap): * dom/Document.h: * dom/DocumentOrderedMap.cpp: Added. (WebCore::keyMatchesId): (WebCore::keyMatchesMapName): (WebCore::keyMatchesLowercasedMapName): (WebCore::DocumentOrderedMap::clear): (WebCore::DocumentOrderedMap::add): (WebCore::DocumentOrderedMap::remove): (WebCore::DocumentOrderedMap::get): (WebCore::DocumentOrderedMap::getElementById): (WebCore::DocumentOrderedMap::getElementByMapName): (WebCore::DocumentOrderedMap::getElementByLowercasedMapName): * dom/DocumentOrderedMap.h: Added. (WebCore::DocumentOrderedMap::contains): (WebCore::DocumentOrderedMap::containsMultiple): * dom/DOMAllInOne.cpp: 2011-02-01 Mario Sanchez Prada Reviewed by Martin Robinson. [Gtk] atk_text_set_caret_offset fails for list items https://bugs.webkit.org/show_bug.cgi?id=53388 Allow using text ranges across list items. * accessibility/gtk/AccessibilityObjectAtk.cpp: (WebCore::AccessibilityObject::allowsTextRanges): Add list items to the list of accessibility objects supporting text ranges. 2011-02-01 Mario Sanchez Prada Reviewed by Martin Robinson. [GTK] character range extents is off when the end of a wrapped line is included https://bugs.webkit.org/show_bug.cgi?id=53323 Fixed wrong calculation getting the range extents. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_text_get_range_extents): Removed '+1' since the requested interval shouldn't include the last character. 2011-02-01 Mario Sanchez Prada Reviewed by Martin Robinson. [GTK] Caret Offset is one off at the end of wrapped lines https://bugs.webkit.org/show_bug.cgi?id=53300 Consider linebreaks as special cases. * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (objectAndOffsetUnignored): In order to avoid getting wrong values when around linebreaks, we need to workaround this by explicitly avoiding those '\n' text nodes from affecting the result of calling to TextIterator:rangeLength(). 2011-02-01 Roland Steiner Unreviewed, rolling out r77229. http://trac.webkit.org/changeset/77229 https://bugs.webkit.org/show_bug.cgi?id=53289 revert mysterious build breakage * Android.mk: * CMakeLists.txt: * GNUmakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/DOMAllInOne.cpp: * dom/Document.cpp: (WebCore::Document::DocumentOrderedMap::clear): (WebCore::Document::DocumentOrderedMap::add): (WebCore::Document::DocumentOrderedMap::remove): (WebCore::Document::DocumentOrderedMap::get): (WebCore::keyMatchesId): (WebCore::Document::getElementById): (WebCore::keyMatchesMapName): (WebCore::keyMatchesLowercasedMapName): (WebCore::Document::getImageMap): * dom/Document.h: (WebCore::Document::DocumentOrderedMap::contains): (WebCore::Document::DocumentOrderedMap::containsMultiple): * dom/DocumentOrderedMap.cpp: Removed. * dom/DocumentOrderedMap.h: Removed. 2011-02-01 Mihai Parparita Reviewed by James Robinson. Async event handlers should not fire within a modal dialog https://bugs.webkit.org/show_bug.cgi?id=53202 Asychronous events that use EventQueue would currently fire while a modal dialog (e.g. window.alert()) was up. Change EventQueue to use a SuspendableTimer (which automatically gets suspended while dialogs are up and in other cases where JS execution is not allowed). Test: fast/events/scroll-event-during-modal-dialog.html * dom/Document.cpp: (WebCore::Document::Document): * dom/EventQueue.cpp: (WebCore::EventQueueTimer::EventQueueTimer): (WebCore::EventQueueTimer::fired): (WebCore::EventQueue::EventQueue): (WebCore::EventQueue::enqueueEvent): (WebCore::EventQueue::pendingEventTimerFired): * dom/EventQueue.h: (WebCore::EventQueue::create): 2011-02-01 Roland Steiner Reviewed by Dimitri Glazkov. Bug 53289 - DOM: Move DocumentOrderedMap from Document into separate files https://bugs.webkit.org/show_bug.cgi?id=53289 Moving the nested class DocumentOrderedMap from Document into separate files, updating code where necessary. No new tests. (refactoring) * Android.mk: * CMakeLists.txt: * GNUMakefile.am: * WebCore.gypi: * WebCore.pro: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/Document.cpp: (WebCore::Document::getElementById): (WebCore::Document::getImageMap): * dom/Document.h: * dom/DocumentOrderedMap.cpp: Added. (WebCore::keyMatchesId): (WebCore::keyMatchesMapName): (WebCore::keyMatchesLowercasedMapName): (WebCore::DocumentOrderedMap::clear): (WebCore::DocumentOrderedMap::add): (WebCore::DocumentOrderedMap::remove): (WebCore::DocumentOrderedMap::get): (WebCore::DocumentOrderedMap::getElementById): (WebCore::DocumentOrderedMap::getElementByMapName): (WebCore::DocumentOrderedMap::getElementByLowercasedMapName): * dom/DocumentOrderedMap.h: Added. (WebCore::DocumentOrderedMap::contains): (WebCore::DocumentOrderedMap::containsMultiple): * dom/DOMAllInOne.cpp: 2011-02-01 Naoki Takano Reviewed by Darin Fisher. [Chromium] Autofill should work with HTML5 form elements https://bugs.webkit.org/show_bug.cgi?id=51809 http://crbug.com/65654 No new tests, because this fix is for Chromium project and hard to test only in WebKit project. * html/InputType.h: Insert comment for canSetSuggestedValue(). * html/TextFieldInputType.cpp: (WebCore::TextFieldInputType::canSetSuggestedValue): Implemented to return always true for that all text filed inputs can be completed. * html/TextFieldInputType.h: Declare canSetSuggestedValue(). * html/TextInputType.cpp: Delete canSetSuggestedValue() not to return true anymore. * html/TextInputType.h: Delete canSetSuggestedValue() not to return true anymore. 2011-02-01 Kent Tamura Reviewed by Dan Bernstein. REGRESSION (r65062): Safari loops forever under WebCore::plainTextToMallocAllocatedBuffer() https://bugs.webkit.org/show_bug.cgi?id=53272 * editing/TextIterator.cpp: (WebCore::TextIterator::handleTextBox): Pass the appropriate renderer to emitText(). 2011-01-31 Alexey Proskuryakov Reviewed by Maciej Stachowiak. https://bugs.webkit.org/show_bug.cgi?id=53466 Move WebKit2 to printing via API methods * WebCore.exp.in: Export IntRect::scale(). 2011-01-31 Patrick Gansterer Reviewed by Adam Barth. Remove obsolete comment after r41871 https://bugs.webkit.org/show_bug.cgi?id=53406 * dom/Document.h: 2011-01-31 Simon Fraser Fix according to reviewer comments: can just use Color::black now. * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::drawInsetShadow): (WebCore::ShadowBlur::drawRectShadowWithoutTiling): 2011-01-31 Simon Fraser Reviewed by Sam Weinig. Clean up ShadowBlur https://bugs.webkit.org/show_bug.cgi?id=53472 Some minor ShadowBlur cleanup. * platform/graphics/ShadowBlur.h: * platform/graphics/ShadowBlur.cpp: (WebCore::ShadowBlur::ShadowBlur): Use m_blurRadius rather than the radius paramter. (WebCore::ShadowBlur::adjustBlurRadius): Renamed from adjustBlurDistance. (WebCore::ShadowBlur::calculateLayerBoundingRect): Rename layerFloatRect to layerRect. Make frameSize a float. (WebCore::ShadowBlur::beginShadowLayer): This now takes a precomputed layerRect rather than calling calculateLayerBoundingRect() to compute it itself, since we were calling calculateLayerBoundingRect() twice. (WebCore::ShadowBlur::drawRectShadow): Optimize to call calculateLayerBoundingRect() only once. The shadowRect variable was unused, so two return paths could be collapsed into one. (WebCore::ShadowBlur::drawInsetShadow): Call calculateLayerBoundingRect() before beginShadowLayer() now. (WebCore::ShadowBlur::drawRectShadowWithoutTiling): The layerRect gets passed in. We always used alpha=1, so no need to pass that in. (WebCore::ShadowBlur::drawRectShadowWithTiling): We always used alpha=1, so no need to pass that in. Move shadowRect down to first use. ShadowBlur::clipBounds() was unused. 2011-01-31 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all https://bugs.webkit.org/show_bug.cgi?id=46748 This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance. Added a regression test to tst_QWebFrame. * bridge/qt/qt_instance.cpp: (JSC::Bindings::QtInstance::QtInstance): 2011-01-27 MORITA Hajime Reviewed by Dimitri Glazkov. Convert shadow DOM to a DOM-based shadow. https://bugs.webkit.org/show_bug.cgi?id=50660 * Removed RenderProgress::m_valuePart, moved the shadow node to the shadow root of HTMLProgressElement. * Removed hard-coded pseudo ID for -webkit-progress-bar-value. ProgressBarValueElement is defined only for overriding shadowPseudoId(). No new tests. No behavioral change. * css/CSSSelector.cpp: (WebCore::CSSSelector::pseudoId): (WebCore::nameToPseudoTypeMap): (WebCore::CSSSelector::extractPseudoType): * css/CSSSelector.h: * html/HTMLProgressElement.cpp: (WebCore::ProgressBarValueElement::ProgressBarValueElement): (WebCore::ProgressBarValueElement::shadowPseudoId): (WebCore::ProgressBarValueElement::create): (WebCore::ProgressBarValueElement::detach): (WebCore::HTMLProgressElement::parseMappedAttribute): (WebCore::HTMLProgressElement::attach): (WebCore::HTMLProgressElement::valuePart): (WebCore::HTMLProgressElement::didElementStateChange): (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded): * html/HTMLProgressElement.h: * rendering/RenderProgress.cpp: (WebCore::RenderProgress::~RenderProgress): (WebCore::RenderProgress::updateFromElement): (WebCore::RenderProgress::layoutParts): (WebCore::RenderProgress::shouldHaveParts): (WebCore::RenderProgress::valuePart): * rendering/RenderProgress.h: * rendering/style/RenderStyleConstants.h: 2011-01-31 Charlie Reis Reviewed by Mihai Parparita. Add sanity check to help diagnose bug 52819 https://bugs.webkit.org/show_bug.cgi?id=53402 Crash early if the children of fromItem look invalid. * loader/HistoryController.cpp: 2011-01-31 Kalle Vahlman Reviewed by Andreas Kling. [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend https://bugs.webkit.org/show_bug.cgi?id=53325 Reimplement paintCurrentFrameInContext() rather than delegate the rendering to paint() to make sure we really do get the video frame content into the GraphicsContext, regardless of accelerated compositing and the video scene state. * platform/graphics/qt/MediaPlayerPrivateQt.cpp: (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext): * platform/graphics/qt/MediaPlayerPrivateQt.h: 2011-01-31 Emil A Eklund Reviewed by Darin Adler. Setting "selected" attribute to false should have no effect in single line can't display right-to-left (rtl) languages https://bugs.webkit.org/show_bug.cgi?id=19785 Changed element, with the checkmarks on the "start" side, and use the