1. 10 Jul, 2012 3 commits
    • abarth@webkit.org's avatar
      WebSocket: Remove hixie76 protocol implementation · b3d37027
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88620
      
      Patch by Yuta Kitamura <yutak@chromium.org> on 2012-07-10
      Reviewed by Adam Barth.
      
      Source/WebCore: 
      
      This change removes code that implements the old hixie-76 WebSocket protocol which
      isn't used anymore.
      
      No new tests are added, because the code using the current protocol should not be
      affected. Tests for hixie-76 protocol are skipped (these tests will be removed
      eventually).
      
      * Modules/websockets/ThreadableWebSocketChannel.h:
      * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
      (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
      (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
      * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
      (ThreadableWebSocketChannelClientWrapper):
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::WebSocket):
      (WebCore::WebSocket::connect):
      (WebCore::WebSocket::send):
      (WebCore::WebSocket::protocol):
      (WebCore::WebSocket::extensions):
      (WebCore::WebSocket::binaryType):
      (WebCore::WebSocket::setBinaryType):
      (WebCore::WebSocket::didReceiveMessageError):
      (WebCore::WebSocket::didClose):
      (WebCore::WebSocket::getFramingOverhead):
      * Modules/websockets/WebSocket.h:
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::WebSocketChannel):
      (WebCore::WebSocketChannel::connect):
      (WebCore::WebSocketChannel::send):
      (WebCore::WebSocketChannel::fail):
      (WebCore::WebSocketChannel::didCloseSocketStream):
      (WebCore::WebSocketChannel::processBuffer):
      (WebCore::WebSocketChannel::startClosingHandshake):
      (WebCore::WebSocketChannel::enqueueTextFrame):
      (WebCore::WebSocketChannel::enqueueRawFrame):
      (WebCore::WebSocketChannel::enqueueBlobFrame):
      (WebCore::WebSocketChannel::processOutgoingFrameQueue):
      (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
      * Modules/websockets/WebSocketChannel.h:
      (WebSocketChannel):
      * Modules/websockets/WebSocketHandshake.cpp:
      (WebCore::WebSocketHandshake::WebSocketHandshake):
      (WebCore::WebSocketHandshake::clientHandshakeMessage):
      (WebCore::WebSocketHandshake::clientHandshakeRequest):
      (WebCore::WebSocketHandshake::readServerHandshake):
      (WebCore::WebSocketHandshake::checkResponseHeaders):
      * Modules/websockets/WebSocketHandshake.h:
      * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
      (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
      (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
      (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
      (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
      * Modules/websockets/WorkerThreadableWebSocketChannel.h:
      (WorkerThreadableWebSocketChannel):
      (Peer):
      (Bridge):
      
      LayoutTests: 
      
      Skip tests under hixie76 directory in all ports, because hixie-76 protocol support is
      being dropped. These tests will be removed later.
      
      * platform/chromium/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      * platform/qt/TestExpectations:
      * platform/win/Skipped:
      * platform/wk2/Skipped:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b3d37027
    • barraclough@apple.com's avatar
      Threadsafety issues in WebScriptObject · fe2082bf
      barraclough@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90849
      
      Reviewed by Filip Pizlo.
      
      WebScriptObject maintains a NSMap of wrapper objects. A race condition exists
      between a wrapper being retrieved from the map, and being released - if the
      final release on an object is called between a call to getJSWrapper and the
      subsequent retain, we may end up with a stale object reference.
      
      We can make this safe by hoisting the removal from the map from delloc up into
      release (if the retainCount is 1), and locking release against retrieval from
      the map. Since release may be called from another thread, and NSMap is not
      threadsafe, we'd better lock around all access to the map (this fix already
      necessitates get & remove to be locked, so this just adds 'add', too).
      
      * bindings/objc/WebScriptObject.mm:
      (WebCore::createJSWrapper):
          - lock around getJSWrapper, retain.
      (-[WebScriptObject _setImp:originRootObject:rootObject:]):
          - lock around addJSWrapper.
      (-[WebScriptObject release]):
          - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper.
      (-[WebScriptObject dealloc]):
          - removeJSWrapper call hoisted into release.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fe2082bf
    • commit-queue@webkit.org's avatar
      [EFL] Battery status code needs refactoring to be reused in WebKit2 · 383c3b01
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90760
      
      Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-09
      Reviewed by Hajime Morita.
      
      Source/WebCore:
      
      Rename BatteryClientEfl to BatteryProviderEfl and remove dependency
      on BatteryController by introducing the BatteryProviderEflClient
      interface. This will allow reusing the BatteryProviderEfl class
      in WebKit2.
      
      No new tests. Already tested by batterystatus/*.
      
      * PlatformEfl.cmake:
      * platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp.
      (WebCore):
      (WebCore::BatteryProviderEfl::BatteryProviderEfl):
      (WebCore::BatteryProviderEfl::batteryStatus):
      (WebCore::BatteryProviderEfl::startUpdating):
      (WebCore::BatteryProviderEfl::stopUpdating):
      (WebCore::BatteryProviderEfl::setBatteryStatus):
      (WebCore::BatteryProviderEfl::timerFired):
      (WebCore::BatteryProviderEfl::getBatteryStatus):
      (WebCore::BatteryProviderEfl::setBatteryClient):
      * platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h.
      (WebCore):
      (BatteryProviderEfl):
      (WebCore::BatteryProviderEfl::~BatteryProviderEfl):
      * platform/efl/BatteryProviderEflClient.h: Added.
      (WebCore):
      (BatteryProviderEflClient):
      
      Source/WebKit:
      
      Add BatteryClientEfl to PlatformEfl.cmake.
      
      * PlatformEfl.cmake:
      
      Source/WebKit/efl:
      
      Add BatteryClientEfl to WebKit, which uses BatteryProviderEfl from
      WebCore internally.
      
      * WebCoreSupport/BatteryClientEfl.cpp: Added.
      (BatteryClientEfl::BatteryClientEfl):
      (BatteryClientEfl::setController):
      (BatteryClientEfl::startUpdating):
      (BatteryClientEfl::stopUpdating):
      (BatteryClientEfl::batteryControllerDestroyed):
      (BatteryClientEfl::didChangeBatteryStatus):
      * WebCoreSupport/BatteryClientEfl.h: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.h.
      (WebCore):
      (BatteryClientEfl):
      (BatteryClientEfl::~BatteryClientEfl):
      * ewk/ewk_view.cpp:
      (_ewk_view_priv_new):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      383c3b01
  2. 09 Jul, 2012 37 commits
    • hayato@chromium.org's avatar
      Unreviewed gardening. · ccdf2515
      hayato@chromium.org authored
      Fix a wrong fix of r122194.
      
      * platform/graphics/chromium/LayerRendererChromium.cpp:
      (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ccdf2515
    • commit-queue@webkit.org's avatar
      Add ENABLE_DIALOG_ELEMENT and skeleton files · e1bba8e6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90521
      
      Patch by Matt Falkenhagen <falken@chromium.org> on 2012-07-09
      Reviewed by Kent Tamura.
      
      .:
      
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/JavaScriptCore:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore:
      
      This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added.
      The feature is diabled by default.
      
      No new tests, as there is no behavior change.
      
      * CMakeLists.txt:
      * Configurations/FeatureDefines.xcconfig:
      * DerivedSources.cpp:
      * DerivedSources.make:
      * DerivedSources.pri:
      * Target.pri:
      * WebCore.gypi:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/generic/RuntimeEnabledFeatures.cpp:
      (WebCore):
      * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog.
      (RuntimeEnabledFeatures):
      (WebCore::RuntimeEnabledFeatures::dialogElementEnabled):
      (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled):
      * dom/ContextFeatures.cpp:
      (WebCore::ContextFeatures::dialogElementEnabled):
      (WebCore):
      * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off.
      * html/HTMLDialogElement.cpp: Added.
      (WebCore):
      (WebCore::HTMLDialogElement::HTMLDialogElement):
      (WebCore::HTMLDialogElement::create):
      (WebCore::HTMLDialogElement::close):
      (WebCore::HTMLDialogElement::show):
      * html/HTMLDialogElement.h: Added.
      (WebCore):
      (HTMLDialogElement):
      * html/HTMLDialogElement.idl: Added.
      * html/HTMLElementsAllInOne.cpp:
      * html/HTMLTagNames.in:
      * page/DOMWindow.idl:
      
      Source/WebKit/chromium:
      
      * features.gypi:
      * public/WebRuntimeFeatures.h:
      (WebRuntimeFeatures):
      * src/WebRuntimeFeatures.cpp:
      (WebKit::WebRuntimeFeatures::enableDialogElement):
      (WebKit):
      (WebKit::WebRuntimeFeatures::isDialogElementEnabled):
      
      Source/WebKit/mac:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/FeatureDefines.xcconfig:
      
      Tools:
      
      * Scripts/webkitperl/FeatureList.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1bba8e6
    • hayato@chromium.org's avatar
      Unreviewed gardening. · 56e3b1c3
      hayato@chromium.org authored
      Remove an assertion starting to fail on interactive_ui_tests on Chromium OS.
      
      * platform/graphics/chromium/LayerRendererChromium.cpp:
      (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56e3b1c3
    • hayato@chromium.org's avatar
      Unreviewed gardening. · 75b3cb14
      hayato@chromium.org authored
      Build fix after r122175
      
      * WebCore.gypi: Remove Source/WebCore/platform/graphics/qt/Extensions3DQt.{cpp,h}
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75b3cb14
    • tkent@chromium.org's avatar
      Improve the boilerplate generated by prepare-ChangeLog · 499cddee
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89560
      
      Reviewed by Ryosuke Niwa.
      
      Produce the following boilerplate:
      
      > 2012-06-20  Kent Tamura  <tkent@chromium.org>
      >
      >         Need a short description (Oops!).
      >         Need the bug URL (Oops!).
      >
      >         Reviewed by NOBODY (Oops!).
      >
      >         Additional information of the change such as approach, rationale. Please add per-function descriptions below. (Oops!).
      >
      >         No new tests (Oops!).
      
      * Scripts/prepare-ChangeLog:
      (generateNewChangeLogs): Generate the updated template.
      * Scripts/webkitpy/common/checkout/changelog.py:
      (ChangeLog.update_with_unreviewed_message):
      Update the pattern for the beginning of the boilerplate.
      (ChangeLog.set_short_description_and_bug_url):
      - Use self._changelog_indent
      - Update the pattern for the description line
      - Skip the bug boilerplate.
      We substitute the specified bug URL to the description boilerplate
      because we need to add it even if the bug URL boilerplate is missing.
      * Scripts/webkitpy/common/checkout/changelog_unittest.py: Update the boilerplate data.
      (test_set_short_description_and_bug_url):
      - Update the description boilerplate.
      - Add a test for a case with both of the description boilerplace and the
        bug URL boilerplate.
      * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
      (PrepareChangeLogTest.test_ensure_bug_url): Update the expected boilerplate.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      499cddee
    • ddkilzer@apple.com's avatar
      Improve performance of RenderInline::absoluteQuads for deeply nested inlines. · 939b220c
      ddkilzer@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90715
      
      Patch by Kiran Muppala <cmuppala@apple.com> on 2012-07-09
      Reviewed by Maciej Stachowiak.
      
      No new tests: functionality unchanged.
      
      * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a
      RenderGeometryMap and use it for subsequent mappings.
      (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
      (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      939b220c
    • yosin@chromium.org's avatar
      [Chromium-Mac] Implement functions for localized time format information · 4768adc0
      yosin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90237
      
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This patch introduces following localized time format related
      functions:
        - localizeTimeFormatText()
        - localizeShortTimeFormatText()
        - timeAMPMLabels
      for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
      
      These function will be used by input type "time" with multiple input
      fields UI.
      
      Note: ICU version of localized time format functions are implemented
      in https://bugs.webkit.org/show_bug.cgi?id=89965
      
      Tests: WebKit/chromium/tests/LocaleMacTest.cpp
      
      * platform/text/mac/LocaleMac.h:
      (LocaleMac): Added time format related functions and variables.
      * platform/text/mac/LocaleMac.mm:
      (WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter.
      (WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter.
      (WebCore::LocaleMac::createTimeFormatter): Added.
      (WebCore::LocaleMac::createShortTimeFormatter): Added.
      (WebCore::LocaleMac::timeFormatText): Added.
      (WebCore::LocaleMac::shortTimeFormatText): Added.
      (WebCore::LocaleMac::timeAMPMLabels): Added.
      
      Source/WebKit/chromium:
      
      * tests/LocaleMacTest.cpp:
      (LocaleMacTest):
      (LocaleMacTest::timeFormatText):
      (LocaleMacTest::shortTimeFormatText):
      (LocaleMacTest::timeAMPMLabel):
      (TEST_F):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4768adc0
    • achicu@adobe.com's avatar
      [CSS Shaders] The FECustomFilter is not making the GL context active · 060f81a3
      achicu@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90840
      
      Reviewed by Dean Jackson.
      
      I've added a couple of makeContextCurrent() in the FECustomFilter related classes.
      Also, removed the assumption that GraphicsContext3D::create() never returns 0.
      
      No new tests, this was crashing on existing tests.
      
      * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
      (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
      (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram):
      * platform/graphics/filters/CustomFilterGlobalContext.cpp:
      (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded):
      * platform/graphics/filters/CustomFilterMesh.cpp:
      (WebCore::CustomFilterMesh::CustomFilterMesh):
      (WebCore::CustomFilterMesh::~CustomFilterMesh):
      * platform/graphics/filters/FECustomFilter.cpp:
      (WebCore::FECustomFilter::deleteRenderBuffers):
      (WebCore::FECustomFilter::platformApplySoftware):
      (WebCore::FECustomFilter::initializeContext):
      * platform/graphics/filters/FECustomFilter.h:
      (FECustomFilter):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      060f81a3
    • tkent@chromium.org's avatar
      REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden. · 1d69c71b
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90774
      
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      Test: fast/forms/hidden/change-type-to-hidden-after-updating-value.html
      
      * dom/Element.cpp:
      (WebCore::Element::setAttributeInternal):
      Pass a copy of the existing Attribute object.
      
      LayoutTests:
      
      * fast/forms/hidden/change-type-to-hidden-after-updating-value.html: Added.
      * fast/forms/hidden/change-type-to-hidden-after-updating-value-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d69c71b
    • philn@webkit.org's avatar
      [GStreamer] cache video dimensions · 6e9afbf9
      philn@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90733
      
      Reviewed by Martin Robinson.
      
      Invalidate the cached video dimensions whenever the video-sink sink pad caps
      change and let ::naturalSize() lazily recalculate them.
      
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
      (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
      (MediaPlayerPrivateGStreamer):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e9afbf9
    • hayato@chromium.org's avatar
      Unreviewed gardening. Update TestExpectations. · 79026cfd
      hayato@chromium.org authored
      * platform/chromium/TestExpectations: http/tests/misc/script-defer.html started failing after r122168.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      79026cfd
    • commit-queue@webkit.org's avatar
      [chromium] Merge updates and idle updates into one pass · 96174ad8
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90324
      
      Patch by Eric Penner <epenner@google.com> on 2012-07-09
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      We no longer need to do painting is passes in order
      to allocate memory in the right order. So this merges
      updates and idle updates into one pass.
      
      Covered by existing unit tests (some of which are
      updated with this patch).
      
      * platform/graphics/chromium/ContentLayerChromium.cpp:
      (WebCore::ContentLayerChromium::needMoreUpdates):
      * platform/graphics/chromium/ContentLayerChromium.h:
      (ContentLayerChromium):
      * platform/graphics/chromium/LayerChromium.h:
      (WebCore::LayerChromium::needMoreUpdates):
      * platform/graphics/chromium/TiledLayerChromium.cpp:
      (WebCore::TiledLayerChromium::updateTiles):
      (WebCore::TiledLayerChromium::updateLayerRect):
      * platform/graphics/chromium/TiledLayerChromium.h:
      (TiledLayerChromium):
      * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
      (WebCore::CCLayerTreeHost::CCLayerTreeHost):
      (WebCore::CCLayerTreeHost::compositeAndReadback):
      (WebCore::CCLayerTreeHost::updateLayers):
      (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
      (WebCore::CCLayerTreeHost::paintLayerContents):
      * platform/graphics/chromium/cc/CCLayerTreeHost.h:
      (CCLayerTreeHost):
      
      Source/WebKit/chromium:
      
      * tests/CCLayerTreeHostTest.cpp:
      (WTF::ContentLayerChromiumWithUpdateTracking::resetPaintContentsCount):
      (WTF::ContentLayerChromiumWithUpdateTracking::ContentLayerChromiumWithUpdateTracking):
      (ContentLayerChromiumWithUpdateTracking):
      (WTF::CCLayerTreeHostTestOpacityChange::afterTest):
      * tests/CCTiledLayerTestCommon.h:
      (FakeTiledLayerChromium):
      * tests/TiledLayerChromiumTest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      96174ad8
    • yosin@chromium.org's avatar
      [Platform] Introduce LocaleMac class · 1e2040e4
      yosin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90248
      
      Reviewed by Kent Tamura.
      
      Source/WebCore:
      
      This patch moves implementation of localized date format related
      functions into LocaleMac class as of LocaleWin class for ease of
      maintain and using specific locale in testing rather than system
      default locale.
      
      Tests: WebKit/chromium/tests/LocaleMacTest.cpp
      
      * WebCore.gyp/WebCore.gyp: Include LocaleMac.mm
      * WebCore.gypi:
      * platform/text/mac/LocaleMac.h: Replace LocaleWin to LocaleMac.
      * platform/text/mac/LocaleMac.mm:
      (WebCore::LocaleMac::LocaleMac):
      (WebCore::LocaleMac::~LocaleMac):
      (WebCore::LocaleMac::create):
      (WebCore::LocaleMac::currentLocale):
      (WebCore::LocaleMac::createShortDateFormatter):
      (WebCore::LocaleMac::parseDate):
      (WebCore::LocaleMac::formatDate):
      (WebCore::LocaleMac::dateFormatText):
      (WebCore::LocaleMac::monthLabels):
      (WebCore::LocaleMac::weekDayShortLabels):
      (WebCore::LocaleMac::firstDayOfWeek):
      * platform/text/mac/LocalizedDateMac.cpp:
      (WebCore::parseLocalizedDate):
      (WebCore::formatLocalizedDate):
      (WebCore::localizedDateFormatText):
      (WebCore::monthLabels):
      (WebCore::weekDayShortLabels):
      (WebCore::firstDayOfWeek):
      * platform/text/mac/LocalizedDateMac.mm: Removed.
      
      Source/WebKit/chromium:
      
      This patch added tests for LocaleMac class.
      
      * WebKit.gypi:
      * tests/LocaleMacTest.cpp: Added.
      (LocaleMacTest):
      (LocaleMacTest::dateComponents):
      (LocaleMacTest::msForDate):
      (LocaleMacTest::formatDate):
      (LocaleMacTest::parseDate):
      (LocaleMacTest::dateFormatText):
      (LocaleMacTest::firstDayOfWeek):
      (LocaleMacTest::monthLabel):
      (LocaleMacTest::weekDayShortLabel):
      (TEST_F):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1e2040e4
    • dino@apple.com's avatar
      Forgot to actually add these files in r122152 · 800b7865
      dino@apple.com authored
      * compositing/tile-cache-must-flatten-expected.html: Added.
      * compositing/tile-cache-must-flatten.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122183 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      800b7865
    • fpizlo@apple.com's avatar
      Unreviewed, roll out http://trac.webkit.org/changeset/121511 · 629c1cd7
      fpizlo@apple.com authored
      It made in-browser V8v7 10% slower.
      
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      * bytecode/CodeBlock.h:
      (CodeBlock):
      (JSC::CodeBlock::countSpeculationSuccess):
      (JSC::CodeBlock::countSpeculationFailure):
      (JSC::CodeBlock::speculativeSuccessCounter):
      (JSC::CodeBlock::speculativeFailCounter):
      (JSC::CodeBlock::forcedOSRExitCounter):
      (JSC::CodeBlock::addressOfSpeculativeSuccessCounter):
      (JSC::CodeBlock::addressOfSpeculativeFailCounter):
      (JSC::CodeBlock::addressOfForcedOSRExitCounter):
      (JSC::CodeBlock::offsetOfSpeculativeSuccessCounter):
      (JSC::CodeBlock::offsetOfSpeculativeFailCounter):
      (JSC::CodeBlock::offsetOfForcedOSRExitCounter):
      (JSC::CodeBlock::largeFailCountThreshold):
      (JSC::CodeBlock::largeFailCountThresholdForLoop):
      (JSC::CodeBlock::shouldReoptimizeNow):
      (JSC::CodeBlock::shouldReoptimizeFromLoopNow):
      * bytecode/ExecutionCounter.cpp:
      (JSC::ExecutionCounter::setThreshold):
      * bytecode/ExecutionCounter.h:
      (ExecutionCounter):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::compileBody):
      * dfg/DFGOSRExit.cpp:
      (JSC::DFG::OSRExit::considerAddingAsFrequentExitSiteSlow):
      * dfg/DFGOSRExitCompiler.cpp:
      (JSC::DFG::OSRExitCompiler::handleExitCounts):
      * dfg/DFGOperations.cpp:
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      * runtime/Options.h:
      (JSC):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      629c1cd7
    • hayato@chromium.org's avatar
      Unreviewed gardening. · 05e0ed0b
      hayato@chromium.org authored
      Update TestExpectations.
      
      * platform/chromium/TestExpectations: Mark fast/forms/select/select-state-restore.html as flaky on WIN DEBUG.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      05e0ed0b
    • danakj@chromium.org's avatar
      [chromium] Create CCScopedTexture class for creating/freeing textures · 98a26902
      danakj@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89485
      
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      This class provides a standard way to create texture ids in a way that
      ensures they will be freed later.
      
      Also includes a CCTexture base class that holds textureId, size, and
      format together in a struct that can be used in place of storing an
      unsigned textureId in other classes.
      
      Unit tests: CCScopedTexureTest.NewScopedTexture
                  CCScopedTexureTest.CreateScopedTexture
                  CCScopedTexureTest.ScopedTextureIsDeleted
                  CCScopedTexureTest.LoseScopedTexture
      
      * WebCore.gypi:
      * platform/graphics/chromium/cc/CCScopedTexture.cpp: Added.
      (WebCore):
      (WebCore::CCScopedTexture::CCScopedTexture):
      (WebCore::CCScopedTexture::~CCScopedTexture):
      (WebCore::CCScopedTexture::allocate):
      (WebCore::CCScopedTexture::free):
      (WebCore::CCScopedTexture::leak):
      * platform/graphics/chromium/cc/CCScopedTexture.h: Added.
      (WebCore):
      (CCScopedTexture):
      (WebCore::CCScopedTexture::create):
      * platform/graphics/chromium/cc/CCTexture.cpp: Added.
      (WebCore):
      (WebCore::CCTexture::setDimensions):
      (WebCore::CCTexture::bytes):
      (WebCore::CCTexture::memorySizeBytes):
      * platform/graphics/chromium/cc/CCTexture.h: Added.
      (WebCore):
      (CCTexture):
      (WebCore::CCTexture::CCTexture):
      (WebCore::CCTexture::id):
      (WebCore::CCTexture::size):
      (WebCore::CCTexture::format):
      (WebCore::CCTexture::setId):
      
      Source/WebKit/chromium:
      
      * WebKit.gypi:
      * tests/CCScopedTextureTest.cpp: Added.
      (WebKitTests):
      (WebKitTests::TEST):
      (TrackingTextureAllocator):
      (WebKitTests::TrackingTextureAllocator::TrackingTextureAllocator):
      (WebKitTests::TrackingTextureAllocator::numTextures):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98a26902
    • jsbell@chromium.org's avatar
      IndexedDB: deleteDatabase fails if transaction running in other database · fc4a9337
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90822
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      The IDBLevelDBBackingStore was preventing a deleteDatabase() from running
      if any other database was running a transaction. Fix by just creating a scratch
      LevelDBTransaction for the delete steps.
      
      Test: storage/indexeddb/deletedatabase-transaction.html
      
      * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
      (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use a LevelDBTransaction
      directly.
      
      LayoutTests:
      
      * storage/indexeddb/deletedatabase-transaction-expected.txt: Added.
      * storage/indexeddb/deletedatabase-transaction.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc4a9337
    • commit-queue@webkit.org's avatar
      .: Expose an export for the iconUrl list so Internals can use it · 546c67d5
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * Source/autotools/symbols.filter: export iconURLs
      
      Source/WebCore: Changed the behavior of iconURLs to always recalculate the list.
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura..
      
      As it turns out, it can contain stale URLs in the case that some script
      manipulates the DOM, which breaks scripts trying to reset the favicon
      URL. Also added a method in Internals to allow tests to get the list of
      icon
      
      Tests: fast/dom/icon-url-change.html
             fast/dom/icon-url-list.html
      
      * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
      * dom/Document.cpp:
      (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
      (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
      (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
      * dom/Document.h:
      (Document): removed the addIconURL method which is no longer used
      * html/HTMLLinkElement.cpp:
      (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
      (WebCore):
      (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
      * html/HTMLLinkElement.h:
      (HTMLLinkElement): declared the icon type and size accessors
      * testing/Internals.cpp:
      (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
      (WebCore):
      * testing/Internals.h:
      (Internals): declared the method for unit testing the icon URL list
      * testing/Internals.idl: exported the Document::iconURLs function
      
      Source/WebKit2: Export the iconURL list to make it available to the Internals class for testing
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * win/WebKit2.def: export the DocumentL::iconURLs function
      
      LayoutTests: Add some new unit tests to test the favicon changing dynamically
      https://bugs.webkit.org/show_bug.cgi?id=88665
      
      Patch by Pete Williamson <petewil@google.com> on 2012-07-09
      Reviewed by Kent Tamura.
      
      * fast/dom/icon-url-change-expected.txt: Added.
      * fast/dom/icon-url-change.html: Added a new test for changing the favicon dynamically
      * fast/dom/icon-url-list-expected.txt: Added.
      * fast/dom/icon-url-list.html: Added a new test for multiple favicons in the HTML header
      * fast/dom/icon-url-property-expected.txt: update unit test expectations
      * fast/dom/icon-url-property.html: update and enable existing favicon test
      * platform/chromium/TestExpectations: reenable the url-property test
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      546c67d5
    • rniwa@webkit.org's avatar
      Gcc build fix after r122174. · d2266442
      rniwa@webkit.org authored
      * storage/StorageAreaImpl.cpp:
      (WebCore::StorageAreaImpl::decrementAccessCount):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d2266442
    • commit-queue@webkit.org's avatar
      Editing: Autocorrection in blockquotes causes text to break out of quote · 06ba1270
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90487
      <rdar://problem/11769020>
      
      Patch by Alice Cheng <alice_cheng@apple.com> on 2012-07-09
      Reviewed by Enrica Casucci.
      
      Source/WebCore:
      
      Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html
      
      SpellingCorrectionCommand uses ReplaceSelectionCommand to replace the misspelled word with the auto-corrected word. Specifically, ReplaceSelectionCommand does a smart copy, where it breaks out of blockquotes. Thus, the fix is to substitute ReplaceSelectionCommand with InserTextCommand.
      
      * editing/SpellingCorrectionCommand.cpp:
      (WebCore::SpellingCorrectionCommand::doApply):
      
      LayoutTests:
      
      * platform/mac/editing/spelling/autocorrection-blockquote-crash-expected.txt:
      * platform/mac/editing/spelling/autocorrection-blockquote-crash.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      06ba1270
    • noam.rosenthal@nokia.com's avatar
      90506 · 4a782c87
      noam.rosenthal@nokia.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4a782c87
    • commit-queue@webkit.org's avatar
      Consider closing unused localStorage database after a timeout. · 58eef4ec
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90713
      
      For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
      we can close the underlying sqlite database.
      
      Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2012-07-09
      Reviewed by Brady Eidson.
      
      Source/WebCore:
      
      Test: storage/domstorage/storage-close-database-on-idle.html
      
      * storage/Storage.cpp:
      (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it.
      (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it.
      * storage/StorageArea.h:
      (StorageArea):
      * storage/StorageAreaImpl.cpp:
      (WebCore::StorageAreaImpl::StorageAreaImpl):
      (WebCore::StorageAreaImpl::incrementAccessCount):
      (WebCore):
      (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document
          referencing to this storageArea.
      (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database.
      * storage/StorageAreaImpl.h:
      (StorageAreaImpl):
      * storage/StorageAreaSync.cpp:
      (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out.
      * storage/StorageTracker.cpp:
      (WebCore):
      (WebCore::StorageTracker::StorageTracker):
      * storage/StorageTracker.h:
      (WebCore::StorageTracker::storageDatabaseIdleInterval):
      (WebCore::StorageTracker::setStorageDatabaseIdleInterval):  set the timeout value that we will wait before closing the
          database.  This is currently used by DumpRenderTree only.
      (StorageTracker):
      
      Source/WebKit/mac:
      
      * Storage/WebStorageManager.mm:
      (+[WebStorageManager setStorageDatabaseIdleInterval:]): add a new method for DumpRenderTree to set the timeout
          that we will wait before closing database.
      (initializeLocalStoragePath):
      * Storage/WebStorageManagerPrivate.h:
      
      Tools:
      
      * DumpRenderTree/LayoutTestController.cpp: add a JS method setStorageDatabaseIdleInterval to testRunner
          to set a different timeout value for closing localStorage database.
      (setStorageDatabaseIdleIntervalCallback):
      (LayoutTestController::staticFunctions):
      * DumpRenderTree/LayoutTestController.h:
      (LayoutTestController):
      * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
      (LayoutTestController::setStorageDatabaseIdleInterval): add empty method.
      * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
      (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
      * DumpRenderTree/win/LayoutTestControllerWin.cpp:
      (LayoutTestController::setStorageDatabaseIdleInterval): ditto.
      
      LayoutTests:
      
      * platform/chromium/TestExpectations: the test needs setCacheModel implementation, skip it in chromium.
      * storage/domstorage/storage-close-database-on-idle-expected.txt: Added.
      * storage/domstorage/storage-close-database-on-idle.html: Added.
      * storage/resources/storage-close-data-on-idle-switch.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58eef4ec
    • jsbell@chromium.org's avatar
      IndexedDB: A null or undefined storeNames argument to... · 487c30b7
      jsbell@chromium.org authored
      IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string
      https://bugs.webkit.org/show_bug.cgi?id=90474
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      Test: storage/indexeddb/transaction-basics.html
      
      * Modules/indexeddb/IDBDatabase.cpp:
      (WebCore::IDBDatabase::transaction):
      * Modules/indexeddb/IDBDatabase.idl:
      
      LayoutTests:
      
      * storage/indexeddb/resources/transaction-basics.js:
      (testInvalidMode):
      (testDegenerateNames.request.onsuccess):
      (testDegenerateNames.verifyDegenerateNames):
      (testDegenerateNames):
      * storage/indexeddb/transaction-basics-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      487c30b7
    • jsbell@chromium.org's avatar
      IndexedDB: Remove obsolete accessor plumbing · 00872ac8
      jsbell@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90812
      
      Reviewed by Tony Chang.
      
      Source/WebCore:
      
      No new tests - just deleting code.
      
      * Modules/indexeddb/IDBTransaction.cpp:
      (WebCore::IDBTransaction::IDBTransaction): Since backend mode() is disconnected, can no
      longer assert that front-end/back-end modes match; not worth it to keeping the plumbing.
      
      Source/WebKit/chromium:
      
      * public/WebIDBCursor.h: Remove direction.
      * public/WebIDBDatabase.h: Remove name, version, objectStoreNames;
      (WebKit::WebIDBDatabase::metadata):
      * public/WebIDBIndex.h: Remove name, keyPath, unique, multiEntry;
      * public/WebIDBObjectStore.h: Remove name, keyPath, indexNames, autoIncrement;
      * src/IDBDatabaseBackendProxy.cpp: Remove plumbing.
      * src/IDBDatabaseBackendProxy.h: Remove plumbing.
      (IDBDatabaseBackendProxy):
      * src/IDBIndexBackendProxy.cpp: Remove plumbing.
      * src/IDBIndexBackendProxy.h: Remove plumbing.
      (IDBIndexBackendProxy):
      * src/IDBObjectStoreBackendProxy.cpp: Remove plumbing.
      * src/IDBObjectStoreBackendProxy.h: Remove plumbing.
      (IDBObjectStoreBackendProxy):
      * src/IDBTransactionBackendProxy.cpp: Remove plumbing.
      * src/IDBTransactionBackendProxy.h: Assert stub is not used - only needed
      by real IDBTransactionBackendImpl
      (WebKit::IDBTransactionBackendProxy::mode):
      * src/WebIDBTransactionImpl.cpp: Remove plumbing.
      * src/WebIDBTransactionImpl.h: Remove plumbing.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      00872ac8
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r122161. · 0078b1b9
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/122161
      https://bugs.webkit.org/show_bug.cgi?id=90837
      
      failed to compile on chromium webkit linux bot (Requested by
      shawnsingh on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-07-09
      
      * WebKit.gypi:
      * WebKitUnitTests.gyp:
      * public/WebDOMMessageEvent.h:
      * tests/AssociatedURLLoaderTest.cpp:
      (WebKit::AssociatedURLLoaderTest::AssociatedURLLoaderTest):
      (WebKit::AssociatedURLLoaderTest::SetUp):
      (WebKit::AssociatedURLLoaderTest::CheckMethodFails):
      (WebKit::AssociatedURLLoaderTest::CheckHeaderFails):
      (WebKit::AssociatedURLLoaderTest::CheckAccessControlHeaders):
      (WebKit::TEST_F):
      * tests/EventListenerTest.cpp:
      * tests/FrameTestHelpers.cpp:
      (WebKit::FrameTestHelpers::registerMockedURLLoad):
      (FrameTestHelpers):
      (WebKit::FrameTestHelpers::loadFrame):
      * tests/FrameTestHelpers.h:
      (FrameTestHelpers):
      * tests/ListenerLeakTest.cpp:
      (WebKit::ListenerLeakTest::RunTest):
      * tests/PopupMenuTest.cpp:
      (WebKit::SelectPopupMenuTest::registerMockedURLLoad):
      (WebKit::SelectPopupMenuTest::loadFrame):
      (WebKit::TEST_F):
      * tests/RunAllTests.cpp:
      * tests/URLTestHelpers.cpp: Removed.
      * tests/URLTestHelpers.h: Removed.
      * tests/WebFrameTest.cpp:
      (WebKit::WebFrameTest::registerMockedHttpURLLoad):
      (WebKit::WebFrameTest::registerMockedChromeURLLoad):
      (WebKit::TEST_F):
      * tests/WebPageNewSerializerTest.cpp:
      (WebKit::WebPageNewSerializeTest::registerMockedURLLoad):
      (WebPageNewSerializeTest):
      (WebKit::WebPageNewSerializeTest::setUpCSSTestPage):
      (WebKit::WebPageNewSerializeTest::loadURLInTopFrame):
      (WebKit::WebPageNewSerializeTest::resourceVectorContains):
      (WebKit::TEST_F):
      * tests/WebPageSerializerTest.cpp:
      (WebKit::WebPageSerializerTest::registerMockedURLLoad):
      (WebKit::WebPageSerializerTest::loadURLInTopFrame):
      (WebKit::WebPageSerializerTest::webVectorContains):
      (WebKit::TEST_F):
      * tests/WebViewTest.cpp:
      (WebKit::TEST_F):
      (WebKit::WebViewTest::testAutoResize):
      (WebKit::WebViewTest::testTextInputType):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0078b1b9
    • danakj@chromium.org's avatar
      [chromium] Remove HashMap workaround for layers with id=0 in CCDamageTracker · a448e6a7
      danakj@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90825
      
      Reviewed by Adrienne Walker.
      
      Layer ids are no longer allowed to be 0, and the behaviour is guarded
      with asserts, so this workaround is not needed any longer.
      
      * platform/graphics/chromium/cc/CCDamageTracker.h:
      (CCDamageTracker):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a448e6a7
    • scheib@chromium.org's avatar
      Pointer Lock requestPointerLock rejects locking an element not in a document. · 50a79895
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90821
      
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Test: pointer-lock/lock-element-not-in-dom.html
      
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      
      LayoutTests:
      
      * pointer-lock/lock-element-not-in-dom-expected.txt: Added.
      * pointer-lock/lock-element-not-in-dom.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      50a79895
    • eric@webkit.org's avatar
      document.write of scripts that also document.write sometimes writes async · f32fcdcc
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=89102
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      When a script tag is first encountered, the TreeBuilder holds the element and returns
      out to the outer HTMLDocumentParser parse loop.  The HTMLDocumentParser then takes
      the script element and passes it to the HTMLScriptRunner for execution. However, if the
      script is an "external script" the HTMLScriptRunner may have to wait for that parser
      blocking script to load, and may store the script in its own m_parserBlockingScript member.
      
      While the HTMLScriptRunner has this not-yet-loaded-script the parser is also blocked.
      Because the "paused" state of the parser was held as a separate bool on the TreeBuilder
      we'd have to be careful to update it to reflect the current state of this pending script
      on the HTMLScriptRunner.
      
      This patch removes this separate "paused" bool and makes the HTMLDocumentParser responsible
      for the "paused" state of the parser through the isWaitingForScripts() function which
      knows how to check both the TreeBuilder and the ScriptRunner for possible parser-blocking scripts.
      
      I suspect this change may actually fix a bunch of edge cases where we were not
      checking for the HTMLScriptRunner's parser blocking script and thus incorrectly ending
      the parser, or not starting the pre-load scanner, etc.
      
      As part of this change I also renamed m_haveParsingBlockingScript in HTMLScriptRunner to match
      the naming style used elsewhere in the parser, as well as removed all the "bool" return values
      for these parse/execute functions as they are no longer useful (or correct). The correct way
      is always to check HTMLDocumentParser::isWaitingForScripts().
      
      Test: fast/parser/cached-script-document-write.html
      
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
      (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
      (WebCore::HTMLDocumentParser::canTakeNextToken):
      (WebCore::HTMLDocumentParser::isWaitingForScripts):
      (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
      (WebCore::HTMLDocumentParser::notifyFinished):
      (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
      * html/parser/HTMLScriptRunner.cpp:
      (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
      (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
      (WebCore::HTMLScriptRunner::execute):
      (WebCore::HTMLScriptRunner::hasParserBlockingScript):
      (WebCore::HTMLScriptRunner::executeParsingBlockingScripts):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
      (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
      (WebCore::HTMLScriptRunner::requestParsingBlockingScript):
      (WebCore::HTMLScriptRunner::runScript):
      * html/parser/HTMLScriptRunner.h:
      (HTMLScriptRunner):
      * html/parser/HTMLTreeBuilder.cpp:
      (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
      (WebCore::HTMLTreeBuilder::takeScriptToProcess):
      (WebCore::HTMLTreeBuilder::processEndTag):
      (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
      * html/parser/HTMLTreeBuilder.h:
      (HTMLTreeBuilder):
      (WebCore::HTMLTreeBuilder::hasParserBlockingScript):
      
      LayoutTests:
      
      * fast/parser/cached-script-document-write-expected.txt: Added.
      * fast/parser/cached-script-document-write.html: Added.
      * fast/parser/resources/cached-script-document-write.js: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f32fcdcc
    • fpizlo@apple.com's avatar
      Source/JavaScriptCore: DFG may get stuck in an infinite fix point if it... · cacd7dc7
      fpizlo@apple.com authored
      Source/JavaScriptCore: DFG may get stuck in an infinite fix point if it constant folds a mispredicted node
      https://bugs.webkit.org/show_bug.cgi?id=90829
      <rdar://problem/11823843>
      
      Reviewed by Oliver Hunt.
              
      If a node is shown to have been mispredicted during CFA, then don't allow constant
      folding to make the graph even more degenerate. Instead, pull back on constant folding
      and allow the normal OSR machinery to fix our profiling so that a future recompilation
      doesn't see the same mistake.
      
      * dfg/DFGAbstractState.cpp:
      (JSC::DFG::AbstractState::execute):
      * dfg/DFGAbstractState.h:
      (JSC::DFG::AbstractState::trySetConstant):
      (AbstractState):
      * dfg/DFGPhase.h:
      (JSC::DFG::Phase::name):
      (Phase):
      (JSC::DFG::runAndLog):
      (DFG):
      (JSC::DFG::runPhase):
      
      LayoutTests: DFG may get stuck in an infinite fix point if it constant folds a mispredicted node
      https://bugs.webkit.org/show_bug.cgi?id=90829
      
      Reviewed by Oliver Hunt.
      
      * fast/js/dfg-constant-fold-misprediction-expected.txt: Added.
      * fast/js/dfg-constant-fold-misprediction.html: Added.
      * fast/js/script-tests/dfg-constant-fold-misprediction.js: Added.
      (foo):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cacd7dc7
    • fpizlo@apple.com's avatar
      It should be possible to jettison JIT stub routines even if they are currently running · 746b8c5b
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90731
      
      Reviewed by Gavin Barraclough.
              
      This gives the GC awareness of all JIT-generated stubs for inline caches. That
      means that if you want to delete a JIT-generated stub, you don't have to worry
      about whether or not it is currently running: if there is a chance that it might
      be, the GC will kindly defer deletion until non-running-ness is proved.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/Instruction.h:
      (JSC):
      (PolymorphicStubInfo):
      (JSC::PolymorphicAccessStructureList::PolymorphicStubInfo::set):
      (JSC::PolymorphicAccessStructureList::PolymorphicAccessStructureList):
      * bytecode/PolymorphicPutByIdList.cpp:
      (JSC::PutByIdAccess::fromStructureStubInfo):
      * bytecode/PolymorphicPutByIdList.h:
      (JSC::PutByIdAccess::transition):
      (JSC::PutByIdAccess::replace):
      (JSC::PutByIdAccess::stubRoutine):
      (PutByIdAccess):
      (JSC::PolymorphicPutByIdList::currentSlowPathTarget):
      * bytecode/StructureStubInfo.h:
      (JSC::StructureStubInfo::reset):
      * dfg/DFGRepatch.cpp:
      (JSC::DFG::generateProtoChainAccessStub):
      (JSC::DFG::tryCacheGetByID):
      (JSC::DFG::tryBuildGetByIDList):
      (JSC::DFG::tryBuildGetByIDProtoList):
      (JSC::DFG::emitPutReplaceStub):
      (JSC::DFG::emitPutTransitionStub):
      (JSC::DFG::tryCachePutByID):
      (JSC::DFG::tryBuildPutByIdList):
      * heap/ConservativeRoots.cpp:
      (JSC):
      (DummyMarkHook):
      (JSC::DummyMarkHook::mark):
      (JSC::ConservativeRoots::add):
      (CompositeMarkHook):
      (JSC::CompositeMarkHook::CompositeMarkHook):
      (JSC::CompositeMarkHook::mark):
      * heap/ConservativeRoots.h:
      (JSC):
      (ConservativeRoots):
      * heap/Heap.cpp:
      (JSC::Heap::markRoots):
      (JSC::Heap::deleteUnmarkedCompiledCode):
      * heap/Heap.h:
      (JSC):
      (Heap):
      * heap/JITStubRoutineSet.cpp: Added.
      (JSC):
      (JSC::JITStubRoutineSet::JITStubRoutineSet):
      (JSC::JITStubRoutineSet::~JITStubRoutineSet):
      (JSC::JITStubRoutineSet::add):
      (JSC::JITStubRoutineSet::clearMarks):
      (JSC::JITStubRoutineSet::markSlow):
      (JSC::JITStubRoutineSet::deleteUnmarkedJettisonedStubRoutines):
      (JSC::JITStubRoutineSet::traceMarkedStubRoutines):
      * heap/JITStubRoutineSet.h: Added.
      (JSC):
      (JITStubRoutineSet):
      (JSC::JITStubRoutineSet::mark):
      * heap/MachineStackMarker.h:
      (JSC):
      * interpreter/RegisterFile.cpp:
      (JSC::RegisterFile::gatherConservativeRoots):
      * interpreter/RegisterFile.h:
      (JSC):
      * jit/ExecutableAllocator.cpp:
      (JSC::DemandExecutableAllocator::DemandExecutableAllocator):
      * jit/ExecutableAllocator.h:
      (JSC):
      * jit/ExecutableAllocatorFixedVMPool.cpp:
      (JSC):
      (JSC::FixedVMPoolExecutableAllocator::FixedVMPoolExecutableAllocator):
      * jit/GCAwareJITStubRoutine.cpp: Added.
      (JSC):
      (JSC::GCAwareJITStubRoutine::GCAwareJITStubRoutine):
      (JSC::GCAwareJITStubRoutine::~GCAwareJITStubRoutine):
      (JSC::GCAwareJITStubRoutine::observeZeroRefCount):
      (JSC::GCAwareJITStubRoutine::deleteFromGC):
      (JSC::GCAwareJITStubRoutine::markRequiredObjectsInternal):
      (JSC::MarkingGCAwareJITStubRoutineWithOneObject::MarkingGCAwareJITStubRoutineWithOneObject):
      (JSC::MarkingGCAwareJITStubRoutineWithOneObject::~MarkingGCAwareJITStubRoutineWithOneObject):
      (JSC::MarkingGCAwareJITStubRoutineWithOneObject::markRequiredObjectsInternal):
      (JSC::createJITStubRoutine):
      * jit/GCAwareJITStubRoutine.h: Added.
      (JSC):
      (GCAwareJITStubRoutine):
      (JSC::GCAwareJITStubRoutine::markRequiredObjects):
      (MarkingGCAwareJITStubRoutineWithOneObject):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::privateCompilePutByIdTransition):
      (JSC::JIT::privateCompilePatchGetArrayLength):
      (JSC::JIT::privateCompileGetByIdProto):
      (JSC::JIT::privateCompileGetByIdSelfList):
      (JSC::JIT::privateCompileGetByIdProtoList):
      (JSC::JIT::privateCompileGetByIdChainList):
      (JSC::JIT::privateCompileGetByIdChain):
      * jit/JITStubRoutine.cpp: Added.
      (JSC):
      (JSC::JITStubRoutine::~JITStubRoutine):
      (JSC::JITStubRoutine::observeZeroRefCount):
      * jit/JITStubRoutine.h: Added.
      (JSC):
      (JITStubRoutine):
      (JSC::JITStubRoutine::JITStubRoutine):
      (JSC::JITStubRoutine::createSelfManagedRoutine):
      (JSC::JITStubRoutine::code):
      (JSC::JITStubRoutine::asCodePtr):
      (JSC::JITStubRoutine::ref):
      (JSC::JITStubRoutine::deref):
      (JSC::JITStubRoutine::startAddress):
      (JSC::JITStubRoutine::endAddress):
      (JSC::JITStubRoutine::addressStep):
      (JSC::JITStubRoutine::canPerformRangeFilter):
      (JSC::JITStubRoutine::filteringStartAddress):
      (JSC::JITStubRoutine::filteringExtentSize):
      (JSC::JITStubRoutine::passesFilter):
      * jit/JITStubs.cpp:
      (JSC::DEFINE_STUB_FUNCTION):
      (JSC::getPolymorphicAccessStructureListSlot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      746b8c5b
    • fpizlo@apple.com's avatar
      fast/js/global-constructors.html is flaky and mostly useless · 5fc328a9
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=90833
      
      Unreviewed, skip flaky and useless test.
      
      * platform/mac/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5fc328a9
    • rafaelw@chromium.org's avatar
      Unreviewed gardening. Marked webgl/glsl-conformance tests failing after... · f6e1077a
      rafaelw@chromium.org authored
      Unreviewed gardening. Marked webgl/glsl-conformance tests failing after dependency roll in chromium.
      
      * platform/chromium/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6e1077a
    • rniwa@webkit.org's avatar
      Microdata tests are flaky · 26775f09
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90830
      
      Reviewed by Antti Koivisto.
      
      The bug was caused by SpaceSplitString's not copying on write properly.
      Even if there was exactly one owner of the SpaceSplitString, we should still not modify
      m_data since m_data is associated with a particular m_keyString in sharedDataMap().
      
      The only situation in which we can safely modify m_data is when m_data's m_keyString is null
      meaning that it had been unique'ed. Furthermore, this optimization had not been used for
      class lists because class list's refCount is always zero as its ref and deref are forwarded
      to the associated Element's ref and deref. This fix re-enables the optimization for class lists.
      
      This behavior change is tested by existing microdata API tests. Without this patch,
      some tests such as properties-collection-add-remove-property.html fail on the first run
      when several tests were ran in the same WebKit instance.
      
      * dom/SpaceSplitString.h:
      (WebCore::SpaceSplitStringData::isUnique):
      (WebCore::SpaceSplitString::ensureUnique):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26775f09
    • commit-queue@webkit.org's avatar
      [BlackBerry] PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate · d54ab84d
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90817
      
      Patch by Yong Li <yoli@rim.com> on 2012-07-09
      Reviewed by Rob Buis.
      
      PR# 174085.
      PagePopupBlackBerry::closePopup() should always clear the pointer in WebPagePrivate to avoid crashes.
      This patch also removes unused variable m_parentPopup and its setter.
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::WebPagePrivate): Remove m_parentPopup.
      * Api/WebPage_p.h:
      (WebPagePrivate):
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::ChromeClientBlackBerry::closePagePopup):
      * WebCoreSupport/PagePopupBlackBerry.cpp:
      (WebCore::PagePopupBlackBerry::init): Remove the setParentPopup() call.
      (WebCore::PagePopupBlackBerry::closePopup): Clear the reference in WebPagePrivate.
      * WebCoreSupport/SelectPopupClient.cpp:
      (WebCore::SelectPopupClient::setValueAndClosePopup): Add an assert for valid m_element.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d54ab84d
    • shawnsingh@chromium.org's avatar
      [chromium] Use WEBKIT_IMPLEMENTATION == 1 for webkit_unit_tests · d08a857d
      shawnsingh@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90094
      
      Reviewed by Adam Barth.
      
      This patch adds the WEBKIT_IMPLEMENTATION = 1 define to
      WebKitUnitTests.gyp. To get it to compile correctly, some string
      and URL code was refactored, and GURL types were replaced with KURL types.
      
      * WebKit.gypi:
      * WebKitUnitTests.gyp:
      * public/WebDOMMessageEvent.h:
      (WebKit::WebDOMMessageEvent::WebDOMMessageEvent):
      * tests/AssociatedURLLoaderTest.cpp:
      * tests/EventListenerTest.cpp:
      * tests/FrameTestHelpers.cpp:
      (WebKit::FrameTestHelpers::loadFrame):
      * tests/FrameTestHelpers.h:
      * tests/ListenerLeakTest.cpp:
      (WebKit::ListenerLeakTest::RunTest):
      * tests/PopupMenuTest.cpp:
      * tests/RunAllTests.cpp:
      * tests/URLTestHelpers.cpp: Added.
      (URLTestHelpers):
      (WebKit::URLTestHelpers::registerMockedURLFromBaseURL):
      (WebKit::URLTestHelpers::registerMockedURLLoad):
      * tests/URLTestHelpers.h: Copied from Source/WebKit/chromium/public/WebDOMMessageEvent.h.
      (WebKit):
      (URLTestHelpers):
      (WebKit::URLTestHelpers::toKURL):
      * tests/WebFrameTest.cpp:
      * tests/WebPageNewSerializerTest.cpp:
      * tests/WebPageSerializerTest.cpp:
      * tests/WebViewTest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d08a857d
    • danakj@chromium.org's avatar
      [chromium] Decouple RenderPass drawing from CCRenderSurface · c09feae0
      danakj@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90573
      
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Removes the managed textures from CCRenderSurface and stores them in a
      HashMap in LayerRendererChromium.
      
      At the start of a frame, all textures for the frame are reserved, and
      unneeded textures are deleted. After each quad is drawn, evicted textures
      (ie temporary textures used for background filters) are deleted to keep
      within memory limits. At the end of the frame, all surface contents
      textures are kept reserved and thus not deleted.
      
      We add a numeric identifier to CCRenderPass which can be used to
      identify the pass across serialization in the future, and is used
      in the interface to LayerRendererChromium. Also we add to the
      CCRenderPass a contentsChangedSinceLastFrame() flag so that the
      value does not need to be retrieved from the CCRenderSurface.
      
      The pointer from CCRenderPass to CCRenderSurface remains for some
      code in the CCLayerTreeHostImpl, and will be addressed in the future, but
      the pointer is no longer used at all while drawing a frame inside
      LayerRendererChromium.
      
      Covered by existing tests, no intended change in behaviour.
      
      * platform/graphics/chromium/LayerRendererChromium.cpp:
      (WebCore::LayerRendererChromium::releaseRenderPassTextures):
      (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
      (WebCore):
      (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
      (WebCore::LayerRendererChromium::drawQuad):
      (WebCore::LayerRendererChromium::drawBackgroundFilters):
      (WebCore::LayerRendererChromium::drawRenderPassQuad):
      (WebCore::LayerRendererChromium::finishDrawingFrame):
      (WebCore::LayerRendererChromium::useRenderPass):
      (WebCore::LayerRendererChromium::initializeSharedObjects):
      * platform/graphics/chromium/LayerRendererChromium.h:
      (LayerRendererChromium):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
      (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
      (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
      (CCLayerTreeHostImpl):
      * platform/graphics/chromium/cc/CCRenderPass.cpp:
      (WebCore::CCRenderPass::create):
      (WebCore::CCRenderPass::CCRenderPass):
      * platform/graphics/chromium/cc/CCRenderPass.h:
      (CCRenderPass):
      (WebCore::CCRenderPass::id):
      (WebCore::CCRenderPass::setFramebufferOutputRect):
      * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
      (WebCore::CCRenderPassDrawQuad::create):
      (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
      * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
      (CCRenderPassDrawQuad):
      (WebCore::CCRenderPassDrawQuad::renderPassId):
      (WebCore::CCRenderPassDrawQuad::contentsChangedSinceLastFrame):
      * platform/graphics/chromium/cc/CCRenderSurface.cpp:
      (WebCore::CCRenderSurface::appendQuads):
      * platform/graphics/chromium/cc/CCRenderSurface.h:
      (WebCore):
      (CCRenderSurface):
      * platform/graphics/chromium/cc/CCRenderer.h:
      (CCRenderer):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
      (WebCore::CCTiledLayerImpl::pushTileProperties):
      * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
      (CCTiledLayerImpl):
      
      Source/WebKit/chromium:
      
      * tests/CCLayerTreeHostImplTest.cpp:
      * tests/LayerRendererChromiumTest.cpp:
      (FakeCCRendererClient::FakeCCRendererClient):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c09feae0