1. 22 Mar, 2013 21 commits
    • commit-queue@webkit.org's avatar
      Use generated bindings for the Coordinates type used by Geolocation · e25524f8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112975
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, refactoring only.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
      (WebCore):
      (WebCore::Coordinates::altitude):
      (WebCore::Coordinates::altitudeAccuracy):
      (WebCore::Coordinates::heading):
      (WebCore::Coordinates::speed):
      * Modules/geolocation/Coordinates.h:
      (Coordinates):
      * Modules/geolocation/Coordinates.idl:
      * Target.pri:
      * UseJSC.cmake:
      * UseV8.cmake:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e25524f8
    • commit-queue@webkit.org's avatar
      INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default · 8d06d34e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113005
      
      Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-03-22
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      Use fallback format when datetime format from locale is not complete.
      
      Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
             fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
             fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
             fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
             fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
             fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html
      
      * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
      (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
      (WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
      (WebCore::DateTimeFormatValidator::visitField):
      (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
      (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
      * html/BaseMultipleFieldsDateAndTimeInputType.h:
      (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
      * html/DateInputType.cpp:
      (WebCore::DateInputType::isValidFormat): Added.
      * html/DateInputType.h:
      (DateInputType):
      * html/DateTimeInputType.cpp:
      (WebCore::DateTimeInputType::isValidFormat): Added.
      * html/DateTimeInputType.h:
      (DateTimeInputType):
      * html/DateTimeLocalInputType.cpp:
      (WebCore::DateTimeLocalInputType::isValidFormat): Added.
      * html/DateTimeLocalInputType.h:
      (DateTimeLocalInputType):
      * html/MonthInputType.cpp:
      (WebCore::MonthInputType::isValidFormat): Added.
      * html/MonthInputType.h:
      (MonthInputType):
      * html/TimeInputType.cpp:
      (WebCore::TimeInputType::isValidFormat): Added.
      * html/TimeInputType.h:
      (TimeInputType):
      * html/WeekInputType.cpp:
      (WebCore::WeekInputType::isValidFormat): Added.
      * html/WeekInputType.h:
      (WeekInputType):
      
      LayoutTests:
      
      * fast/forms/date-multiple-fields/date-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html: Added.
      * fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html: Added.
      * fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html: Added.
      * fast/forms/month-multiple-fields/month-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html: Added.
      * fast/forms/time-multiple-fields/time-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html: Added.
      * fast/forms/week-multiple-fields/week-multiple-fields-fallback-format-expected.txt: Added.
      * fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d06d34e
    • morrita@google.com's avatar
      Custom Elements: "readyCallback" lifecycle callback should be called. · 321d20ac
      morrita@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112538
      
      Reviewed by Elliott Sprehn.
      
      Source/WebCore:
      
      This change allows each custom element definition to hook up its instantiation,
      namely "readyCallback" lifecycle callback.
      
      The change has two parts:
      - 1. Tracking which Element objects to be created.
      - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
        before the Element object is visible from page script.
      
      For 1, CustomElementRegistry maintains list of "callback
      invocaions".  Each list item ("invocation") tracks the element
      which has a lifecycle callback to be invoked. Each invocation is
      registered when - Any custom element C++ object is instantiated.
      See changes on CustomElementConstructor.cpp.
      
      This also happens when @is attribute is set by the parser or node
      cloning routine, which can turn a non-custom element into a
      type-extended custom element. See changes on Element.cpp.
      
      For 2, CustomElementRegistry basically follows what
      MutationObserver is doing, and introduces a method called
      deliverLifecycleCallbacks(). This function flushes all pending
      callback invocations. You can think it as a dual of
      MutationObserver::deliverAllMutations().
      
      The delivery function is called places where MutationObserver's
      deliverAllMutations() is called. In addition, it is also called
      just before returning from a set of DOM APIs. For example, it is
      called just before createElement() returns, so that possibly
      created custom element becomes ready through its readyCallback().
      Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
      principle, APIs which can create new custom element instnaces are
      marked. See CustomElementRegistry::CallbackDeliveryScope and
      changes on CodeGeneratorV8.pm.
      
      We need this extra work because the readyCallback() needs to give
      an illusion so that JavaScript programmers feel like the
      readyCallback() callback being called just after it is created,
      instead of called on arbitrary late timing like MutationObserver
      notifications.
      
      Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
             fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
             fast/dom/custom/lifecycle-ready-creation-api.html
             fast/dom/custom/lifecycle-ready-innerHTML.html
             fast/dom/custom/lifecycle-ready-parser-only.html
             fast/dom/custom/lifecycle-ready-parser-script.html
             fast/dom/custom/lifecycle-ready-paste.html
      
      * bindings/scripts/CodeGeneratorV8.pm:
      - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
      (GenerateCustomElementInvocationScopeIfNeeded):
      (GenerateNormalAttrSetter):
      (GenerateFunction):
      * bindings/scripts/IDLAttributes.txt:
      * bindings/v8/CustomElementHelpers.cpp:
      (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
      (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
      * bindings/v8/CustomElementHelpers.h:
      (CustomElementHelpers):
      * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
      (WebCore::V8RecursionScope::didLeaveScriptContext):
      * dom/CustomElementConstructor.cpp:
      (WebCore::CustomElementConstructor::createElement):
      (WebCore::CustomElementConstructor::createElementInternal):
      * dom/CustomElementConstructor.h:
      (WebCore::CustomElementConstructor::isExtended):
      (CustomElementConstructor):
      * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
      (WebCore::CustomElementInvocation::CustomElementInvocation):
      (WebCore::CustomElementInvocation::~CustomElementInvocation):
      (WebCore::activeCustomElementRegistries):
      (WebCore::CustomElementRegistry::~CustomElementRegistry):
      (WebCore::CustomElementRegistry::didGiveTypeExtension):
      (WebCore::CustomElementRegistry::didCreateElement):
      (WebCore::CustomElementRegistry::activate):
      (WebCore::CustomElementRegistry::deactivate):
      (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
      (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
      * dom/CustomElementRegistry.h:
      (CustomElementInvocation):
      (WebCore::CustomElementInvocation::element):
      (CallbackDeliveryScope):
      (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
      (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
      (CustomElementRegistry):
      (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
      * dom/Document.cpp:
      (WebCore::Document::createElement):
      (WebCore::Document::didCreateCustomElement):
      * dom/Document.h:
      (Document):
      * dom/Document.idl:
      * dom/Element.cpp:
      (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
      (WebCore::Element::parserSetAttributes):
      (WebCore::Element::cloneAttributesFromElement):
      * dom/Element.h:
      * dom/Node.idl:
      * dom/ShadowRoot.idl:
      * html/HTMLElement.idl:
      * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::runScript):
      
      Source/WebKit/chromium:
      
      * src/WebKit.cpp: Added deliverAllLifecycleCallbacks()
      
      Source/WTF:
      
      * wtf/HashSet.h:
      (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
      
      LayoutTests:
      
      * fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-createElement-recursion.html: Added.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Added.
      * fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-creation-api.html: Added.
      * fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-innerHTML.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-only-expected.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-only.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-parser-script.html: Added.
      * fast/dom/custom/lifecycle-ready-paste-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-paste.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146583 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      321d20ac
    • tommyw@google.com's avatar
      MediaStream API: Finalize the RTCPeerConnection states · 740d37e0
      tommyw@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112792
      
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      * chromium/public/WebRTCPeerConnectionHandlerClient.h:
      
      Source/WebCore:
      
      This patch finalized the RTCPeerConnection state and events. These changes
      have not yet pushed out to the editors draft; but they are uncontroversial
      and agreed upon.
      
      readyState will be deleted; please use the replacement signalingState which is already available.
      onstatechange -> onsignalingstatechange
      onicechange -> oniceconnectionstatechange
      ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
      RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
      
      Patch covered by modified tests.
      
      * Modules/mediastream/RTCPeerConnection.cpp:
      (WebCore::RTCPeerConnection::RTCPeerConnection):
      (WebCore::RTCPeerConnection::iceConnectionState):
      (WebCore::RTCPeerConnection::changeSignalingState):
      (WebCore::RTCPeerConnection::changeIceGatheringState):
      (WebCore::RTCPeerConnection::changeIceConnectionState):
      * Modules/mediastream/RTCPeerConnection.h:
      (RTCPeerConnection):
      * Modules/mediastream/RTCPeerConnection.idl:
      * dom/EventNames.h:
      (WebCore):
      * platform/mediastream/RTCPeerConnectionHandlerClient.h:
      
      Source/WebKit/chromium:
      
      * src/AssertMatchingEnums.cpp:
      
      LayoutTests:
      
      * fast/mediastream/RTCPeerConnection-datachannel.html:
      * fast/mediastream/RTCPeerConnection-dtmf.html:
      * fast/mediastream/RTCPeerConnection-events-expected.txt:
      * fast/mediastream/RTCPeerConnection-events.html:
      * fast/mediastream/RTCPeerConnection-ice.html:
      * fast/mediastream/RTCPeerConnection-state-expected.txt:
      * fast/mediastream/RTCPeerConnection-state.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146582 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      740d37e0
    • commit-queue@webkit.org's avatar
      [EFL][WK2] View is not focused when fullscreen mode toggled · 9e479af5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113009
      
      Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-22
      Reviewed by Laszlo Gombos.
      
      Set focus on view when fullscreen mode enabled/disabled
      by FullScreen API.
      
      * MiniBrowser/efl/main.c:
      (on_fullscreen_accept):
      (on_fullscreen_deny):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146581 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e479af5
    • mkwst@chromium.org's avatar
      Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data. · c83c2ce5
      mkwst@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112965
      
      Reviewed by Alexey Proskuryakov.
      
      In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
      it would be possible to use 'KURL(ParsedURLString, [url])' rather than
      'KURL(KURL(), [url])', since we knew that the URL in question is a
      value and absolute URL. This patch fixes the obvious instances of this
      pattern; there are several more 'KURL(KURL(), String)' calls in
      WebCore but these were the only places I was reasonably sure that bad
      data couldn't creep in.
      
      * dom/Document.cpp:
      (WebCore::Document::updateBaseURL):
          'documentURI' is pulled from 'url()->string()'. It's safe.
      * page/ContentSecurityPolicy.cpp:
      (WebCore::gatherSecurityPolicyViolationEventData):
      (WebCore::ContentSecurityPolicy::reportViolation):
          'CallFrame::sourceURL()' is a known valid/absolute URL.
      * page/SecurityOrigin.cpp:
      (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
      (WebCore::SecurityOrigin::create):
          The strings constructed here are certainly valid.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c83c2ce5
    • kadam@inf.u-szeged.hu's avatar
      2d0dbee2
    • commit-queue@webkit.org's avatar
      [EFL] New baseline for accessibility/platform-name.html · a81a109e
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113018
      
      Unreviewed EFL gardening
      
      Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-03-22
      
      * platform/efl-wk1/TestExpectations:
      * platform/efl-wk2/TestExpectations:
      * platform/efl/accessibility/platform-name-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a81a109e
    • loislo@chromium.org's avatar
      Web Inspector: Flame Chart. move overview window when user scrolls the chart. · 3256f90b
      loislo@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113014
      
      Reviewed by Yury Semikhatsky.
      
      I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
      But the dragging part was not so simple due to the different approaches in
      OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
      when FlameChart used _xOffset and _xScaleFactor and width.
      It was not practical and I rewrote the FlameChart mechanics
      and now it also uses _windowLeft _windowRight.
      
      * inspector/front-end/FlameChart.js:
      (WebInspector.FlameChart):
      (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
      (WebInspector.FlameChart.Calculator.prototype.computePosition):
      (WebInspector.FlameChart.prototype._onWindowChanged):
      (WebInspector.FlameChart.prototype._startCanvasDragging):
      (WebInspector.FlameChart.prototype._canvasDragging):
      (WebInspector.FlameChart.prototype._onMouseMove):
      (WebInspector.FlameChart.prototype._onMouseWheel):
      (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
      (WebInspector.FlameChart.prototype._drawOverviewCanvas):
      (WebInspector.FlameChart.prototype.draw):
      (WebInspector.FlameChart.prototype._updateBoundaries):
      (WebInspector.FlameChart.prototype.update):
      * inspector/front-end/OverviewGrid.js:
      (WebInspector.OverviewGrid.prototype.setWindowPosition):
      (WebInspector.OverviewGrid.prototype.setWindow):
      (WebInspector.OverviewGrid.prototype.addEventListener):
      (WebInspector.OverviewGrid.prototype.zoom):
      (WebInspector.OverviewGrid.Window.prototype._zoom):
      * inspector/front-end/inspectorCommon.css:
      (.overview-grid-window-rulers):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3256f90b
    • commit-queue@webkit.org's avatar
      Move GeolocationClient.h to Modules/geolocation/ · aceea69d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112997
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, no functional change.
      
      * GNUmakefile.list.am:
      * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
      (WebCore):
      (GeolocationClient):
      (WebCore::GeolocationClient::~GeolocationClient):
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aceea69d
    • rniwa@webkit.org's avatar
      Add a flaky crash test expectations on Mac WebKit2 per bug 113020. · 27b96222
      rniwa@webkit.org authored
      * platform/mac-wk2/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      27b96222
    • zandobersek@gmail.com's avatar
      Unreviewed GTK gardening. · 32661dac
      zandobersek@gmail.com authored
      * platform/gtk/TestExpectations: Skipping fast/dom/custom tests as the custom elements support is not yet enabled
      on the GTK port. Adding crashing expectations for two IDB tests that regressed with r146540.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146573 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32661dac
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r146534 and r146565. · 064f0fd1
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/146534
      http://trac.webkit.org/changeset/146565
      https://bugs.webkit.org/show_bug.cgi?id=113017
      
      "r146534 caused perf regression on Chromium Linux x64"
      (Requested by yurys on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-03-22
      
      Source/WebCore:
      
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateNormalAttrSetter):
      (GenerateOverloadedFunction):
      (GenerateFunctionCallback):
      (GenerateFunction):
      (GenerateParametersCheck):
      (GenerateSingleConstructorCallback):
      (GenerateNonStandardFunction):
      (GenerateImplementation):
      (GenerateFunctionCallString):
      * bindings/scripts/IDLAttributes.txt:
      * bindings/scripts/test/V8/V8Float64Array.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestEventTarget.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestInterface.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
      (WebCore):
      * bindings/scripts/test/V8/V8TestTypedefs.cpp:
      (WebCore):
      * bindings/v8/CustomElementHelpers.cpp:
      * bindings/v8/CustomElementHelpers.h:
      (WebCore):
      (CustomElementHelpers):
      * bindings/v8/V8DOMConfiguration.cpp:
      (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
      (WebCore::V8DOMConfiguration::configureTemplate):
      * bindings/v8/V8DOMConfiguration.h:
      (BatchedMethod):
      (V8DOMConfiguration):
      * bindings/v8/V8RecursionScope.cpp:
      (WebCore::V8RecursionScope::didLeaveScriptContext):
      * dom/CustomElementConstructor.cpp:
      (WebCore::CustomElementConstructor::createElement):
      * dom/CustomElementConstructor.h:
      (CustomElementConstructor):
      * dom/CustomElementRegistry.cpp:
      (WebCore::CustomElementRegistry::~CustomElementRegistry):
      * dom/CustomElementRegistry.h:
      (WebCore):
      (CustomElementRegistry):
      * dom/Document.cpp:
      (WebCore::Document::createElement):
      (WebCore::Document::registerElement):
      * dom/Document.h:
      * dom/Document.idl:
      * dom/Element.cpp:
      (WebCore::Element::parserSetAttributes):
      (WebCore::Element::cloneAttributesFromElement):
      * dom/Element.h:
      * dom/Element.idl:
      * dom/Node.idl:
      * dom/ShadowRoot.idl:
      * html/HTMLElement.idl:
      * html/parser/HTMLScriptRunner.cpp:
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::runScript):
      
      Source/WebKit/chromium:
      
      * src/WebKit.cpp:
      
      Source/WTF:
      
      * wtf/HashSet.h:
      (WTF):
      (WTF::copyToVector):
      
      LayoutTests:
      
      * fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-createElement-recursion.html: Removed.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Removed.
      * fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-creation-api.html: Removed.
      * fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-innerHTML.html: Removed.
      * fast/dom/custom/lifecycle-ready-parser-only-expected.html: Removed.
      * fast/dom/custom/lifecycle-ready-parser-only.html: Removed.
      * fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-parser-script.html: Removed.
      * fast/dom/custom/lifecycle-ready-paste-expected.txt: Removed.
      * fast/dom/custom/lifecycle-ready-paste.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      064f0fd1
    • commit-queue@webkit.org's avatar
      [GStreamer] Memory leak in AudioFileReader::createBus() · 7f292610
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112925
      
      Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-22
      Reviewed by Martin Robinson.
      
      Adopt the reference returned by g_timeout_source_new()
      to fix a memory leak.
      
      No new tests. No change in behavior.
      
      * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
      (WebCore::AudioFileReader::createBus):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7f292610
    • commit-queue@webkit.org's avatar
      Move page/Coordinates.[h|idl] to Modules/geolocation/ · 1a06ddd9
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112945
      
      Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
      Reviewed by Kentaro Hara.
      
      No new tests, no functional change.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * DerivedSources.pri:
      * GNUmakefile.list.am:
      * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
      (WebCore):
      (Coordinates):
      (WebCore::Coordinates::create):
      (WebCore::Coordinates::isolatedCopy):
      (WebCore::Coordinates::latitude):
      (WebCore::Coordinates::longitude):
      (WebCore::Coordinates::altitude):
      (WebCore::Coordinates::accuracy):
      (WebCore::Coordinates::altitudeAccuracy):
      (WebCore::Coordinates::heading):
      (WebCore::Coordinates::speed):
      (WebCore::Coordinates::canProvideAltitude):
      (WebCore::Coordinates::canProvideAltitudeAccuracy):
      (WebCore::Coordinates::canProvideHeading):
      (WebCore::Coordinates::canProvideSpeed):
      (WebCore::Coordinates::Coordinates):
      * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
      * Target.pri:
      * WebCore.gypi:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146570 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1a06ddd9
    • rniwa@webkit.org's avatar
      Add a flaky test failure expectation per bug 113012. · 270599d2
      rniwa@webkit.org authored
      * platform/win/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      270599d2
    • rniwa@webkit.org's avatar
      Leak bots erroneously report JSC::WatchpointSet as leaking · 3340cf93
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=107781
      
      Reviewed by Filip Pizlo.
      
      Since leaks doesn't support tagged pointers, avoid using it by flipping the bit flag to indicate
      the entry is "fat". We set the flag when the entry is NOT fat; i.e. slim.
      
      Replaced FatFlag by SlimFlag and initialized m_bits with this flag to indicate that the entry is
      initially "slim".
      
      * runtime/SymbolTable.cpp:
      (JSC::SymbolTableEntry::copySlow): Don't set FatFlag since it has been replaced by SlimFlag.
      (JSC::SymbolTableEntry::inflateSlow): Ditto.
      
      * runtime/SymbolTable.h:
      (JSC::SymbolTableEntry::Fast::Fast): Set SlimFlag by default.
      (JSC::SymbolTableEntry::Fast::isNull): Ignore SlimFlag.
      (JSC::SymbolTableEntry::Fast::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag
      is not set.
      
      (JSC::SymbolTableEntry::SymbolTableEntry): Set SlimFlag by default.
      (JSC::SymbolTableEntry::SymbolTableEntry::getFast): Set SlimFlag when creating Fast from a fat entry.
      (JSC::SymbolTableEntry::isNull): Ignore SlimFlag.
      (JSC::SymbolTableEntry::FatEntry::FatEntry): Strip SlimFlag.
      (JSC::SymbolTableEntry::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag is unset.
      (JSC::SymbolTableEntry::fatEntry): Don't strip FatFlag as this flag doesn't exist anymore.
      (JSC::SymbolTableEntry::pack): Preserve SlimFlag.
      
      (JSC::SymbolTableIndexHashTraits): empty value is no longer zero so don't set emptyValueIsZero true.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146568 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3340cf93
    • rniwa@webkit.org's avatar
      Final Mac rebaseline attempt for r146531 since r146564 wasn't enough. · fd8498c8
      rniwa@webkit.org authored
      I'm sorry I made a huge mess here.
      
      * platform/mac/compositing/rtl/rtl-fixed-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd8498c8
    • commit-queue@webkit.org's avatar
      [chromium] Mark virtual/gpu/fast/canvas/canvas-toDataURL-webp.html as flaky · 3c926545
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93310
      
      Unreviewed test expectations update.
      
      libwebp will be updated to 0.3.0 in chrome changing the encoder
      output after which this test will need to be rebaselined.
      
      Patch by James Zern <jzern@chromium.org> on 2013-03-22
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3c926545
    • morrita@google.com's avatar
      Custom Elements: "readyCallback" lifecycle callback should be called. · e5501fe8
      morrita@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112538
      
      Reviewed by Elliott Sprehn.
      
      Source/WebCore:
      
      This change allows each custom element definition to hook up its instantiation,
      namely "readyCallback" lifecycle callback.
      
      The change has two parts:
      - 1. Tracking which Element objects to be created.
      - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
        before the Element object is visible from page script.
      
      For 1, CustomElementRegistry maintains list of "callback
      invocaions".  Each list item ("invocation") tracks the element
      which has a lifecycle callback to be invoked. Each invocation is
      registered when - Any custom element C++ object is instantiated.
      See changes on CustomElementConstructor.cpp.
      
      This also happens when @is attribute is set by the parser or node
      cloning routine, which can turn a non-custom element into a
      type-extended custom element. See changes on Element.cpp.
      
      For 2, CustomElementRegistry basically follows what
      MutationObserver is doing, and introduces a method called
      deliverLifecycleCallbacks(). This function flushes all pending
      callback invocations. You can think it as a dual of
      MutationObserver::deliverAllMutations().
      
      The delivery function is called places where MutationObserver's
      deliverAllMutations() is called. In addition, it is also called
      just before returning from a set of DOM APIs. For example, it is
      called just before createElement() returns, so that possibly
      created custom element becomes ready through its readyCallback().
      Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
      principle, APIs which can create new custom element instnaces are
      marked. See CustomElementRegistry::CallbackDeliveryScope and
      changes on CodeGeneratorV8.pm.
      
      We need this extra work because the readyCallback() needs to give
      an illusion so that JavaScript programmers feel like the
      readyCallback() callback being called just after it is created,
      instead of called on arbitrary late timing like MutationObserver
      notifications.
      
      Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
             fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
             fast/dom/custom/lifecycle-ready-creation-api.html
             fast/dom/custom/lifecycle-ready-innerHTML.html
             fast/dom/custom/lifecycle-ready-parser-only.html
             fast/dom/custom/lifecycle-ready-parser-script.html
             fast/dom/custom/lifecycle-ready-paste.html
      
      * bindings/scripts/CodeGeneratorV8.pm:
      - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
      (GenerateCustomElementInvocationScopeIfNeeded):
      (GenerateNormalAttrSetter):
      (GenerateFunction):
      * bindings/scripts/IDLAttributes.txt:
      * bindings/v8/CustomElementHelpers.cpp:
      (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
      (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
      * bindings/v8/CustomElementHelpers.h:
      (CustomElementHelpers):
      * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
      (WebCore::V8RecursionScope::didLeaveScriptContext):
      * dom/CustomElementConstructor.cpp:
      (WebCore::CustomElementConstructor::createElement):
      (WebCore::CustomElementConstructor::createElementInternal):
      * dom/CustomElementConstructor.h:
      (WebCore::CustomElementConstructor::isExtended):
      (CustomElementConstructor):
      * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
      (WebCore::CustomElementInvocation::CustomElementInvocation):
      (WebCore::CustomElementInvocation::~CustomElementInvocation):
      (WebCore::activeCustomElementRegistries):
      (WebCore::CustomElementRegistry::~CustomElementRegistry):
      (WebCore::CustomElementRegistry::didGiveTypeExtension):
      (WebCore::CustomElementRegistry::didCreateElement):
      (WebCore::CustomElementRegistry::activate):
      (WebCore::CustomElementRegistry::deactivate):
      (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
      (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
      * dom/CustomElementRegistry.h:
      (CustomElementInvocation):
      (WebCore::CustomElementInvocation::element):
      (CallbackDeliveryScope):
      (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
      (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
      (CustomElementRegistry):
      (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
      * dom/Document.cpp:
      (WebCore::Document::createElement):
      (WebCore::Document::didCreateCustomElement):
      * dom/Document.h:
      (Document):
      * dom/Document.idl:
      * dom/Element.cpp:
      (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
      (WebCore::Element::parserSetAttributes):
      (WebCore::Element::cloneAttributesFromElement):
      * dom/Element.h:
      * dom/Node.idl:
      * dom/ShadowRoot.idl:
      * html/HTMLElement.idl:
      * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
      (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
      (WebCore::HTMLScriptRunner::runScript):
      
      Source/WebKit/chromium:
      
      * src/WebKit.cpp: Added deliverAllLifecycleCallbacks()
      
      Source/WTF:
      
      * wtf/HashSet.h:
      (WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.
      
      LayoutTests:
      
      * fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-createElement-recursion.html: Added.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Added.
      * fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-creation-api.html: Added.
      * fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-innerHTML.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-only-expected.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-only.html: Added.
      * fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-parser-script.html: Added.
      * fast/dom/custom/lifecycle-ready-paste-expected.txt: Added.
      * fast/dom/custom/lifecycle-ready-paste.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5501fe8
    • rniwa@webkit.org's avatar
      Yet another Mac rebaseline attempt for r146531 since r146538 and r146554 didn't work. · 17553db6
      rniwa@webkit.org authored
      * platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
      * platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
      * platform/mac/compositing/rtl/rtl-fixed-expected.txt:
      * platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146564 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17553db6
  2. 21 Mar, 2013 19 commits
    • jer.noble@apple.com's avatar
      Crash in WebCore::MediaPlayer::cachedResourceLoader + 4 · 33abd785
      jer.noble@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112977
      
      Reviewed by Geoffrey Garen.
      
      Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
      sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
      but it is possible that, on another thread, the AVAssetResourceLoader has already begun
      using the delegate and in so doing has retained it. By the time the delegate method is fired
      on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
      been deleted, and the delegate's m_callback pointer is now pointing at freed memory.
      
      In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
      delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
      m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.
      
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
      (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
      (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
      (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146563 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      33abd785
    • tasak@google.com's avatar
      XMLDocumentParser doesn't parse <template> correctly. · 3e8717c4
      tasak@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112328
      
      Reviewed by Hajime Morrita.
      
      Source/WebCore:
      
      XMLDocumentParser should check whether a parent node is attached or not
      when a new element is appended.
      
      Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml
      
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::XMLDocumentParser::startElementNs):
      m_currentNode is a parent node of newElement, but it is updated by
      pushCurrentNode. So firstly stored copied m_curretNode's value into
      local currentNode and used the currentNode to check whether
      newElement's parent is attached or not.
      
      LayoutTests:
      
      * fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash-expected.txt: Added.
      * fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3e8717c4
    • dgrogan@chromium.org's avatar
      Unreviewed, rolling out r146560. · 4313cf3a
      dgrogan@chromium.org authored
      http://trac.webkit.org/changeset/146560
      https://bugs.webkit.org/show_bug.cgi?id=112862
      
      invalid parameter to histogram
      
      Source/Platform:
      
      * chromium/public/Platform.h:
      
      Source/WebCore:
      
      * platform/leveldb/LevelDBDatabase.cpp:
      (WebCore::LevelDBDatabase::open):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4313cf3a
    • dgrogan@chromium.org's avatar
      IndexedDB: Histogram available disk space on attempt to open database · 969a1e84
      dgrogan@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112862
      
      Reviewed by Adam Barth.
      
      Source/Platform:
      
      * chromium/public/Platform.h:
      (WebKit::Platform::availableDiskSpaceInBytes):
      (Platform):
      
      Source/WebCore:
      
      ChromeOS suspects they might be hitting disk corruption when the disks
      are nearly full. This patch logs the available space to either the
      "success" or the "fail" histogram as appropriate so that the
      distributions can be compared.
      
      No new tests - I don't know of a good way to test histograms. Local
      printf testing didn't turn up any bugs.
      
      * platform/leveldb/LevelDBDatabase.cpp:
      (WebCore::HistogramFreeSpace):
      (WebCore):
      (WebCore::LevelDBDatabase::open):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      969a1e84
    • dpranke@chromium.org's avatar
      nrwt is no longer saving retry results in the retries/ subdirectory · df699e3f
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112995
      
      Reviewed by Ojan Vafai.
      
      I think this has been broken a long time, unfortunately. This
      patch should fix that.
      
      In order to do so, I had to pass the directory to use from
      the Worker object through the SingleTestWriter to the
      TestResultWriter. While I was plumbing that through, I rationalized
      the order of the parameter arguments a bit ...
      
      * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
      (Worker._run_single_test):
      * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
      (run_single_test):
      (SingleTestRunner.__init__):
      (SingleTestRunner._run_compare_test):
      (SingleTestRunner._run_rebaseline):
      (SingleTestRunner._run_reftest):
      * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
      (write_test_result):
      * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
      (TestResultWriterTest.test_reftest_diff_image):
      * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
      (RunTest.test_retrying_uses_retries_directory):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146559 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df699e3f
    • mhahnenberg@apple.com's avatar
      Objective-C API: Need a good way to preserve custom properties on JS wrappers · 67910819
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112608
      
      Reviewed by Geoffrey Garen.
      
      Currently, we just use a weak map, which means that garbage collection can cause a wrapper to
      disappear if it isn't directly exported to JavaScript.
      
      The most straightforward and safe way (with respect to garbage collection and concurrency) is to have
      clients add and remove their external references along with their owners. Effectively, the client is
      recording the structure of the external object graph so that the garbage collector can make sure to
      mark any wrappers that are reachable through either the JS object graph of the external Obj-C object
      graph. By keeping these wrappers alive, this has the effect that custom properties on these wrappers
      will also remain alive.
      
      The rule for if an object needs to be tracked by the runtime (and therefore whether the client should report it) is as follows:
      For a particular object, its references to its children should be added if:
      1. The child is referenced from JavaScript.
      2. The child contains references to other objects for which (1) or (2) are true.
      
      * API/JSAPIWrapperObject.mm:
      (JSAPIWrapperObjectHandleOwner::finalize):
      (JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): A wrapper object is kept alive only if its JSGlobalObject
      is marked and its corresponding Objective-C object was added to the set of opaque roots.
      (JSC::JSAPIWrapperObject::visitChildren): We now call out to scanExternalObjectGraph, which handles adding all Objective-C
      objects to the set of opaque roots.
      * API/JSAPIWrapperObject.h:
      (JSAPIWrapperObject):
      * API/JSContext.mm: Moved dealloc to its proper place in the main implementation.
      (-[JSContext dealloc]):
      * API/JSVirtualMachine.h:
      * API/JSVirtualMachine.mm:
      (-[JSVirtualMachine initWithContextGroupRef:]):
      (-[JSVirtualMachine dealloc]):
      (getInternalObjcObject): Helper funciton to get the Objective-C object out of JSManagedValues or JSValues if there is one.
      (-[JSVirtualMachine addManagedReference:withOwner:]): Adds the Objective-C object to the set of objects
      owned by the owner object in that particular virtual machine.
      (-[JSVirtualMachine removeManagedReference:withOwner:]): Removes the relationship between the two objects.
      (-[JSVirtualMachine externalObjectGraph]):
      (scanExternalObjectGraph): Does a depth-first search of the external object graph in a particular virtual machine starting at
      the specified root. Each new object it encounters it adds to the set of opaque roots. These opaque roots will keep their
      corresponding wrapper objects alive if they have them.
      * API/JSManagedReferenceInternal.h: Added.
      * API/JSVirtualMachine.mm: Added the per-JSVirtualMachine map between objects and the objects they own, which is more formally
      known as that virtual machine's external object graph.
      * API/JSWrapperMap.mm:
      (-[JSWrapperMap dealloc]): We were leaking this before :-(
      (-[JSVirtualMachine initWithContextGroupRef:]):
      (-[JSVirtualMachine dealloc]):
      (-[JSVirtualMachine externalObjectGraph]):
      * API/JSVirtualMachineInternal.h:
      * API/tests/testapi.mm: Added two new tests using the TinyDOMNode class. The first tests that a custom property added to a wrapper
      doesn't vanish after GC, even though that wrapper isn't directly accessible to the JS garbage collector but is accessible through
      the external Objective-C object graph. The second test makes sure that adding an object to the external object graph with the same
      owner doesn't cause any sort of problems.
      (+[TinyDOMNode sharedVirtualMachine]):
      (-[TinyDOMNode init]):
      (-[TinyDOMNode dealloc]):
      (-[TinyDOMNode appendChild:]):
      (-[TinyDOMNode numberOfChildren]):
      (-[TinyDOMNode childAtIndex:]):
      (-[TinyDOMNode removeChildAtIndex:]):
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * heap/SlotVisitor.h:
      (SlotVisitor):
      * heap/SlotVisitorInlines.h:
      (JSC::SlotVisitor::containsOpaqueRootTriState): Added a new method to SlotVisitor to allow scanExternalObjectGraph to have a
      thread-safe view of opaque roots during parallel marking. The set of opaque roots available to any one SlotVisitor isn't guaranteed
      to be 100% correct, but that just results in a small duplication of work in scanExternalObjectGraph. To indicate this change for
      false negatives we return a TriState that's either true or mixed, but never false.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67910819
    • li.yin@intel.com's avatar
      FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor. · f1cef129
      li.yin@intel.com authored
      https://bugs.webkit.org/show_bug.cgi?id=88389
      
      Reviewed by Kenneth Russell.
      
      Source/WebCore:
      
      Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
      Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.
      
      Test: fast/files/blob-constructor.html.
      
      * bindings/js/JSBlobCustom.cpp:
      (WebCore::JSBlobConstructor::constructJSBlob):
      * bindings/v8/custom/V8BlobCustom.cpp:
      (WebCore::V8Blob::constructorCustom):
      * fileapi/WebKitBlobBuilder.cpp:
      (WebCore::BlobBuilder::append): Remove the deprecated warning.
      * fileapi/WebKitBlobBuilder.h:
      (WebCore):
      (BlobBuilder):
      
      LayoutTests:
      
      * fast/files/blob-constructor-expected.txt:
      * fast/files/script-tests/blob-constructor.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f1cef129
    • tasak@google.com's avatar
      [Shadow]: @host styles are not applied dynamically · 5ab37ff4
      tasak@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112869
      
      Reviewed by Elliott Sprehn.
      
      Source/WebCore:
      
      Need to add features of @host @-rules to rule feature set.
      
      Test: fast/dom/shadow/athost-apply-dynamically.html
      
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::collectFeaturesTo):
      
      LayoutTests:
      
      * fast/dom/shadow/athost-apply-dynamically-expected.html: Added.
      * fast/dom/shadow/athost-apply-dynamically.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ab37ff4
    • hayato@chromium.org's avatar
      [Shadow] Provide an api of insertionParent(). · 1dbd7a11
      hayato@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112866
      
      Source/WebCore:
      
      Add insertinParent binding to Element and Text.
      It's prefixed (webkitInsertionParent) and guarded by SHADOW_DOM flag.
      
      The bug in the Shadow DOM spec is here:
      https://www.w3.org/Bugs/Public/show_bug.cgi?id=21067
      
      Reviewed by Dimitri Glazkov.
      
      Test: fast/dom/shadow/insertion-parent.html
      
      * dom/Element.idl:
      * dom/Node.cpp:
      (WebCore::Node::insertionParentForBinding):
      (WebCore):
      * dom/Node.h:
      (Node):
      * dom/Text.idl:
      
      LayoutTests:
      
      Reviewed by Dimitri Glazkov.
      
      * fast/dom/shadow/insertion-parent-expected.txt: Added.
      * fast/dom/shadow/insertion-parent.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146555 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dbd7a11
    • rniwa@webkit.org's avatar
      Another Mac rebaseline attempt for r146531 since r146538 didn't work. · 8e2be415
      rniwa@webkit.org authored
      * platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
      * platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
      * platform/mac/compositing/rtl/rtl-fixed-expected.txt:
      * platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e2be415
    • pkasting@chromium.org's avatar
      [chromium] Test expectations updates. · 84454432
      pkasting@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88833
      https://bugs.webkit.org/show_bug.cgi?id=107935
      https://bugs.webkit.org/show_bug.cgi?id=109507
      
      Unreviewed, test expectations updates.
      
      * platform/chromium/TestExpectations:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84454432
    • mark.lam@apple.com's avatar
      Source/JavaScriptCore: Fix O(n^2) op_debug bytecode charPosition to column computation. · c649858c
      mark.lam@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112957.
      
      Reviewed by Geoffrey Garen.
      
      The previous algorithm does a linear reverse scan of the source string
      to find the line start for any given char position. This results in a
      O(n^2) algortithm when the source string has no line breaks.
      
      The new algorithm computes a line start column table for a
      SourceProvider on first use. This line start table is used to fix up
      op_debug's charPosition operand into a column operand when an
      UnlinkedCodeBlock is linked into a CodeBlock. The initialization of
      the line start table is O(n), and the CodeBlock column fix up is
      O(log(n)).
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::dumpBytecode): 
      (JSC::CodeBlock::CodeBlock): - do column fix up.
      * interpreter/Interpreter.cpp:
      (JSC::Interpreter::debug): - no need to do column fixup anymore.
      * interpreter/Interpreter.h:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * llint/LLIntSlowPaths.cpp:
      (JSC::LLInt::LLINT_SLOW_PATH_DECL):
      * parser/SourceProvider.cpp:
      (JSC::SourceProvider::lineStarts):
      (JSC::charPositionExtractor):
      (JSC::SourceProvider::charPositionToColumnNumber):
      - initialize line start column table if needed.
      - look up line start for the given char position.
      * parser/SourceProvider.h:
      
      Source/WTF: Introducing String::findNextLineStart().
      https://bugs.webkit.org/show_bug.cgi?id=112957.
      
      Reviewed by Geoffrey Garen.
      
      This is replaces String::reverseFindLineTerminator() in the JSC
      debugger's code for computing column numbers.
      
      * wtf/text/StringImpl.cpp:
      (WTF::StringImpl::findNextLineStart):
      * wtf/text/StringImpl.h:
      (WTF::findNextLineStart):
      * wtf/text/WTFString.h:
      (WTF::String::findNextLineStart):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c649858c
    • timothy_horton@apple.com's avatar
      [wk2] Page Overlays: Don't create backing store until the client asks us to paint · 84fa24d8
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112989
      <rdar://problem/13355759>
      
      Reviewed by Anders Carlsson.
      
      * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
      (WebKit::WebInspectorClient::highlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::updateFindUIAfterPageScroll):
      Invalidate the entire overlay on installation, to maintain existing behavior
      on platforms where the fade-in animation is not performed by invalidating the overlay.
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::installPageOverlay):
      Don't invalidate the overlay upon installation.
      
      * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
      (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
      Create backing store for the page overlay layer the first time it is painted into.
      (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
      Don't update the size of the page overlay layer unless we intend for it to have backing store.
      (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
      Don't create backing store when we create the page overlay layer.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      84fa24d8
    • commit-queue@webkit.org's avatar
      WinCairo build fails to link. · 9f5491ec
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112892
      
      Patch by peavo@outlook.com <peavo@outlook.com> on 2013-03-21
      Reviewed by Kentaro Hara.
      
      * WebKit.vcproj/WebKitExports.def.in: Added ENABLE(VIDEO_TRACK) guard.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9f5491ec
    • tsepez@chromium.org's avatar
      Bypass XSSAuditor for asp.net servers. · 07812d39
      tsepez@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112235
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Similar to https://bugs.webkit.org/show_bug.cgi?id=81283, but the
      fix to that bug failed to cover this particular comma-splicing case.
      
      Test: http/tests/security/xssAuditor/img-tag-with-comma.html
      
      * html/parser/XSSAuditor.cpp:
      (WebCore::isTerminatingCharacter):
      Beware of comma-splicing tricks by stopping at commas.
      
      LayoutTests:
      
      * http/tests/security/xssAuditor/img-tag-with-comma-expected.txt: Added.
      * http/tests/security/xssAuditor/img-tag-with-comma.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07812d39
    • fpizlo@apple.com's avatar
      JSC profiler should have an at-a-glance report of the success of DFG optimization · 791dfcbf
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=112988
      
      Reviewed by Geoffrey Garen.
      
      Source/JavaScriptCore: 
      
      * dfg/DFGByteCodeParser.cpp:
      (JSC::DFG::ByteCodeParser::handleCall):
      (JSC::DFG::ByteCodeParser::handleGetById):
      (JSC::DFG::ByteCodeParser::parseBlock):
      * profiler/ProfilerCompilation.cpp:
      (JSC::Profiler::Compilation::Compilation):
      (JSC::Profiler::Compilation::toJS):
      * profiler/ProfilerCompilation.h:
      (JSC::Profiler::Compilation::noticeInlinedGetById):
      (JSC::Profiler::Compilation::noticeInlinedPutById):
      (JSC::Profiler::Compilation::noticeInlinedCall):
      (Compilation):
      * runtime/CommonIdentifiers.h:
      
      Tools: 
      
      * Scripts/display-profiler-output:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      791dfcbf
    • pkasting@chromium.org's avatar
    • dpranke@chromium.org's avatar
      [chromium] Linux ASAN WebKit canary is running out of memory · fb2ca44d
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=112978
      
      Reviewed by Tony Chang.
      
      Running the AddressSanitizer on a crash takes a lot of
      memory, so we should serialize access to it to avoid running
      out of memory on a machine.
      
      * Scripts/webkitpy/layout_tests/port/chromium.py:
      (ChromiumPort._get_crash_log):
      * Scripts/webkitpy/layout_tests/port/http_lock.py:
      (HttpLock.__init__):
      (HttpLock.wait_for_httpd_lock):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fb2ca44d
    • rniwa@webkit.org's avatar
      Add Mac baseline after r146510. · 6d01cb68
      rniwa@webkit.org authored
      * platform/mac/svg/custom/marker-orient-auto-expected.png: Added.
      * platform/mac/svg/custom/marker-orient-auto-expected.txt: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6d01cb68