1. 02 Aug, 2012 40 commits
    • scheib@chromium.org's avatar
      Remove old Pointer Lock API. · 03edde3b
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88892
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Removing the old Pointer Lock API as one of the final cleanup
      changes for the Update to Fullscreen style locking Spec meta
      bug https://bugs.webkit.org/show_bug.cgi?id=84402.
      
      This change primarily removes idl, access in navigator,
      one event, and supporting infrastructure in page/PointerLock.
      
      In PointerLockController changes were already noted clearly with
      TODOs differentiating old and new api sections.
      
      Test: pointer-lock/pointerlockchange-event-on-lock-lost.html
      
      * WebCore.gypi:
      * dom/Element.cpp:
      (WebCore::Element::webkitRequestPointerLock):
      * dom/EventNames.h:
      (WebCore):
      * page/Navigator.cpp:
      * page/Navigator.h:
      (WebCore):
      (Navigator):
      * page/Navigator.idl:
      * page/PointerLock.cpp: Removed.
      * page/PointerLock.h: Removed.
      * page/PointerLock.idl: Removed.
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      (WebCore::PointerLockController::didAcquirePointerLock):
      (WebCore::PointerLockController::didNotAcquirePointerLock):
      (WebCore::PointerLockController::didLosePointerLock):
      * page/PointerLockController.h:
      (PointerLockController):
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
          Removed #include to old API header.
      
      LayoutTests:
      
      Tests for old API removed, and most remaining tests required only small
      changes.
      
      * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
      * pointer-lock/lock-already-locked-expected.txt:
      * pointer-lock/lock-already-locked.html:
      * pointer-lock/lock-fail-responses-expected.txt: Removed.
      * pointer-lock/lock-fail-responses.html: Removed.
          This test only covered the old API. The related concept is tested
          for the new api in pointerlockchange-pointerlockerror-events.html.
      * pointer-lock/pointer-lock-api-expected.txt:
      * pointer-lock/pointer-lock-api.html:
      * pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt: Added.
      * pointer-lock/pointerlockchange-event-on-lock-lost.html: Added.
      * pointer-lock/pointerlocklost-event-expected.txt: Removed.
      * pointer-lock/pointerlocklost-event.html: Removed.
          pointerlocklost-event.html renamed to pointerlockchange-event-on-lock-lost.html.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03edde3b
    • dpranke@chromium.org's avatar
      test-webkitpy can fail on a clean checkout · 536b2c38
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93039
      
      Reviewed by Adam Barth.
      
      Now that we run tests in parallel that can cause the installer
      to try and install packages in parallel (even the same package),
      and that probably won't work. We fix this by autoinstalling
      everything up front (serially).
      
      * Scripts/webkitpy/test/main.py:
      (Tester._run_tests):
      * Scripts/webkitpy/thirdparty/__init__.py:
      (autoinstall_everything):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      536b2c38
    • rniwa@webkit.org's avatar
      scripts in formaction should be stripped upon paste · 2194851f
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92298
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      Strip formaction attribute values when the URL is of javascript protocol.
      
      Test: editing/pasteboard/paste-noscript-xhtml.html
            editing/pasteboard/paste-noscript.html
      
      * dom/Element.cpp:
      (WebCore::isAttributeToRemove): Explicitly compare with href and nohref instead of comparing
      the ends of strings since comparing two AtomicString is much faster.
      
      LayoutTests:
      
      Added formaction attributes to tests.
      
      * editing/pasteboard/paste-noscript-expected.txt:
      * editing/pasteboard/paste-noscript-xhtml-expected.txt:
      * editing/pasteboard/paste-noscript.html:
      * editing/pasteboard/resources/paste-noscript-content.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2194851f
    • commit-queue@webkit.org's avatar
      Built in quotes don't use lang attribute · bbef81f1
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92918
      
      Patch by Elliott Sprehn <esprehn@gmail.com> on 2012-08-02
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      Previously even though there was a table in RenderQuote of languages mapped
      to quotes we always used basic quotes. This patch removes the broken tree
      walking and uses Element::computeInheritedLanguage fixing this.
      
      Tests: fast/css-generated-content/quotes-lang-expected.html
             fast/css-generated-content/quotes-lang.html
             fast/css-generated-content/quotes-xml-lang-expected.html
             fast/css-generated-content/quotes-xml-lang.html
      
      * rendering/RenderQuote.cpp:
      (WebCore::RenderQuote::originalText):
      (WebCore::RenderQuote::quotesData): New method that determines the right QuotesData to use.
      (WebCore):
      * rendering/RenderQuote.h:
      (RenderQuote):
      
      LayoutTests:
      
      Add a test that the built in quote languages are used and that custom
      languages work as well. This also tests that xml:lang takes precedence
      over lang.
      
      * fast/css-generated-content/quotes-lang-expected.html: Added.
      * fast/css-generated-content/quotes-lang.html: Added.
      * fast/css-generated-content/quotes-xml-lang-expected.html: Added.
      * fast/css-generated-content/quotes-xml-lang.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bbef81f1
    • abarth@webkit.org's avatar
      Add back a header I mistakenly removed in my previous commit. · 6898daec
      abarth@webkit.org authored
      * WebCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6898daec
    • enne@google.com's avatar
      [chromium] Remove dependency on Scrollbar.h from ScrollbarLayerChromium · 58111b24
      enne@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93024
      
      Reviewed by James Robinson.
      
      Change part enum from the Scrollbar version to WebScrollbar's.
      
      Tested by composited layout tests.
      
      * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
      (WebCore::ScrollbarBackgroundPainter::create):
      (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
      (ScrollbarBackgroundPainter):
      (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      58111b24
    • abarth@webkit.org's avatar
      BindingSecurityBase serves no purpose and should be removed · 61f87e1c
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93025
      
      Reviewed by Eric Seidel.
      
      Now that we don't use templates in the generic bindings, we can merge
      BindingSecurity and BindingSecurityBase. This patch also removes some
      functions that are no longer used (and reduces the number of
      #includes).
      
      No behavior change.
      
      * GNUmakefile.list.am:
      * WebCore.gypi:
      * bindings/generic/BindingSecurity.h:
      (WebCore):
      (BindingSecurity):
      * bindings/generic/BindingSecurityBase.cpp: Removed.
      * bindings/generic/BindingSecurityBase.h: Removed.
      * bindings/v8/V8Binding.h:
      * bindings/v8/V8Utilities.cpp:
      * bindings/v8/custom/V8MutationObserverCustom.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124515 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      61f87e1c
    • rniwa@webkit.org's avatar
      Let XCode have its own away and also sort the files. · 763eff3b
      rniwa@webkit.org authored
      * WebCore.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      763eff3b
    • commit-queue@webkit.org's avatar
      [chromium] Add CCScrollbarAnimationController class for compositor scrollbar animation · 98dfd12a
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91688
      
      Patch by Tien-Ren Chen <trchen@chromium.org> on 2012-08-02
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Add CCScrollbarAnimationController that serves as the middle man
      between the scrolling layer and scrollbar layer. Now all scroll offset
      information are pushed through the controller, and individual platform
      can provide specialized controller for extra processing.
      
      A basic fadeout controller for Android scrollbar is included.
      
      New test: ScrollbarLayerChromiumTest.scrollOffsetSynchronization
                CCScrollbarAnimationControllerLinearFade.*
      
      * WebCore.gypi:
      * page/FrameView.cpp:
      (WebCore::FrameView::calculateScrollbarModesForLayout):
      * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
      (WebCore::createScrollbarLayer):
      * platform/graphics/chromium/TreeSynchronizer.cpp:
      (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
      (WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
      * platform/graphics/chromium/cc/CCLayerImpl.cpp:
      (WebCore::CCLayerImpl::scrollBy):
      (WebCore::CCLayerImpl::setMaxScrollPosition):
      (WebCore):
      (WebCore::CCLayerImpl::horizontalScrollbarLayer):
      (WebCore::CCLayerImpl::setHorizontalScrollbarLayer):
      (WebCore::CCLayerImpl::verticalScrollbarLayer):
      (WebCore::CCLayerImpl::setVerticalScrollbarLayer):
      * platform/graphics/chromium/cc/CCLayerImpl.h:
      (WebCore):
      (CCLayerImpl):
      (WebCore::CCLayerImpl::scrollbarAnimationController):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
      (WebCore::CCLayerTreeHostImpl::animate):
      (WebCore::CCLayerTreeHostImpl::pinchGestureBegin):
      (WebCore::CCLayerTreeHostImpl::pinchGestureUpdate):
      (WebCore::CCLayerTreeHostImpl::pinchGestureEnd):
      (WebCore::CCLayerTreeHostImpl::animateScrollbars):
      (WebCore):
      (WebCore::CCLayerTreeHostImpl::animateScrollbarsRecursive):
      * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
      (CCLayerTreeHostImpl):
      * platform/graphics/chromium/cc/CCScrollbarAnimationController.cpp: Added.
      (WebCore):
      (WebCore::CCScrollbarAnimationController::create):
      (WebCore::CCScrollbarAnimationController::CCScrollbarAnimationController):
      (WebCore::CCScrollbarAnimationController::~CCScrollbarAnimationController):
      (WebCore::CCScrollbarAnimationController::getScrollLayerBounds):
      (WebCore::CCScrollbarAnimationController::updateScrollOffset):
      * platform/graphics/chromium/cc/CCScrollbarAnimationController.h: Added.
      (WebCore):
      (CCScrollbarAnimationController):
      (WebCore::CCScrollbarAnimationController::animate):
      (WebCore::CCScrollbarAnimationController::didPinchGestureBegin):
      (WebCore::CCScrollbarAnimationController::didPinchGestureUpdate):
      (WebCore::CCScrollbarAnimationController::didPinchGestureEnd):
      (WebCore::CCScrollbarAnimationController::setHorizontalScrollbarLayer):
      (WebCore::CCScrollbarAnimationController::horizontalScrollbarLayer):
      (WebCore::CCScrollbarAnimationController::setVerticalScrollbarLayer):
      (WebCore::CCScrollbarAnimationController::verticalScrollbarLayer):
      * platform/graphics/chromium/cc/CCScrollbarAnimationControllerAndroid.cpp: Added.
      (WebCore):
      (WebCore::CCScrollbarAnimationController::create):
      (WebCore::CCScrollbarAnimationControllerAndroid::CCScrollbarAnimationControllerAndroid):
      (WebCore::CCScrollbarAnimationControllerAndroid::~CCScrollbarAnimationControllerAndroid):
      (WebCore::CCScrollbarAnimationControllerAndroid::animate):
      (WebCore::CCScrollbarAnimationControllerAndroid::didPinchGestureUpdate):
      (WebCore::CCScrollbarAnimationControllerAndroid::didPinchGestureEnd):
      (WebCore::CCScrollbarAnimationControllerAndroid::updateScrollOffset):
      (WebCore::CCScrollbarAnimationControllerAndroid::opacityAtTime):
      * platform/graphics/chromium/cc/CCScrollbarAnimationControllerAndroid.h: Added.
      (WebCore):
      (CCScrollbarAnimationControllerAndroid):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
      (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
      (WebCore):
      (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
      (WebCore::CCScrollbarLayerImpl::CCScrollbar::currentPos):
      (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
      (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
      (WebCore::CCScrollbarLayerImpl::orientation):
      (WebCore::CCScrollbarLayerImpl::setCurrentPos):
      (WebCore::CCScrollbarLayerImpl::setTotalSize):
      (WebCore::CCScrollbarLayerImpl::setMaximum):
      (CCScrollbarLayerImpl):
      
      Source/WebKit/chromium:
      
      New unit test ScrollbarLayerChromiumTest.scrollOffsetSynchronization to verify
      scroll offset is updated during tree synchronization and threaded scrolling.
      Another new unit test CCScrollbarAnimationControllerLinearFadeTest to verify
      opacity animates as intended.
      
      * tests/ScrollbarLayerChromiumTest.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124513 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      98dfd12a
    • dbarton@mathscribe.com's avatar
      MathML: nested square root symbols have varying descenders · 48f1c2a6
      dbarton@mathscribe.com authored
      https://bugs.webkit.org/show_bug.cgi?id=43819
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      This bug stems from the use of offsetHeight() on a renderer that's possibly a
      RenderInline, in getBoxModelObjectHeight() in RenderMathMLBlock.h.
      RenderInline::offsetHeight() actually returns linesBoundingBox().height(), which can be
      overly large, especially for the big STIX fonts that include a few mathematical symbols
      with unusually tall ascenders or descenders. A better solution for MathML in general is
      the CSS properties { -webkit-line-box-contain: glyphs replaced; line-height: 0; }. This
      gives tight glyph-based formatting in radical expressions, subscripts, superscripts,
      underscripts, overscripts, numerators, denominators, etc. To make this work, inline
      elements such as <mn> and <mi> must be wrapped inside implicit <mrow>s or just
      RenderMathMLBlocks, when a tight height is desired. We also replace
      getBoxModelObjectWidth(), which uses offsetWidth(), with contentLogicalWidth(). Finally,
      we enable the STIXGeneral font for use inside layout tests.
      
      Tested by existing LayoutTests/mathml/presentation/ files including roots.xhtml.
      
      * css/mathml.css:
      (math):
      (mtext):
      (mroot > * + *):
      (mtd):
      * rendering/mathml/RenderMathMLBlock.cpp:
      (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
      (WebCore::RenderMathMLBlock::baselinePosition):
      * rendering/mathml/RenderMathMLBlock.h:
      * rendering/mathml/RenderMathMLFraction.cpp:
      (WebCore::RenderMathMLFraction::baselinePosition):
      * rendering/mathml/RenderMathMLOperator.cpp:
      (WebCore::RenderMathMLOperator::createStackableStyle):
      (WebCore::RenderMathMLOperator::baselinePosition):
      * rendering/mathml/RenderMathMLRoot.cpp:
      (WebCore::RenderMathMLRoot::addChild):
      (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
      (WebCore::RenderMathMLRoot::paint):
      * rendering/mathml/RenderMathMLRoot.h:
      * rendering/mathml/RenderMathMLSquareRoot.cpp:
      * rendering/mathml/RenderMathMLSquareRoot.h:
      * rendering/mathml/RenderMathMLSubSup.cpp:
      (WebCore::RenderMathMLSubSup::layout):
      * rendering/mathml/RenderMathMLUnderOver.cpp:
      (WebCore::RenderMathMLUnderOver::baselinePosition):
      * rendering/mathml/RenderMathMLUnderOver.h:
      
      Tools: 
      
      Allow the STIXGeneral font to be used during layout tests, especially for MathML.
      
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (allowedFontFamilySet):
      * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
      (WTR::allowedFontFamilySet):
      
      LayoutTests: 
      
      These tests are rebaselined to use the STIXGeneral font, and tight glyph-based MathML
      layout using the CSS properties
      { -webkit-line-box-contain: glyphs replaced; line-height: 0; }.
      
      * mathml/presentation/style.xhtml:
      * platform/mac/mathml/presentation/attributes-expected.png:
      * platform/mac/mathml/presentation/attributes-expected.txt:
      * platform/mac/mathml/presentation/fenced-expected.png:
      * platform/mac/mathml/presentation/fenced-expected.txt:
      * platform/mac/mathml/presentation/fenced-mi-expected.png:
      * platform/mac/mathml/presentation/fenced-mi-expected.txt:
      * platform/mac/mathml/presentation/fractions-expected.png:
      * platform/mac/mathml/presentation/fractions-expected.txt:
      * platform/mac/mathml/presentation/fractions-vertical-alignment-expected.png:
      * platform/mac/mathml/presentation/fractions-vertical-alignment-expected.txt:
      * platform/mac/mathml/presentation/mo-expected.png:
      * platform/mac/mathml/presentation/mo-expected.txt:
      * platform/mac/mathml/presentation/mo-stretch-expected.png:
      * platform/mac/mathml/presentation/mo-stretch-expected.txt:
      * platform/mac/mathml/presentation/mroot-pref-width-expected.png:
      * platform/mac/mathml/presentation/mroot-pref-width-expected.txt:
      * platform/mac/mathml/presentation/over-expected.png:
      * platform/mac/mathml/presentation/over-expected.txt:
      * platform/mac/mathml/presentation/roots-expected.png:
      * platform/mac/mathml/presentation/roots-expected.txt:
      * platform/mac/mathml/presentation/row-alignment-expected.png:
      * platform/mac/mathml/presentation/row-alignment-expected.txt:
      * platform/mac/mathml/presentation/row-expected.png:
      * platform/mac/mathml/presentation/row-expected.txt:
      * platform/mac/mathml/presentation/style-expected.png:
      * platform/mac/mathml/presentation/style-expected.txt:
      * platform/mac/mathml/presentation/sub-expected.png:
      * platform/mac/mathml/presentation/sub-expected.txt:
      * platform/mac/mathml/presentation/subsup-expected.png:
      * platform/mac/mathml/presentation/subsup-expected.txt:
      * platform/mac/mathml/presentation/sup-expected.png:
      * platform/mac/mathml/presentation/sup-expected.txt:
      * platform/mac/mathml/presentation/tables-expected.png:
      * platform/mac/mathml/presentation/tables-expected.txt:
      * platform/mac/mathml/presentation/tokenElements-expected.png:
      * platform/mac/mathml/presentation/tokenElements-expected.txt:
      * platform/mac/mathml/presentation/under-expected.png:
      * platform/mac/mathml/presentation/under-expected.txt:
      * platform/mac/mathml/presentation/underover-expected.png:
      * platform/mac/mathml/presentation/underover-expected.txt:
      * platform/mac/mathml/xHeight-expected.png:
      * platform/mac/mathml/xHeight-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      48f1c2a6
    • enne@google.com's avatar
      [chromium] Make CCScrollbarLayerImpl handle lost contexts properly · 38c2c470
      enne@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93021
      
      Reviewed by James Robinson.
      
      Source/WebCore:
      
      The resource ids that CCScrollbarLayerImpl holds onto need to be
      discarded during a lost context as the resource provider they came
      from is also destroyed.
      
      Make a scrollbarGeometry function that wraps all uses of the
      m_geometry member to make it possible to test CCScrollbarLayerImpl
      without depending on WebCore.
      
      Test: CCLayerTreeHostImplTest.dontUseOldResourcesAfterLostContext
      
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
      (WebCore::CCScrollbarLayerImpl::scrollbarGeometry):
      (WebCore):
      (WebCore::CCScrollbarLayerImpl::appendQuads):
      (WebCore::CCScrollbarLayerImpl::didLoseContext):
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
      (CCScrollbarLayerImpl):
      
      Source/WebKit/chromium:
      
      Add CCScrollbarLayerImpl to the dontUseOldResourceAfterLostContext
      test. Additionally, modify this test so that stale resource ids
      properly point at invalid texture ids so that the test actually tests
      what it is supposed to be testing.
      
      * tests/CCLayerTreeHostImplTest.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38c2c470
    • oliver@apple.com's avatar
      A few objects aren't being safely protected from GC in all cases · 43cda12c
      oliver@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93031
      
      Reviewed by Filip Pizlo.
      
      I haven't seen evidence that anyone is hitting bugs due to this, but any
      GC error can lead to later -- hard to diagnose -- bugs if they result in
      resurrecting dead objects.
      
      * bindings/js/JSCustomXPathNSResolver.cpp:
      (WebCore::JSCustomXPathNSResolver::create):
      (WebCore::JSCustomXPathNSResolver::JSCustomXPathNSResolver):
      (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
      * bindings/js/JSCustomXPathNSResolver.h:
      (JSCustomXPathNSResolver):
      * bindings/js/JSDictionary.cpp:
      (WebCore::JSDictionary::tryGetProperty):
      * bindings/js/JSDictionary.h:
      (WebCore::JSDictionary::JSDictionary):
      (WebCore::JSDictionary::initializerObject):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124510 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      43cda12c
    • eae@chromium.org's avatar
      Range::isPointInRange incorrectly throws WRONG_DOCUMENT_ERR · 1de3c0ad
      eae@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93009
      
      Reviewed by Ojan Vafai.
      
      Source/WebCore: 
      
      The latest working draft of the DOM4 spec has all but killed the
      WRONG_DOCUMENT_ERR exception. Update isPointInRange to return false
      instead of throwing an exception when the range and point are in
      different documents. This matches the Mozilla behavior.
      
      Test: fast/html/range-point-in-range-for-different-documents.html
      
      * dom/Range.cpp:
      (WebCore::Range::isPointInRange):
      Return false instead of throwing WRONG_DOCUMENT_ERR when the point is in
      a different document.
      
      LayoutTests: 
      
      Add test for Range::isPointInRange where the point is in a different
      document than the range.
      
      * fast/dom/move-nodes-across-documents.html: Change expectations for isPointInRange
      * fast/html/range-point-in-range-for-different-documents-expected.txt: Added.
      * fast/html/range-point-in-range-for-different-documents.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1de3c0ad
    • dpranke@chromium.org's avatar
      test-webkitpy: some tests need to run by themselves · 9fd49fad
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92926
      
      Reviewed by Ojan Vafai.
      
      Due to timing issues some of the executive tests will collide
      and fail if they're run concurrently. This patch adds support
      for writing tests that will be executed one at a time
      (serially); to get them, add "serial_" to the front of the test
      method name.
      
      * Scripts/webkitpy/common/system/executive_unittest.py:
      (ExecutiveTest.serial_test_kill_process):
      (ExecutiveTest.serial_test_kill_all):
      (ExecutiveTest.serial_test_check_running_pid):
      (ExecutiveTest.serial_test_running_pids):
      (ExecutiveTest.serial_test_run_in_parallel):
      * Scripts/webkitpy/test/main.py:
      (Tester._run_tests):
      (Tester._test_names):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9fd49fad
    • dpranke@chromium.org's avatar
      test-webkitpy: integrate proper support for integration tests · ca8cf541
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92925
      
      Reviewed by Ojan Vafai.
      
      This patch merges the custom loader I used for integration tests
      into the main test-webkitpy code. Integration tests are not run
      by default yet, but at least they can be run.
      
      * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
      (MockTestShellTest.test_test_shell_parse_options):
      * Scripts/webkitpy/layout_tests/port/port_testcase.py:
      (test_path_to_apache_config_file):
      * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
      (WebsocketserverTest):
      * Scripts/webkitpy/test/main.py:
      (Tester._parse_args):
      (Tester._run_tests):
      (Tester._test_names):
      (Tester._log_exception):
      (_Loader):
      (_Loader.getTestCaseNames):
      (_Loader.getTestCaseNames.isTestMethod):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ca8cf541
    • dpranke@chromium.org's avatar
      test-webkitpy: clean up runner in preparation for running tests serially as necessary · a494ea39
      dpranke@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92922
      
      Reviewed by Ojan Vafai.
      
      In order to run some tests by themselves (serially, rather than
      in parallel with other tests), we will need to be able to run
      multiple test suites; this causes us to move loading the logic
      for finding test method names out of the runner and into main.
      
      I'm taking advantage of this to simplify some other stuff from
      the runner as well; it is now very simple and doesn't expose its
      dependency on unittest.TestResult at all (nor will the Printer
      use TestResult).
      
      Subsequent patches will move the custom loader from
      port_testcase so that we can properly choose whether to run
      integration tests and/or serial tests, and then update the
      appropriate tests to run only serially.
      
      * Scripts/webkitpy/test/main.py:
      (Tester._run_tests):
      (Tester):
      (Tester._check_imports):
      (Tester._test_names):
      (Tester._all_test_names):
      * Scripts/webkitpy/test/printer.py:
      (Printer.__init__):
      (Printer.write_update):
      (Printer):
      (Printer.print_finished_test):
      (Printer.print_result):
      * Scripts/webkitpy/test/runner.py:
      (unit_test_name):
      (Runner.__init__):
      (Runner.run):
      (Runner.handle):
      (_Worker.handle):
      * Scripts/webkitpy/test/runner_unittest.py:
      (FakeLoader.loadTestsFromName):
      (RunnerTest.test_run):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a494ea39
    • arv@chromium.org's avatar
      DOM4: className should be defined on Element and not on HTMLElement · 5ffe9aaf
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93014
      
      Reviewed by Adam Barth.
      
      DOM4 specs that Element should have the className WebIDL attribute. This moves the
      attribute to the correct IDL file.
      
      Source/WebCore:
      
      Test: fast/dom/Element/class-name.html
      
      * dom/Element.idl:
      * html/HTMLElement.idl:
      
      LayoutTests:
      
      * fast/dom/Element/class-name-expected.txt: Added.
      * fast/dom/Element/class-name.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ffe9aaf
    • arv@chromium.org's avatar
      [V8] Handle case where Error.prototype returns an empty object · a5984528
      arv@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=91792
      
      Reviewed by Kentaro Hara.
      
      In some edge cases we get an empty object back from Error.prototype.
      
      No new tests. I cannot reproduce this.
      
      * bindings/v8/V8BindingPerContextData.cpp:
      (WebCore::V8BindingPerContextData::constructorForTypeSlowCase):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5984528
    • fpizlo@apple.com's avatar
      Unreviewed, build fix for DFG_ENABLE(DEBUG_PROPAGATION_VERBOSE). · 3088f18d
      fpizlo@apple.com authored
      * dfg/DFGStructureCheckHoistingPhase.cpp:
      (JSC::DFG::StructureCheckHoistingPhase::run):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3088f18d
    • eric@webkit.org's avatar
      Add back ASSERT(!needsLayout) to RenderTableSection which is now valid · 5d226dca
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92954
      
      Unreviewed, follow-up per Mitz's request.
      
      
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::paint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5d226dca
    • jamesr@google.com's avatar
      [chromium] Remove unused includes from compositor code · 9c1c7d6f
      jamesr@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92930
      
      Reviewed by Adrienne Walker.
      
      * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
      * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
      * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c1c7d6f
    • abarth@webkit.org's avatar
      Turn on tests for the mac-ews, for realz this time. · 8c41f1eb
      abarth@webkit.org authored
      * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
      (MacEWS):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c41f1eb
    • abarth@webkit.org's avatar
      The generic bindings shouldn't use templates · ad8dc057
      abarth@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93016
      
      Reviewed by Eric Seidel.
      
      Source/WebCore: 
      
      We originally created the generic bindings to share code between the
      JavaScriptCore and V8 bindings. However, the code came out sort of ugly
      because we used templates (with the idea that templates would let us
      use more than one scripting engine).
      
      This patch rips out the templates in an attempt to make the code
      prettier and therefore easier to use in both V8 and JSC. I've tried to
      keep this patch small by remaning things mostly in place. In the next
      patch, I'll move a bunch of code out of headers and into cpp files.
      
      No behavior change.
      
      * GNUmakefile.am:
      * UseV8.cmake:
      * WebCore.gyp/WebCore.gyp:
      * WebCore.gypi:
      * WebCore.pri:
      * bindings/generic/BindingSecurity.h:
      (WebCore):
      (BindingSecurity):
      (WebCore::BindingSecurity::canAccessWindow):
      (WebCore::BindingSecurity::canAccessFrame):
      (WebCore::BindingSecurity::shouldAllowAccessToNode):
      (WebCore::BindingSecurity::allowPopUp):
      (WebCore::BindingSecurity::allowSettingFrameSrcToJavascriptUrl):
      (WebCore::BindingSecurity::allowSettingSrcToJavascriptURL):
      * bindings/generic/GenericBinding.h:
      (WebCore::completeURL):
      * bindings/scripts/CodeGeneratorV8.pm:
      (GenerateDomainSafeFunctionGetter):
      (GenerateNormalAttrGetter):
      (GenerateReplaceableAttrSetter):
      (GenerateFunctionCallback):
      (GenerateImplementation):
      * bindings/scripts/test/V8/V8Float64Array.cpp:
      * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
      (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
      (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
      * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
      * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
      * bindings/scripts/test/V8/V8TestEventTarget.cpp:
      * bindings/scripts/test/V8/V8TestException.cpp:
      * bindings/scripts/test/V8/V8TestInterface.cpp:
      * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
      * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
      * bindings/scripts/test/V8/V8TestNode.cpp:
      * bindings/scripts/test/V8/V8TestObj.cpp:
      (WebCore::TestObjV8Internal::contentDocumentAttrGetter):
      (WebCore::TestObjV8Internal::getSVGDocumentCallback):
      * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
      * bindings/v8/BindingState.cpp: Renamed from Source/WebCore/bindings/v8/specialization/V8BindingState.cpp.
      (WebCore):
      (WebCore::BindingState::instance):
      (WebCore::activeWindow):
      (WebCore::firstWindow):
      (WebCore::activeFrame):
      (WebCore::firstFrame):
      (WebCore::immediatelyReportUnsafeAccessTo):
      * bindings/v8/BindingState.h: Renamed from Source/WebCore/bindings/v8/specialization/V8BindingState.h.
      (WebCore):
      (BindingState):
      * bindings/v8/ScriptController.cpp:
      (WebCore::ScriptController::canAccessFromCurrentOrigin):
      * bindings/v8/V8Binding.h:
      (WebCore):
      * bindings/v8/V8DOMWindowShell.cpp:
      * bindings/v8/V8Proxy.cpp:
      * bindings/v8/V8Utilities.cpp:
      (WebCore::callingOrEnteredFrame):
      (WebCore::completeURL):
      * bindings/v8/custom/V8DOMWindowCustom.cpp:
      (WebCore::WindowSetTimeoutImpl):
      (WebCore::V8DOMWindow::eventAccessorGetter):
      (WebCore::V8DOMWindow::eventAccessorSetter):
      (WebCore::V8DOMWindow::locationAccessorSetter):
      (WebCore::V8DOMWindow::openerAccessorSetter):
      (WebCore::V8DOMWindow::addEventListenerCallback):
      (WebCore::V8DOMWindow::removeEventListenerCallback):
      (WebCore::V8DOMWindow::showModalDialogCallback):
      (WebCore::V8DOMWindow::openCallback):
      (WebCore::V8DOMWindow::namedSecurityCheck):
      (WebCore::V8DOMWindow::indexedSecurityCheck):
      * bindings/v8/custom/V8DocumentLocationCustom.cpp:
      (WebCore::V8Document::locationAccessorSetter):
      * bindings/v8/custom/V8EntryCustom.cpp:
      * bindings/v8/custom/V8EntrySyncCustom.cpp:
      * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
      (WebCore::V8HTMLFrameElement::locationAccessorSetter):
      * bindings/v8/custom/V8HistoryCustom.cpp:
      (WebCore::V8History::indexedSecurityCheck):
      (WebCore::V8History::namedSecurityCheck):
      * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
      * bindings/v8/custom/V8InjectedScriptManager.cpp:
      (WebCore::InjectedScriptManager::canAccessInspectedWindow):
      * bindings/v8/custom/V8LocationCustom.cpp:
      (WebCore::V8Location::hashAccessorSetter):
      (WebCore::V8Location::hostAccessorSetter):
      (WebCore::V8Location::hostnameAccessorSetter):
      (WebCore::V8Location::hrefAccessorSetter):
      (WebCore::V8Location::pathnameAccessorSetter):
      (WebCore::V8Location::portAccessorSetter):
      (WebCore::V8Location::protocolAccessorSetter):
      (WebCore::V8Location::searchAccessorSetter):
      (WebCore::V8Location::reloadAccessorGetter):
      (WebCore::V8Location::replaceAccessorGetter):
      (WebCore::V8Location::assignAccessorGetter):
      (WebCore::V8Location::reloadCallback):
      (WebCore::V8Location::replaceCallback):
      (WebCore::V8Location::assignCallback):
      (WebCore::V8Location::toStringCallback):
      (WebCore::V8Location::indexedSecurityCheck):
      (WebCore::V8Location::namedSecurityCheck):
      * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
      * bindings/v8/custom/V8NodeCustom.cpp:
      
      Source/WebKit/chromium: 
      
      Update #include.
      
      * src/WebBindings.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad8dc057
    • inferno@chromium.org's avatar
      No isChildAllowed checked when adding RenderFullScreen as the child.. · ad473f5c
      inferno@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92995
      
      Reviewed by Eric Seidel.
      
      Source/WebCore:
      
      Test: fullscreen/fullscreen-child-not-allowed-crash.html
      
      * dom/Document.cpp:
      (WebCore::Document::webkitWillEnterFullScreenForElement): pass the object's parent
      pointer as an additional argument.
      * dom/NodeRenderingContext.cpp:
      (WebCore::NodeRendererFactory::createRendererIfNeeded): pass the to be parent |parentRenderer|
      as the argument.
      * rendering/RenderFullScreen.cpp:
      (RenderFullScreen::wrapRenderer): make sure that parent allows RenderFullScreen as the child.
      * rendering/RenderFullScreen.h:
      (RenderFullScreen): support the object's parent
      pointer as an additional argument.
      
      LayoutTests:
      
      * fullscreen/fullscreen-child-not-allowed-crash-expected.txt: Added.
      * fullscreen/fullscreen-child-not-allowed-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ad473f5c
    • jamesr@google.com's avatar
      [chromium] Wrap shared context getters in WebKit API and avoid... · 13ca51d9
      jamesr@google.com authored
      [chromium] Wrap shared context getters in WebKit API and avoid WebCore::GraphicsContext3D use in compositor internals
      https://bugs.webkit.org/show_bug.cgi?id=92917
      
      Reviewed by Adrienne Walker.
      
      Source/Platform:
      
      This adds Platform API for creating and accessing shared GraphicsContext3D and Ganesh contexts from the main or
      compositor threads. These can be used for evaluating filters or doing accelerated painting. These contexts are
      generally leaked until lost or process exit, the details are documented in WebSharedGraphicsContext3D.h
      
      * Platform.gypi:
      * chromium/public/WebSharedGraphicsContext3D.h: Added.
      (WebKit):
      (WebSharedGraphicsContext3D):
      
      Source/WebCore:
      
      This uses Platform API wrappers to access the shared WebGraphicsContext3D / Ganesh contexts from the compositor
      to evaluate accelerated filters or do accelerated painting.
      
      Filters changes covered by css3/filters/*-hw.html layout tests.
      
      * WebCore.gypi:
      * platform/chromium/support/WebSharedGraphicsContext3D.cpp:
      (WebKit):
      (WebKit::WebSharedGraphicsContext3D::mainThreadContext):
      (WebKit::WebSharedGraphicsContext3D::mainThreadGrContext):
      (WebKit::WebSharedGraphicsContext3D::compositorThreadContext):
      (WebKit::WebSharedGraphicsContext3D::compositorThreadGrContext):
      (WebKit::WebSharedGraphicsContext3D::haveCompositorThreadContext):
      (WebKit::WebSharedGraphicsContext3D::createCompositorThreadContext):
      * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
      (WebCore::createAcceleratedCanvas):
      (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::updateRect):
      (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
      * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
      (WebKit):
      (FrameBufferSkPictureCanvasLayerTextureUpdater):
      * platform/graphics/chromium/LayerRendererChromium.cpp:
      (WebCore::applyFilters):
      * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
      (WebCore::CCRenderSurfaceFilters::apply):
      * platform/graphics/chromium/cc/CCRenderSurfaceFilters.h:
      (WebKit):
      (CCRenderSurfaceFilters):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13ca51d9
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=93020 · a459af84
      bdakin@apple.com authored
      REGRESSION (tiled scrolling): Full-screen video is broken if page is 
      scrolled
      -and corresponding-
      <rdar://problem/11629778>
      
      Reviewed by Anders Carlsson.
      
      The bug here is that ScrollingTreeNodeMac::setScrollLayerPosition() 
      uses the CALayer (PlatformLayer) directly to set the position. That 
      means that the GraphicsLayer that owns that PlatformLayer does not 
      have updated position information. That results in this bug when we 
      switch from fast scrolling to main thread scrolling, because at that 
      point, the GraphicsLayer needs to have the correct information. So 
      make sure to update the main thread scroll position and layer 
      position before transitioning to main thread scrolling.
      * page/scrolling/ScrollingCoordinator.cpp:
      (WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a459af84
    • commit-queue@webkit.org's avatar
      Unreviewed debug build fix (bug 92889) · 51814d7b
      commit-queue@webkit.org authored
      Patch by Antonio Gomes <agomes@rim.com> on 2012-08-02
      
      * WebKitSupport/InRegionScroller.cpp:
      (BlackBerry::WebKit::pushBackInRegionScrollable):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      51814d7b
    • commit-queue@webkit.org's avatar
      [BlackBerry] Rounding error of destination rect of checkerboard · 1f3984c6
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93012
      
      Patch by Leo Yang <leoyang@rim.com> on 2012-08-02
      Reviewed by Rob Buis.
      
      Reviewed internally by Jakob Petsovits.
      
      Intersect with the destination rectangle to eliminate the rounding error.
      
      * Api/BackingStore.cpp:
      (BlackBerry::WebKit::BackingStorePrivate::blitContents):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1f3984c6
    • commit-queue@webkit.org's avatar
      Web Inspector: Rename 'User agent' to 'Overrides' in settings screen · 6ffd7a17
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92990
      
      Patch by Addy Osmani <addyo@chromium.org> on 2012-08-02
      Reviewed by Pavel Feldman.
      
      Simple setting rename of User agent -> Overrides
      
      * English.lproj/localizedStrings.js:
      * inspector/front-end/SettingsScreen.js:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ffd7a17
    • pdr@google.com's avatar
      Do not dispatch modification events in SVG attribute synchronization · 5dcae74d
      pdr@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92604
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Previously, calling hasAttribute() during layout could hit a
      layout-during-layout bug because calling hasAttribute() could dispatch a
      subtree modification event which could synchronously force a layout. hasAttribute()
      exhibits this behavior because property synchronization is done lazily.
      
      This patch skips dispatching subtree modification events during attribute
      synchronization.
      
      Additionally, this patch contains a refactoring of lazy attribute setting. We
      now have a single place where lazy attributes are set (setSynchronizedLazyAttribute)
      and lazy attribute flags have been moved to just Element and ElementAttributeData.
      
      Test: svg/custom/path-domsubtreemodified-crash.html
      
      * dom/Element.cpp:
      (WebCore::Element::setAttribute):
      (WebCore::Element::setSynchronizedLazyAttribute):
      (WebCore):
      (WebCore::Element::setAttributeInternal):
      * dom/Element.h:
      (Element):
      * dom/ElementAttributeData.cpp:
      (WebCore::ElementAttributeData::addAttribute):
      (WebCore::ElementAttributeData::removeAttribute):
      * dom/ElementAttributeData.h:
      (ElementAttributeData):
      * dom/StyledElement.cpp:
      (WebCore::StyledElement::updateStyleAttribute):
      * svg/properties/SVGAnimatedPropertyMacros.h:
      (WebCore::SVGSynchronizableAnimatedProperty::synchronize):
      
      LayoutTests:
      
      * svg/custom/path-domsubtreemodified-crash-expected.txt: Added.
      * svg/custom/path-domsubtreemodified-crash.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5dcae74d
    • kpiascik@rim.com's avatar
      Web Inspector: Override the DeviceOrientation · a0e9cc5e
      kpiascik@rim.com authored
      https://bugs.webkit.org/show_bug.cgi?id=91008
      
      Reviewed by Pavel Feldman.
      
      Source/WebCore:
      
      Re-added the m_page member variable to DeviceOrientationController and
      added InspectorInstrumentation to see if the DeviceOrientationData
      should be overridden or not.
      
      Added UI to the web inspector front-end to allow users to override the
      device orientation.  This is currently hidden behind an experiment.
      
      Test: inspector/device-orientation-success.html
      
      * English.lproj/localizedStrings.js:
      * dom/DeviceOrientationController.cpp:
      (WebCore::DeviceOrientationController::DeviceOrientationController):
      (WebCore::DeviceOrientationController::create):
      (WebCore::DeviceOrientationController::didChangeDeviceOrientation):
      (WebCore::provideDeviceOrientationTo):
      * dom/DeviceOrientationController.h:
      (DeviceOrientationController):
      * inspector/Inspector.json:
      * inspector/InspectorInstrumentation.cpp:
      (WebCore):
      (WebCore::InspectorInstrumentation::overrideDeviceOrientationImpl):
      * inspector/InspectorInstrumentation.h:
      (WebCore):
      (InspectorInstrumentation):
      (WebCore::InspectorInstrumentation::overrideDeviceOrientation):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::setDeviceOrientationOverride):
      (WebCore):
      (WebCore::InspectorPageAgent::clearDeviceOrientationOverride):
      (WebCore::InspectorPageAgent::canOverrideDeviceOrientation):
      (WebCore::InspectorPageAgent::overrideDeviceOrientation):
      * inspector/InspectorPageAgent.h:
      * inspector/front-end/Settings.js:
      (WebInspector.ExperimentsSettings):
      * inspector/front-end/SettingsScreen.js:
      (WebInspector.UserAgentSettingsTab):
      (WebInspector.UserAgentSettingsTab.prototype._createInput):
      (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
      (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
      (WebInspector.UserAgentSettingsTab.prototype._onDeviceOrientationOverrideCheckboxClicked):
      (WebInspector.UserAgentSettingsTab.prototype._applyDeviceOrientationUserInput):
      (WebInspector.UserAgentSettingsTab.prototype._setDeviceOrientation.set if):
      (WebInspector.UserAgentSettingsTab.prototype._setDeviceOrientation):
      (WebInspector.UserAgentSettingsTab.prototype._createDeviceOrientationOverrideElement):
      * inspector/front-end/UserAgentSupport.js:
      (WebInspector.UserAgentSupport.DeviceOrientation):
      (WebInspector.UserAgentSupport.DeviceOrientation.prototype.toSetting):
      (WebInspector.UserAgentSupport.DeviceOrientation.parseSetting):
      (WebInspector.UserAgentSupport.DeviceOrientation.parseUserInput):
      (WebInspector.UserAgentSupport.DeviceOrientation.clearDeviceOrientationOverride):
      * inspector/front-end/inspector.js:
      (WebInspector.doLoadedDone):
      
      LayoutTests:
      
      New tests for Device Orientation override.
      
      * inspector/device-orientation-success-expected.txt: Added.
      * inspector/device-orientation-success.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a0e9cc5e
    • commit-queue@webkit.org's avatar
      TypedArray set method is slow when called with another typed array · 18fabe98
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92556
      
      Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2012-08-02
      Reviewed by Kenneth Russell.
      
      PerformanceTests:
      
      * Bindings/typed-array-set-from-typed.html: Added.
      
      Source/WebCore:
      
      When setting multiples values to a typed array from an array like
      element, try to determine if the argument is a typed array. If so,
      cast the argument to a typed array, and read each element with .item()
      method. That avoid reading the value as a JSValue, and speedups set
      method by approximatively 10x.
      
      Introduce setWebGLArrayWithTypedArrayArgument template function which
      checks if argument is a typed array. If so, it copies the data to
      target typed array and returns true. Otherwise, it returns false.
      
      Introduce copyTypedArrayBuffer template function which copies data
      from a typed array to another one. This function is also used from
      constructArrayBufferViewWithTypedArrayArgument.
      
      * bindings/js/JSArrayBufferViewHelper.h:
      (WebCore):
      (WebCore::copyTypedArrayBuffer):
      (WebCore::setWebGLArrayWithTypedArrayArgument):
      (WebCore::setWebGLArrayHelper):
      (WebCore::constructArrayBufferViewWithTypedArrayArgument):
      * bindings/js/JSFloat32ArrayCustom.cpp:
      (WebCore::JSFloat32Array::set):
      * bindings/js/JSFloat64ArrayCustom.cpp:
      (WebCore::JSFloat64Array::set):
      * bindings/js/JSInt16ArrayCustom.cpp:
      (WebCore::JSInt16Array::set):
      * bindings/js/JSInt32ArrayCustom.cpp:
      (WebCore::JSInt32Array::set):
      * bindings/js/JSInt8ArrayCustom.cpp:
      (WebCore::JSInt8Array::set):
      * bindings/js/JSUint16ArrayCustom.cpp:
      (WebCore::JSUint16Array::set):
      * bindings/js/JSUint32ArrayCustom.cpp:
      (WebCore::JSUint32Array::set):
      * bindings/js/JSUint8ArrayCustom.cpp:
      (WebCore::JSUint8Array::set):
      * bindings/js/JSUint8ClampedArrayCustom.cpp:
      (WebCore::JSUint8ClampedArray::set):
      
      Source/WTF:
      
      Add an checkInboundData function to TypedArrayBase to check if a
      position will be not be out of bound or overflow from the typed array.
      
      * wtf/TypedArrayBase.h:
      (WTF::TypedArrayBase::checkInboundData):
      (TypedArrayBase):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      18fabe98
    • cfleizach@apple.com's avatar
      AXEnabled = false for AXIncrementors inside text fields · 7215244a
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=93008
      
      Reviewed by Anders Carlsson.
      
      Source/WebCore:
      
      Mock objects should return "enabled" by default, since they are valid objects.
      
      * accessibility/AccessibilityMockObject.h:
      (WebCore::AccessibilityMockObject::isEnabled):
      (AccessibilityMockObject):
      
      LayoutTests:
      
      Update tests to reflect that mock objects should be enabled by default.
      
      * platform/mac/accessibility/html5-input-number-expected.txt:
      * platform/mac/accessibility/html5-input-number.html:
      * platform/mac/accessibility/table-attributes-expected.txt:
      * platform/mac/accessibility/table-sections-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7215244a
    • wangxianzhu@chromium.org's avatar
      [Chromium-Android] Run layout tests on multiple devices in parallel · 44487b36
      wangxianzhu@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92877
      
      Reviewed by Dirk Pranke.
      
      Moved methods that run command on a particular device from ChromiumAndroidPort to ChromiumAndroidDriver.
      The drivers run adb commands with the '-s serial_number' parameter which specifies the device according to the work_number.
      
      * Scripts/webkitpy/layout_tests/port/chromium_android.py:
      (ChromiumAndroidPort.__init__):
      (ChromiumAndroidPort.default_child_processes): Default to the number of attached devices.
      (ChromiumAndroidPort.test_expectations): Removed because it is unused.
      (ChromiumAndroidPort.setup_test_run): Most contents moved into ChromiumAndroidDriver._setup_test()
      (ChromiumAndroidPort.clean_up_test_run): Now the http server is stopped here.
      (ChromiumAndroidPort._get_devices):
      (ChromiumAndroidPort._get_device_serial):
      (ChromiumAndroidDriver):
      (ChromiumAndroidDriver.__init__):
      (ChromiumAndroidDriver.__del__):
      (ChromiumAndroidDriver._setup_test): Original contents of ChromiumAndroidPort.setup_test_run().
      (ChromiumAndroidDriver._push_executable): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._push_fonts): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._push_test_resources): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._synchronize_datetime): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._run_adb_command): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._teardown_performance): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver._get_crash_log): Moved from ChromiumAndroidPort.
      (ChromiumAndroidDriver.cmd_line):
      (ChromiumAndroidDriver._file_exists_on_device):
      (ChromiumAndroidDriver._remove_all_pipes):
      (ChromiumAndroidDriver._start):
      (ChromiumAndroidDriver._start_once):
      (ChromiumAndroidDriver.stop):
      * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
      (MockRunCommand):
      (MockRunCommand.__init__):
      (MockRunCommand.mock_run_command_fn):
      (MockRunCommand.mock_no_device):
      (MockRunCommand.mock_one_device):
      (MockRunCommand.mock_two_devices):
      (MockRunCommand.mock_no_tombstone_dir):
      (MockRunCommand.mock_no_tombstone_file):
      (MockRunCommand.mock_ten_tombstones):
      (MockRunCommand.mock_logcat):
      (ChromiumAndroidPortTest):
      (ChromiumAndroidPortTest.make_port):
      (ChromiumAndroidPortTest.test_driver_cmd_line):
      (ChromiumAndroidPortTest.test_get_devices_no_device):
      (ChromiumAndroidPortTest.test_get_devices_one_device):
      (ChromiumAndroidPortTest.test_get_devices_two_devices):
      (ChromiumAndroidPortTest.test_get_device_serial_no_device):
      (ChromiumAndroidPortTest.test_get_device_serial_one_device):
      (ChromiumAndroidPortTest.test_get_device_serial_two_devices):
      (ChromiumAndroidDriverTest):
      (ChromiumAndroidDriverTest.setUp):
      (ChromiumAndroidDriverTest.test_get_last_stacktrace):
      (ChromiumAndroidDriverTest.test_get_crash_log):
      (ChromiumAndroidDriverTest.test_cmd_line):
      (ChromiumAndroidDriverTwoDriversTest):
      (ChromiumAndroidDriverTwoDriversTest.test_two_drivers):
      * Scripts/webkitpy/layout_tests/port/driver.py:
      (Driver.run_test):
      (Driver._get_crash_log): Added to allow subclasses to override.
      * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
      (parse_args): Removed the --adb-args command-line parameter because now we select device automatically. Added --adb-device to specify devices.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44487b36
    • commit-queue@webkit.org's avatar
      Layout Test: compositing/backface-visibility/backface-visibility-webgl.html is... · a23a8cc4
      commit-queue@webkit.org authored
      Layout Test: compositing/backface-visibility/backface-visibility-webgl.html is not supported on Windows.
      No WebGL support.
      https://bugs.webkit.org/show_bug.cgi?id=92929
      
      Patch by Roger Fong <roger_fong@apple.com> on 2012-08-02
      Reviewed by Tim Horton.
      
      * platform/win/Skipped:
      compositing/backface-visibility/backface-visibility-webgl.html added to Windows skip list.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a23a8cc4
    • carlosgc@webkit.org's avatar
      [GTK] Inspector should set a default attached height before being attached · 6e9054ba
      carlosgc@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90767
      
      Reviewed by Xan Lopez.
      
      We are currently using the minimum attached height in
      WebKitWebViewBase as the default height for the inspector when
      attached. It would be easier for WebKitWebViewBase and embedders
      implementing attach() if the inspector already had an attached
      height set when it's being attached.
      
      * UIProcess/API/gtk/WebKitWebViewBase.cpp:
      (webkitWebViewBaseContainerAdd): Don't initialize
      inspectorViewHeight.
      (webkitWebViewBaseSetInspectorViewHeight): Allow to set the
      inspector view height before having an inpector view, but only
      queue a resize when the view already has an inspector view.
      * UIProcess/API/gtk/tests/TestInspector.cpp:
      (testInspectorDefault):
      (testInspectorManualAttachDetach):
      * UIProcess/gtk/WebInspectorProxyGtk.cpp:
      (WebKit::WebInspectorProxy::platformAttach): Set the default
      attached height before attach the inspector view.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e9054ba
    • peter@chromium.org's avatar
      [Chromium] Add a stub for WebView::getTouchHighlightQuads() · 9b4ddea1
      peter@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92997
      
      Reviewed by Adam Barth.
      
      Chrome on Android will be using this method for the link preview
      implementation, discussion about which is available in Bug 79150. Since
      that system is fairly big, will require refactoring, and the unavailable
      APIs are blocking API compatibility, add a stub for now.
      
      Together with the WebView API, also add the "WebTouchCandidatesInfo"
      structure which is being used by it.
      
      Source/Platform:
      
      * Platform.gypi: List WebTouchCandidatesInfo.h
      * chromium/public/WebTouchCandidatesInfo.h: Added.
      (WebKit):
      (WebTouchCandidatesInfo):
      (WebKit::WebTouchCandidatesInfo::WebTouchCandidatesInfo):
      
      Source/WebKit/chromium:
      
      * public/WebView.h:
      (WebKit):
      (WebView):
      * src/WebViewImpl.cpp:
      (WebKit):
      (WebKit::WebViewImpl::getTouchHighlightQuads):
      * src/WebViewImpl.h:
      (WebViewImpl):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9b4ddea1
    • commit-queue@webkit.org's avatar
      WebKitTestRunner needs layoutTestController.setUserStyleSheetEnabled · f2f51b80
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=42679
      
      Patch by Dinu Jacob <dinu.jacob@nokia.com> on 2012-08-02
      Reviewed by Eric Seidel.
      
      Source/WebKit2:
      
      Added WKBundleSetUserStyleSheetLocation API.
      
      * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
      (WKBundleSetUserStyleSheetLocation): Added.
      * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetUserStyleSheetLocation.
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::setUserStyleSheetLocation): Added. Sets the user style sheet location
      for all pages in the page group.
      (WebKit):
      * WebProcess/InjectedBundle/InjectedBundle.h:
      (InjectedBundle):
      
      Tools:
      
      * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Added
      setUserStyleSheetEnabled and setUserStyleSheetLocation.
      * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
      (WTR::LayoutTestController::LayoutTestController): Initialize new members added.
      (WTR::LayoutTestController::setUserStyleSheetEnabled): Added.
      (WTR::LayoutTestController::setUserStyleSheetLocation): Added.
      * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Added members
      userStyleSheetEnabled, and m_userStyleSheetLocation and methods
      setUserStyleSheetEnabled, and setUserStyleSheetLocation.
      
      LayoutTests:
      
      Removed tests that are now passing.
      
      * platform/wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2f51b80
    • mhahnenberg@apple.com's avatar
      Remove all uses of ClassInfo for JSStrings in JIT code · 85c200b2
      mhahnenberg@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=92935
      
      Reviewed by Geoffrey Garen.
      
      This is the first step in removing our dependence on in-object ClassInfo pointers
      in JIT code. Most of the changes are to check the Structure, which is unique for 
      JSString primitives.
      
      * bytecode/SpeculatedType.cpp:
      (JSC::speculationFromClassInfo):
      (JSC::speculationFromStructure): Changed to check the TypeInfo in the Structure
      since there wasn't a JSGlobalData immediately available to grab the JSString 
      Structure out of.
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * jit/JITInlineMethods.h:
      (JSC::JIT::emitLoadCharacterString):
      * jit/JITOpcodes.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITOpcodes32_64.cpp:
      (JSC::JIT::privateCompileCTIMachineTrampolines):
      (JSC::JIT::emit_op_to_primitive):
      (JSC::JIT::emitSlow_op_eq):
      (JSC::JIT::emitSlow_op_neq):
      (JSC::JIT::compileOpStrictEq):
      (JSC::JIT::emit_op_convert_this):
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emitSlow_op_get_by_val):
      * jit/JITPropertyAccess32_64.cpp:
      (JSC::JIT::stringGetByValStubGenerator):
      (JSC::JIT::emitSlow_op_get_by_val):
      * jit/SpecializedThunkJIT.h:
      (JSC::SpecializedThunkJIT::loadJSStringArgument):
      * jit/ThunkGenerators.cpp:
      (JSC::stringCharLoad):
      (JSC::charCodeAtThunkGenerator):
      (JSC::charAtThunkGenerator):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      85c200b2
    • eric@webkit.org's avatar
      Add back ASSERT(!needsLayout) to RenderTableSection which is now valid · 082b8d8f
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=92954
      
      Reviewed by Julien Chaffraix.
      
      * rendering/RenderTableSection.cpp:
      (WebCore::RenderTableSection::paint):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      082b8d8f