1. 26 Sep, 2012 40 commits
    • barraclough@apple.com's avatar
      Generalize JSGlobalThis as JSProxy · 4aef7247
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97716
      
      Reviewed by Oliver Hunt.
      
      ../JavaScriptCore: 
      
      Generalize JSGlobalThis as JSProxy and move proxying functionality up from the window shell into JSProxy.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::toThisObject):
          - Hoist toThisObject from WebCore.
      (JSC):
      * runtime/JSGlobalObject.h:
          - removed include.
      (JSC::JSGlobalObject::finishCreation):
          - JSGlobalThis -> JSObject
      (JSGlobalObject):
          - Hoist toThisObject from WebCore.
      * runtime/JSGlobalThis.cpp: Removed.
      * runtime/JSGlobalThis.h: Removed.
      * runtime/JSObject.cpp:
          - removed include.
      * runtime/JSObject.h:
      (JSObject):
      (JSC::JSObject::isProxy):
          - isGlobalThis -> isProxy
          - GlobalThisType -> ProxyType
      * runtime/JSProxy.cpp: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.cpp.
      (JSC):
      (JSC::JSProxy::visitChildren):
      (JSC::JSProxy::setTarget):
      (JSC::JSProxy::className):
      (JSC::JSProxy::getOwnPropertySlot):
      (JSC::JSProxy::getOwnPropertySlotByIndex):
      (JSC::JSProxy::getOwnPropertyDescriptor):
      (JSC::JSProxy::put):
      (JSC::JSProxy::putByIndex):
      (JSC::JSProxy::putDirectVirtual):
      (JSC::JSProxy::defineOwnProperty):
      (JSC::JSProxy::deleteProperty):
      (JSC::JSProxy::deletePropertyByIndex):
      (JSC::JSProxy::getPropertyNames):
      (JSC::JSProxy::getOwnPropertyNames):
          - Class cretaed from JSGlobalThis, JSDOMWindowShell.
      * runtime/JSProxy.h: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.h.
      (JSC::JSProxy::create):
      (JSC::JSProxy::createStructure):
      (JSProxy):
      (JSC::JSProxy::target):
      (JSC::JSProxy::JSProxy):
          - Class cretaed from JSGlobalThis, JSDOMWindowShell.
      * runtime/JSType.h:
          - GlobalThisType -> ProxyType
      
      ../WebCore: 
      
      This patch moves window shell functionality up to JSC::JSProxy.
      
      * ForwardingHeaders/runtime/JSGlobalThis.h: Removed.
      * ForwardingHeaders/runtime/JSProxy.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSGlobalThis.h.
      * bindings/js/JSDOMGlobalObject.cpp:
      (WebCore::JSDOMGlobalObject::finishCreation):
          - JSGlobalThis -> JSObject
      * bindings/js/JSDOMGlobalObject.h:
      (JSDOMGlobalObject):
          - JSGlobalThis -> JSObject
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore):
          - Hoist toThisObject up into JSC.
      * bindings/js/JSDOMWindowBase.h:
      (JSDOMWindowBase):
          - Hoist toThisObject up into JSC.
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore):
          - JSGlobalThis -> JSProxy
          - moved JSObject callbacks to JSProxy
      * bindings/js/JSDOMWindowShell.h:
      (JSDOMWindowShell):
          - JSGlobalThis -> JSProxy
          - moved JSObject callbacks to JSProxy
      (WebCore::JSDOMWindowShell::window):
          - unwrappedObject() -> target()
      (WebCore::JSDOMWindowShell::setWindow):
          - setUnwrappedObject() -> setTarget()
      (WebCore::JSDOMWindowShell::createStructure):
          - GlobalThisType -> ProxyType
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4aef7247
    • kling@webkit.org's avatar
      4.95MB below RenderBlock::insertIntoTrackedRendererMaps() on Membuster3. · f46ddd5c
      kling@webkit.org authored
      <http://webkit.org/b/97687>
      
      Reviewed by Anders Carlsson.
      
      Give the TrackedRendererListHashSet typedef an inline capacity of 16 (the default is 256.)
      Browsing around the web, I saw almost no cases with more than 20 entries in these lists,
      and this simple change saves us ~4.68MB on the Membuster3 benchmark.
      
      * rendering/RenderBlock.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f46ddd5c
    • crogers@google.com's avatar
      DelayNode must take sample-accurate delay times into account · 3de1f676
      crogers@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97609
      
      Reviewed by Kenneth Russell.
      
      Currently DelayNode simply uses a coarse-grained k-rate smoothing of .delayTime
      It should also be capable of supporting audio-rate control of .delayTime
      
      * Modules/webaudio/DelayDSPKernel.cpp:
      (WebCore::DelayDSPKernel::DelayDSPKernel):
      (WebCore::DelayDSPKernel::process):
      * Modules/webaudio/DelayDSPKernel.h:
      (DelayDSPKernel):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3de1f676
    • msaboff@apple.com's avatar
      Add ability for JSArray::unshiftCount to unshift in middle of an array · a1c33e2b
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97691
      
      Reviewed by Filip Pizlo.
      
      Changed JSArray::unshiftCount and unshiftCountSlowCase to handle unshifting from the middle of an
      array.  Depending on where the unshift point is, either the front part of the array will be moved
      "left" or the back part will be moved right.  Given that unshiftCount only works on contiguous
      arrays it is safe to use memmove for the moves.
      
      This change is worth 25% performance improvement on pdfjs.  It doesn't seem to have any impact on
      any other benchmarks.
      
      * runtime/ArrayPrototype.cpp:
      (JSC::unshift):
      * runtime/JSArray.cpp:
      (JSC::JSArray::unshiftCountSlowCase):
      (JSC::JSArray::unshiftCount):
      * runtime/JSArray.h:
      (JSArray):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a1c33e2b
    • commit-queue@webkit.org's avatar
      [chromium] Do not dispatch touch-events to plugins unless they explicitly request for touch-events. · b84c4f69
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97685
      
      Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-09-26
      Reviewed by Adam Barth.
      
      Plugins need to call setIsAcceptingTouchEvents if they want to receive touch-events. So
      avoid dispatching touch-events to plugins unless they have explicitly requested for them.
      
      * src/WebPluginContainerImpl.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b84c4f69
    • pilgrim@chromium.org's avatar
      [Chromium][Win] Remove ensureFontLoaded from PlatformSupport · bd9c1018
      pilgrim@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97696
      
      Reviewed by Adam Barth.
      
      Part of a refactoring series. See tracking bug 82948.
      
      Source/WebCore:
      
      * platform/chromium/PlatformSupport.h:
      (PlatformSupport):
      * platform/graphics/skia/SkiaFontWin.cpp:
      (WebCore::paintSkiaText):
      
      Source/WebKit/chromium:
      
      * src/PlatformSupport.cpp:
      (WebCore::PlatformSupport::ensureFontLoaded):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd9c1018
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r129654. · 88c7df9e
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/129654
      https://bugs.webkit.org/show_bug.cgi?id=97702
      
      breaks chromium windows build (Requested by schenney on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-26
      
      Source/Platform:
      
      * chromium/public/WebRTCPeerConnectionHandler.h:
      (WebKit):
      (WebRTCPeerConnectionHandler):
      * chromium/public/WebRTCStatsRequest.h: Removed.
      
      Source/WebCore:
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/mediastream/RTCPeerConnection.cpp:
      * Modules/mediastream/RTCPeerConnection.h:
      (WebCore):
      (RTCPeerConnection):
      * Modules/mediastream/RTCPeerConnection.idl:
      * Modules/mediastream/RTCStatsCallback.h: Removed.
      * Modules/mediastream/RTCStatsCallback.idl: Removed.
      * Modules/mediastream/RTCStatsElement.cpp: Removed.
      * Modules/mediastream/RTCStatsElement.h: Removed.
      * Modules/mediastream/RTCStatsElement.idl: Removed.
      * Modules/mediastream/RTCStatsReport.cpp: Removed.
      * Modules/mediastream/RTCStatsReport.h: Removed.
      * Modules/mediastream/RTCStatsReport.idl: Removed.
      * Modules/mediastream/RTCStatsRequestImpl.cpp: Removed.
      * Modules/mediastream/RTCStatsRequestImpl.h: Removed.
      * Modules/mediastream/RTCStatsResponse.cpp: Removed.
      * Modules/mediastream/RTCStatsResponse.h: Removed.
      * Modules/mediastream/RTCStatsResponse.idl: Removed.
      * WebCore.gypi:
      * platform/chromium/support/WebRTCStatsRequest.cpp: Removed.
      * platform/mediastream/RTCPeerConnectionHandler.cpp:
      (RTCPeerConnectionHandlerDummy):
      * platform/mediastream/RTCPeerConnectionHandler.h:
      (WebCore):
      (RTCPeerConnectionHandler):
      * platform/mediastream/RTCStatsRequest.h: Removed.
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
      (RTCPeerConnectionHandlerChromium):
      
      Tools:
      
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
      (MockWebRTCPeerConnectionHandler):
      
      LayoutTests:
      
      * fast/mediastream/RTCPeerConnection-stats-expected.txt: Removed.
      * fast/mediastream/RTCPeerConnection-stats.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88c7df9e
    • pdr@google.com's avatar
      Refactor SMILTimeContainer to maintain animation information instead of... · c4c854e5
      pdr@google.com authored
      Refactor SMILTimeContainer to maintain animation information instead of recalculating it every frame
      https://bugs.webkit.org/show_bug.cgi?id=96697
      
      Reviewed by Eric Seidel.
      
      SVGTimeContainer can be improved by maintaining extra information about
      animations during schedule/unschedule instead of re-calculating it
      every frame.
      
      After this patch, SMILTimeContainer maintains a GroupedAnimationsMap instead of
      just a Vector. This map maps a list of animations to the specific ElementAttributePair
      that will be animated.
      
      On schedule/unschedule we modify this map instead of creating it in updateAnimations.
      As a result, we need to be careful about always notifying (or, re-scheduling) the
      time container when either an animation's target changes or an animation's attributeName
      changes. This notification is managed by tracking changes with targetElementWillChange
      and setAttributeName.
      
      After this patch, updateAnimations only iterates over m_scheduledAnimations.
      Furthermore, the sorting of animations by priority is now done over each Vector of
      SVGSMILElements affecting a {SVGElement*, QualifiedName} pair instead of over all the
      SVGSMILElements at once.
      
      Lastly, a guard (m_preventScheduledAnimationsChanges) has been added
      to prove that we do not modify the scheduled animations map out
      from under ourselves.
      
      No new tests as this is just a refactoring.
      
      * svg/SVGAnimateElement.cpp:
      (WebCore::SVGAnimateElement::hasValidAttributeType):
      
      * svg/SVGAnimateMotionElement.cpp:
      (WebCore::SVGAnimateMotionElement::hasValidAttributeName):
      
          Per the spec, AnimateMotion is not affected by attributeName. Instead
          of having a special case for this in SMILTimeContainer::updateAnimations
          we simply implement this method.
      
      (WebCore):
      * svg/SVGAnimateMotionElement.h:
      (SVGAnimateMotionElement):
      * svg/SVGAnimationElement.cpp:
      (WebCore::SVGAnimationElement::updateAnimation):
      * svg/animation/SMILTimeContainer.cpp:
      (WebCore):
      (WebCore::SMILTimeContainer::SMILTimeContainer):
      (WebCore::SMILTimeContainer::~SMILTimeContainer):
      
          This method now cleans up the map since we have dynamically allocated
          Vectors in it.
      
      (WebCore::SMILTimeContainer::schedule):
      
          Here we are just adding an entry to the map. There is some special handling
          for creating the Vector of one does not exist.
      
      (WebCore::SMILTimeContainer::unschedule):
      (WebCore::SMILTimeContainer::notifyIntervalsChanged):
      (WebCore::SMILTimeContainer::setElapsed):
      (WebCore::SMILTimeContainer::startTimer):
      (WebCore::SMILTimeContainer::updateAnimations):
      * svg/animation/SMILTimeContainer.h:
      (WebCore::SMILTimeContainer::create):
      (SMILTimeContainer):
      * svg/animation/SVGSMILElement.cpp:
      (WebCore::SVGSMILElement::~SVGSMILElement):
      (WebCore::SVGSMILElement::insertedInto):
      (WebCore::SVGSMILElement::removedFrom):
      (WebCore):
      (WebCore::SVGSMILElement::hasValidAttributeName):
      (WebCore::SVGSMILElement::svgAttributeChanged):
      (WebCore::SVGSMILElement::setAttributeName):
      (WebCore::SVGSMILElement::targetElementWillChange):
      (WebCore::SVGSMILElement::resetTargetElement):
      (WebCore::SVGSMILElement::resolveFirstInterval):
      (WebCore::SVGSMILElement::beginListChanged):
      (WebCore::SVGSMILElement::endListChanged):
      (WebCore::SVGSMILElement::progress):
      * svg/animation/SVGSMILElement.h:
      (SVGSMILElement):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4c854e5
    • msaboff@apple.com's avatar
      Update SVGFontData for 8 bit TextRun changes · e877f36a
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97379
      
      Reviewed by Geoffrey Garen.
      
      Educated applySVGGlyphSelection to be 8 / 16 bit TextRun aware.
      
      No change in funcitonality, therefore no new tests.
      
      * svg/SVGFontData.cpp:
      (WebCore::SVGFontData::applySVGGlyphSelection):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e877f36a
    • leandrogracia@chromium.org's avatar
      [Chromium] Fix find-in-page corner case for detached frames · 79d12269
      leandrogracia@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97688
      
      Reviewed by Adam Barth.
      
      Adds a check to prevent crashes when running find-in-page requests
      on detached frames.
      
      * src/WebFrameImpl.cpp:
      (WebKit::WebFrameImpl::scopeStringMatches):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79d12269
    • msaboff@apple.com's avatar
      Update ComplexTextController for 8 bit TextRun changes · 88652ce6
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97378
      
      Reviewed by Geoffrey Garen.
      
      Source/WebCore: 
      
      Since the ComplextTextController code is primarily used for UChar data, just upconvert an 8 bit
      TextRun into a new String and hold on to the String with a vector for the life of the controller.
      
      No change in functionality, therefore no new tests.
      
      * platform/graphics/mac/ComplexTextController.cpp:
      (WebCore::ComplexTextController::ComplexTextController):
      (WebCore::ComplexTextController::collectComplexTextRuns):
      * platform/graphics/mac/ComplexTextController.h:
      (ComplexTextController):
      
      Source/WTF: 
      
      Add a new create method to make a 16 bit string from 8 bit source data.  This is used in 
      ComplexTextController when we have LChar* + length text data, but we really want 16 bit
      data for the complex text rendering code.
      
      * wtf/text/WTFString.cpp:
      (WTF::String::make16BitFrom8BitSource):
      (WTF):
      * wtf/text/WTFString.h:
      (String):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88652ce6
    • msaboff@apple.com's avatar
      Add Latin-1 Line Break Iterator to TextBreakIteratorICU.cpp · 59cecb2a
      msaboff@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=96935
      
      Reviewed by Geoffrey Garen.
      
      Added a Latin-1 UText implementation for the ICU library to use.  Added a new acquireLineBreakIterator() for
      8 bit strings that uses the Latin-1 UText implementation.  This code path is not being called with the current 
      ToT code.  Subsequent changes will enable calling the new code.
      
      * platform/text/TextBreakIterator.h:
      (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
      (LazyLineBreakIterator):
      (WebCore::LazyLineBreakIterator::string):
      (WebCore::LazyLineBreakIterator::get):
      (WebCore::LazyLineBreakIterator::reset):
      * platform/text/TextBreakIteratorICU.cpp:
      (WebCore::uTextLatin1Clone):
      (WebCore::uTextLatin1NativeLength):
      (WebCore::uTextLatin1Access):
      (WebCore::uTextLatin1Extract):
      (WebCore::uTextLatin1MapOffsetToNative):
      (WebCore::uTextLatin1MapNativeIndexToUTF16):
      (WebCore::uTextLatin1Close):
      (WebCore::UTextOpenLatin1):
      (WebCore::acquireLineBreakIterator):
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::LineBreaker::nextLineBreak):
      * rendering/RenderText.cpp:
      (WebCore::RenderText::computePreferredLogicalWidths):
      * rendering/break_lines.cpp:
      (WebCore::nextBreakablePosition):
      (WebCore::nextBreakablePositionIgnoringNBSP):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      59cecb2a
    • carlosgc@webkit.org's avatar
      [GTK] Don't use the C API internally in WebKitJavascriptResult · aae0971e
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=96780
      
      Reviewed by Gustavo Noronha Silva.
      
      Using the C++ classes directly instead of the C API wrappers we
      avoid a lot of toImpl/toAPI casts, string conversions and
      allocations. The code is also a lot simpler and easier to read.
      
      * UIProcess/API/gtk/WebKitJavascriptResult.cpp:
      (_WebKitJavascriptResult::_WebKitJavascriptResult):
      (webkitJavascriptResultCreate):
      * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h:
      * UIProcess/API/gtk/WebKitWebView.cpp:
      (webkitWebViewRunJavaScriptCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aae0971e
    • commit-queue@webkit.org's avatar
      [BlackBerry] Reverting implementation for 407 error pages · 9b68ba78
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97455
      
      Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-09-26
      Reviewed by Rob Buis.
      
      Last fix to NetworkJob to invoke AuthenticationChallenge by resetting
      BlackBerryPlatformSettings's proxy credentials to "" if authentication
      failed.
      
      * platform/network/blackberry/NetworkJob.cpp:
      (WebCore::NetworkJob::sendRequestWithCredentials):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b68ba78
    • mifenton@rim.com's avatar
      [BlackBerry] Update padding in ensureFocusTextElementVisible to be DPI independent. · ce1c6dea
      mifenton@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97684
      
      Reviewed by Rob Buis.
      
      Update padding in ensureFocusTextElementVisible to be DPI
      independent and relative to the current zoom level.
      
      Reviewed Internally by Gen Mak.
      
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce1c6dea
    • kenneth@webkit.org's avatar
      Reorder Cairo WebCore includes · 659a8eec
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97679
      
      Reviewed by Simon Hausmann.
      
      * platform/graphics/cairo/FontCairo.cpp:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      * platform/graphics/cairo/TransformationMatrixCairo.cpp:
      * platform/wx/wxcode/cairo/non-kerned-drawing.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      659a8eec
    • eae@chromium.org's avatar
      Change FractionalLayoutUnit denominator to 64 to reduce precision loss when... · 271b04ab
      eae@chromium.org authored
      Change FractionalLayoutUnit denominator to 64 to reduce precision loss when converting to floating point
      https://bugs.webkit.org/show_bug.cgi?id=96139
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      We currently use a denominator of 60 in FractionalLayoutUnit,
      this causes a loss of precision when converting to floating
      point.
              
      By changing the denominator to 64 the values can better be
      represented as floating point (without loosing any precision for
      many values), this in turn allows us to remove the tolerance
      hack in the line break logic and avoids problems caused by this
      precision for web sites that do their own layout based on
      element measurements.
      
      Test: fast/sub-pixel/float-precision.html
      
      * platform/FractionalLayoutUnit.h:
      Change denominator to 64.
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::LineWidth::fitsOnLine):
      Remove epsilon tolerance hack.
      
      LayoutTests: 
      
      Add new precision test and adjust expectations for existing tests as needed.
      
      * fast/sub-pixel/float-precision-expected.html: Added.
      * fast/sub-pixel/float-precision.html: Added.
      * fast/sub-pixel/float-wrap-with-subpixel-top-expected.html:
      * fast/sub-pixel/float-wrap-with-subpixel-top.html:
      * fast/sub-pixel/layout-boxes-with-zoom-expected.html:
      * fast/sub-pixel/layout-boxes-with-zoom.html:
      * fast/sub-pixel/size-of-box-with-zoom-expected.html:
      * fast/sub-pixel/size-of-box-with-zoom.html:
      * platform/chromium-linux/css1/formatting_model/inline_elements-expected.txt:
      * platform/chromium-linux/css2.1/t090501-c414-flt-03-b-g-expected.txt:
      * platform/chromium-linux/fast/backgrounds/background-position-parsing-expected.txt:
      * platform/chromium-linux/fast/block/margin-collapse/103-expected.txt:
      * platform/chromium-linux/fast/borders/border-antialiasing-expected.png:
      * platform/chromium-linux/fast/borders/border-radius-huge-assert-expected.png:
      * platform/chromium-linux/fast/box-sizing/box-sizing-expected.png:
      * platform/chromium-linux/fast/css/bidi-override-in-anonymous-block-expected.txt:
      * platform/chromium-linux/fast/css/hsl-color-expected.png:
      * platform/chromium-linux/fast/dom/HTMLMeterElement/meter-styles-expected.png:
      * platform/chromium-linux/fast/encoding/utf-16-big-endian-expected.txt:
      * platform/chromium-linux/fast/encoding/utf-16-little-endian-expected.txt:
      * platform/chromium-linux/fast/forms/date/date-appearance-expected.png:
      * platform/chromium-linux/fast/forms/form-element-geometry-expected.txt:
      * platform/chromium-linux/fast/html/details-add-summary-1-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-10-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-2-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-3-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-4-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-5-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-6-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-7-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-8-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-add-summary-9-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-marker-style-expected.png:
      * platform/chromium-linux/fast/html/details-no-summary1-expected.png:
      * platform/chromium-linux/fast/html/details-no-summary3-expected.png:
      * platform/chromium-linux/fast/html/details-open-javascript-expected.png:
      * platform/chromium-linux/fast/html/details-open1-expected.png:
      * platform/chromium-linux/fast/html/details-open3-expected.png:
      * platform/chromium-linux/fast/html/details-open5-expected.png:
      * platform/chromium-linux/fast/html/details-position-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-1-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-2-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-3-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-4-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-5-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-remove-summary-6-and-click-expected.png:
      * platform/chromium-linux/fast/html/details-writing-mode-expected.png:
      * platform/chromium-linux/fast/multicol/vertical-rl/float-multicol-expected.png:
      * platform/chromium-linux/fast/parser/style-script-head-test-expected.txt:
      * platform/chromium-linux/fast/text/line-breaks-expected.txt:
      * platform/chromium-linux/svg/custom/use-css-no-effect-on-shadow-tree-expected.png:
      * platform/chromium-linux/svg/custom/viewBox-hit-expected.png:
      * platform/chromium-linux/svg/wicd/rightsizing-grid-expected.png:
      * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.png:
      * platform/chromium-linux/svg/wicd/test-rightsizing-b-expected.txt:
      * platform/chromium-linux/svg/zoom/page/zoom-background-images-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-hixie-mixed-009-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-img-preserveAspectRatio-support-1-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-mask-with-percentages-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-float-border-padding-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-2-expected.txt:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-absolute-size-expected.txt:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-override-size-expected.png:
      * platform/chromium-linux/svg/zoom/page/zoom-svg-through-object-with-percentage-size-expected.png:
      * platform/chromium-linux/svg/zoom/text/zoom-svg-float-border-padding-expected.png:
      * platform/chromium-linux/tables/mozilla/bugs/bug2479-4-expected.txt:
      * platform/chromium-linux/tables/mozilla/bugs/bug46480-1-expected.png:
      * platform/chromium-linux/tables/mozilla/bugs/bug46480-2-expected.png:
      * platform/chromium-win/compositing/visibility/visibility-image-layers-dynamic-expected.txt:
      * platform/chromium-win/css1/formatting_model/vertical_formatting-expected.txt:
      * platform/chromium-win/css2.1/t080301-c411-vt-mrgn-00-b-expected.txt:
      * platform/chromium-win/fast/block/float/shrink-to-avoid-float-complexity-expected.txt:
      * platform/chromium-win/fast/css/hsl-color-expected.txt:
      * platform/chromium-win/fast/dom/HTMLMeterElement/meter-optimums-expected.txt:
      * platform/chromium-win/fast/dom/HTMLMeterElement/meter-styles-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-immediate-child-complex-splitting-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-immediate-child-generated-content-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-dynamic-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-immediate-columns-child-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-dynamic-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-as-nested-columns-child-expected.txt:
      * platform/chromium-win/fast/multicol/span/span-margin-collapsing-expected.txt:
      * platform/chromium-win/fast/text/whitespace/024-expected.txt:
      * platform/chromium-win/svg/wicd/rightsizing-grid-expected.txt:
      * platform/chromium-win/svg/zoom/page/zoom-hixie-mixed-009-expected.txt:
      * platform/chromium-win/svg/zoom/page/zoom-replaced-intrinsic-ratio-001-expected.txt:
      * platform/chromium-win/tables/mozilla/bugs/bug2479-1-expected.txt:
      * platform/chromium-win/tables/mozilla/other/test3-expected.txt:
      * platform/chromium-win/tables/mozilla_expected_failures/bugs/bug91057-expected.txt:
      * platform/chromium/fast/css/getComputedStyle/getComputedStyle-margin-percentage-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      271b04ab
    • ossy@webkit.org's avatar
      [Qt] Unreviewed buildfix after r129647. · f2f7cf8e
      ossy@webkit.org authored
      * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp: Revert incorrect include reordering.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2f7cf8e
    • commit-queue@webkit.org's avatar
      Implement the GetStats interface on PeerConnection · 82e28ae8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=95193
      
      Source/Platform:
      
      Patch by Harald Tveit Alvestrand <harald@alvestrand.no> on 2012-09-26
      Reviewed by Adam Barth.
      
      * chromium/public/WebRTCPeerConnectionHandler.h:
      (WebKit):
      (WebRTCPeerConnectionHandler):
      (WebKit::WebRTCPeerConnectionHandler::getStats):
      * chromium/public/WebRTCStatsRequest.h: added.
      (WebCore):
      (WebKit):
      (WebRTCStatsRequest):
      (WebKit::WebRTCStatsRequest::WebRTCStatsRequest):
      (WebKit::WebRTCStatsRequest::~WebRTCStatsRequest):
      (WebKit::WebRTCStatsRequest::operator=):
      
      Source/WebCore:
      
      Specification:
      http://dev.w3.org/2011/webrtc/editor/webrtc-20120920.html
      
      Patch by Harald Tveit Alvestrand <harald@alvestrand.no> on 2012-09-26
      Reviewed by Adam Barth.
      
      The implementation consists of a pure virtual platform object
      (RTCStatsRequest) that is implemented in WebCore, and stores
      its information in a straightforward data hierarchy.
      This patch adds the call path and the storage structures.
      It does not add filling in data.
      
      Test: fast/mediastream/RTCPeerConnection-stats.html
      
      * CMakeLists.txt:
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::getStats):
      (WebCore):
      * Modules/mediastream/RTCPeerConnection.h:
      (WebCore):
      (RTCPeerConnection):
      * Modules/mediastream/RTCPeerConnection.idl:
      * Modules/mediastream/RTCStatsCallback.h: Added.
      (WebCore):
      (RTCStatsCallback):
      (WebCore::RTCStatsCallback::~RTCStatsCallback):
      * Modules/mediastream/RTCStatsCallback.idl: Added.
      * Modules/mediastream/RTCStatsElement.cpp: Added.
      (WebCore):
      (WebCore::RTCStatsElement::create):
      (WebCore::RTCStatsElement::RTCStatsElement):
      (WebCore::RTCStatsElement::stat):
      * Modules/mediastream/RTCStatsElement.h: Added.
      (WebCore):
      (RTCStatsElement):
      * Modules/mediastream/RTCStatsElement.idl: Added.
      * Modules/mediastream/RTCStatsReport.cpp: Added.
      (WebCore):
      (WebCore::RTCStatsReport::create):
      (WebCore::RTCStatsReport::RTCStatsReport):
      * Modules/mediastream/RTCStatsReport.h: Added.
      (WebCore):
      (RTCStatsReport):
      (WebCore::RTCStatsReport::local):
      (WebCore::RTCStatsReport::remote):
      * Modules/mediastream/RTCStatsReport.idl: Added.
      * Modules/mediastream/RTCStatsRequestImpl.cpp: Added.
      (WebCore):
      (WebCore::RTCStatsRequestImpl::create):
      (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
      (WebCore::RTCStatsRequestImpl::~RTCStatsRequestImpl):
      (WebCore::RTCStatsRequestImpl::requestSucceeded):
      (WebCore::RTCStatsRequestImpl::stop):
      (WebCore::RTCStatsRequestImpl::clear):
      * Modules/mediastream/RTCStatsRequestImpl.h: Added.
      (WebCore):
      (RTCStatsRequestImpl):
      * Modules/mediastream/RTCStatsResponse.cpp: Added.
      (WebCore):
      (WebCore::RTCStatsResponse::create):
      (WebCore::RTCStatsResponse::RTCStatsResponse):
      * Modules/mediastream/RTCStatsResponse.h: Added.
      (WebCore):
      (RTCStatsResponse):
      (WebCore::RTCStatsResponse::result):
      * Modules/mediastream/RTCStatsResponse.idl: Added.
      * WebCore.gypi:
      * platform/chromium/support/WebRTCStatsRequest.cpp: Copied from Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h.
      (WebKit):
      (WebKit::WebRTCStatsRequest::WebRTCStatsRequest):
      (WebKit::WebRTCStatsRequest::assign):
      (WebKit::WebRTCStatsRequest::reset):
      (WebKit::WebRTCStatsRequest::requestSucceeded):
      * platform/mediastream/RTCPeerConnectionHandler.h:
      (WebCore):
      (RTCPeerConnectionHandler):
      * platform/mediastream/RTCStatsRequest.h: Copied from Source/WebCore/platform/mediastream/RTCPeerConnectionHandler.h.
      (WebCore):
      (RTCStatsRequest):
      (WebCore::RTCStatsRequest::~RTCStatsRequest):
      (WebCore::RTCStatsRequest::RTCStatsRequest):
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
      (WebCore::RTCPeerConnectionHandlerChromium::getStats):
      (WebCore):
      * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
      (RTCPeerConnectionHandlerChromium):
      
      Tools:
      
      Patch by Harald Tveit Alvestrand <harald@alvestrand.no> on 2012-09-26
      Reviewed by Adam Barth.
      
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
      (RTCStatsRequestSucceededTask):
      (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
      (MockWebRTCPeerConnectionHandler::getStats):
      * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
      (MockWebRTCPeerConnectionHandler):
      
      LayoutTests:
      
      Patch by Harald Tveit Alvestrand <harald@alvestrand.no> on 2012-09-26
      Reviewed by Adam Barth.
      
      * fast/mediastream/RTCPeerConnection-stats-expected.txt: Added.
      * fast/mediastream/RTCPeerConnection-stats.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      82e28ae8
    • commit-queue@webkit.org's avatar
      [WK2][WTR] Policy client: dumping from decidePolicyForResponse callback · 3e841338
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97034
      
      Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-26
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebCore:
      
      Exported WebCore::ResourceResponseBase::isAttachment() method for MAC port.
      
      No new tests. No functionality added.
      
      * WebCore.exp.in:
      
      Source/WebKit2:
      
      Added suggested filename getter to WKURLResponse interface and also added a property showing whether the response
      is attachment.
      
      * Shared/API/c/WKURLResponse.cpp:
      (WKURLResponseSuggestedFilename):
      (WKURLResponseIsAttachment):
      * Shared/API/c/WKURLResponse.h:
      
      Tools:
      
      Provided dumping from WTR Policy client 'decidePolicyForResponse' callback.
      
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::decidePolicyForResponse):
      
      LayoutTests:
      
      Unskipped some of http/tests/download tests from wk2/Skipped, put those which still fail
      to an appropriate group in wk2/Skipped file. All of the http/tests/download tests still fail
      for EFL WK1.
      
      * platform/efl-wk1/TestExpectations:
      * platform/efl/TestExpectations:
      * platform/wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e841338
    • beidson@apple.com's avatar
      (Threaded scrolling) WebKit not scrolling to the correct location upon going back on macsurfer.com · cb0dc788
      beidson@apple.com authored
      <rdar://problem/12039913> and https://bugs.webkit.org/show_bug.cgi?id=97617
      
      Reviewed by Anders Carlsson.
      
      In the asynchronous land of threaded scrolling we lose the information about whether or not a scroll
      is programmatic.
      
      This caused all scrolls to be treated as user scrolls and to generated scroll events.
      
      We can fix this by passing the programmatic bit to the scrolling thread and re-applying it back in the main thread.
      
      Unable to test threaded scrolling at this time.
      
      Include the "Is programmatic scroll" bit in the scroll state:
      * page/scrolling/ScrollingTreeState.cpp:
      (WebCore::ScrollingTreeState::ScrollingTreeState):
      (WebCore::ScrollingTreeState::setRequestedScrollPosition): Also set whether or not this represents a programmatic scroll.
      * page/scrolling/ScrollingTreeState.h:
      (ScrollingTreeState):
      (WebCore::ScrollingTreeState::representsProgrammaticScroll):
      
      Pass that bit back to the ScrollingCoordinator:
      * page/scrolling/ScrollingTree.cpp:
      (WebCore::ScrollingTree::ScrollingTree):
      (WebCore::ScrollingTree::commitNewTreeState):
      (WebCore::ScrollingTree::updateMainFrameScrollPosition):
      * page/scrolling/ScrollingTree.h:
      
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::requestScrollPositionUpdate): Pass the "is programmatic scroll" bit to the scrolling thread.
      (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition): Reset the "is programmatic scroll" bit on the FrameView.
      * page/scrolling/ScrollingCoordinator.h:
      (ScrollingCoordinator):
      
      * page/FrameView.h:
      (FrameView):
      (WebCore::FrameView::inProgrammaticScroll): Expose setter/getters for the programmatic scroll flag.
      (WebCore::FrameView::setInProgrammaticScroll):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb0dc788
    • mrobinson@webkit.org's avatar
      [GTK] Use XDamage to simplify RedirectedXCompositeWindow · fc8c42fa
      mrobinson@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97267
      
      Reviewed by Alejandro G. Castro.
      
      Use XDamage to queue redraws of the widget when redirecting accelerated compositing
      to an offscreen window. This allows removing a finicky timer-based approach, improves
      performance, and allows simplifying things greatly.
      
      .:
      
      * configure.ac: Add support for finding XDamage via pkg-config.
      
      Source/WebCore:
      
      No new tests. This is covered by existing tests.
      
      * GNUmakefile.am: Add the XDamage CFLAGS in the appropriate place.
      * platform/gtk/RedirectedXCompositeWindow.cpp:
      (WebCore::getWindowHashMap): Added.
      (WebCore::filterXDamageEvent): Added.
      (WebCore::supportsXDamageAndXComposite): Added.
      (WebCore::RedirectedXCompositeWindow::create): Fail to create the window if
      the XServer doesn't support XDamage and XComposite.
      (WebCore::RedirectedXCompositeWindow::RedirectedXCompositeWindow): Add XDamage support and
      remove the m_usable size distinction. Add the window the window HashMap now.
      (WebCore::RedirectedXCompositeWindow::~RedirectedXCompositeWindow): Remove the window
      from the window HashMap.
      (WebCore::RedirectedXCompositeWindow::resize): Now just immediately update the size.
      (WebCore::RedirectedXCompositeWindow::callDamageNotifyCallback): Added.
      * platform/gtk/RedirectedXCompositeWindow.h:
      (WebCore::RedirectedXCompositeWindow::setDamageNotifyCallback): Added.
      
      Source/WebKit/gtk:
      
      * GNUmakefile.am: Add the XDamage CFLAGS and LIBS.
      * WebCoreSupport/AcceleratedCompositingContext.h:
      (AcceleratedCompositingContext): Change the signature of compositeLayersToContext
      to accept an enum that explains the composite purpose.
      * WebCoreSupport/AcceleratedCompositingContextGL.cpp:
      (WebKit::redirectedWindowDamagedCallback): Added.
      (WebKit::AcceleratedCompositingContext::initialize): Handle the situation where
      the RedirectedXCompositeWindow returns a null pointer.
      (WebKit::AcceleratedCompositingContext::enabled): Ditto.
      (WebKit::AcceleratedCompositingContext::renderLayersToWindow): Remove the code handling
      the usable size of the RedirectedXCompositeWindow. The usable size is now always equal
      to the size.
      (WebKit::AcceleratedCompositingContext::compositeLayersToContext): When drawing for a
      resize, first clear the entire context. Remove the double swap-buffer, as it's no
      longer necessary.
      (WebKit::AcceleratedCompositingContext::setRootCompositingLayer): Handle the case that
      the redirected window is null.
      (WebKit::AcceleratedCompositingContext::resizeRootLayer): Instead of doing another
      immediate layer flush, just recomposite the current layer state and schedule a new
      flush. This should make resizing faster.
      (WebKit::AcceleratedCompositingContext::flushAndRenderLayers): We no longer need to
      queue a redraw, unless we want to force one.
      
      Source/WebKit2:
      
      * GNUmakefile.am: Add the XDamage CFLAGS and LIBS to the appropriate places.
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (_WebKitWebViewBasePrivate): Remove readyToRenderAcceleratedCompositingResults as
      it's no longer necessary.
      (webkit_web_view_base_init): Handle the situation where the RedirectedXCompositeWindow
      is null.
      (webkitWebViewRenderAcceleratedCompositingResults): Ditto.
      (resizeWebKitWebViewBaseFromAllocation): Ditto.
      (webkitWebViewBaseCreateWebPage): Ditto.
      (redirectedWindowDamagedCallback): Added.
      * UIProcess/WebPageProxy.h: Remove InvalidateWidget message.
      * UIProcess/WebPageProxy.messages.in: Ditto.
      * UIProcess/gtk/WebPageProxyGtk.cpp: Ditto.
      * WebProcess/WebPage/WebPage.h: Ditto.
      * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
      (WebKit::LayerTreeHostGtk::compositeLayersToContext): No longer need to
      trigger the invalidateWindow message.
      * WebProcess/WebPage/gtk/WebPageGtk.cpp: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc8c42fa
    • loislo@chromium.org's avatar
      Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation · 6e28cc73
      loislo@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97662
      
      Reviewed by Yury Semikhatsky.
      
      Source/WebCore:
      
      Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
      Also we'd like to know exact pointers to strings and buffers for verification purposes.
      
      * dom/WebCoreMemoryInstrumentation.cpp:
      (WebCore):
      * dom/WebCoreMemoryInstrumentation.h:
      (WebCoreMemoryTypes):
      * inspector/InspectorMemoryAgent.cpp:
      (MemoryBlockName):
      (WebCore):
      (WebCore::collectDomTreeInfo):
      (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
      
      Source/WebKit/chromium:
      
      Old schema used sizeInBytes method on StringImpl. This method works incorrect for substrings.
      Also we'd like to know exact pointers to strings and buffers for verification purposes.
      
      * tests/MemoryInstrumentationTest.cpp:
      (WebCore::TEST):
      (WebCore):
      
      Source/WTF:
      
      Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
      Also we'd like to know exact pointers to strings and buffers for verification purposes.
      
      * GNUmakefile.list.am:
      * WTF.gypi:
      * WTF.pro:
      * WTF.vcproj/WTF.vcproj:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/MemoryInstrumentationArrayBufferView.h:
      (WTF):
      (WTF::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e28cc73
    • vsevik@chromium.org's avatar
      Web Inspector: [REGRESSION] Revision support problems: revert and apply... · 4452da12
      vsevik@chromium.org authored
      Web Inspector: [REGRESSION] Revision support problems: revert and apply original content  cause exceptions
      https://bugs.webkit.org/show_bug.cgi?id=97669
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Added missed callback parameters.
      
      Test: inspector/uisourcecode-revisions.html
      
      * inspector/front-end/UISourceCode.js:
      (WebInspector.UISourceCode.prototype.revertToOriginal):
      (WebInspector.UISourceCode.prototype.revertAndClearHistory):
      
      LayoutTests:
      
      * inspector/uisourcecode-revisions-expected.txt: Added.
      * inspector/uisourcecode-revisions.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4452da12
    • kenneth@webkit.org's avatar
      Reorder Qt WebCore includes · 7a158520
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97678
      
      Reviewed by Noam Rosenthal.
      
      * bridge/qt/qt_instance.cpp:
      * bridge/qt/qt_instance.h:
      * bridge/qt/qt_pixmapruntime.cpp:
      * bridge/qt/qt_runtime.cpp:
      * platform/graphics/qt/FontCacheQt.cpp:
      * platform/graphics/qt/FontCustomPlatformData.h:
      * platform/graphics/qt/ImageDecoderQt.cpp:
      * platform/graphics/qt/ImageDecoderQt.h:
      * platform/graphics/qt/PathQt.cpp:
      * platform/graphics/qt/TransformationMatrixQt.cpp:
      * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
      * platform/network/qt/DnsPrefetchHelper.h:
      * platform/network/qt/QNetworkReplyHandler.cpp:
      * platform/network/qt/ResourceHandleQt.cpp:
      * platform/qt/ClipboardQt.cpp:
      * platform/qt/GamepadsQt.cpp:
      * platform/qt/PasteboardQt.cpp:
      * platform/qt/PlatformScreenQt.cpp:
      * platform/qt/RenderThemeQt.cpp:
      * platform/text/qt/TextBoundariesQt.cpp:
      * plugins/qt/PluginPackageQt.cpp:
      * plugins/qt/PluginViewQt.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7a158520
    • commit-queue@webkit.org's avatar
      [EFL] mediaControlsEflFullscreen.css overrides regular media controls styling · e6545176
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97671
      
      Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-26
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebCore:
      
      Add missing ":-webkit-full-screen" in mediaControlsEflFullscreen.css so
      that regular media controls styling is not overridden by full screen
      styling when switching to full screen mode. This was causing a lot of
      flakiness in our media tests.
      
      No new tests, already covered by existing media tests.
      
      * css/mediaControlsEflFullscreen.css:
      (video:-webkit-full-screen::-webkit-media-controls-panel):
      (video:-webkit-full-screen:-webkit-full-page-media::-webkit-media-controls-panel):
      (video:-webkit-full-screen::-webkit-media-controls-mute-button):
      (video:-webkit-full-screen::-webkit-media-controls-play-button):
      (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
      (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
      (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
      (video:-webkit-full-screen::-webkit-media-controls-timeline):
      (video:-webkit-full-screen::-webkit-media-controls-volume-slider-container):
      (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
      (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
      (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
      (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button):
      (video:-webkit-full-screen::-webkit-media-controls-rewind-button):
      (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
      (video:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
      
      LayoutTests:
      
      Unskip several media tests that are no longer flaky
      now that we address media controls styling issues
      when switching to full screen mode.
      
      Some tests needed rebaselining. The rebaseline is unrelated
      to this change but was needed in order to unskip the tests.
      
      * platform/efl/TestExpectations:
      * platform/efl/media/controls-after-reload-expected.png:
      * platform/efl/media/controls-after-reload-expected.txt:
      * platform/efl/media/controls-strict-expected.png:
      * platform/efl/media/controls-strict-expected.txt:
      * platform/efl/media/controls-styling-expected.png:
      * platform/efl/media/controls-styling-expected.txt:
      * platform/efl/media/controls-without-preload-expected.png:
      * platform/efl/media/controls-without-preload-expected.txt:
      * platform/efl/media/media-controls-clone-expected.png:
      * platform/efl/media/media-controls-clone-expected.txt:
      * platform/efl/media/media-document-audio-repaint-expected.txt:
      * platform/efl/media/sources-fallback-codecs-expected.txt: Added.
      * platform/efl/media/video-controls-rendering-expected.png:
      * platform/efl/media/video-controls-rendering-expected.txt:
      * platform/efl/media/video-display-toggle-expected.png:
      * platform/efl/media/video-display-toggle-expected.txt:
      * platform/efl/media/video-empty-source-expected.png:
      * platform/efl/media/video-empty-source-expected.txt:
      * platform/efl/media/video-zoom-controls-expected.png:
      * platform/efl/media/video-zoom-controls-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e6545176
    • caseq@chromium.org's avatar
      Web Inspector: display stack of last layout invalidation instead of first one · 259992d2
      caseq@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97677
      
      Reviewed by Vsevolod Vlasov.
      
      - add a call to InspectorInstrumentation::didInvalidateLayout() when upgrading relayout root;
      - do not suppress timeline's Invalidate Layout records other than first.
      
      * inspector/InspectorTimelineAgent.cpp:
      (WebCore::InspectorTimelineAgent::didInvalidateLayout):
      * page/FrameView.cpp:
      (WebCore::FrameView::scheduleRelayoutOfSubtree):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      259992d2
    • antti@apple.com's avatar
      Optimize stylesheet insertions · 0517bdff
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97627
      
      Reviewed by Andreas Kling.
      
      PerformanceTests: 
      
      Add synthetic performance test for avoiding style recalcs on stylesheet inserts.
      
      * CSS/StyleSheetInsert.html: Added.
      
      Source/WebCore: 
      
      We currently do scope analysis for stylesheets that are added to the end of the active stylesheet list to avoid unnecessary style
      recalcs and StyleResolver rebuilding. However it is somewhat common to insert <style> elements dynamically to positions other than last.
      In this case we currently simply force full style recalc. We should do scope analysis and partial style recalcs also in these cases.
              
      PerformanceTests/CSS/StyleSheetInsert.html microbenchmark shows ~20x progression from the patch.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::StyleResolver):
      (WebCore::StyleResolver::resetAuthorStyle):
              
          Add a way to reset author RuleSet without deleting the whole StyleResolver.
      
      (WebCore):
      * css/StyleResolver.h:
      (StyleResolver):
      * dom/DocumentStyleSheetCollection.cpp:
      (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
              
          Check if there have been insertions to the stylesheet list. If so we need to reset
          the StyleResolver (to handle rule position changes) but don't need to force full
          style recalc. Do scope analysis for inserted stylesheets as well.
      
      (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
      * dom/DocumentStyleSheetCollection.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0517bdff
    • commit-queue@webkit.org's avatar
      Gesture tap highlighting entire first line · 33d2a5f3
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97668
      
      Patch by Allan Sandfeld Jensen <allan.jensen@digia.com> on 2012-09-26
      Reviewed by Kenneth Rohde Christiansen.
      
      Keep better track if which part is the first, middle or last, and adjust the X-edges accordingly.
      
      * page/GestureTapHighlighter.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33d2a5f3
    • vsevik@chromium.org's avatar
      Web Inspector: DefaultTextEditor throws exception sometimes. · f936ef41
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97681
      
      Reviewed by Alexander Pavlov.
      
      Added a check that line number does not exceed text model line count.
      
      * inspector/front-end/DefaultTextEditor.js:
      (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f936ef41
    • kenneth@webkit.org's avatar
      [TextureMapper] Remove unused method · 95bc5477
      kenneth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97675
      
      Reviewed by Simon Hausmann.
      
      * platform/graphics/texmap/TextureMapperGL.h: Remove uidForImage()
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      95bc5477
    • loislo@chromium.org's avatar
      Web Inspector: extract HashSet instrumentation from core NMI code and put it... · c10e0982
      loislo@chromium.org authored
      Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
      https://bugs.webkit.org/show_bug.cgi?id=97198
      
      Reviewed by Yury Semikhatsky.
      
      Current implementation has overloads for HashSet.
      This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
      
      Source/WebCore:
      
      * css/CSSCursorImageValue.cpp:
      (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::Features::reportMemoryUsage):
      (WebCore::StyleResolver::collectMatchingRulesForList):
      * dom/Document.cpp:
      (WebCore::Document::reportMemoryUsage):
      * dom/DocumentEventQueue.cpp:
      (WebCore::DocumentEventQueue::reportMemoryUsage):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::reportMemoryUsage):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::reportMemoryUsage):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::reportMemoryUsage):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::reportMemoryUsage):
      
      Source/WebKit/chromium:
      
      * tests/MemoryInstrumentationTest.cpp:
      (WebCore::TEST):
      (WebCore):
      
      Source/WTF:
      
      * GNUmakefile.list.am:
      * WTF.gypi:
      * WTF.pro:
      * WTF.vcproj/WTF.vcproj:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/HashSet.h:
      (WTF):
      (HashSet):
      * wtf/HashTable.h:
      (WTF):
      (HashTable):
      * wtf/MemoryInstrumentation.h:
      (WTF::MemoryClassInfo::addCollectionElements):
      (WTF::MemoryClassInfo::addHashCountedSet):
      * wtf/MemoryInstrumentationHashSet.h: Added.
      (WTF):
      (WTF::reportMemoryUsage):
      * wtf/MemoryInstrumentationHashTable.h: Added.
      (WTF):
      (WTF::reportMemoryUsage):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c10e0982
    • dominik.rottsches@intel.com's avatar
      [soup] Obey setTimeoutInterval in soup backend · 2107819a
      dominik.rottsches@intel.com authored
      https://bugs.webkit.org/show_bug.cgi?id=94796
      
      Reviewed by Gustavo Noronha Silva.
      
      Implementing ResourceHandle's setTimeoutInterval support for the soup backend.
      This is preparatory work for bug 74802, timeout support for XHR2. The patch
      has been successfully tested in combination with my work-in-progress
      for that bug.
      
      No new tests yet, tests will be added with the patch in bug 74802.
      
      * platform/network/ResourceHandleInternal.h:
      (WebCore::ResourceHandleInternal::ResourceHandleInternal): Adding a timeout source.
      (ResourceHandleInternal):
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore):
      (WebCore::cleanupSoupRequestOperation): Resetting the timer.
      (WebCore::sendRequestCallback): Stopping the timer.
      (WebCore::startHTTPRequest): Starting a timeout timer before the async request.
      (WebCore::ResourceHandle::platformSetDefersLoading): Starting a timeout timer before the async request.
      (WebCore::requestTimeoutCallback): Preparing a corresponding resource error and notifying clients of failure.
      (WebCore::startNonHTTPRequest): Starting a timeout timer before the async request.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2107819a
    • caseq@chromium.org's avatar
      Web Inspector: paint inspector overlay on a transparency layer · bb14507b
      caseq@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97659
      
      Reviewed by Pavel Feldman.
      
      Set composite operation to copy and begin transparency layer before painting the
          frame view of overlay page, so that text on transparent background is properly rendered.
      
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::paint):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb14507b
    • commit-queue@webkit.org's avatar
      [Qt] Make use of ASCIILiteral in PlatformKeyboardEventQt.cpp · 4b086e47
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97612
      
      Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-09-26
      Reviewed by Jocelyn Turcotte.
      
      String literals returned by keyIdentifierForQtKeyCode and
      keyTextForKeyEvent now make use of more efficient ASCIILiteral.
      
      * platform/qt/PlatformKeyboardEventQt.cpp:
      (WebCore::keyIdentifierForQtKeyCode):
      (WebCore::keyTextForKeyEvent):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4b086e47
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r129592. · 9ab98ef6
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/129592
      https://bugs.webkit.org/show_bug.cgi?id=97670
      
      Failures in Chromium security tests (Requested by schenney on
      #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-09-26
      
      Source/JavaScriptCore:
      
      * runtime/JSGlobalObjectFunctions.cpp:
      (JSC::globalFuncEval):
      
      LayoutTests:
      
      * fast/js/eval-cross-window-expected.txt:
      * fast/js/eval-cross-window.html:
      * http/tests/security/cross-frame-access-call-expected.txt:
      * http/tests/security/cross-frame-access-call.html:
      * http/tests/security/resources/xss-eval2.html:
      * http/tests/security/resources/xss-eval3.html:
      * http/tests/security/xss-eval-expected.txt:
      * http/tests/security/xss-eval.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129629 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9ab98ef6
    • yurys@chromium.org's avatar
      Unreviewed. Roll out http://trac.webkit.org/changeset/129502 since it broke cookie table. · e42ce63d
      yurys@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97471
      
      * inspector/front-end/CookieParser.js:
      (WebInspector.Cookie.prototype.expires):
      * inspector/front-end/CookiesTable.js:
      (WebInspector.CookiesTable.prototype._createGridNode):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e42ce63d
    • vsevik@chromium.org's avatar
      Web Inspector: Remove resource() getter from UISourceCode. · 331c4068
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97557
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Resource getter removed from UISourceCode. Resource could be fetched from ResourceTreeModel directly.
      
      * inspector/front-end/CSSStyleModel.js:
      (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent):
      * inspector/front-end/CompilerScriptMapping.js:
      * inspector/front-end/JavaScriptSource.js:
      (WebInspector.JavaScriptSource):
      * inspector/front-end/NetworkUISourceCodeProvider.js:
      (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
      * inspector/front-end/ResourceScriptMapping.js:
      (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
      * inspector/front-end/SASSSourceMapping.js:
      (WebInspector.SASSSource):
      * inspector/front-end/ScriptSnippetModel.js:
      (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
      (WebInspector.SnippetJavaScriptSource):
      * inspector/front-end/ScriptsPanel.js:
      (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
      * inspector/front-end/StyleSource.js:
      (WebInspector.StyleSource):
      * inspector/front-end/UISourceCode.js:
      (WebInspector.UISourceCode):
      
      LayoutTests:
      
      * http/tests/inspector/workspace-test.js:
      (initialize_WorkspaceTest.InspectorTest.addMockUISourceCodeToWorkspace):
      * inspector/debugger/breakpoint-manager.html:
      * inspector/debugger/dynamic-script-tag-expected.txt:
      * inspector/debugger/dynamic-script-tag.html:
      * inspector/debugger/scripts-file-selector.html:
      * inspector/debugger/scripts-panel.html:
      * inspector/debugger/scripts-sorting.html:
      * inspector/debugger/ui-source-code-display-name.html:
      * inspector/debugger/ui-source-code.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      331c4068
    • vsevik@chromium.org's avatar
      Web Inspector: Fix closure compilation errors. · a6306ad8
      vsevik@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97666
      
      Reviewed by Alexander Pavlov.
      
      Fixed closure compilation errors.
      Changed contentProvider contentURL() method return type to string.
      Removed redundant () in CookieTable.
      
      * inspector/front-end/CSSStyleModel.js:
      * inspector/front-end/ContentProvider.js:
      * inspector/front-end/ContentProviders.js:
      (WebInspector.ConcatenatedScriptsContentProvider.prototype.contentURL):
      (WebInspector.StaticContentProvider.prototype.contentURL):
      * inspector/front-end/CookiesTable.js:
      (WebInspector.CookiesTable.prototype._createGridNode):
      * inspector/front-end/DOMAgent.js:
      (WebInspector.DOMDocument):
      * inspector/front-end/FileContentView.js:
      * inspector/front-end/NetworkRequest.js:
      * inspector/front-end/Resource.js:
      * inspector/front-end/Script.js:
      * inspector/front-end/ScriptsPanel.js:
      * inspector/front-end/UISourceCode.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6306ad8
    • caseq@chromium.org's avatar
      Web Inspector: [chromium] add a test for inspector overlay update frequency · 2040dac1
      caseq@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97567
      
      Reviewed by Yury Semikhatsky.
      
      Added a test for reasonable number of frames caused by inspector page overlay.
      We expect changes in nodes being inspected to cause an update, while just idling
      should not cause large numbers of unexpected updates.
      
      * src/js/Tests.js:
      (.TestSuite.prototype.testPageOverlayUpdate):
      (.TestSuite.prototype.testPageOverlayUpdate.innerAddRecord):
      (.TestSuite.prototype.testPageOverlayUpdate.populatePage):
      (.TestSuite.prototype.testPageOverlayUpdate.step2):
      (.TestSuite.prototype.testPageOverlayUpdate.step4):
      (.TestSuite.prototype.testPageOverlayUpdate.step5):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2040dac1