1. 11 Oct, 2012 40 commits
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=98700 · 64d3610a
      bdakin@apple.com authored
      ScrollingCoordinator is a hot mess of if-defs
      
      Reviewed by Anders Carlsson.
      
      This patch moves all of the threaded scrolling code in 
      ScrollingCoordinator into a new class called ScrollingCoordinatorMac 
      which inherits from ScrollingCoordinator. 
      
      It also adds ScrollingCoordinatorChromium to do Chromium-specific work. 
      ScrollingCoordinator itself does work that is cross-platform. 
              
      Finally, this patch also eliminates ScrollingCoordinatorNone. 
      ScrollingCoordinator is now sufficient for platforms that relied on 
      ScrollingCoordinatorNone to build.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::create):
      (WebCore):
      (WebCore::ScrollingCoordinator::ScrollingCoordinator):
      (WebCore::ScrollingCoordinator::~ScrollingCoordinator):
      (WebCore::ScrollingCoordinator::pageDestroyed):
      (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
      (WebCore::ScrollingCoordinator::computeCurrentWheelEventHandlerCount):
      (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
      (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
      * page/scrolling/ScrollingCoordinator.h:
      (WebCore):
      (ScrollingCoordinator):
      (WebCore::ScrollingCoordinator::scrollingTree):
      (WebCore::ScrollingCoordinator::commitTreeStateIfNeeded):
      (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
      (WebCore::ScrollingCoordinator::supportsFixedPositionLayers):
      (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
      (WebCore::ScrollingCoordinator::handleWheelEvent):
      (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
      (WebCore::ScrollingCoordinator::attachToStateTree):
      (WebCore::ScrollingCoordinator::detachFromStateTree):
      (WebCore::ScrollingCoordinator::clearStateTree):
      (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
      (WebCore::ScrollingCoordinator::setLayerIsContainerForFixedPositionLayers):
      (WebCore::ScrollingCoordinator::setLayerIsFixedToContainerLayer):
      (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
      (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
      * page/scrolling/ScrollingCoordinatorNone.cpp: Removed.
      * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
      (WebCore::ScrollingCoordinatorChromium::ScrollingCoordinatorChromium):
      (WebCore::ScrollingCoordinatorChromium::~ScrollingCoordinatorChromium):
      (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
      (WebCore):
      (WebCore::ScrollingCoordinatorChromium::frameViewRootLayerDidChange):
      (WebCore::ScrollingCoordinatorChromium::frameViewHorizontalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinatorChromium::frameViewVerticalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinatorChromium::setScrollLayer):
      (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
      (WebCore::ScrollingCoordinatorChromium::setWheelEventHandlerCount):
      (WebCore::ScrollingCoordinatorChromium::setShouldUpdateScrollLayerPositionOnMainThread):
      (WebCore::ScrollingCoordinatorChromium::setLayerIsContainerForFixedPositionLayers):
      (WebCore::ScrollingCoordinatorChromium::setLayerIsFixedToContainerLayer):
      (WebCore::ScrollingCoordinatorChromium::scrollableAreaScrollLayerDidChange):
      (WebCore::ScrollingCoordinatorChromium::recomputeWheelEventHandlerCountForFrameView):
      * page/scrolling/chromium/ScrollingCoordinatorChromium.h: Added.
      (WebCore):
      (ScrollingCoordinatorChromium):
      (WebCore::ScrollingCoordinatorChromium::supportsFixedPositionLayers):
      * page/scrolling/mac/ScrollingCoordinatorMac.h: Added.
      (WebCore):
      (ScrollingCoordinatorMac):
      (ScrollParameters):
      * page/scrolling/mac/ScrollingCoordinatorMac.mm:
      (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
      (WebCore::ScrollingCoordinatorMac::~ScrollingCoordinatorMac):
      (WebCore::ScrollingCoordinatorMac::pageDestroyed):
      (WebCore):
      (WebCore::ScrollingCoordinatorMac::scrollingTree):
      (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded):
      (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
      (WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
      (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
      (WebCore::ScrollingCoordinatorMac::frameViewHorizontalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinatorMac::frameViewVerticalScrollbarLayerDidChange):
      (WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
      (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
      (WebCore::ScrollingCoordinatorMac::updateMainFrameScrollPositionAndScrollLayerPosition):
      (WebCore::ScrollingCoordinatorMac::attachToStateTree):
      (WebCore::ScrollingCoordinatorMac::detachFromStateTree):
      (WebCore::ScrollingCoordinatorMac::clearStateTree):
      (WebCore::ScrollingCoordinatorMac::stateNodeForID):
      (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView):
      (WebCore::ScrollingCoordinatorMac::setScrollLayerForNode):
      (WebCore::ScrollingCoordinatorMac::setNonFastScrollableRegionForNode):
      (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
      (WebCore::ScrollingCoordinatorMac::setWheelEventHandlerCountForNode):
      (WebCore::ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread):
      (WebCore::ScrollingCoordinatorMac::updateMainFrameScrollLayerPosition):
      (WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
      (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired):
      (WebCore::ScrollingCoordinatorMac::commitTreeState):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131137 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d3610a
    • commit-queue@webkit.org's avatar
      [Shadow DOM] Insertion points need resetStyleInheritance · b9d364a4
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93922
      
      Patch by Takashi Sakamoto <tasak@google.com> on 2012-10-11
      Reviewed by Dimitri Glazkov.
      
      Source/WebCore:
      
      Implemented resetStyleInheritance of insertion points.
      Its spec link is http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#api-html-content-element-reset-style-inheritance
      
      Test: fast/dom/shadow/insertion-point-resetStyleInheritance.html
      
      * css/StyleResolver.cpp:
      (WebCore::isResetStyleInheritance):
      Added a new function to check whether there exists any insertion
      point which has reset-style-inhertiance flag set to be true.
      (WebCore::StyleResolver::initForStyleResolve):
      Modified to use the above function to check reset-style-inheritance.
      * html/shadow/HTMLContentElement.idl:
      * html/shadow/HTMLShadowElement.idl:
      Added a new attribute for reset-style-inheritance.
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::InsertionPoint):
      Initialized a new member variable for reset-style-inheritance.
      (WebCore::InsertionPoint::resetStyleInheritance):
      (WebCore::InsertionPoint::setResetStyleInheritance):
      Implemented setter/getter for reset-style-inheritance.
      * html/shadow/InsertionPoint.h:
      (InsertionPoint):
      Added a new member variable for reset-style-inheritance.
      
      LayoutTests:
      
      * fast/dom/shadow/insertion-point-resetStyleInheritance-expected.txt: Added.
      * fast/dom/shadow/insertion-point-resetStyleInheritance.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b9d364a4
    • andersca@apple.com's avatar
      Attempt to fix build broken by r131125. · 5ff7b5e5
      andersca@apple.com authored
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::addImageToResources):
      KURL::utf8String() is apparently a USE(GOOGLEURL) feature. Call url.string().utf8() instead.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ff7b5e5
    • bashi@chromium.org's avatar
      [Chromium] Use harfbuzz-ng by default on Linux · 72127d50
      bashi@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97281
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Switch old harfbuzz to harfbuzz-ng on chromium linux port.
      
      No new tests. Existing tests should cover this switch.
      Test expectations will be updated.
      
      * WebCore.gyp/WebCore.gyp:
      
      Source/WebKit/chromium:
      
      * features.gypi: Enable WTF_USE_HARFBUZZ_NG when use_x11 == 1.
      
      LayoutTests:
      
      * platform/chromium/TestExpectations: Added temporary expectations.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      72127d50
    • nduca@chromium.org's avatar
      Expose high-resolution on requestAnimationFrame callback · ca5e5e4e
      nduca@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66683
      
      This changes requestAnimationFrame's animationStartTime argument
      to be a high resolution DOM timestamp, per disucssion here:
      http://lists.w3.org/Archives/Public/public-web-perf/2012Apr/0004.html
      
      Reviewed by James Robinson.
      
      Source/WebCore:
      
      Covered by existing requestAnimationFrame tests.
      
      * dom/Document.cpp:
      (WebCore::Document::serviceScriptedAnimations):
      * dom/Document.h:
      (Document):
      * dom/ScriptedAnimationController.cpp:
      (WebCore::ScriptedAnimationController::ScriptedAnimationController):
      (WebCore::ScriptedAnimationController::serviceScriptedAnimations):
      (WebCore):
      (WebCore::ScriptedAnimationController::windowScreenDidChange):
      (WebCore::ScriptedAnimationController::scheduleAnimation):
      (WebCore::ScriptedAnimationController::animationTimerFired):
      (WebCore::ScriptedAnimationController::displayRefreshFired):
      * dom/ScriptedAnimationController.h:
      (ScriptedAnimationController):
      * page/FrameView.cpp:
      (WebCore::FrameView::serviceScriptedAnimations):
      * page/FrameView.h:
      (FrameView):
      * platform/graphics/DisplayRefreshMonitor.cpp:
      (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor):
      (WebCore::DisplayRefreshMonitor::notifyClients):
      * platform/graphics/DisplayRefreshMonitor.h:
      (DisplayRefreshMonitor):
      * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp:
      (WebCore::DisplayRefreshMonitor::displayLinkFired):
      * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
      (WebCore):
      (WebCore::DisplayRefreshMonitor::requestRefreshCallback):
      (WebCore::DisplayRefreshMonitor::displayLinkFired):
      
      Source/WebKit/chromium:
      
      * src/PageWidgetDelegate.cpp:
      (WebKit::PageWidgetDelegate::animate):
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::updateAnimations):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca5e5e4e
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r131100. · f09dbb31
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/131100
      https://bugs.webkit.org/show_bug.cgi?id=99127
      
      Caused an ASSERT (Requested by abarth|gardening on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-11
      
      Source/WebCore:
      
      * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
      (WebCore::CustomFilterValidatedProgram::compositeFunctionString):
      
      LayoutTests:
      
      * css3/filters/custom/custom-filter-composite-operators-expected.png: Removed.
      * css3/filters/custom/custom-filter-composite-operators-expected.txt: Removed.
      * css3/filters/custom/custom-filter-composite-operators.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f09dbb31
    • bashi@chromium.org's avatar
      [Chromium] Improve vertical text rendering of HarfBuzzShaper (Re-land) · 56d24ad2
      bashi@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98979
      
      Reviewed by Tony Chang.
      
      - Specify 'vert' and 'vrt2' features when we render vertical text.
      - Set appropriate script so that harfbuzz-ng can use the features.
      
      No new tests. fast/text/international/text-spliced-font.html should cover this change.
      This change will affect after switching to harfbuzz-ng.
      
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
      (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
      (WebCore::findScriptForVerticalGlyphSubstitution): Added.
      (WebCore):
      (WebCore::HarfBuzzNGFace::setScriptForVerticalGlyphSubstitution): Added.
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
      (HarfBuzzNGFace): Added m_scriptForVerticalText.
      * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
      (WebCore::HarfBuzzShaper::setFontFeatures):
      Set 'vert' and 'vrt2' features when orientation() == Vertical.
      (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
      Call setScriptForVerticalGlyphSubstitution() when orientation() == Vertical.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56d24ad2
    • jcivelli@chromium.org's avatar
      Source/WebCore: Fix for a crasher when generating MHTML for a page containing SVG images. · f393d765
      jcivelli@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99105
      
      Reviewed by Adam Barth.
      
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeCSSStyleSheet):
      (WebCore::PageSerializer::addImageToResources):
      
      Source/WebKit/chromium: Test for a fix for a crasher when generating MHTML for a page containing SVG images.
      https://bugs.webkit.org/show_bug.cgi?id=99105
      
      Reviewed by Adam Barth.
      
      * page/PageSerializer.cpp:
      (WebCore::PageSerializer::serializeCSSStyleSheet):
      (WebCore::PageSerializer::addImageToResources):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f393d765
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r131107. · 5a083743
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/131107
      https://bugs.webkit.org/show_bug.cgi?id=99126
      
      Causes an ASSERT (Requested by abarth|gardening on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-11
      
      Source/WebCore:
      
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::labelForElement):
      * dom/DocumentOrderedMap.cpp:
      * dom/DocumentOrderedMap.h:
      (DocumentOrderedMap):
      * dom/Element.cpp:
      (WebCore::Element::insertedInto):
      (WebCore::Element::removedFrom):
      (WebCore):
      (WebCore::Element::willModifyAttribute):
      * dom/Element.h:
      (Element):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::TreeScope):
      * dom/TreeScope.h:
      (WebCore):
      (TreeScope):
      
      Tools:
      
      * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
      (AccessibilityController::getAccessibleElementById):
      * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
      (AccessibilityUIElement::titleUIElementCallback):
      
      LayoutTests:
      
      * accessibility/secure-textfield-title-ui.html:
      * accessibility/title-ui-element-correctness-expected.txt: Removed.
      * accessibility/title-ui-element-correctness.html: Removed.
      * perf/accessibility-title-ui-element-expected.txt: Removed.
      * perf/accessibility-title-ui-element.html: Removed.
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a083743
    • timothy_horton@apple.com's avatar
      LocalCurrentGraphicsContext will never restore the current context to null · 2b0c10a8
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99122
      
      Reviewed by Simon Fraser.
      
      LocalCurrentGraphicsContext is meant to cause temporary changes to
      NSGraphicsContext's currentContext. However, if it is entered when
      currentContext is null, it will not restore to null, as a null
      m_savedNSGraphicsContext was being used to indicate that the current and
      passed-in graphics contexts were equal (and thus no save/restore was required).
      
      Add a separate flag for whether or not we need to restore the context.
      
      Also flip the order of calls to restore graphics context state so that
      exiting LocalCurrentGraphicsContext does things in exactly the opposite
      of entry.
      
      * platform/mac/LocalCurrentGraphicsContext.h:
      (LocalCurrentGraphicsContext):
      * platform/mac/LocalCurrentGraphicsContext.mm:
      (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
      (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b0c10a8
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r131109. · 8ba93373
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/131109
      https://bugs.webkit.org/show_bug.cgi?id=99124
      
      Does not compile on chromium-mac (Requested by
      abarth|gardening on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-11
      
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
      (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
      (HarfBuzzNGFace):
      * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
      (WebCore::HarfBuzzShaper::setFontFeatures):
      (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8ba93373
    • lforschler@apple.com's avatar
      Versioning. · e65b1d6e
      lforschler@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e65b1d6e
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=99111 · 15617a6f
      bdakin@apple.com authored
      ScrollingStateNode should keep its Vector of children in an OwnPtr
      
      Reviewed by Ada Chan.
      
      Vector<OwnPtr<ScrollingStateNode> >* m_children; is now:
       OwnPtr<Vector<OwnPtr<ScrollingStateNode> > > m_children;
      * page/scrolling/ScrollingStateNode.cpp:
      (WebCore::ScrollingStateNode::ScrollingStateNode):
      (WebCore::ScrollingStateNode::~ScrollingStateNode):
      (WebCore::ScrollingStateNode::appendChild):
      * page/scrolling/ScrollingStateNode.h:
      (ScrollingStateNode):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15617a6f
    • leviw@chromium.org's avatar
      [Sub pixel layout] Fast-path iframe scrolling can picks up an extra pixel · 63f73871
      leviw@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98571
      
      Reviewed by Emil A Eklund.
      
      Source/WebCore:
      
      Refactoring all coordinate-switching functionality to use a single "mode" flag
      as opposed to having a bunch of boolean values. This enables the same set of
      options across the board, and a consistent interface. This was previously
      done for mapLocalToContainer.
      
      The imptetus for this for this stems from the one logical change in this patch
      which only effects sub-pixel layout. FrameView::convertToRenderer and
      convertFromRenderer return IntPoint coordinates, and need to also snap transform
      offsets to determine proper rects for scrolling.
      
      Unlabeled functions below are simply being updated to these new interfaces.
      
      Test: fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html
      
      * WebCore.exp.in:
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::getUpperLeftCorner):
      (WebCore::ContainerNode::getLowerRightCorner):
      * dom/Element.cpp:
      (WebCore::Element::boundsInRootViewSpace):
      * dom/MouseRelatedEvent.cpp:
      (WebCore::MouseRelatedEvent::computeRelativePosition):
      * dom/Node.cpp:
      (WebCore::Node::convertToPage):
      (WebCore::Node::convertFromPage):
      * html/HTMLSelectElement.cpp:
      (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
      * html/shadow/SliderThumbElement.cpp:
      (WebCore::SliderThumbElement::setPositionFromPoint):
      * html/shadow/SpinButtonElement.cpp:
      (WebCore::SpinButtonElement::defaultEventHandler):
      * page/FrameView.cpp:
      (WebCore::FrameView::convertToRenderer): Now pixel-snaps offsets before passing
      them to TransformState, which transforms the coordinates.
      (WebCore::FrameView::convertFromRenderer): Ditto.
      * rendering/LayoutState.cpp:
      (WebCore::LayoutState::LayoutState):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::absoluteQuads):
      * rendering/RenderBox.cpp:
      (WebCore::RenderBox::absoluteQuads):
      (WebCore::RenderBox::mapLocalToContainer):
      (WebCore::RenderBox::mapAbsoluteToLocalPoint):
      * rendering/RenderBox.h:
      (RenderBox):
      * rendering/RenderBoxModelObject.cpp:
      (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
      * rendering/RenderBoxModelObject.h:
      (RenderBoxModelObject):
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
      * rendering/RenderFrameSet.cpp:
      (WebCore::RenderFrameSet::userResize):
      * rendering/RenderGeometryMap.cpp:
      (WebCore::RenderGeometryMap::absolutePoint):
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::mapLocalToContainer):
      * rendering/RenderInline.h:
      (RenderInline):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::absoluteToContents):
      (WebCore::RenderLayer::calculateClipRects):
      * rendering/RenderMediaControls.cpp:
      (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton):
      * rendering/RenderMenuList.cpp:
      (WebCore::RenderMenuList::showPopup):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::localToAbsolute):
      (WebCore::RenderObject::absoluteToLocal):
      (WebCore::RenderObject::mapLocalToContainer):
      (WebCore::RenderObject::mapAbsoluteToLocalPoint):
      (WebCore::RenderObject::localToContainerQuad):
      (WebCore::RenderObject::localToContainerPoint):
      * rendering/RenderObject.h:
      (RenderObject): MapLocalToContainerFlags is now MapCoordinatesFlags since it's
      now used for other conversion methods.
      (WebCore::RenderObject::localToAbsoluteQuad):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::mapLocalToContainer):
      (WebCore::RenderView::mapAbsoluteToLocalPoint):
      * rendering/RenderView.h:
      (RenderView):
      * rendering/svg/RenderSVGForeignObject.cpp:
      (WebCore::RenderSVGForeignObject::mapLocalToContainer):
      * rendering/svg/RenderSVGForeignObject.h:
      (RenderSVGForeignObject):
      * rendering/svg/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::mapLocalToContainer):
      * rendering/svg/RenderSVGInline.h:
      (RenderSVGInline):
      * rendering/svg/RenderSVGModelObject.cpp:
      (WebCore::RenderSVGModelObject::mapLocalToContainer):
      * rendering/svg/RenderSVGModelObject.h:
      (RenderSVGModelObject):
      * rendering/svg/RenderSVGRoot.cpp:
      (WebCore::RenderSVGRoot::mapLocalToContainer):
      * rendering/svg/RenderSVGRoot.h:
      (RenderSVGRoot):
      * rendering/svg/RenderSVGText.cpp:
      (WebCore::RenderSVGText::mapLocalToContainer):
      * rendering/svg/RenderSVGText.h:
      (RenderSVGText):
      * rendering/svg/SVGRenderSupport.cpp:
      (WebCore::SVGRenderSupport::mapLocalToContainer):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::localCoordinateSpaceTransform):
      
      LayoutTests:
      
      Tests scrolling of sub-pixel layers on sub-pixel platforms (Chromium).
      
      * fast/sub-pixel/sub-pixel-iframe-copy-on-scroll.html: Added.
      * platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.png: Added.
      * platform/chromium-linux/fast/sub-pixel/sub-pixel-iframe-copy-on-scroll-expected.txt: Added.
      * platform/chromium-linux/fast/repaint/repaint-across-writing-mode-boundary-expected.png:
      The repaint rect shrinks safely by one pixel.
      * platform/chromium/TestExpectations:
      * platform/mac-lion/TestExpectations:
      * platform/mac-snowleopard/TestExpectations:
      * platform/mac-wk2/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt-4.8/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win-wk2/TestExpectations:
      * platform/win-xp/TestExpectations:
      * platform/win/TestExpectations:
      * platform/wincairo/TestExpectations:
      * platform/wk2/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131111 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63f73871
    • abarth@webkit.org's avatar
      Incorrect/Illegal static cast in FrameView.cpp · 01ad32d9
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98943
      
      Reviewed by Eric Seidel.
      
      HTMLFrameElementBase is the common base class for <frame> and <iframe>.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::init):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131110 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01ad32d9
    • bashi@chromium.org's avatar
      [Chromium] Improve vertical text rendering of HarfBuzzShaper · f189830c
      bashi@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98979
      
      Reviewed by Tony Chang.
      
      - Specify 'vert' and 'vrt2' features when we render vertical text.
      - Set appropriate script so that harfbuzz-ng can use the features.
      
      No new tests. fast/text/international/text-spliced-font.html should cover this change.
      This change will affect after switching to harfbuzz-ng.
      
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.cpp:
      (WebCore::HarfBuzzNGFace::HarfBuzzNGFace):
      (WebCore::findScriptForVerticalGlyphSubstitution): Added.
      (WebCore):
      (WebCore::HarfBuzzNGFace::setScriptForVerticalGlyphSubstitution): Added.
      * platform/graphics/harfbuzz/ng/HarfBuzzNGFace.h:
      (HarfBuzzNGFace): Added m_scriptForVerticalText.
      * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
      (WebCore::HarfBuzzShaper::setFontFeatures):
      Set 'vert' and 'vrt2' features when orientation() == Vertical.
      (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
      Call setScriptForVerticalGlyphSubstitution() when orientation() == Vertical.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f189830c
    • dmazzoni@google.com's avatar
      AX: labelForElement is slow when there are a lot of DOM elements · 881eb996
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97825
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Adds a DocumentOrderedMap to TreeScope that allows accessibility to
      quickly map from an id to the label for that id. This speeds up
      AccessibilityNode::labelForElement, which was a bottleneck in Chromium
      when accessibility was on.
      
      Tests: accessibility/title-ui-element-correctness.html
             perf/accessibility-title-ui-element.html
      
      * accessibility/AccessibilityNodeObject.cpp:
      (WebCore::AccessibilityNodeObject::labelForElement):
      * dom/DocumentOrderedMap.cpp:
      (WebCore::keyMatchesLabelForAttribute):
      (WebCore):
      (WebCore::DocumentOrderedMap::getElementByLabelForAttribute):
      * dom/DocumentOrderedMap.h:
      (DocumentOrderedMap):
      * dom/Element.cpp:
      (WebCore::Element::insertedInto):
      (WebCore::Element::removedFrom):
      (WebCore::Element::updateLabel):
      (WebCore):
      (WebCore::Element::willModifyAttribute):
      * dom/Element.h:
      (Element):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::TreeScope):
      (WebCore::TreeScope::addLabel):
      (WebCore):
      (WebCore::TreeScope::removeLabel):
      (WebCore::TreeScope::labelElementForId):
      * dom/TreeScope.h:
      (WebCore):
      (TreeScope):
      (WebCore::TreeScope::shouldCacheLabelsByForAttribute):
      
      Tools:
      
      Implement titleUIElement in the chromium port of DRT, and
      fix getAccessibleElementById so that it ensures the backing store
      is up-to-date.
      
      * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
      (AccessibilityController::getAccessibleElementById):
      * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
      (AccessibilityUIElement::titleUIElementCallback):
      
      LayoutTests:
      
      Adds two new tests for titleUIElement that run on both Mac and
      Chromium. One tests correctness, the other tests speed.
      
      Fixes one test so that it passes on Chromium.
      Enables other tests that now pass on Chromium.
      
      * accessibility/secure-textfield-title-ui.html:
      * accessibility/title-ui-element-correctness-expected.txt: Added.
      * accessibility/title-ui-element-correctness.html: Added.
      * perf/accessibility-title-ui-element-expected.txt: Added.
      * perf/accessibility-title-ui-element.html: Added.
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131107 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      881eb996
    • simonjam@chromium.org's avatar
      unprefix window.performance.webkitNow() · 29630d3c
      simonjam@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88278
      
      Reviewed by Tony Gentilcore.
      
      PerformanceTests:
      
      * resources/runner.js: Bind to proper object to avoid invalid invocation errors.
      
      Source/WebCore:
      
      Test: fast/dom/Window/window-properties-performance.html
            fast/performance/performance-now-timestamps.html
      
      * page/Performance.cpp:
      (WebCore::Performance::now):
      * page/Performance.h:
      (Performance):
      * page/Performance.idl:
      
      LayoutTests:
      
      * fast/dom/Window/window-properties-performance-expected.txt:
      * fast/performance/performance-now-timestamps-expected.txt:
      * fast/performance/script-tests/performance-now-timestamps.js:
      * platform/chromium/TestExpectations: Remove skipped expectation.
      * platform/efl/TestExpectations:
      * platform/efl/fast/dom/Window/window-properties-performance-expected.txt:
      * platform/gtk/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/qt/fast/dom/Window/window-properties-performance-expected.txt:
      * resources/magnitude-perf.js:
      (Magnitude._runIteration):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      29630d3c
    • roger_fong@apple.com's avatar
      [WebGL] [Mac] only the mapped symbol for the first element of a uniform/attribute array is stored. · 874ecced
      roger_fong@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98966
      
      Reviewed by Dean Jackson.
      
      We currently do not add name/mappedName symbol pairs for each element of a uniform/attribute array.
      This is because we only add a number of symbols equal to how many symbols the shader compiler tells us there are.
      The shader compiler treats an array as a single uniform. We need to be adding in symbols to the map for each element of the array ourselves.
      The mappedName of each array element is the same between elements except for the "[index]" at the end so this is easy to do.
      
      Tested using Khronos WebGL conformance suite:
      conformance/glsl/misc/glsl-long-variable-names.html
      
      * platform/graphics/ANGLEWebKitBridge.cpp:
      (WebCore::getSymbolInfo):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      874ecced
    • kling@webkit.org's avatar
      ElementAttributeData shouldn't be managing Element's callbacks. · 5444f252
      kling@webkit.org authored
      <http://webkit.org/b/98987>
      
      Reviewed by Anders Carlsson.
      
      Dispatch the following attribute-related Element callbacks from within Element
      instead of ElementAttributeData. Also made them private.
      
          - willModifyAttribute
          - didModifyAttribute
          - didAddAttribute
          - didRemoveAttribute
      
      No behavior change, just making ElementAttributeData a bit dumber (a good thing.)
      
      * dom/Element.cpp:
      (WebCore::Element::detachAttribute):
      (WebCore::Element::removeAttribute):
      (WebCore::Element::setAttributeInternal):
      (WebCore::Element::removeAttributeInternal):
      (WebCore::Element::addAttributeInternal):
      * dom/Element.h:
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::addAttribute):
      (WebCore::ElementAttributeData::removeAttribute):
      * dom/ElementAttributeData.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5444f252
    • commit-queue@webkit.org's avatar
      [CSS Shaders] Make custom filters use a premultiplied buffer. · 8254b65c
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98396
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2012-10-11
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Currently, a GLSL css_Composite function returns a premultiplied color, so
      FECustomFilter must make a premultiplied buffer in the case when an author is
      using the CSS mix function.
      
      In addition, there are two performance benefits when FECustomFilter uses a premultiplied buffer.
      1. FilterEffect::asImageBuffer is faster.
      2. In the future when Accelerated Compositing implementations use
      FECustomFilter, they do not need to convert an unmultiplied buffer to a
      premultiplied buffer.
      
      Test: css3/filters/custom/custom-filter-composite-fractional-source-alpha.html
      
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::applyShader):
      
      LayoutTests:
      
      Add test to check that the DOM element texture composites correctly
      when source alpha is a fractional value.
      
      * css3/filters/custom/custom-filter-composite-fractional-source-alpha-expected.html: Added.
      * css3/filters/custom/custom-filter-composite-fractional-source-alpha.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8254b65c
    • rwlbuis@webkit.org's avatar
      [CMAKE] Do not add include dirs twice · edeb1e00
      rwlbuis@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99099
      
      Reviewed by Yong Li.
      
      Do not add WebCore_INCLUDE_DIRECTORIES to WebCoreTestSupport_INCLUDE_DIRECTORIES, the includes_directory
      call does this for us.
      
      * CMakeLists.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      edeb1e00
    • commit-queue@webkit.org's avatar
      [CSS Shaders] Implement all composite operators except destination and lighter. · 6ba95bc6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97859
      
      Patch by Huang Dongsung <luxtella@company100.net> on 2012-10-11
      Reviewed by Dean Jackson.
      
      Source/WebCore:
      
      Add expressions for all composite operators except destination and
      lighter. The expressions are lifted directly from the CSS Compositing
      and Blending spec [1]. WebKit adds these compositing expressions to the
      author's shader.
      
      [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#advancedcompositing
      
      Test: css3/filters/custom/custom-filter-composite-operators.html
      
      * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
      (WebCore::CustomFilterValidatedProgram::compositeFunctionString):
      
      LayoutTests:
      
      Add test to check that the DOM element texture composites correctly with the css_MixColor
      variable from the author's shader for each composite operator.
      
      * css3/filters/custom/custom-filter-composite-operators-expected.png: Added.
      * css3/filters/custom/custom-filter-composite-operators-expected.txt: Added.
      * css3/filters/custom/custom-filter-composite-operators.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131100 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ba95bc6
    • jsbell@chromium.org's avatar
      IndexedDB: IDL types defined in spec should be visible to scripts · 9b681a3b
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99093
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Interfaces defined in the spec WebIDL, such as IDBCursorWithValue, should be exposed
      to scripts as properties of the global object. A few types were missing - add them.
      
      Test: storage/indexeddb/interfaces.html
      
      * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
      * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
      
      LayoutTests:
      
      Verify that interfaces defined in the IDB spec's WebIDL are present on the
      global object.
      
      * storage/indexeddb/interfaces-expected.txt: Added.
      * storage/indexeddb/interfaces.html: Added.
      * storage/indexeddb/resources/interfaces.js: Added.
      * storage/indexeddb/resources/shared.js: Remove assertion redundant with this test.
      (test):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b681a3b
    • ggaren@apple.com's avatar
      Removed ASSERT_CLASS_FITS_IN_CELL · 0aac150b
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97634
      
      Reviewed by Mark Hahnenberg.
      
      Source/JavaScriptCore: 
      
      Our collector now supports arbitrarily sized objects, so the ASSERT is not needed.
      
      * API/JSCallbackFunction.cpp:
      * API/JSCallbackObject.cpp:
      * heap/MarkedSpace.h:
      * jsc.cpp:
      * runtime/Arguments.cpp:
      * runtime/ArrayConstructor.cpp:
      * runtime/ArrayPrototype.cpp:
      * runtime/BooleanConstructor.cpp:
      * runtime/BooleanObject.cpp:
      * runtime/BooleanPrototype.cpp:
      * runtime/DateConstructor.cpp:
      * runtime/DatePrototype.cpp:
      * runtime/Error.cpp:
      * runtime/ErrorConstructor.cpp:
      * runtime/ErrorPrototype.cpp:
      * runtime/FunctionConstructor.cpp:
      * runtime/FunctionPrototype.cpp:
      * runtime/InternalFunction.cpp:
      * runtime/JSActivation.cpp:
      * runtime/JSArray.cpp:
      * runtime/JSBoundFunction.cpp:
      * runtime/JSFunction.cpp:
      * runtime/JSGlobalObject.cpp:
      * runtime/JSGlobalThis.cpp:
      * runtime/JSNameScope.cpp:
      * runtime/JSNotAnObject.cpp:
      * runtime/JSONObject.cpp:
      * runtime/JSObject.cpp:
      * runtime/JSPropertyNameIterator.cpp:
      * runtime/JSScope.cpp:
      * runtime/JSWithScope.cpp:
      * runtime/JSWrapperObject.cpp:
      * runtime/MathObject.cpp:
      * runtime/NameConstructor.cpp:
      * runtime/NamePrototype.cpp:
      * runtime/NativeErrorConstructor.cpp:
      * runtime/NativeErrorPrototype.cpp:
      * runtime/NumberConstructor.cpp:
      * runtime/NumberObject.cpp:
      * runtime/NumberPrototype.cpp:
      * runtime/ObjectConstructor.cpp:
      * runtime/ObjectPrototype.cpp:
      * runtime/RegExpConstructor.cpp:
      * runtime/RegExpMatchesArray.cpp:
      * runtime/RegExpObject.cpp:
      * runtime/RegExpPrototype.cpp:
      * runtime/StringConstructor.cpp:
      * runtime/StringObject.cpp:
      * runtime/StringPrototype.cpp:
      * testRegExp.cpp: Removed the ASSERT.
      
      Source/WebCore: 
      
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore):
      * bindings/js/JSImageConstructor.cpp:
      (WebCore):
      * bindings/js/JSNodeFilterCondition.cpp:
      (WebCore):
      * bindings/js/JSWorkerContextBase.cpp:
      (WebCore):
      * bindings/scripts/CodeGeneratorJS.pm:
      (GenerateImplementation):
      * bindings/scripts/test/JS/JSFloat64Array.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestEventTarget.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestException.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestInterface.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestNode.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestObj.cpp:
      (WebCore):
      * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
      (WebCore):
      * bridge/runtime_method.cpp:
      (JSC):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0aac150b
    • beidson@apple.com's avatar
      Switch ResourceLoader::resourceData() from SharedBuffer to ResourceBuffer · 1b1b9406
      beidson@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=98976
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      No new tests (No change in behavior).
      
      * WebCore.exp.in:
      * html/ImageDocument.cpp:
      (WebCore::ImageDocumentParser::appendBytes):
      (WebCore::ImageDocumentParser::finish):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::mainResourceContent):
      (WebCore::InspectorPageAgent::sharedBufferContent):
      (WebCore):
      (WebCore::InspectorPageAgent::dataContent):
      * inspector/InspectorPageAgent.h:
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::didFinishLoading):
      (WebCore::InspectorResourceAgent::didFailLoading):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::mainResourceData):
      (WebCore::DocumentLoader::setupForReplaceByMIMEType):
      (WebCore::DocumentLoader::maybeCreateArchive):
      (WebCore::DocumentLoader::mainResource):
      (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent):
      * loader/DocumentLoader.h:
      (WebCore):
      (DocumentLoader):
      * loader/ResourceBuffer.cpp:
      (WebCore::ResourceBuffer::append):
      (WebCore):
      (WebCore::ResourceBuffer::clear):
      * loader/ResourceBuffer.h:
      (ResourceBuffer):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::resourceData):
      (WebCore::ResourceLoader::addData):
      (WebCore::ResourceLoader::willStopBufferingData):
      * loader/ResourceLoader.h:
      (WebCore):
      (ResourceLoader):
      * loader/SubresourceLoader.cpp:
      (WebCore::SubresourceLoader::didReceiveResponse):
      (WebCore::SubresourceLoader::sendDataToResource):
      (WebCore::SubresourceLoader::didFinishLoading):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebdatasource.cpp:
      (webkit_web_data_source_get_data):
      
      Source/WebKit/mac:
      
      * WebView/WebDataSource.mm:
      (-[WebDataSource data]):
      
      Source/WebKit/win:
      
      * WebDataSource.cpp:
      (WebDataSource::data):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::finishedLoading):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::source):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::getMainResourceDataOfFrame):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1b1b9406
    • kpiascik@rim.com's avatar
      Web Inspector: node search does not work with elements on touch start listener · 0874f994
      kpiascik@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=95252
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Added new InspectorInstrumentation::handleTouchEvent() method which
      will prevent a touch handler from firing and inspect and element if we
      are already searching for a node to highlight.
      Now when a user has chosen to inspect element (magnifying glass icon)
      and touches on a page the event will be directed to inspector and
      handled appropriately.
      
      Not testable.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::handleTouchEvent):
      (WebCore):
      * inspector/InspectorDOMAgent.h:
      (InspectorDOMAgent):
      * inspector/InspectorInstrumentation.cpp:
      (WebCore):
      (WebCore::InspectorInstrumentation::handleTouchEventImpl):
      * inspector/InspectorInstrumentation.h:
      (InspectorInstrumentation):
      (WebCore::InspectorInstrumentation::handleTouchEvent):
      (WebCore):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleTouchEvent):
      
      Source/WebKit/blackberry:
      
      Removed calls to InspectorInstrumentation that no didn't work anyway.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPage::touchEvent):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0874f994
    • commit-queue@webkit.org's avatar
      [BlackBerry] Credentials for HTTPS urls are saved in the HTTP protection space · ba9966fd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99082
      
      Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-10-11
      Reviewed by Rob Buis.
      
      Adding support for secure ProtectionSpaces in Credentials
      to prevent credentials from being overwritten/used when the user
      accesses both versions of the same url.
      
      PR 199457
      
      The issue was the secure/non-secure version of the same protocol
      were using the same ProtectionSpace enum in the network stack. When
      the credentials are saved, it will overwrite each other since the
      protection object is identical.
      
      The fix is to use the WebKit provided secure enums when the protcol is secure.
      
      To test this, access a restricted site that is running on http. Save the
      password and access the same restricted site (same domain
      and path) but on https. The browser should prompt for credentials.
      
      * platform/network/blackberry/NetworkJob.cpp:
      (WebCore::NetworkJob::notifyAuthReceived):
      (WebCore::NetworkJob::handleFTPHeader):
      (WebCore::NetworkJob::sendRequestWithCredentials):
      (WebCore::NetworkJob::storeCredentials):
      * platform/network/blackberry/NetworkManager.cpp:
      (WebCore::NetworkManager::startJob):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ba9966fd
    • commit-queue@webkit.org's avatar
      [texmap] logic error in BitmapTextureGL::updateContents · ee02064a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98969
      
      Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-10-11
      Reviewed by Noam Rosenthal.
      
      Incorrect test (bytesPerLine == targetRect.width() / 4) never
      evaluates to true. Change it to correct test
      (bytesPerLine == targetRect.width() * 4)
      
      No new tests because no functional change.
      
      * platform/graphics/texmap/TextureMapperGL.cpp:
      (WebCore::BitmapTextureGL::updateContents):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ee02064a
    • mitz@apple.com's avatar
      <rdar://problem/12477191> Combined text reverts to full-width font after a style change · 38c100f8
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=99009
      
      Reviewed by John Sullivan.
      
      Source/WebCore: 
      
      Test: fast/text/text-combine-width-after-style-change.html
      
      * rendering/RenderCombineText.cpp:
      (WebCore::RenderCombineText::styleDidChange): Changed to reset m_isCombined to false, to
      ensure that combineText() is called on the next layout.
      
      LayoutTests: 
      
      * fast/text/text-combine-width-after-style-change-expected.html: Added.
      * fast/text/text-combine-width-after-style-change.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38c100f8
    • commit-queue@webkit.org's avatar
      accelerated compositing does not work with ati driver · 09c5c922
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97472
      
      Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-10-11
      Reviewed by Martin Robinson.
      
      Create m_parentWindow at positive position. Otherwise, parts of it are
      not displayed on ati drivers.
      
      Covered by existing tests.
      
      * platform/gtk/RedirectedXCompositeWindow.cpp:
      (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09c5c922
    • commit-queue@webkit.org's avatar
      Fix JPEG decoding faiure when IMAGE_DECODER_DOWN_SAMPLING is enabled · ca8adbda
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98878
      
      Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2012-10-11
      Reviewed by Kenneth Russell.
      
      When using libjpeg-turbo and enabling IMAGE_DECODER_DOWN_SAMPLING,
      JPEG decoding failed because of no support for JCS_EXT_RGBA, JCS_EXT_BGRA.
      Set RGBA values when color space is JCS_EXT_RGBA or JCS_EXT_BGRA.
      
      No new tests.
      
      * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
      (WebCore::JPEGImageDecoder::outputScanlines):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca8adbda
    • vsevik@chromium.org's avatar
      Web Inspector: Preview HTML in ajax responses in network panel · d6f78a60
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99066
      
      Reviewed by Yury Semikhatsky.
      
      HTML preview is now shown for XHR responses with text/html mime types.
      Also RequestHTMLView is refactored to use sandbox iframe correctly.
      Also extracted a method to generate dataURL from resource/request content.
      
      * inspector/front-end/NetworkRequest.js:
      (WebInspector.NetworkRequest):
      (WebInspector.NetworkRequest.prototype.populateImageSource):
      (WebInspector.NetworkRequest.prototype.asDataURL):
      * inspector/front-end/RequestHTMLView.js:
      (WebInspector.RequestHTMLView):
      (WebInspector.RequestHTMLView.prototype._createIFrame):
      * inspector/front-end/RequestPreviewView.js:
      (WebInspector.RequestPreviewView.prototype._createPreviewView):
      * inspector/front-end/Resource.js:
      (WebInspector.Resource.prototype.populateImageSource):
      * inspector/front-end/ResourceUtils.js:
      (WebInspector.contentAsDataURL):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131074 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6f78a60
    • commit-queue@webkit.org's avatar
      Regression(r131058): Broke EFL build · 0fa11beb
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99079
      
      Unreviewed build fix.
      
      Use iterator::value instead of iterator::second to fix
      build break after r131058.
      
      Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-11
      
      * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
      (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131073 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0fa11beb
    • commit-queue@webkit.org's avatar
      Always enable the experiments tab for WebKit nightly · 4435ce41
      commit-queue@webkit.org authored
      Web Inspector: Enabling experiments tab in WebKit nightly.
      https://bugs.webkit.org/show_bug.cgi?id=98923
      
      Patch by Mihai Balan <mibalan@adobe.com> on 2012-10-11
      Reviewed by Pavel Feldman.
      
      Enabling Web Inspector experiments tab in WebKit nightly. This is done by adding a new
      Preference key, Preferences.experimentsEnabled. Default values are true for WebKit and false
      for Chromium. They can also be overridden as before (in Chromium)
      
      Source/WebCore:
      
      * inspector/front-end/Settings.js:
      (WebInspector.ExperimentsSettings.prototype.get experimentsEnabled):
      
      Source/WebKit/chromium:
      
      * src/js/DevTools.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4435ce41
    • hayato@chromium.org's avatar
      Source/WebCore: Support re-projection for Shadow DOM. · 735b2294
      hayato@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97151
      
      Reviewed by Dimitri Glazkov.
      
      Update node distribution algorithm so that nodes can be re-projected to insertion points
      in nested shadow subtree.
      
      See the latest Shadow DOM spec for what 're-projected' means:
      - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
      Also see the related W3C bug:
      - http://www.w3.org/Bugs/Public/show_bug.cgi?id=18513
      
      Since this change breaks existing behavior, we have to update several code at once, which includes:
      - ContentDistributer: ContentDistributor now re-projects distributed nodes.
      - ComposedShadowTreeWalker: ComposedShadowTreeWalker is now aware of re-projection. That can
        resolve re-projection transparently.
      - AncestorChainWalker (formerly named ComposedShadowTreeParentWallker):
        AncestorChainWalker is now aware of re-projection. I've also added a crossingInsertionPoint()
        member function so that clients of the walker can know whether the walker is just crossing
        insertion points for a re-projected node.
      - EventDispatcher: EventDispatcher now uses the updated AncestorChainWalker and its
        crossingInsertionPoint() so that EventDispatcher can compute relative target for each ancestor correctly.
      
      I've also updated existing layout tests and added some layout tests for re-projection.
      Re-projection for multiple shadow root is not supported yet. I'll address that in another bug.
      
      Tests: fast/dom/shadow/composed-shadow-tree-walker.html
             fast/dom/shadow/shadow-dom-event-dispatching.html
             fast/dom/shadow/shadowdom-reprojection-1.html
             fast/dom/shadow/shadowdom-reprojection-2.html
      
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::resolveReprojection):
      (WebCore):
      (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint):
      (WebCore::ComposedShadowTreeWalker::traverseParent):
      (WebCore::AncestorChainWalker::AncestorChainWalker):
      (WebCore::AncestorChainWalker::parent):
      * dom/ComposedShadowTreeWalker.h:
      (AncestorChainWalker):
      (WebCore::AncestorChainWalker::crossingInsertionPoint):
      * dom/EventDispatcher.cpp:
      (WebCore::EventRelatedTargetAdjuster::adjust):
      (WebCore::EventDispatcher::ensureEventAncestors):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedNode):
      * html/HTMLLIElement.cpp:
      (WebCore::HTMLLIElement::attach):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::distribute):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::updateMouseEventTargetNode):
      
      LayoutTests: Update ComposedShadowTreeWalker for Shadow DOM re-projection.
      https://bugs.webkit.org/show_bug.cgi?id=97151
      
      Reviewed by Dimitri Glazkov.
      
      * fast/dom/shadow/composed-shadow-tree-walker-expected.txt:
      * fast/dom/shadow/composed-shadow-tree-walker.html:
      * fast/dom/shadow/resources/shadow-dom.js:
      (createShadowRootWithAttributes):
      (createDOM):
      * fast/dom/shadow/shadow-dom-event-dispatching.html:
      * fast/dom/shadow/shadowdom-reprojection-1-expected.html: Added.
      * fast/dom/shadow/shadowdom-reprojection-1.html: Added.
      * fast/dom/shadow/shadowdom-reprojection-2-expected.html: Added.
      * fast/dom/shadow/shadowdom-reprojection-2.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131070 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      735b2294
    • shinyak@chromium.org's avatar
      Make ContentSelectorQuery work when siblings are passed explicitly. · 201979b7
      shinyak@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96990
      
      Reviewed by Dimitri Glazkov.
      
      When we implement content reprojection in ShadowDOM, we have to pass a node pool to SelectorChecker.
      We introdue ShadowDOMSiblingTraversalStrategy, which traverses a node pool instead of real node siblings.
      
      Since ContentSelector is a very hot place, we don't want to regress performance. In the previous patch,
      we've make ContentSelector::checkOneSelector template to take SiblingTraversalStrategy as an argument.
      
      We also move DOMSiblingTraversalStrategy to SiblingTraversalStrategies.h.
      
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.xcodeproj/project.pbxproj:
      * css/SelectorChecker.cpp:
      (WebCore):
      * css/SelectorChecker.h:
      * css/SiblingTraversalStrategies.h: Added.
      (WebCore):
      (DOMSiblingTraversalStrategy): Moved from SelectorChecker.
      (WebCore::DOMSiblingTraversalStrategy::isFirstChild):
      (WebCore::DOMSiblingTraversalStrategy::isLastChild):
      (WebCore::DOMSiblingTraversalStrategy::isFirstOfType):
      (WebCore::DOMSiblingTraversalStrategy::isLastOfType):
      (WebCore::DOMSiblingTraversalStrategy::countElementsBefore):
      (WebCore::DOMSiblingTraversalStrategy::countElementsOfTypeBefore):
      (WebCore::DOMSiblingTraversalStrategy::countElementsAfter):
      (WebCore::DOMSiblingTraversalStrategy::countElementsOfTypeAfter):
      (WebCore::ShadowDOMSiblingTraversalStrategy::ShadowDOMSiblingTraversalStrategy):
      (ShadowDOMSiblingTraversalStrategy): SiblingTraversalStrategy which uses a node pool instead of a real element
      siblings. This strategy takes a vector of node which we traverse.
      (WebCore::ShadowDOMSiblingTraversalStrategy::isFirstChild):
      (WebCore::ShadowDOMSiblingTraversalStrategy::isLastChild):
      (WebCore::ShadowDOMSiblingTraversalStrategy::isFirstOfType):
      (WebCore::ShadowDOMSiblingTraversalStrategy::isLastOfType):
      (WebCore::ShadowDOMSiblingTraversalStrategy::countElementsBefore):
      (WebCore::ShadowDOMSiblingTraversalStrategy::countElementsAfter):
      (WebCore::ShadowDOMSiblingTraversalStrategy::countElementsOfTypeBefore):
      (WebCore::ShadowDOMSiblingTraversalStrategy::countElementsOfTypeAfter):
      * css/StyleResolver.cpp:
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::distributeSelectionsTo):
      * html/shadow/ContentSelectorQuery.cpp: Uses ShadowDOMSiblingTraversalStrategy instead of DOMSiblingTraversalStrategy.
      (WebCore::ContentSelectorChecker::ContentSelectorChecker):
      (WebCore):
      (WebCore::ContentSelectorChecker::checkContentSelector):
      (WebCore::ContentSelectorDataList::initialize):
      (WebCore::ContentSelectorDataList::matches):
      (WebCore::ContentSelectorQuery::ContentSelectorQuery):
      (WebCore::ContentSelectorQuery::matches):
      * html/shadow/ContentSelectorQuery.h:
      (ContentSelectorChecker):
      (WebCore):
      (ContentSelectorDataList):
      (ContentSelectorQuery):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131068 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      201979b7
    • kbalazs@webkit.org's avatar
      [Qt] GraphicsContextPlatformPrivate is leaking it's ShadowBlur · d4b19577
      kbalazs@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=99073
      
      Reviewed by Noam Rosenthal.
      
      Stop leaking GraphicsContextPlatformPrivate::shadow.
      
      No change in behavior so no new tests.
      
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
      Always destroy shadow. It is obviously owned by the context so it has
      nothing to do with the erly return.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4b19577
    • jsbell@chromium.org's avatar
      WebIDL: overloaded methods prevent number -> string conversion · e0e3aef3
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=85326
      
      Reviewed by Kentaro Hara.
      
      Source/WebCore:
      
      Make the default behavior for overloaded methods matching DOMString arguments match the
      default behavior for non-overloaded methods, which more closely matches the WebIDL spec.
      Enable legacy behavior of only matching undefined/null/string/object(and not number,
      boolean, etc) via the StrictTypeChecking attribute.
      
      Tests: storage/indexeddb/cursor-overloads.html
             storage/indexeddb/legacy-constants.html
             ... and run-bindings-tests
      
      * Modules/indexeddb/IDBCursor.cpp:
      (WebCore::IDBCursor::stringToDirection): Handle "0"..."4" as stringified legacy constants.
      * Modules/indexeddb/IDBCursor.h:
      * Modules/indexeddb/IDBDatabase.cpp: Remove redundant overloads.
      (WebCore::IDBDatabase::transaction): Remove redundant overloads.
      * Modules/indexeddb/IDBDatabase.h:
      (IDBDatabase):
      * Modules/indexeddb/IDBDatabase.idl: Remove redundant overloads.
      * Modules/indexeddb/IDBIndex.cpp: Remove redundant overloads.
      (WebCore::IDBIndex::openCursor):
      (WebCore::IDBIndex::openKeyCursor):
      * Modules/indexeddb/IDBIndex.h: Remove redundant overloads.
      (IDBIndex):
      * Modules/indexeddb/IDBIndex.idl: Remove redundant overloads.
      * Modules/indexeddb/IDBObjectStore.cpp: Remove redundant overloads.
      (WebCore::IDBObjectStore::openCursor):
      * Modules/indexeddb/IDBObjectStore.h: Remove redundant overloads.
      (IDBObjectStore):
      * Modules/indexeddb/IDBObjectStore.idl: Remove redundant overloads.
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::stringToMode): Handle "0"..."4" as stringified legacy constants.
      * Modules/indexeddb/IDBTransaction.h:
      * bindings/scripts/CodeGeneratorJS.pm: Check for StrictTypeChecking attribute.
      (GenerateParametersCheckExpression):
      * bindings/scripts/CodeGeneratorV8.pm: Ditto.
      (GenerateParametersCheckExpression):
      * bindings/scripts/test/JS/JSTestObj.cpp: Rebaselined.
      (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
      (WebCore):
      (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
      * bindings/scripts/test/TestObj.idl: Added [StrictTypeChecking] to DOMString overloads,
      plus a new DOMString overload w/o it.
      * bindings/scripts/test/V8/V8TestObj.cpp: Rebaselined.
      (WebCore::TestObjV8Internal::overloadedMethod11Callback):
      (TestObjV8Internal):
      (WebCore::TestObjV8Internal::overloadedMethodCallback):
      * html/canvas/CanvasRenderingContext2D.idl: Tag legacy overloads with [StrictTypeChecking].
      * xml/XMLHttpRequest.idl: Ditto.
      
      LayoutTests:
      
      Updated expectations - new (more generic) console warnings.
      
      * storage/indexeddb/cursor-overloads-expected.txt:
      * storage/indexeddb/legacy-constants-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0e3aef3
    • commit-queue@webkit.org's avatar
      [Chromium][Mac] r130994 seems to break chromium gpu test · adec724b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=98995
      
      Patch by Justin Novosad <junov@chromium.org> on 2012-10-11
      Reviewed by Stephen White.
      
      Removing unnecessary assertion that was based on an invalid assumption
      that 2d canvas draw operations were always called from within WebThread
      tasks.
      
      Test: Canvas2DAllowed chromium gpu_test
      
      * platform/graphics/chromium/Canvas2DLayerManager.cpp:
      (WebCore::Canvas2DLayerManager::willProcessTask):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131059 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adec724b