1. 09 Apr, 2013 8 commits
    • commit-queue@webkit.org's avatar
      Web Inspector: Add Localized strings after r144154 and r135127 · 8e4d2402
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114269
      
      Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-09
      Reviewed by Timothy Hatcher.
      
      No new tests, no behavior change.
      
      * English.lproj/localizedStrings.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e4d2402
    • antti@apple.com's avatar
      Throttle compositing layer flushes in subframes · 07a5be6e
      antti@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114267
      
      Reviewed by Andreas Kling.
      
      Throttle compositing layer flushes in all frames, not just the main one.
              
      This especially reduces flushes/repaints generated by ads in iframes.
      
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::loadProgressingStatusChanged):
      * page/FrameView.cpp:
      (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
      * page/FrameView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      07a5be6e
    • commit-queue@webkit.org's avatar
      Table border doesn't show up · afc43040
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=13709
      
      Patch by Suchit Agrawal <a.suchit@samsung.com> on 2013-04-09
      Reviewed by Antti Koivisto.
      
      Source/WebCore:
      
      Border issue is fixed when border width is less than 0.8pt
      
      Border width is stored as unsigned. Border width (specified by
      author) is converted into pixels and some times this pixel value
      goes less than 1px. In this case, border width becomes 0px when
      pixel value (double type) assigned to unsigned type.
      Border width should not fall to 0px unless it is specified by
      author.
      
      Test: fast/borders/border-width-less-then-a-unit-of-pt.html
      
      * css/StyleBuilder.cpp:
      ApplyPropetyComputeLength class is replaced with 3 classes :
      ApplyPropertyComputeBorderWidth, ApplyPropertyComputeTextSpacing
      and ApplyPropertyComputeTransformOriginZ.
      
      (WebCore::ApplyPropertyComputeBorderWidth::applyValue):
      (WebCore::ApplyPropertyComputeBorderWidth::createHandler):
      This class handles all width properties like border, outline,
      etc. These all properties stores value in integer types.
      Pixel value rounded of to 1px if value less than 1px and greater
      than 0px.
      
      (WebCore):
      (ApplyPropertyComputeTextSpacing):
      (WebCore::ApplyPropertyComputeTextSpacing::setValue):
      (WebCore::ApplyPropertyComputeTextSpacing::applyValue):
      (WebCore::ApplyPropertyComputeTextSpacing::createHandler):
      This class handles all spacing properties like word-spacing,
      letter-spacing etc.
      
      (ApplyPropertyComputeTransformOriginZ):
      (WebCore::ApplyPropertyComputeTransformOriginZ::setValue):
      (WebCore::ApplyPropertyComputeTransformOriginZ::applyValue):
      (WebCore::ApplyPropertyComputeTransformOriginZ::createHandler):
      This class handles TransformOriginZ Property.
      
      (WebCore::StyleBuilder::StyleBuilder):
      ApplyProprtyComputeLength class usage changed with defined new
      classes as per class definition.
      
      LayoutTests:
      
      This test file have border width, outline offset, outline width, border
      spacing and column rule width properties test cases.
      * fast/borders/border-width-less-then-a-unit-of-pt-expected.html: Added.
      * fast/borders/border-width-less-then-a-unit-of-pt.html: Added.
      
      Test case table/mozilla_expected_failures/bug89315.html need to do rebaseline
      in efl, gtk and mac.
      * platform/efl/TestExpectations:
      * platform/gtk/TestExpectations:
      * platform/mac/TestExpectations:
      
      Updated the test result for table/mozilla_expected_failures/bug89315.html
      Border is expected for table in test table/mozilla_expected_failures/bug89315.html
      * platform/qt/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
      * platform/qt/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
      * tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afc43040
    • loki@webkit.org's avatar
      Initialization skipped error on WinCario after r147643 · 667afd9c
      loki@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114258
      
      Reviewed by Csaba Osztrogonác.
      
      Build fix. Adding extra block statement to avoid error C2362 on WinCario
      
      * platform/win/DragImageCairoWin.cpp:
      (WebCore::createDragImageFromImage):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      667afd9c
    • commit-queue@webkit.org's avatar
      [WK2] Remove build warnings for unused parameters · d19b7347
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114234
      
      Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2013-04-09
      Reviewed by Andreas Kling.
      
      Fix build warnings -Wunused-parameter.
      
      Source/WebCore:
      
      * Modules/indexeddb/IDBBackingStore.cpp:
      (WebCore::IDBBackingStore::openInMemory):
      * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
      (WebCore::CreateIndexAbortOperation::perform):
      (WebCore::DeleteIndexAbortOperation::perform):
      (WebCore::CreateObjectStoreAbortOperation::perform):
      (WebCore::DeleteObjectStoreAbortOperation::perform):
      (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
      * Modules/indexeddb/IDBLevelDBCoding.cpp:
      (WebCore::IDBLevelDBCoding::decodeBool):
      (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
      * Modules/indexeddb/IDBLevelDBCoding.h:
      (WebCore::IDBLevelDBCoding::encodeIntSafely):
      * bindings/js/IDBBindingUtilities.cpp:
      (WebCore::canSet):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
      (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
      * platform/leveldb/LevelDBDatabase.cpp:
      (WebCore::ComparatorAdapter::FindShortestSeparator):
      (WebCore::ComparatorAdapter::FindShortSuccessor):
      
      Source/WebKit2:
      
      * UIProcess/Storage/StorageManager.cpp:
      (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
      * UIProcess/WebContext.cpp:
      (WebKit::WebContext::requestNetworkingStatistics):
      (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
      * WebProcess/Storage/StorageAreaProxy.cpp:
      (WebKit::StorageAreaProxy::removeItem):
      (WebKit::StorageAreaProxy::clear):
      (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
      (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
      * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
      (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::didFinishLoad):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d19b7347
    • thiago.santos@intel.com's avatar
      [WK2] Drop WebProcess capabilities on Linux using seccomp filters · 0ee9d4d0
      thiago.santos@intel.com authored
      https://bugs.webkit.org/show_bug.cgi?id=89875
      
      Reviewed by Maciej Stachowiak.
      
      .:
      
      Added the bits to EFL/CMake buildsystem to find the libseccomp
      library.
      
      * Source/cmake/FindLibSeccomp.cmake: Added.
      * Source/cmake/OptionsEfl.cmake:
      * Source/cmake/WebKitFeatures.cmake:
      * Source/cmakeconfig.h.cmake:
      
      Source/WebCore:
      
      Make the DATA_DIR global since it is now needed for WebCore and WebKit2.
      It is now used to set a sandbox policy for the EFL port.
      
      * PlatformEfl.cmake:
      
      Source/WebKit2:
      
      Introduce the foundations of the SeccompFilter-based sandbox. The
      hardening of the WebProcess (and potentially PluginProcess, etc)
      works by a combination of the two things:
      
      - Blocking syscalls that are not used, reducing the size of the attack
      surface.
      - Trapping sensitive syscalls and delegating the execution of these
      syscalls to a separated trusted process subject to a set of policies.
      
      The initial implementation traps the open()-family of syscalls on WebKit
      EFL's and Qt's WebProcess, but it could be easily used by any Linux port,
      since the code is suppose to be Linux-compliant. The list of syscalls handled
      by the broker process should definitely grow as we mature the
      implementation. Other syscalls needs to be handled to get this sandbox
      fully functional, like unlink(), mkdir(), etc.
      
      The broker process should be initialized as early as possible on the
      sandboxed process main() function, because it only does a fork(), which
      is cheap on Linux. That also aims to minimize the resident memory footprint
      of the broker process.
      
      Opening of files for upload and saving downloads is not supported yet,
      since it should be handled to the UIProcess in a similar fashion as
      the Mac port does.
      
      * PlatformEfl.cmake:
      * Shared/linux/SeccompFilters/OpenSyscall.cpp: Added.
      (WebKit):
      (WebKit::OpenSyscall::createFromOpenatContext):
      (WebKit::OpenSyscall::createFromCreatContext):
      (WebKit::OpenSyscall::OpenSyscall):
      (WebKit::OpenSyscall::setResult):
      (WebKit::OpenSyscall::execute):
      (WebKit::OpenSyscall::encode):
      (WebKit::OpenSyscall::decode):
      (WebKit::OpenSyscallResult::OpenSyscallResult):
      (WebKit::OpenSyscallResult::~OpenSyscallResult):
      (WebKit::OpenSyscallResult::encode):
      (WebKit::OpenSyscallResult::decode):
      * Shared/linux/SeccompFilters/OpenSyscall.h: Added.
      (CoreIPC):
      (WebKit):
      (OpenSyscall):
      (WebKit::OpenSyscall::setPath):
      (WebKit::OpenSyscall::setFlags):
      (WebKit::OpenSyscall::setMode):
      (OpenSyscallResult):
      (WebKit::OpenSyscallResult::fd):
      (WebKit::OpenSyscallResult::errorNumber):
      * Shared/linux/SeccompFilters/SeccompBroker.cpp: Added.
      (WebKit):
      (SeccompBrokerClient):
      (WebKit::sendMessage):
      (WebKit::receiveMessage):
      (WebKit::SIGSYSHandler):
      (WebKit::registerSIGSYSHandler):
      (WebKit::SeccompBrokerClient::shared):
      (WebKit::SeccompBrokerClient::SeccompBrokerClient):
      (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
      (WebKit::SeccompBrokerClient::dispatch):
      (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount):
      (WebKit::SeccompBroker::launchProcess):
      (WebKit::SeccompBroker::initialize):
      (WebKit::SeccompBroker::runLoop):
      * Shared/linux/SeccompFilters/SeccompBroker.h: Added.
      (WebKit):
      (SeccompBroker):
      (WebKit::SeccompBroker::setSyscallPolicy):
      (WebKit::SeccompBroker::SeccompBroker):
      * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added.
      (WebKit):
      (WebKit::SeccompFilters::SeccompFilters):
      (WebKit::SeccompFilters::~SeccompFilters):
      (WebKit::SeccompFilters::addRule):
      (WebKit::SeccompFilters::initialize):
      * Shared/linux/SeccompFilters/SeccompFilters.h: Added.
      (WebKit):
      (SeccompFilters):
      (WebKit::SeccompFilters::context):
      (WebKit::SeccompFilters::platformInitialize):
      * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Added.
      (WebKit):
      (WebKit::SigactionSyscall::createFromContext):
      * Shared/linux/SeccompFilters/SigactionSyscall.h: Added.
      (WebKit):
      (SigactionSyscall):
      * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Added.
      (WebKit):
      (WebKit::SigprocmaskSyscall::createFromContext):
      * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Added.
      (WebKit):
      (SigprocmaskSyscall):
      * Shared/linux/SeccompFilters/Syscall.cpp: Added.
      (WebKit):
      (WebKit::Syscall::createFromContext):
      (WebKit::Syscall::createFromDecoder):
      (WebKit::Syscall::Syscall):
      (WebKit::SyscallResult::createFromDecoder):
      (WebKit::SyscallResult::SyscallResult):
      * Shared/linux/SeccompFilters/Syscall.h: Added.
      (CoreIPC):
      (WebKit):
      (Syscall):
      (WebKit::Syscall::~Syscall):
      (WebKit::Syscall::type):
      (WebKit::Syscall::setContext):
      (WebKit::Syscall::context):
      (SyscallResult):
      (WebKit::SyscallResult::~SyscallResult):
      (WebKit::SyscallResult::type):
      * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Added.
      (WebKit):
      (WebKit::removeTrailingSlash):
      (WebKit::SyscallPolicy::hasPermissionForPath):
      (WebKit::SyscallPolicy::addFilePermission):
      (WebKit::SyscallPolicy::addDirectoryPermission):
      (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
      * Shared/linux/SeccompFilters/SyscallPolicy.h: Added.
      (WebKit):
      (SyscallPolicy):
      * Target.pri:
      * WebKit2.pri:
      * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Added.
      (WebKit):
      (WebKit::SeccompFiltersWebProcessEfl::SeccompFiltersWebProcessEfl):
      (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
      * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Added.
      (WebKit):
      (SeccompFiltersWebProcessEfl):
      * WebProcess/qt/SeccompFiltersWebProcessQt.cpp: Added.
      (WebKit):
      (WebKit::SeccompFiltersWebProcessQt::SeccompFiltersWebProcessQt):
      (WebKit::SeccompFiltersWebProcessQt::platformInitialize):
      * WebProcess/qt/SeccompFiltersWebProcessQt.h: Added.
      (WebKit):
      (SeccompFiltersWebProcessQt):
      * WebProcess/qt/WebProcessQt.cpp:
      (WebKit::WebProcess::platformInitializeWebProcess):
      * WebProcess/soup/WebProcessSoup.cpp:
      (WebKit::WebProcess::platformInitializeWebProcess):
      
      Tools:
      
      Add unit tests to verify if the handling of the open, openat, creat syscall
      is being done right. We check if the Read/Write/ReadAndWrite permissions
      are respected, if the canonical path is being resolved and if
      the permissions are falling back to the topmost parent directory with a
      policy set when the directory being opened has no policy.
      
      We also test if any attempt of blocking SIGSYS is silently ignored.
      SIGSYS cannot be blocked because in it's handler is where we hook
      syscalls to the broker process.
      
      Also added libseccomp to EFL's jhbuild to make the life of developers
      willing to help easier.
      
      * Scripts/webkitperl/FeatureList.pm:
      * TestWebKitAPI/PlatformEfl.cmake:
      * TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: Added.
      (TestWebKitAPI):
      (SeccompEnvironment):
      (TestWebKitAPI::SeccompEnvironment::SetUp):
      (TestWebKitAPI::SeccompEnvironment::TearDown):
      (TestWebKitAPI::dummyHandler):
      (TestWebKitAPI::TEST):
      (TestWebKitAPI::stressTest):
      * efl/jhbuild.modules:
      * qmake/mkspecs/features/features.pri:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147998 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ee9d4d0
    • rniwa@webkit.org's avatar
      Remove WebCore.gyp/gypi · a9c9f70c
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114239
      
      Reviewed by Benjamin Poulain.
      
      * WebCore.gyp: Removed.
      * WebCore.gyp/.gitignore: Removed.
      * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Removed.
      * WebCore.gyp/MakeNames.gypi: Removed.
      * WebCore.gyp/WebCore.gyp: Removed.
      * WebCore.gyp/mac: Removed.
      * WebCore.gyp/mac/adjust_visibility.sh: Removed.
      * WebCore.gyp/mac/check_objc_rename.sh: Removed.
      * WebCore.gyp/scripts: Removed.
      * WebCore.gyp/scripts/action_csspropertynames.py: Removed.
      * WebCore.gyp/scripts/action_cssvaluekeywords.py: Removed.
      * WebCore.gyp/scripts/action_derivedsourcesallinone.py: Removed.
      * WebCore.gyp/scripts/action_makenames.py: Removed.
      * WebCore.gyp/scripts/action_useragentstylesheets.py: Removed.
      * WebCore.gyp/scripts/rule_bison.py: Removed.
      * WebCore.gyp/scripts/supplemental_idl_files.py: Removed.
      * WebCore.gypi: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147987 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9c9f70c
    • commit-queue@webkit.org's avatar
      Rollout r147756: performance regression · 57c76062
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114176
      
      Patch by Mihai Maerean <mmaerean@adobe.com> on 2013-04-08
      Reviewed by Alexis Menard.
      
      Source/WebCore:
      
      Rolling out the patch for https://bugs.webkit.org/show_bug.cgi?id=74144 "[CSS Regions] Elements in a region
      should be assignable to a named flow" because of the performance regression in Parser/html5-full-render.html .
      
      No new tests (because this is a rollout patch).
      
      * dom/Element.cpp:
      * dom/Element.h:
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRenderingContext::parentRenderer):
      (WebCore::NodeRenderingContext::shouldCreateRenderer):
      (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
      * dom/NodeRenderingContext.h:
      * dom/PseudoElement.h:
      * dom/Text.cpp:
      (WebCore::Text::textRendererIsNeeded):
      (WebCore::Text::updateTextRenderer):
      * dom/Text.h:
      * rendering/FlowThreadController.cpp:
      * rendering/FlowThreadController.h:
      * rendering/RenderObject.h:
      * rendering/RenderRegion.h:
      * svg/SVGElement.cpp:
      * svg/SVGElement.h:
      
      LayoutTests:
      
      * fast/regions/flow-body-in-html-expected.txt: Removed.
      * fast/regions/flow-body-in-html.html: Removed.
      * fast/regions/region-content-flown-into-region-expected.html: Removed.
      * fast/regions/region-content-flown-into-region.html: Removed.
      * fast/regions/universal-selector-children-to-the-same-region-expected.txt: Removed.
      * fast/regions/universal-selector-children-to-the-same-region.html: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      57c76062
  2. 08 Apr, 2013 30 commits
    • benjamin@webkit.org's avatar
      Remove HTML Notification · de455ba7
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114231
      
      Reviewed by Ryosuke Niwa.
      
      Source/JavaScriptCore: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebCore: 
      
      The feature is dead. It was only kept in the tree because of chromium.
      
      * Configurations/FeatureDefines.xcconfig:
      * Modules/notifications/Notification.cpp:
      (WebCore):
      (WebCore::Notification::Notification):
      * Modules/notifications/Notification.h:
      (Notification):
      * Modules/notifications/NotificationCenter.h:
      (NotificationCenter):
      * Modules/notifications/NotificationCenter.idl:
      * page/FeatureObserver.h:
      
      Source/WebKit/blackberry: 
      
      * WebCoreSupport/AboutDataEnableFeatures.in:
      
      Source/WebKit/mac: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WebKit/qt: 
      
      * WebCoreSupport/NotificationPresenterClientQt.cpp:
      (WebCore::NotificationPresenterClientQt::displayNotification):
      (WebCore::NotificationPresenterClientQt::cancel):
      (WebCore::NotificationPresenterClientQt::notificationClicked):
      (WebCore::NotificationPresenterClientQt::removeReplacedNotificationFromQueue):
      (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
      (WebCore::NotificationPresenterClientQt::dumpShowText):
      
      Source/WebKit2: 
      
      * Configurations/FeatureDefines.xcconfig:
      
      Source/WTF: 
      
      * wtf/FeatureDefines.h:
      
      Tools: 
      
      * qmake/mkspecs/features/features.pri:
      
      LayoutTests: 
      
      * fast/notifications/notifications-with-permission-expected.txt:
      * fast/notifications/notifications-with-permission.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      de455ba7
    • dino@apple.com's avatar
      Don't try to remove a non-existent snapshot · 9b5476c1
      dino@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114226
      <rdar://problem/13604480>
      
      Reviewed by Darin Adler.
      
      We don't need to trigger the timer to remove a snapshot
      if there was never a snapshot displayed.
      
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::setDisplayState): Detect if we're moving from the DisplayingSnapshot state.
      (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Guard against a missing renderer.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147977 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b5476c1
    • paroga@webkit.org's avatar
      Do not define CAN_THEME_URL_ICON for PLATFORM(WIN_CAIRO) · 7afa0281
      paroga@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=108444
      
      Reviewed by Darin Adler.
      
      Image::loadPlatformResource("urlIcon") returns nothing
      since r30961 on Windows which makes the code useless.
      
      * loader/icon/IconDatabase.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7afa0281
    • roger_fong@apple.com's avatar
      Build fix. · d9968cbb
      roger_fong@apple.com authored
      * platform/win/DragImageWin.cpp:
      (WebCore::createDragImageIconForCachedImageFilename):
      * WebKit.vcproj/WebKitExports.def.in:
      * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
      * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
      * JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d9968cbb
    • ggaren@apple.com's avatar
      Stop #include-ing all of JavaScriptCore in every DOM-related file · 34e919eb
      ggaren@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114220
      
      Reviewed by Sam Weinig.
      
      ../JavaScriptCore: 
      
      I separated WeakInlines.h from Weak.h so WebCore data types that need
      to declare a Weak<T> data member don't have to #include all of the
      infrastructure for accessing that data member.
      
      This also required separating Weak<T> from PassWeak<T> by removing the
      WeakImplAccessor class template and pushing code down into its subclasses.
      
      * API/JSWeakObjectMapRefPrivate.cpp:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * bytecode/UnlinkedCodeBlock.h:
      * heap/PassWeak.h:
      (JSC):
      (PassWeak):
      (JSC::::PassWeak):
      (JSC::::operator):
      (JSC::::get):
      * heap/SlotVisitorInlines.h:
      * heap/Weak.h:
      (JSC):
      (Weak):
      * heap/WeakInlines.h: Copied from Source/JavaScriptCore/heap/Weak.h.
      (JSC):
      (JSC::::Weak):
      (JSC::::operator):
      (JSC::::get):
      (JSC::::was):
      (JSC::weakClear):
      * jit/JITThunks.h:
      * runtime/RegExpCache.h:
      * runtime/Structure.h:
      * runtime/WeakGCMap.h:
      
      ../WebCore: 
      
      I separated ScriptWrappableInlines.h from ScriptWrappable.h so
      WebCore data types that inherit from ScriptWrappable don't
      have to #include all of the infrastructure for accessing that data member.
      
      * ForwardingHeaders/heap/PassWeak.h: Added.
      * ForwardingHeaders/heap/WeakInlines.h: Added.
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSDOMBinding.h:
      (JSC):
      * bindings/js/JSEventListener.h:
      * bindings/js/JSMutationCallback.cpp:
      * bindings/js/JSNodeFilterCondition.h:
      * bindings/js/ScriptWrappable.h:
      (JSC):
      (WebCore):
      (ScriptWrappable):
      * bindings/js/ScriptWrappableInlines.h: Added.
      (WebCore):
      (WebCore::ScriptWrappable::wrapper):
      (WebCore::ScriptWrappable::setWrapper):
      (WebCore::ScriptWrappable::clearWrapper):
      * bridge/qt/qt_instance.h:
      * bridge/qt/qt_runtime.h:
      * bridge/runtime_root.cpp:
      * bridge/runtime_root.h:
      * css/StylePropertySet.cpp:
      * dom/LiveNodeList.cpp:
      (WebCore::LiveNodeListBase::reportMemoryUsage):
      * dom/Node.cpp:
      (WebCore::Node::reportMemoryUsage):
      * inspector/InspectorDebuggerAgent.cpp:
      * inspector/NetworkResourcesData.cpp:
      * loader/cache/CachedSVGDocument.cpp:
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::reportMemoryUsage):
      
      ../WebKit2: 
      
      * Shared/WebCoreArgumentCoders.cpp:
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      34e919eb
    • commit-queue@webkit.org's avatar
      [BlackBerry] Clean up render theme code. · df8800bd
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114216
      
      Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-04-08
      Reviewed by Rob Buis.
      
      BlackBerry PR 323062
      
      Clean up redundant code.
      
      * platform/blackberry/RenderThemeBlackBerry.cpp:
      (WebCore):
      (WebCore::RenderThemeBlackBerry::paintSliderTrack):
      * platform/blackberry/RenderThemeBlackBerry.h:
      (RenderThemeBlackBerry):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df8800bd
    • andersca@apple.com's avatar
      Call Netscape Plugin's toString() and valueOf() instead of providing default implementation · 0cb90f97
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113139
      
      Patch by Arunprasad Rajkumar <arunprasadr@nds.com> on 2013-04-08
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Tests: plugins/npruntime/tostring.html
             plugins/npruntime/valueof.html
      
      * bridge/c/c_instance.cpp:
      (JSC::Bindings::CInstance::~CInstance):
      (JSC::Bindings::CInstance::invokeMethod):
      (JSC::Bindings::CInstance::invokeDefaultMethod):
      (Bindings):
      (JSC::Bindings::CInstance::invokeConstruct):
      (JSC::Bindings::CInstance::stringValue):
      (JSC::Bindings::CInstance::booleanValue):
      (JSC::Bindings::CInstance::valueOf):
      (JSC::Bindings::CInstance::toJSPrimitive):
      * bridge/c/c_instance.h:
      (CInstance):
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
      * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters:
      * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
      * DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp: Added.
      (ToStringAndValueOfObject):
      (ToStringAndValueOfObject::ToStringAndValueOfObject):
      (ScriptableObject):
      (ToStringAndValueOfObject::ScriptableObject::hasMethod):
      (ToStringAndValueOfObject::ScriptableObject::invoke):
      (ToStringAndValueOfObject::ScriptableObject::pluginTest):
      (ToStringAndValueOfObject::NPP_GetValue):
      * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
      * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
      * GNUmakefile.am:
      
      LayoutTests:
      
      * platform/qt-mac/TestExpectations:
      * platform/wk2/TestExpectations:
      * plugins/npruntime/tostring-expected.txt: Added.
      * plugins/npruntime/tostring.html: Added.
      * plugins/npruntime/valueof-expected.txt: Added.
      * plugins/npruntime/valueof.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0cb90f97
    • timothy_horton@apple.com's avatar
      REGRESSION (r138858): Crash in WebCore::FrameLoader::~FrameLoader() when... · e39867bb
      timothy_horton@apple.com authored
      REGRESSION (r138858): Crash in WebCore::FrameLoader::~FrameLoader() when opening page in a background tab
      https://bugs.webkit.org/show_bug.cgi?id=109935
      <rdar://problem/13225963>
      
      Reviewed by Brady Eidson.
      
      Previously, we were deciding if a Page could go into
      the PageCache by blacklisting certain load types. Instead,
      whitelist the load types that we know can go into the cache,
      so that newly-added load types are not cached unless
      that is explicitly desired.
      
      The crash occurs when a page which is actively loading
      is put into the page cache while doing a redirect with
      FrameLoadTypeRedirectWithLockedBackForwardList (note that
      this is a redirect that was not covered in the blacklist),
      and then promptly removed from the page cache, resulting
      in resources from the redirect target (the now-active page)
      being incorrectly destroyed.
      
      No new tests, only known crash repro case is extremely
      timing dependent (and only happens in WebKit2, with tiled
      drawing, in background tabs).
      
      * history/PageCache.cpp:
      (WebCore::PageCache::canCache):
      
      Adjust a test which depended on slow-redirects going
      into the page cache (which will no longer happen)
      to instead click on a link.
      
      * fast/history/timed-refresh-in-cached-frame.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e39867bb
    • andersca@apple.com's avatar
      Fix build. · 86ec616b
      andersca@apple.com authored
      * platform/network/ResourceHandle.cpp:
      (WebCore::ResourceHandle::continueDidReceiveResponse):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147954 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      86ec616b
    • andersca@apple.com's avatar
      Add an async version of ResourceHandle::didReceiveResponse · ac87e20e
      andersca@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114215
      
      Reviewed by Sam Weinig.
      
      Source/WebCore:
      
      In order to support converting NSURLConnections to NSURLDownloads when using the network process
      we need an async version of didReceiveResponse.
      
      * WebCore.exp.in:
      * platform/network/ResourceHandleClient.cpp:
      (WebCore::ResourceHandleClient::didReceiveResponseAsync):
      Just call continueDidReceiveResponse().
      
      * platform/network/mac/ResourceHandleMac.mm:
      (WebCore::ResourceHandle::continueWillSendRequest):
      Split up a single condition in two, making it easier to see which assertion fails.
      
      (WebCore::ResourceHandle::continueDidReceiveResponse):
      Call -[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse].
      
      (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
      (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
      (WebCore::ResourceHandle::continueWillCacheResponse):
      Split up a single condition in two, making it easier to see which assertion fails.
      
      * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
      * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
      (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]):
      Signal the semaphore.
      
      (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
      Call didReceiveResponseAsync on the main thread and wait on the semaphore.
      
      Source/WebKit2:
      
      * NetworkProcess/NetworkResourceLoader.cpp:
      (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
      Send the message and then call continueDidReceiveResponse.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ac87e20e
    • bdakin@apple.com's avatar
      Crash in ScrollingCoordinator::mainThreadScrollingReasons() when going back · b6eb305b
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114214
      -and corresponding-
      <rdar://problem/13208616>
      
      Reviewed by Anders Carlsson.
      
      When a page is restoring from the page cache, the mainFrame can have a null 
      Document. So we should null-check the Document here. 
      
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147949 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b6eb305b
    • abucur@adobe.com's avatar
      Simplify ContainerNode::removeChildren · 24c25908
      abucur@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=113517
      
      Reviewed by Darin Adler.
      
      The patch is based on the work made by Elliott Sprehn. He kindly agreed
      for me to finalize the last bits and pieces of the fix.
      
      Source/WebCore:
      
      Simplify ContainerNode::removeChildren by merging the loops and removing
      willRemoveChildren. This removes two traversals of the children, avoids
      refing and derefing all the children once, avoids allocating a second
      NodeVector of children, and means we detach() in the same order as
      normal removal.
      
      This does mean you can get into an infinite loop with DOMNodeRemoved
      listeners by continously adding nodes but this is true in all other browsers
      and the current behavior is bad because it means you don't get notified
      of nodes added during removal (which other browsers do notify of). This
      patch removes the containerNode.html test that originally tested for this
      infinite loop and adds a new one that tests that all nodes get notified.
      
      This makes PerformanceTests/Parser/innerHTML-setter.html 2-6% faster.
      
      There's also a new test verifying ranges remain consistent if modified
      inside an mutation event handler. Without the patch it's possible to create
      a range with boundaries outside of the DOM tree.
      
      Tests: fast/dom/Range/range-remove-children-event.html
             fast/events/mutation-during-innerHTML.html
      
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::removeChildren):
      * dom/Document.cpp:
      * dom/Document.h: nodeChildrenWillBeRemoved is not needed any more.
      * dom/Range.cpp:
      * dom/Range.h: nodeChildrenWillBeRemoved is not needed any more.
      
      LayoutTests:
      
      Remove containerNode.html test since it was checking for an infinite
      loop when adding DOM nodes inside a DOMNodeRemoved mutation event
      handler, but we actually do want to allow an infinite loop here for
      correctness and compatability with other browsers.
      
      Also added mutation-during-innerHTML which checks that all nodes
      are notified of being removed even if they were added during the
      DOMNodeRemoved notification.
      
      There's a new test range-remove-children-event that verifies the
      ranges modified inside a mutation event handler remain consistent.
      
      * fast/dom/MutationObserver/added-out-of-order-expected.txt:
      * fast/dom/MutationObserver/added-out-of-order.html:
      * fast/dom/Range/range-remove-children-event-expected.txt: Added.
      * fast/dom/Range/range-remove-children-event.html: Added.
      * fast/dom/containerNode-expected.txt: Removed.
      * fast/dom/containerNode.html: Removed.
      * fast/events/mutation-during-innerHTML-expected.txt: Added.
      * fast/events/mutation-during-innerHTML.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24c25908
    • simon.fraser@apple.com's avatar
      Remove some #includes in headers in rendering code · 40a77435
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114079
      
      Reviewed by Sam Weinig.
      
      Clean up #includes in RenderObject, RenderLayer etc.
      Moved makeMatrixRenderable() into RenderLayer.app, allowing
      the removal of a TransformationMatrix.h include.
      
      Make some RenderLayer functions that deal with filters not inline,
      to avoid including RenderLayerFilterInfo.h.
      
      * platform/graphics/GraphicsLayer.h:
      * platform/graphics/ImageOrientation.cpp:
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      * platform/graphics/qt/GraphicsContextQt.cpp:
      * platform/graphics/transforms/AffineTransform.cpp:
      * platform/graphics/transforms/AffineTransform.h:
      * rendering/RenderBoxModelObject.h:
      * rendering/RenderLayer.cpp:
      (WebCore::makeMatrixRenderable):
      (WebCore::RenderLayer::filterRenderer):
      (WebCore::RenderLayer::filterInfo):
      (WebCore::RenderLayer::ensureFilterInfo):
      (WebCore::RenderLayer::removeFilterInfoIfNeeded):
      * rendering/RenderLayer.h:
      * rendering/RenderLayerBacking.h:
      * rendering/RenderLineBoxList.h:
      * rendering/RenderObject.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147940 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40a77435
    • robert@webkit.org's avatar
      Unreviewed, rolling out r147850. · fc892827
      robert@webkit.org authored
      http://trac.webkit.org/changeset/147850
      https://bugs.webkit.org/show_bug.cgi?id=113706
      
      Changeset crossed paths with 147505, which is the same fix.
      
      Source/WebCore:
      
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::inlineLogicalWidth):
      
      LayoutTests:
      
      * fast/inline/inline-with-empty-inline-children-expected.txt:
      * fast/inline/inline-with-empty-inline-children.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147939 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fc892827
    • ap@apple.com's avatar
      <rdar://problem/12834449> Crashes in WebSocketChannel::processFrame when processing a ping · 9729b33f
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=114178
      
              Reviewed by Brady Eidson.
      
              No test, I could never reproduce even manually.
      
              Calling enqueueRawFrame() could change incoming buffer, so a subsequent skipBuffer()
              would operate on wrong assumptions. This happened because enqueueRawFrame() actually
              tried to process the queue, and send failure sometimed clears m_buffer.
      
              Fixing this by decoupling enqueuing from sending, and making sure that skipBuffer()
              in ping frame processing case is performed at a safe time.
      
              * Modules/websockets/WebSocketChannel.cpp:
              (WebCore::WebSocketChannel::send):
              (WebCore::WebSocketChannel::startClosingHandshake):
              (WebCore::WebSocketChannel::processFrame):
              (WebCore::WebSocketChannel::enqueueTextFrame):
              (WebCore::WebSocketChannel::enqueueRawFrame):
              (WebCore::WebSocketChannel::enqueueBlobFrame):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9729b33f
    • mvujovic@adobe.com's avatar
      REGRESSION (r147502): Animations of CA filters broken · 311d1ffd
      mvujovic@adobe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114067
      
      Reviewed by Dean Jackson.
      
      Revert r147502 [1] because it broke CA filter animations.
              
      [1]: http://trac.webkit.org/changeset/147502
      
      Source/WebCore: 
      
      * platform/graphics/IntRectExtent.h:
      (WebCore::IntRectExtent::isZero):
      (IntRectExtent):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::needsCompositingLayersRebuiltForOverflow):
      (WebCore):
      (WebCore::RenderLayer::styleChanged):
      * rendering/RenderLayer.h:
      (RenderLayer):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::updateFilters):
      (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
      * rendering/RenderLayerBacking.h:
      (RenderLayerBacking):
      * rendering/RenderLayerCompositor.cpp:
      (WebCore::RenderLayerCompositor::calculateCompositedBounds):
      
      Source/WTF: 
      
      * wtf/Platform.h:
      
      LayoutTests: 
      
      * compositing/filters/sw-layer-overlaps-hw-shadow-expected.txt:
      * compositing/filters/sw-nested-shadow-overlaps-hw-nested-shadow-expected.txt:
      * compositing/filters/sw-shadow-overlaps-hw-layer-expected.txt:
      * compositing/filters/sw-shadow-overlaps-hw-shadow-expected.txt:
      * css3/filters/composited-layer-bounds-after-sw-blur-animation-expected.txt: Removed.
      * css3/filters/composited-layer-bounds-after-sw-blur-animation.html: Removed.
      * css3/filters/composited-layer-bounds-with-composited-blur-expected.txt: Removed.
      * css3/filters/composited-layer-bounds-with-composited-blur.html: Removed.
      * css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change-expected.txt: Removed.
      * css3/filters/composited-layer-child-bounds-after-composited-to-sw-shadow-change.html: Removed.
      * css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow-expected.txt: Removed.
      * css3/filters/composited-layer-promotion-after-outset-overlap-change-using-composited-shadow.html: Removed.
      * css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow-expected.txt: Removed.
      * css3/filters/composited-layer-promotion-after-outset-overlap-change-using-sw-shadow.html: Removed.
      * css3/filters/filter-change-repaint-composited-expected.png:
      * css3/filters/filter-change-repaint-composited.html:
      * platform/qt/TestExpectations:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147937 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      311d1ffd
    • jocelyn.turcotte@digia.com's avatar
      [Qt] Avoid "QFont::setPixelSize: Pixel size <= 0 (0)" · 72ea76b1
      jocelyn.turcotte@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114175
      
      Reviewed by Allan Sandfeld Jensen.
      
      QFont doesn't support a 0-size but WebCore does.
      Leave our QFont in its default state in this case to avoid the warning.
      
      * platform/graphics/qt/FontPlatformDataQt.cpp:
      (WebCore::FontPlatformData::FontPlatformData):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      72ea76b1
    • commit-queue@webkit.org's avatar
      Counter still gets incremented when counter-increment is set to none · 659caf7b
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=84985
      
      Patch by Yi Shen <max.hong.shen@gmail.com> on 2013-04-08
      Reviewed by Darin Adler.
      
      When the counter-increment is set to none, no counters are incremented.
      
      Source/WebCore:
      
      Tests: New test cases added in fast/css/counters/counter-increment-tests.htm
      
      * css/StyleBuilder.cpp:
      (WebCore::ApplyPropertyCounter::applyValue):
      
      LayoutTests:
      
      * fast/css/counters/counter-increment-tests-expected.txt: Added new test cases.
      * fast/css/counters/counter-increment-tests.htm: Added new test cases.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147930 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      659caf7b
    • commit-queue@webkit.org's avatar
      Crash in WebCore::ElementRuleCollector::collectMatchingRulesForList · 76803844
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113458
      
      Patch by Douglas Stockwell <dstockwell@chromium.org> on 2013-04-08
      Reviewed by Darin Adler.
      
      Source/WebCore:
      
      A stylesheet which has been invalidated (type changed from "" or
      "text/css") was not correctly removed from the list of active
      style sheets when its children are changed.
      
      This change releases StyleElement::m_sheet in advance of calling
      DocumentStyleSheetCollection::updateActiveStyleSheets.
      
      (StyleElement::clearSheet calls CSSStyleSheet::clearOwnerNode calls
      CSSStyleSheet::didMutate calls Document::styleResolverChanged calls
      DocumentStyleSheetCollection::updateActiveStyleSheets)
      
      Test: fast/css/style-element-invalidation-crash.html
      
      * dom/StyleElement.cpp:
      (WebCore::StyleElement::clearSheet): Release m_sheet before we
        trigger an update of the active style sheets.
      
      LayoutTests:
      
      * fast/css/style-element-invalidation-crash-expected.txt: Added.
      * fast/css/style-element-invalidation-crash.html: Added.
      * fast/css/stylesheet.innerHTML-calls-didmutate.html: Removed.
      * fast/css/stylesheet.innerHTML-calls-didmutate-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147928 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76803844
    • carlosgc@webkit.org's avatar
      [GTK] DOM objects created wrapping a base class have incorrect GObject type · 0464259a
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113132
      
      Reviewed by Gustavo Noronha Silva.
      
      Source/WebCore:
      
      Some of the DOM methods can create a concrete instance of another
      object, but return a base class. GObject bindings provide custom
      kit implementations for Node, Element, Event and EvenTarget, so
      any concrete HTMLElement wrapped as an HTMLElement ends up
      wrapping the right WebCore object but in the wrong GObject type.
      This affects not only HTMLElements, but any polymorphic object
      wrapped using a base class.
      This patch changes the way objects are created, so that all
      classes have their own kit implementation, but for polymorphic
      objects the kit implementation of the base class is always
      used. The kit method of polymorphic base classes use a generic
      wrap method instead of the wrapFoo method like all other
      classes. In the static code we provide the implementation of the
      generic wrap method for every polimorphic base class, falling back
      to their wrapFoo method if the concrete object can't be used to
      wrap the object.
      Both WebKitDOMBinding and WebKitHTMLElementWrapperFactory now provide
      implementations of wrap and have been renamed to WebKitDOMPrivate
      and WebKitDOMHTMLPrivate.
      
      * bindings/gobject/GNUmakefile.am:
      * bindings/gobject/WebKitDOMBinding.cpp: Removed.
      * bindings/gobject/WebKitDOMEventTarget.cpp:
      (WebKit::kit): Moved kit implementation from WebKitDOMBinding for
      consistency with all other objects that have their own kit.
      (WebKit::core): Updated to match the core implementation fo all
      other objects.
      * bindings/gobject/WebKitDOMEventTargetPrivate.h:
      (WebCore):
      (WebKit):
      * bindings/gobject/WebKitDOMHTMLPrivate.cpp: Added.
      (WebKit): Use preprocessor macros to define and set the wrap
      functions of all HTML elements, removing a lot of boilerplate code
      and making it easier to add new wrap functions in the future.
      (WebKit::wrap):
      * bindings/gobject/WebKitDOMHTMLPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h.
      (WebCore):
      (WebKit):
      * bindings/gobject/WebKitDOMObject.cpp:
      * bindings/gobject/WebKitDOMPrivate.cpp: Added.
      (WebKit):
      (WebKit::wrap):
      * bindings/gobject/WebKitDOMPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitDOMBinding.h.
      (WebCore):
      (WebKit):
      * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Removed.
      * bindings/scripts/CodeGeneratorGObject.pm:
      (IsBaseType): Helper function to check if a type is a base class.
      (GetBaseClass): Helper function to get the base class for a given
      parent type.
      (GenerateFunction): Remove special case for EventTarget since the
      kit prototype of EventTarget is in its private header like all
      other objects.
      (GenerateCFile): Add a kit implementation for all objects.
      (IsPolymorphic): Helper function to check if the given type is the
      base class of a polymorphic object.
      (Generate): Include the private header of the base class for
      polymorphic objects.
      (WriteData): Remove the special case for WebKitDOMNode since now
      all objects has a kit method.
      * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
      (WebKit::kit):
      * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
      (WebKit::kit):
      * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
      (WebKit):
      * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
      * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h:
      (WebKit):
      
      Source/WebKit/gtk:
      
      Remove WebKitDOMBindindg.h include from several files because it's
      been renamed and it was not actually needed.
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      * WebCoreSupport/EditorClientGtk.cpp:
      * webkit/webkithittestresult.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0464259a
    • abecsi@webkit.org's avatar
      Fix the build with strict GCC 4.8 · a42ddd32
      abecsi@webkit.org authored
      Unreviewed build fix.
      
      Initialize dragImage to suppress GCC's warning about it being possibly used uninitialized,
      which results is a build failure with GCC 4.8 that sets -Werror=maybe-uninitialized.
      
      No new tests needed.
      
      * page/DragController.cpp:
      (WebCore::DragController::doImageDrag):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147922 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a42ddd32
    • zandobersek@gmail.com's avatar
      Remove the unused LayoutTestSupport class · d3dafbaf
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114170
      
      Reviewed by Alexey Proskuryakov.
      
      The LayoutTestSupport class is not used by any port anywhere in the code and should be removed.
      
      No new tests - no changes in functionality.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.vcproj/WebCore.vcproj:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.vcxproj/WebCore.vcxproj.filters:
      * WebCore.xcodeproj/project.pbxproj:
      * platform/LayoutTestSupport.cpp: Removed.
      * platform/LayoutTestSupport.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147921 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d3dafbaf
    • zandobersek@gmail.com's avatar
      Remove WebCore::(enable|disable)SecureTextInput methods · d8a93601
      zandobersek@gmail.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114126
      
      Reviewed by Alexey Proskuryakov.
      
      Remove the enableSecureTextInput and disableSecureTextInput methods and all the codepaths leading to them.
      These were used only by the Chromium port and are as such not required anymore.
      
      No new tests - no changes in functionality.
      
      * GNUmakefile.list.am:
      * WebCore.order:
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Document.cpp:
      (WebCore::Document::Document):
      * dom/Document.h:
      (Document):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::focusedOrActiveStateChanged):
      * editing/FrameSelection.h:
      (FrameSelection):
      * html/PasswordInputType.cpp:
      * html/PasswordInputType.h:
      (PasswordInputType):
      * page/Frame.cpp:
      (WebCore::Frame::setDocument):
      * platform/SecureTextInput.h: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147920 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d8a93601
    • jer.noble@apple.com's avatar
      Unreviewed build fix; r147892 moved an export definition out of · ed74b149
      jer.noble@apple.com authored
      a protective #ifdef, causing a link error on platforms which do
      not define that method.
      
      * WebCore.exp.in:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147919 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed74b149
    • commit-queue@webkit.org's avatar
      [Qt] Enable text tracks from track elements · bc3b5dd2
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113522
      
      Patch by Brendan Long <b.long@cablelabs.com> on 2013-04-08
      Reviewed by Jocelyn Turcotte.
      
      No new tests because they're already there. This just enables the feature.
      
      * Target.pri:
      * bindings/generic/RuntimeEnabledFeatures.cpp:
      (WebCore):
      * platform/qt/LocalizedStringsQt.cpp:
      (WebCore):
      (WebCore::textTrackSubtitlesText):
      (WebCore::textTrackOffText):
      (WebCore::textTrackNoLabelText):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc3b5dd2
    • sergio@webkit.org's avatar
      [GTK] Toggle OverWrite mode when pressing the Insert key · 7bce53cd
      sergio@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=113384
      
      Reviewed by Martin Robinson.
      
      Perform an OverWrite command as a response to the emission of the
      toggle-overwrite signal. Due to the nature of the command it will
      only do that when being on a richly editable web content.
      
      * platform/gtk/KeyBindingTranslator.cpp:
      (WebCore::toggleOverwriteCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bce53cd
    • commit-queue@webkit.org's avatar
      [BlackBerry] Provide more specific error description for SocketStreamError · 7686229f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114134
      
      Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-04-08
      Reviewed by Rob Buis.
      
      Pass the reason of a failure to SocketStreamError instance
      and notify it via SocketStreamHandleClient::didFailSocketStream().
      
      * platform/network/blackberry/SocketStreamError.h:
      (WebCore::SocketStreamError::SocketStreamError):
      * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
      (WebCore::SocketStreamHandle::notifyStatusReceived):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147915 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7686229f
    • commit-queue@webkit.org's avatar
      [GTK][EFL] HEAD requests changed to GET after 303 redirection · cde3c3f6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=110127
      
      Patch by Youenn Fablet <youennf@gmail.com> on 2013-04-08
      Reviewed by Martin Robinson.
      
      Source/WebCore:
      
      Made shouldRedirectAsGET always return false for HEAD requests.
      
      * platform/network/soup/ResourceHandleSoup.cpp:
      (WebCore::shouldRedirectAsGET):
      
      LayoutTests:
      
      Added tests checking HEAD redirection.
      Redirected HEAD requests are expected to remain HEAD requests.
      (http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21#section-7.4)
      
      * http/tests/xmlhttprequest/head-redirection-expected.txt: Added.
      * http/tests/xmlhttprequest/head-redirection.html: Added.
      * http/tests/xmlhttprequest/resources/get_method.php: Added.
      * http/tests/xmlhttprequest/resources/redirect_methods.php: Added.
      * platform/mac/http/tests/xmlhttprequest/head-redirection-expected.txt: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cde3c3f6
    • carlosgc@webkit.org's avatar
      DragImage should not depend on Frame and CachedImage · baf91e99
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=21357
      
      Reviewed by Sam Weinig.
      
      Remove Frame and CachedImage dependencies from DragImage.
      
      * dom/Clipboard.h:
      (WebCore): Add forward delcaration for CacheImage since it's not
      included anymore in DragImage.h.
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Use
      Frame::dragImageForSelection() and call
      dissolveDragImageToFraction() for the returned DragImage. Pass the
      font rendering mode to createDragImageForLink, instead of a Frame
      that is only used to get the font rendering mode.
      (WebCore::DragController::doImageDrag): Get the suggested filename
      for the cached image and pass it to
      createDragImageIconForCachedImageFilename().
      * platform/DragImage.cpp:
      (WebCore::createDragImageForLink): Receive a FontRenderingMode
      instead of a Frame.
      * platform/DragImage.h:
      (WebCore): Remove createDragImageForSelection, change
      createDragImageForLink to receive a FontRenderingMode instead of a
      frame, and rename createDragImageIconForCachedImage as
      createDragImageIconForCachedImageFilename since it nows received
      the suggested filename of the cached image.
      * platform/blackberry/DragImageBlackBerry.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Adapt to API
      changes.
      * platform/efl/DragImageEfl.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Ditto.
      * platform/gtk/DragImageGtk.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Ditto.
      * platform/mac/DragImageMac.mm:
      (WebCore::dissolveDragImageToFraction): Return early if the passed
      image is NULL.
      (WebCore::createDragImageIconForCachedImageFilename): Adapt to API
      changes.
      (WebCore::createDragImageForLink): Ditto.
      * platform/qt/DragImageQt.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Ditto.
      * platform/win/DragImageWin.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Ditto.
      (WebCore::createDragImageForLink): Ditto.
      * platform/wx/DragImageWx.cpp:
      (WebCore::createDragImageIconForCachedImageFilename): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      baf91e99
    • rakuco@webkit.org's avatar
      [EFL] REGRESSION(r147743): Use the correct `operator new' override in RenderThemeEfl. · c1671085
      rakuco@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114166
      
      Reviewed by Alexis Menard.
      
      r147743 disabled GLOBAL_FAST_MALLOC_NEW on the EFL port, but this has
      caused some pixel tests in WK1 to crash.
      
      The problem stems from RenderThemeEfl::applyEdjeRTLState() directly
      calling `operator new(size_t)' for some allocations.
      RefCounted<RenderTheme>, on its turn, has a WTF_MAKE_FAST_ALLOCATED
      call which adds some `operator new' overrides to the class. Our direct
      calls in applyEdjeRTLState() made the scope resolution rules choose the
      WTF_MAKE_FAST_ALLOCATED version (which uses FastMalloc's allocator),
      while WTF::deleteOwnedPtr() calls the global `operator delete' (which
      uses the system's free() implementation).
      
      * platform/efl/RenderThemeEfl.cpp:
      (WebCore::RenderThemeEfl::applyEdjeRTLState): Explicitly choose the
      global `operator new' when calling it.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c1671085
  3. 07 Apr, 2013 2 commits
    • benjamin@webkit.org's avatar
      Remove the android code from WebCore · 11e52cf9
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=114136
      
      Reviewed by Anders Carlsson.
      
      * WebCore.exp.in:
      * dom/ViewportArguments.cpp:
      (WebCore):
      (WebCore::setViewportFeature):
      (WebCore::viewportErrorMessageTemplate):
      (WebCore::viewportErrorMessageLevel):
      * dom/ViewportArguments.h:
      (WebCore::ViewportArguments::ViewportArguments):
      (ViewportArguments):
      (WebCore::ViewportArguments::operator==):
      * editing/EditingBehavior.h:
      (WebCore::EditingBehavior::shouldMoveCaretToHorizontalBoundaryWhenPastTopOrBottom):
      (WebCore::EditingBehavior::shouldAllowSpellingSuggestionsWithoutSelection):
      (WebCore::EditingBehavior::shouldNavigateBackOnBackspace):
      * editing/EditingBehaviorTypes.h:
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleGestureLongTap):
      (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
      * page/Settings.cpp:
      (WebCore):
      (WebCore::editingBehaviorTypeForPlatform):
      * platform/graphics/FontCache.h:
      (FontCache):
      * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
      (WebCore::FontPlatformData::getRenderStyleForStrike):
      * testing/InternalSettings.cpp:
      (WebCore::InternalSettings::setEditingBehavior):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147893 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      11e52cf9
    • oliver@apple.com's avatar
      Add bounds checking for WTF::Vector::operator[] · 4e3f9653
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=89600
      
      Reviewed by Filip Pizlo.
      
      Source/JavaScriptCore:
      
      Make a few JSC classes opt-out of release mode bounds checking.
      
      * assembler/AssemblerBuffer.h:
      (AssemblerBuffer):
      * assembler/AssemblerBufferWithConstantPool.h:
      (AssemblerBufferWithConstantPool):
      * bytecode/CodeBlock.cpp:
      (JSC::CodeBlock::CodeBlock):
      (JSC::CodeBlock::bytecodeOffset):
      (JSC):
      (JSC::replaceExistingEntries):
      * bytecode/CodeBlock.h:
      (JSC::CodeBlock::bytecodeOffsetForCallAtIndex):
      (JSC::CodeBlock::callReturnIndexVector):
      (JSC::CodeBlock::codeOrigins):
      (RareData):
      * bytecode/UnlinkedCodeBlock.h:
      (JSC::UnlinkedEvalCodeBlock::adoptVariables):
      (UnlinkedEvalCodeBlock):
      * bytecompiler/BytecodeGenerator.cpp:
      (JSC::BytecodeGenerator::BytecodeGenerator):
      (JSC::BytecodeGenerator::emitNewArray):
      (JSC::BytecodeGenerator::emitCall):
      (JSC::BytecodeGenerator::emitConstruct):
      * bytecompiler/BytecodeGenerator.h:
      (CallArguments):
      (JSC::BytecodeGenerator::instructions):
      (BytecodeGenerator):
      * bytecompiler/StaticPropertyAnalysis.h:
      (JSC::StaticPropertyAnalysis::create):
      (JSC::StaticPropertyAnalysis::StaticPropertyAnalysis):
      (StaticPropertyAnalysis):
      * bytecompiler/StaticPropertyAnalyzer.h:
      (StaticPropertyAnalyzer):
      (JSC::StaticPropertyAnalyzer::StaticPropertyAnalyzer):
      * dfg/DFGJITCompiler.cpp:
      (JSC::DFG::JITCompiler::link):
      * parser/ASTBuilder.h:
      (ASTBuilder):
      * runtime/ArgList.h:
      (MarkedArgumentBuffer):
      * runtime/ArrayPrototype.cpp:
      (JSC::arrayProtoFuncSort):
      
      Source/WebCore:
      
      Fix exports
      
      * WebCore.exp.in:
      
      Source/WTF:
      
      Add a template parameter to Vector<> that controls whether
      bounds checking is performed in release builds or not.
      Defaults to crashing on overflow.
      
      * wtf/Forward.h:
      (WTF):
      * wtf/Vector.h:
      (WTF):
      (Vector):
      (WTF::Vector::at):
      (WTF::Vector::removeLast):
      (WTF::::Vector):
      (WTF::=):
      (WTF::::contains):
      (WTF::::find):
      (WTF::::reverseFind):
      (WTF::::fill):
      (WTF::::appendRange):
      (WTF::::expandCapacity):
      (WTF::::tryExpandCapacity):
      (WTF::::resize):
      (WTF::::shrink):
      (WTF::::grow):
      (WTF::::reserveCapacity):
      (WTF::::tryReserveCapacity):
      (WTF::::reserveInitialCapacity):
      (WTF::::shrinkCapacity):
      (WTF::::append):
      (WTF::::tryAppend):
      (WTF::::appendSlowCase):
      (WTF::::uncheckedAppend):
      (WTF::::appendVector):
      (WTF::::insert):
      (WTF::::prepend):
      (WTF::::remove):
      (WTF::::reverse):
      (WTF::::releaseBuffer):
      (WTF::::checkConsistency):
      (WTF::deleteAllValues):
      (WTF::swap):
      (WTF::operator==):
      (WTF::operator!=):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147892 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e3f9653