1. 07 Apr, 2011 36 commits
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 5614540c
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              Added tests to ensure WebKit inserts a paragraph separator properly around tab span.
      
              * editing/inserting/insert-div-021-expected.txt: No longer duplicates span[id="test"] incorrectly.
              * editing/inserting/insert-paragraph-after-tab-span-and-text-expected.txt: Added.
              * editing/inserting/insert-paragraph-after-tab-span-and-text.html: Added.
              * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Added.
              * editing/inserting/insert-paragraph-separator-tab-span.html: Added.
              * editing/inserting/insert-paragraph-at-end-of-line-expected.txt: No longer duplicates a[id="anchor"] incorrectly.
      2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
              because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
      
              r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
              avoiding the tab span.
      
              Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
              Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
              we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
              before moving the nodes.
      
              Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
                     editing/inserting/insert-paragraph-separator-tab-span.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
              no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
              separator into a paragraph separator.
              * editing/htmlediting.cpp:
              (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
              node after the tab span if the position was at the end of the tab span.
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5614540c
    • commit-queue@webkit.org's avatar
      2011-04-07 Jia Pu <jpu@apple.com> · 6aedb680
      commit-queue@webkit.org authored
              Reviewed by Darin Adler.
      
              [Mac] Editor::setComposition() should not trigger correction panel timer.
              https://bugs.webkit.org/show_bug.cgi?id=58049
               <rdar://problem/9226305>
      
              On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
              should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand.
              When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
              m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
      
              No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
              autocorrection panel timer, which can not be easily done in automated fashion.
      
              * editing/Editor.cpp:
              (WebCore::Editor::deleteWithDirection):
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::confirmComposition):
              (WebCore::Editor::setComposition):
              * editing/EditorCommand.cpp:
              (WebCore::executeDelete):
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::deleteSelection):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::insertLineBreak):
              (WebCore::TypingCommand::insertParagraphSeparator):
              (WebCore::TypingCommand::typingAddedToOpenCommand):
              * editing/TypingCommand.h:
              (WebCore::TypingCommand::create):
              (WebCore::TypingCommand::setShouldPreventSpellChecking):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6aedb680
    • commit-queue@webkit.org's avatar
      2011-04-07 John Bauman <jbauman@chromium.org> · f12d168a
      commit-queue@webkit.org authored
              Reviewed by Kenneth Russell.
      
              clearIfComposited call is really slow
              https://bugs.webkit.org/show_bug.cgi?id=57999
      
              Move getContextAttributes call after the if, so it isn't called nearly as often.
      
              No new tests.
      
              * html/canvas/WebGLRenderingContext.cpp:
              (WebCore::WebGLRenderingContext::clearIfComposited):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f12d168a
    • commit-queue@webkit.org's avatar
      2011-04-07 Luke Macpherson <macpherson@chromium.org> · 16204d14
      commit-queue@webkit.org authored
              Reviewed by Dimitri Glazkov.
      
              Implement Backgroun and Mask properties in CSSStyleApplyProperty
              https://bugs.webkit.org/show_bug.cgi?id=57922
      
              No tests added as no behavioral changes.
      
              * css/CSSStyleApplyProperty.cpp:
              Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
              (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
              Added constructor calls to set up:
                CSSPropertyBackgroundAttachment
                CSSPropertyBackgroundClip
                CSSPropertyWebkitBackgroundClip
                CSSPropertyWebkitBackgroundComposite
                CSSPropertyBackgroundOrigin
                CSSPropertyWebkitBackgroundOrigin
                CSSPropertyBackgroundSize
                CSSPropertyWebkitBackgroundSize
                CSSPropertyWebkitMaskAttachment
                CSSPropertyWebkitMaskClip
                CSSPropertyWebkitMaskComposite
                CSSPropertyWebkitMaskOrigin
                CSSPropertyWebkitMaskSize
              * css/CSSStyleApplyProperty.h:
              (WebCore::CSSStyleApplyProperty::setPropertyValue):
              Add function to specify an equivalent property value in the lookup table.
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::applyProperty):
              Remove sections now implemented by CSSStyleApplyProperty.
              * css/CSSStyleSelector.h:
              Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16204d14
    • eric@webkit.org's avatar
      2011-04-04 Eric Seidel <eric@webkit.org> · 5bee2940
      eric@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Split run storage out from BidiResolver into a new BidiRunList class
              https://bugs.webkit.org/show_bug.cgi?id=57764
      
              Part of what makes BidiResolver and InlineIterator so difficult to understand
              (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
              for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
              BidiRuns from the algorithm.  This patch breaks the storage aspect off
              into its own class BidiRunList.
      
              This patch is only a start.  It does not actually fix the problematic ownership
              relationship, but it does make it possible to fix such in a second patch.
      
              The run pointers and addRun/prependRun, etc. were already a tightly coupled
              logical subset of the BidiResolver class, so moving them into their own class
              was both obvious and easy.  The only piece of logic I had to move was that
              deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
      
              I believe this deleteRuns side-effect was only ever used for one place
              (right after findNextLineBreak) and that it's only needed because
              findNextLineBreak can sometimes create bidi runs.  Run creation appears to be
              an unintentional side-effect of how InlineIterator calls through to BidiResolver
              as part of bidiNext and not a desired effect of the code.  I have added the call
              to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
              could get re-used) as a safety precaution.  We could replace both with ASSERTs
              in a later patch.
      
              I suspect there may be a small performance win from further refactoring so that
              findNextLineBreak does not need to create BidiRuns.
      
              As I commented in the code, callers should own their own BidiRunList which they
              pass to BidiResolver::createBidiRunsForLine.  I attempted to implement that in
              an earlier version of this patch, but it was too complicated with the current
              twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
              raise/lowerExplicitEmbeddingLevel are called unconditionally
              from commitExplicitEmbedding (which is called by bidiNext) and expect to have
              access to a runs list even in cases where we don't want any runs (findNextLineBreak).
      
              I also cleaned up some of the callers to pass around BidiRunList objects instead
              of InlineBidiResolvers now that they're separate objects.
      
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * platform/graphics/GraphicsContext.cpp:
              (WebCore::GraphicsContext::drawBidiText):
              * platform/text/BidiResolver.h:
              (WebCore::BidiResolver::BidiResolver):
              (WebCore::BidiResolver::runs):
              (WebCore::BidiResolver::markCurrentRunEmpty):
              (WebCore::::appendRun):
              (WebCore::::lowerExplicitEmbeddingLevel):
              (WebCore::::raiseExplicitEmbeddingLevel):
              (WebCore::::reorderRunsFromLevels):
              (WebCore::::createBidiRunsForLine):
              * rendering/InlineIterator.h:
              (WebCore::InlineBidiResolver::appendRun):
              * rendering/RenderBlock.h:
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::createRun):
              (WebCore::RenderBlock::appendRunsForObject):
              (WebCore::reachedEndOfTextRenderer):
              (WebCore::RenderBlock::handleTrailingSpaces):
              (WebCore::RenderBlock::layoutInlineChildren):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5bee2940
    • commit-queue@webkit.org's avatar
      2011-04-07 Naoki Takano <takano.naoki@gmail.com> · 2ff922bf
      commit-queue@webkit.org authored
              Reviewed by Adam Barth.
      
              [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
              https://bugs.webkit.org/show_bug.cgi?id=57911
              http://code.google.com/p/chromium/issues/detail?id=78073
      
              Manual test added: manual-tests/autofill-popup-location.html
      
              Originally only height is checked so that it introduces the bug.
              So I changed it to check both width and height as size.
      
              * manual-tests/autofill-popup-location.html: Added.
              * platform/chromium/PopupMenuChromium.cpp:
              (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ff922bf
    • lforschler@apple.com's avatar
      Versioning. · 0d12048d
      lforschler@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83236 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d12048d
    • abarth@webkit.org's avatar
      2011-04-07 Adam Barth <abarth@webkit.org> · 75a72fe0
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implement img-src style-src and font-src
              https://bugs.webkit.org/show_bug.cgi?id=58018
      
              Test a bunch of allow/block tests for these new directives.
      
              * http/tests/security/contentSecurityPolicy/image-allowed-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/image-allowed.html: Added.
              * http/tests/security/contentSecurityPolicy/image-blocked-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/image-blocked.html: Added.
              * http/tests/security/contentSecurityPolicy/resources/blue.css: Added.
              * http/tests/security/contentSecurityPolicy/resources/style.xsl: Added.
              * http/tests/security/contentSecurityPolicy/style-allowed-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/style-allowed.html: Added.
              * http/tests/security/contentSecurityPolicy/style-blocked-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/style-blocked.html: Added.
              * http/tests/security/contentSecurityPolicy/xsl-allowed.php: Added.
              * http/tests/security/contentSecurityPolicy/xsl-blocked-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/xsl-blocked.php: Added.
      2011-04-07  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement img-src style-src and font-src
              https://bugs.webkit.org/show_bug.cgi?id=58018
      
              These are pretty straight forward given the rest of the infrastructure
              we've built so far.
      
              Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
                     http/tests/security/contentSecurityPolicy/image-blocked.html
                     http/tests/security/contentSecurityPolicy/style-allowed.html
                     http/tests/security/contentSecurityPolicy/style-blocked.html
                     http/tests/security/contentSecurityPolicy/xsl-allowed.php
                     http/tests/security/contentSecurityPolicy/xsl-blocked.php
      
              * loader/cache/CachedResourceLoader.cpp:
              (WebCore::CachedResourceLoader::canRequest):
              * page/ContentSecurityPolicy.cpp:
              (WebCore::ContentSecurityPolicy::allowImageFromSource):
              (WebCore::ContentSecurityPolicy::allowStyleFromSource):
              (WebCore::ContentSecurityPolicy::allowFontFromSource):
              (WebCore::ContentSecurityPolicy::addDirective):
              * page/ContentSecurityPolicy.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75a72fe0
    • levin@chromium.org's avatar
      Make IconSnapshot and PageURLRecord member variables private. · e0bc5507
      levin@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=58080
      
      Reviewed by Darin Adler.
      
      No change in functionality so no new tests.
      
      * loader/icon/IconDatabase.cpp:
      (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
      (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
      * loader/icon/IconRecord.h:
      (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
      (WebCore::IconSnapshot::iconURL): Expose the property.
      (WebCore::IconSnapshot::timestamp): Ditto.
      (WebCore::IconSnapshot::data): Ditto.
      * loader/icon/PageURLRecord.h:
      (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
      (WebCore::PageURLSnapshot::pageURL): Expose the property.
      (WebCore::PageURLSnapshot::iconURL): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e0bc5507
    • mitz@apple.com's avatar
      Build fix. · b430cba3
      mitz@apple.com authored
      * platform/graphics/cairo/GraphicsContextCairo.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b430cba3
    • eric@webkit.org's avatar
      2011-04-07 Eric Seidel <eric@webkit.org> · cb59cb58
      eric@webkit.org authored
              Reviewed by Adam Barth.
      
              Add stub support for generating Gtk build system from gyp
              https://bugs.webkit.org/show_bug.cgi?id=58086
      
              This adds support for a new --port argument and plumbs through
              the necessary paths to allow generating for a port other than Mac.
      
              * Source/gyp/configure:
      2011-04-07  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Add stub support for generating Gtk build system from gyp
              https://bugs.webkit.org/show_bug.cgi?id=58086
      
              This does not produce a buildable JavaScriptCore, but it
              does allow running gyp/configure --port=gtk and having
              it generate a gtk.Makefile which we can use for testing
              the rest of the plumbing.
      
              * gyp/gtk.gyp: Added.
      2011-04-07  Eric Seidel  <eric@webkit.org>
      
              Reviewed by Adam Barth.
      
              Add stub support for generating Gtk build system from gyp
              https://bugs.webkit.org/show_bug.cgi?id=58086
      
              This does not produce a buildable WebCore, but it
              does allow running gyp/configure --port=gtk and having
              it generate a gtk.Makefile which we can use for testing
              the rest of the plumbing.
      
              * gyp/gtk.gyp: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb59cb58
    • scherkus@chromium.org's avatar
      2011-04-07 Andrew Scherkus <scherkus@chromium.org> · 63a58153
      scherkus@chromium.org authored
              Revert ENABLE_TRACK patch due to compile failures.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83223 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      63a58153
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=57736 · 1d8cc948
      hyatt@apple.com authored
              
      Reviewed by Dan Bernstein.
      
      Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
      optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
      layout finished. This would eventually lead to an inability to properly determine the correct layout root and
      would cause a deleted root to be used later on.
      
      Added fast/block/positioning/complex-positioned-movement.html.
      
      Source/WebCore: 
      
      * page/FrameView.cpp:
      (WebCore::FrameView::scheduleRelayoutOfSubtree):
      Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
          
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::simplifiedLayout):
      Change simplified layout so that the positioned movement optimization no longer clears the other layout
      flags. This will ensure that we still lay out our descendants if they need it.
              
      (WebCore::RenderBlock::layoutPositionedObjects):
      Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
      no longer does the clear.
          
      * rendering/RenderBox.h:
      (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
      tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
      does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
      the other flags in case other kinds of layout are still needed.
          
      * rendering/RenderObject.h:
      (WebCore::RenderObject::setNeedsPositionedMovementLayout):
      (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
      Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
      
      LayoutTests: 
      
      * fast/block/positioning/complex-positioned-movement.html: Added.
      * platform/mac/fast/block/positioning/complex-positioned-movement-expected.checksum: Added.
      * platform/mac/fast/block/positioning/complex-positioned-movement-expected.png: Added.
      * platform/mac/fast/block/positioning/complex-positioned-movement-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1d8cc948
    • scherkus@chromium.org's avatar
      2011-04-07 Anna Cavender <annacc@chromium.org> · 26898096
      scherkus@chromium.org authored
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * configure.ac:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * Configurations/FeatureDefines.xcconfig:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              No new tests. No real functionality added just yet.
      
              * CMakeLists.txt:
              * Configurations/FeatureDefines.xcconfig:
              * DerivedSources.make:
              * GNUmakefile.am:
              * WebCore.gypi:
              * WebCore.xcodeproj/project.pbxproj:
              * features.pri:
              * html/HTMLAttributeNames.in:
              * html/HTMLTagNames.in:
              * html/HTMLTrackElement.cpp: Added.
              (WebCore::HTMLTrackElement::HTMLTrackElement):
              (WebCore::HTMLTrackElement::create):
              (WebCore::HTMLTrackElement::insertedIntoTree):
              (WebCore::HTMLTrackElement::willRemove):
              (WebCore::HTMLTrackElement::src):
              (WebCore::HTMLTrackElement::setSrc):
              (WebCore::HTMLTrackElement::kind):
              (WebCore::HTMLTrackElement::setKind):
              (WebCore::HTMLTrackElement::srclang):
              (WebCore::HTMLTrackElement::setSrclang):
              (WebCore::HTMLTrackElement::label):
              (WebCore::HTMLTrackElement::setLabel):
              (WebCore::HTMLTrackElement::isDefault):
              (WebCore::HTMLTrackElement::setIsDefault):
              (WebCore::HTMLTrackElement::isURLAttribute):
              * html/HTMLTrackElement.h: Added.
              * html/HTMLTrackElement.idl: Added.
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * WebKit.xcodeproj/project.pbxproj:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * features.gypi:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * Configurations/FeatureDefines.xcconfig:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * Configurations/FeatureDefines.xcconfig:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * Scripts/build-webkit:
      
      2011-04-07  Anna Cavender  <annacc@chromium.org>
      
              Reviewed by Eric Carlson.
      
              Setup ENABLE(TRACK) feature define
              https://bugs.webkit.org/show_bug.cgi?id=53556
      
              * win/tools/vsprops/FeatureDefines.vsprops:
              * win/tools/vsprops/FeatureDefinesCairo.vsprops:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26898096
    • mitz@apple.com's avatar
      <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor · bd95d94d
      mitz@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=58083
      
      Reviewed by Simon Fraser.
      
      Source/WebCore: 
      
      Test: fast/text/decorations-transformed.html
      
      * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
      is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
      gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
      the width and the height. In this new mode, translating a rectangle in user space never changes
      its dimensions in device pixels.
      * platform/graphics/cg/GraphicsContextCG.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
      (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
      all underlines have the same thickness in device pixels.
      * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
      * platform/graphics/qt/GraphicsContextQt.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
      * platform/graphics/skia/GraphicsContextSkia.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
      * platform/graphics/wince/GraphicsContextWinCE.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
      * platform/graphics/wx/GraphicsContextWx.cpp:
      (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDecoration):
      
      LayoutTests: 
      
      * fast/text/decorations-transformed.html: Added.
      * platform/mac/fast/text/decorations-transformed-expected.checksum: Added.
      * platform/mac/fast/text/decorations-transformed-expected.png: Added.
      * platform/mac/fast/text/decorations-transformed-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bd95d94d
    • vitalyr@chromium.org's avatar
      2011-04-06 Vitaly Repeshko <vitalyr@chromium.org> · 0ac61fe5
      vitalyr@chromium.org authored
              Reviewed by Nate Chapin.
      
              [V8] Remove custom DOMImplementation getter on Document.
              https://bugs.webkit.org/show_bug.cgi?id=57991
      
              The custom getter is no longer required because DOMImplementation
              objects are now created per document.
      
              Test: fast/dom/DOMImplementation/implementation-identity.html
      
              * bindings/scripts/CodeGeneratorV8.pm:
              * bindings/v8/custom/V8DocumentCustom.cpp:
              * dom/Document.idl:
      
      2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
      
              Reviewed by Nate Chapin.
      
              [V8] Remove custom DOMImplementation getter on Document.
              https://bugs.webkit.org/show_bug.cgi?id=57991
      
              * fast/dom/DOMImplementation/implementation-identity-expected.txt: Added.
              * fast/dom/DOMImplementation/implementation-identity.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ac61fe5
    • inferno@chromium.org's avatar
      2011-04-07 Sergey Glazunov <serg.glazunov@gmail.com> · 147aa3d8
      inferno@chromium.org authored
              Reviewed by Dimitri Glazkov.
      
              setHasID() is only called for styled elements
              https://bugs.webkit.org/show_bug.cgi?id=57267
      
              Test: fast/dom/non-styled-element-id-crash.html
      
              * dom/Element.cpp:
              (WebCore::Element::attributeChanged):
              (WebCore::Element::idAttributeChanged):
              * dom/Element.h:
              * dom/StyledElement.cpp:
              (WebCore::StyledElement::parseMappedAttribute):
      2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
      
              Reviewed by Dimitri Glazkov.
      
              setHasID() is only called for styled elements
              https://bugs.webkit.org/show_bug.cgi?id=57267
      
              * fast/dom/non-styled-element-id-crash-expected.txt: Added.
              * fast/dom/non-styled-element-id-crash.html: Added.
              * svg/custom/embedded-svg-disallowed-in-dashboard.xml: Fix the failing test.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      147aa3d8
    • jer.noble@apple.com's avatar
      2011-04-07 Jer Noble <jer.noble@apple.com> · b14cd6d7
      jer.noble@apple.com authored
              Reviewed by Eric Carlson.
      
              HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
              https://bugs.webkit.org/show_bug.cgi?id=58070
      
              Make the HTMLMediaElement full screen functions call into the new Full Screen API when
              FULLSCREEN_API is enabled.
      
              * html/HTMLMediaElement.cpp:
              (WebCore::HTMLMediaElement::enterFullscreen):
              (WebCore::HTMLMediaElement::exitFullscreen):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b14cd6d7
    • abarth@webkit.org's avatar
      2011-04-07 Adam Barth <abarth@webkit.org> · a3a60470
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              Implement CSP's options directive
              https://bugs.webkit.org/show_bug.cgi?id=58014
      
              * http/tests/security/contentSecurityPolicy/inline-script-allowed-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/inline-script-allowed.html: Added.
              * http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html: Added.
      2011-04-07  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              Implement CSP's options directive
              https://bugs.webkit.org/show_bug.cgi?id=58014
      
              This patch contains the full options parser, but we only have enough of
              CSP implemented to see the effects of disable-xss-protection.  Will
              need to do some more work before we can see eval-script in action.
      
              Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
                     http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
      
              * page/ContentSecurityPolicy.cpp:
              (WebCore::CSPOptions::CSPOptions):
              (WebCore::CSPOptions::disableXSSProtection):
              (WebCore::CSPOptions::evalScript):
              (WebCore::CSPOptions::parse):
              (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
              (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
              (WebCore::ContentSecurityPolicy::allowInlineScript):
              (WebCore::ContentSecurityPolicy::addDirective):
              * page/ContentSecurityPolicy.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a3a60470
    • ap@apple.com's avatar
      Reviewed by Anders Carlsson. · 8199f90c
      ap@apple.com authored
              REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
              https://bugs.webkit.org/show_bug.cgi?id=58066
              <rdar://problem/8965302>
      
              * Scripts/webkit2/messages.py:
              * Shared/mac/AttributedString.h: Added.
              * Shared/mac/AttributedString.mm: Added.
              (WebKit::AttributedString::encode):
              (WebKit::AttributedString::decode):
              Added an class that wraps NSAttributedString. As far as I can tell, one can't pass a CF
              or NS object to another process without wrapping it in a C++ one.
              
              * Shared/mac/ArgumentCodersMac.h: Added.
              * Shared/mac/ArgumentCodersMac.mm: Added.
              Added coders for Foundation objects, similar to ArgumentCodersCF. There are two reasons why
              these are needed:
              1) Even though most Foundation objects are toll free bridged with CF, CFGetTypeID() doesn't
              work properly for them (I've been just getting 1).
              2) NSColor isn't toll free bridged to CF.
              This adds just the types necessary for editing NSAttributedString (and I don't yet know what
              happens with attachments).
      
              * UIProcess/API/mac/WKView.mm: (-[WKView attributedSubstringFromRange:]):
              * UIProcess/WebPageProxy.h:
              * UIProcess/mac/WebPageProxyMac.mm:
              (WebKit::WebPageProxy::getAttributedSubstringFromRange):
              * WebKit2.xcodeproj/project.pbxproj:
              * WebProcess/WebPage/WebPage.h:
              * WebProcess/WebPage/WebPage.messages.in:
              Boilerplate code for making a sync call to web process.
      
              * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getAttributedSubstringFromRange):
              Ported from WebHTMLView.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8199f90c
    • aestes@apple.com's avatar
      2011-04-07 Andy Estes <aestes@apple.com> · e35644e1
      aestes@apple.com authored
              Reviewed by Darin Adler.
      
              REGRESSION (r64712): Microsoft Outlook 2011: original message contents
              not included when replying to an email.
              https://bugs.webkit.org/show_bug.cgi?id=57794
      
              * WebKit.xcodeproj/project.pbxproj:
      2011-04-07  Andy Estes  <aestes@apple.com>
      
              Reviewed by Darin Adler.
      
              REGRESSION (r64712): Microsoft Outlook 2011: original message contents
              not included when replying to an email.
              https://bugs.webkit.org/show_bug.cgi?id=57794
              
              Outlook populates a reply message by creating an empty WebView and
              using DOM API to populate the WebView's empty document with content
              from the original message. It expects the initial empty document to
              simply be "<html></html>", and it proceeds to dynamically create and
              append a BODY node and add the original message content as a child of
              that node. Outlook then takes the innerHTML of the frame's first body
              element and copies it into a *new* document that is displayed and
              edited in the reply message window.
              
              Due to implementing the HTML5 tree building algorithm in r64712,
              initial empty documents went from being "<html></html>" to being
              "<html><head></head><body></body></html>". Outlook still dynamically
              creates a BODY node to parent the original message content, but this
              BODY node duplicates the one created by the tree builder. When Outlook
              then takes the innerHTML of the first body element to populate the
              reply message window it gets the empty body element created by the
              parser, not the one it created with the original message content.
              
              Fix this by injecting a user script into the initial empty document
              that removes the HEAD and BODY nodes created by the parser. This
              ensures that the BODY created by Outlook is the only BODY in the
              document.
      
              * Misc/OutlookQuirksUserScript.js: Added.
              * WebView/WebView.mm:
              (leakMailQuirksUserScriptContents):
              (-[WebView _injectMailQuirksScript]):
              (needsOutlookQuirksScript):
              (leakOutlookQuirksUserScriptContents):
              (-[WebView _injectOutlookQuirksScript]):
              (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
      2011-04-07  Andy Estes  <aestes@apple.com>
      
              Reviewed by Darin Adler.
      
              REGRESSION (r64712): Microsoft Outlook 2011: original message contents
              not included when replying to an email.
              https://bugs.webkit.org/show_bug.cgi?id=57794
              
              * WebCore.exp.in:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
              before checking if the FrameLoader is parsing the initial empty document.
              This allows user scripts to be injected at the end of document parsing
              (if the setting is enabled).
              * page/Frame.cpp:
              (WebCore::Frame::injectUserScripts): Do not inject scripts if this
              feature is disabled on the initial empty document.
              * page/Settings.cpp:
              (WebCore::Settings::Settings):
              * page/Settings.h: Add a setting for injecting user scripts into the
              initial empty document (defaults to false).
              (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
              (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
              * platform/mac/RuntimeApplicationChecks.h:
              * platform/mac/RuntimeApplicationChecks.mm:
              (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
              application is Microsoft Outlook.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e35644e1
    • jer.noble@apple.com's avatar
      2011-04-06 Jer Noble <jer.noble@apple.com> · d5446357
      jer.noble@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
              https://bugs.webkit.org/show_bug.cgi?id=57962
      
              Add support for a new AVPlayerItem API which will notify clients when their
              seek completes.  This requires a new Notification type to be passed to the main
              thread in MediaPlayerPrivateAVFoundation.
      
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
              (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
              (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
                  overloaded functions which take a Notification; and a Notification::Type and boolean.
              (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted
                  Notification type.
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
              (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
              (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
              (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
              (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d5446357
    • commit-queue@webkit.org's avatar
      2011-04-07 Nancy Piedra <nancy.piedra@nokia.com> · 404a2d88
      commit-queue@webkit.org authored
              Reviewed by Eric Carlson.
      
              Add tests for parsing codecs parameter in video-can-play-type.html
              https://bugs.webkit.org/show_bug.cgi?id=53275
      
              * media/video-can-play-type-expected.txt:
              * media/video-can-play-type.html:
      2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
      
              Reviewed by Eric Carlson.
      
              Parse quotes from content type parameters
              https://bugs.webkit.org/show_bug.cgi?id=53275
      
              This functionality is tested in video-can-play-type.html layout test
              where I've added codecs parameter with good and bad formatting.
      
              * platform/ContentType.cpp:
              (WebCore::ContentType::parameter):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      404a2d88
    • pfeldman@chromium.org's avatar
      2011-04-07 Pavel Feldman <pfeldman@google.com> · 381bdc24
      pfeldman@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: remove "enabled" from the setBreakpoint protocol.
              https://bugs.webkit.org/show_bug.cgi?id=58047
      
              * bindings/js/ScriptDebugServer.cpp:
              (WebCore::ScriptDebugServer::hasBreakpoint):
              * bindings/v8/DebuggerScript.js:
              ():
              * bindings/v8/ScriptDebugServer.cpp:
              (WebCore::ScriptDebugServer::setBreakpoint):
              * inspector/Inspector.json:
              * inspector/InspectorDebuggerAgent.cpp:
              (WebCore::buildObjectForBreakpointCookie):
              (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
              (WebCore::InspectorDebuggerAgent::setBreakpoint):
              (WebCore::InspectorDebuggerAgent::continueToLocation):
              (WebCore::InspectorDebuggerAgent::didParseSource):
              * inspector/InspectorDebuggerAgent.h:
              * inspector/ScriptBreakpoint.h:
              (WebCore::ScriptBreakpoint::ScriptBreakpoint):
              * inspector/front-end/DebuggerModel.js:
              (WebInspector.DebuggerModel.prototype.setBreakpoint):
              (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
              * inspector/front-end/DebuggerPresentationModel.js:
              (WebInspector.DebuggerPresentationModel):
              (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
              (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
              (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
              (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
              (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
              (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
              (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
              (WebInspector.DebuggerPresentationModel.prototype._reset):
              (WebInspector.PresentationBreakpoint):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      381bdc24
    • mitz@apple.com's avatar
      Removed a redundant line of code. · c4ea8fff
      mitz@apple.com authored
      Reviewed by Adam Roben.
      
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
      this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c4ea8fff
    • commit-queue@webkit.org's avatar
      2011-04-07 Liang Qi <liang.qi@nokia.com> · e7687859
      commit-queue@webkit.org authored
              Reviewed by Laszlo Gombos.
      
              [Qt][Symbian] Enable webkit build with GCCE on Symbian.
              https://bugs.webkit.org/show_bug.cgi?id=57841
      
              * wtf/MathExtras.h: GCCE compiler doesn't support those std static functions.
      2011-04-07  Liang Qi  <liang.qi@nokia.com>
      
              Reviewed by Laszlo Gombos.
      
              [Qt][Symbian] Enable webkit build with GCCE on Symbian.
              https://bugs.webkit.org/show_bug.cgi?id=57841
      
              * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
              --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
              to 0x1000000 together. They need to be updated in the future when WebKit grows.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7687859
    • pfeldman@chromium.org's avatar
      2011-04-06 Pavel Feldman <pfeldman@google.com> · 7e937074
      pfeldman@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: get rid of Breakpoint.js.
              https://bugs.webkit.org/show_bug.cgi?id=57949
      
              * WebCore.gypi:
              * WebCore.vcproj/WebCore.vcproj:
              * inspector/front-end/Breakpoint.js: Removed.
              * inspector/front-end/BreakpointsSidebarPane.js:
              (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
              (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
              (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
              (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
              * inspector/front-end/DebuggerModel.js:
              (WebInspector.DebuggerModel):
              (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
              (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
              (WebInspector.DebuggerModel.prototype.setBreakpoint):
              (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
              (WebInspector.DebuggerModel.prototype.removeBreakpoint):
              (WebInspector.DebuggerModel.prototype._breakpointResolved):
              (WebInspector.DebuggerModel.prototype.reset):
              * inspector/front-end/DebuggerPresentationModel.js:
              (WebInspector.DebuggerPresentationModel):
              (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
              (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
              (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
              (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
              (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
              (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
              (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
              (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
              (WebInspector.DebuggerPresentationModel.prototype._reset):
              (WebInspector.PresentationBreakpoint):
              (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
              (WebInspector.PresentationBreakpoint.prototype.get url):
              (WebInspector.PresentationBreakpoint.prototype.get resolved):
              (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
              * inspector/front-end/ResourceTreeModel.js:
              (WebInspector.ResourceTreeModel):
              (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
              (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
              * inspector/front-end/ScriptsPanel.js:
              (WebInspector.ScriptsPanel):
              (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
              (WebInspector.ScriptsPanel.prototype.reset):
              * inspector/front-end/WebKit.qrc:
              * inspector/front-end/inspector.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7e937074
    • yurys@chromium.org's avatar
      2011-04-07 Yury Semikhatsky <yurys@chromium.org> · 045ff0a9
      yurys@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: console messages names should adhere to the common naming style
              https://bugs.webkit.org/show_bug.cgi?id=58042
      
              * inspector/protocol/console-agent-expected.txt:
      2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
      
              Reviewed by Pavel Feldman.
      
              Web Inspector: console messages names should adhere to the common naming style
              https://bugs.webkit.org/show_bug.cgi?id=58042
      
              * inspector/ConsoleMessage.cpp:
              (WebCore::ConsoleMessage::addToFrontend):
              (WebCore::ConsoleMessage::updateRepeatCountInConsole):
              * inspector/Inspector.json:
              * inspector/InspectorConsoleAgent.cpp:
              (WebCore::InspectorConsoleAgent::clearConsoleMessages):
              * inspector/front-end/ConsoleView.js:
              (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
              (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
              (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
              (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      045ff0a9
    • loislo@chromium.org's avatar
      2011-04-06 Ilya Tikhonovsky <loislo@chromium.org> · 83857a43
      loislo@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
              https://bugs.webkit.org/show_bug.cgi?id=57957
      
              There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
              Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
              It was decided that we will use it.
      
              the list of renames:
              1) type-> /dev/null
              2) domain + '.' + event => method // for events
              3) domain + '.' + command => method // for requests
              4) requestId => id // for responses
              5) arguments => params // for requests
              6) data => params // for events
              7) body => result // for responses
      
              protocolErrors and error properties will be converted to JSON-RPC error format.
              The order of properties in messages also will be adjusted.
              The only thing that looks unnecessary is jsonrpc property.
      
              * inspector/protocol/console-agent-expected.txt:
              * inspector/protocol/runtime-agent-expected.txt:
              * inspector/report-API-errors-expected.txt:
              * inspector/report-API-errors.html:
              * inspector/report-protocol-errors-expected.txt:
              * inspector/report-protocol-errors.html:
      2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
      
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
              https://bugs.webkit.org/show_bug.cgi?id=57957
      
              There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
              Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
              It was decided that we will use it.
      
              the list of renames:
              1) type-> /dev/null
              2) domain + '.' + event => method // for events
              3) domain + '.' + command => method // for requests
              4) requestId => id // for responses
              5) arguments => params // for requests
              6) data => params // for events
              7) body => result // for responses
      
              protocolErrors and error properties will be converted to JSON-RPC error format.
              The order of properties in messages also will be adjusted.
              The only thing that looks unnecessary is jsonrpc property.
      
              * inspector/CodeGeneratorInspector.pm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      83857a43
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 7881ad09
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Add functions to update left and right offsets to LineOffsets
              https://bugs.webkit.org/show_bug.cgi?id=58028
      
              Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
              which are used to update m_left and m_right. Also added m_block and m_isFirstLine
              member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
      
              * rendering/RenderBlock.h:
              * rendering/RenderBlockLineLayout.cpp:
              (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
              (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
              (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
              (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
              (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
              (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
              no longer passes firstLine around.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7881ad09
    • pfeldman@chromium.org's avatar
      2011-04-06 Pavel Feldman <pfeldman@google.com> · af0c7276
      pfeldman@chromium.org authored
              Reviewed by Yury Semikhatsky.
      
              Web Inspector: migrate debugger domain to the unified breakpoint location notion.
              https://bugs.webkit.org/show_bug.cgi?id=57928
      
              * inspector/Inspector.json:
              * inspector/InspectorDebuggerAgent.cpp:
              (WebCore::buildObjectForBreakpointCookie):
              (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
              (WebCore::InspectorDebuggerAgent::setBreakpoint):
              (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
              (WebCore::InspectorDebuggerAgent::didParseSource):
              * inspector/InspectorDebuggerAgent.h:
              * inspector/front-end/Breakpoint.js:
              (WebInspector.Breakpoint):
              * inspector/front-end/DebuggerModel.js:
              (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
              (WebInspector.DebuggerModel.prototype._breakpointResolved):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af0c7276
    • andreas.kling@nokia.com's avatar
      2011-04-07 Andreas Kling <andreas.kling@nokia.com> · e4b158bb
      andreas.kling@nokia.com authored
              Reviewed by Benjamin Poulain.
      
              [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
      
              When initializing a QStyleOptionSlider from a widget, the State_Horizontal
              hint may get set depending on how that widget is laid out in its parent.
              If this happens when drawing a vertical scrollbar, the hint is never
              cleared and we end up painting a vertical scrollbar with horizontal arrows.
      
              Covered by pixel tests which should no longer paint silly scrollbars.
      
              * platform/qt/ScrollbarThemeQt.cpp:
              (WebCore::styleOptionSlider):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e4b158bb
    • abarth@webkit.org's avatar
      2011-04-07 Adam Barth <abarth@webkit.org> · 3285b43b
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              script-src should block inline script
              https://bugs.webkit.org/show_bug.cgi?id=58012
      
              Test that script-src blocks inline script.  This test uses a different
              approach than the existing tests for variety.
      
              * http/tests/security/contentSecurityPolicy/inline-script-blocked-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/inline-script-blocked.html: Added.
              * http/tests/security/contentSecurityPolicy/resources/document-write-alert-fail.js: Added.
              * http/tests/security/contentSecurityPolicy/resources/dump-as-text.js: Added.
      2011-04-07  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              script-src should block inline script
              https://bugs.webkit.org/show_bug.cgi?id=58012
      
              Block inline scripts at the ScriptElement layer.  This should catch
              exactly the scripts we want to catch.
      
              Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
      
              * dom/Document.cpp:
              (WebCore::Document::processHttpEquiv):
                  - This patch also adds the ability to supply a CSP policy via a
                    <meta> tag.  We'll update the name of the header once we've
                    finished implementing the spec.
              * dom/ScriptElement.cpp:
              (WebCore::ScriptElement::executeScript):
              * page/ContentSecurityPolicy.cpp:
              (WebCore::ContentSecurityPolicy::allowInlineScript):
              * page/ContentSecurityPolicy.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83159 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3285b43b
    • commit-queue@webkit.org's avatar
      2011-04-07 Alice Boxhall <aboxhall@chromium.org> · a892eb1c
      commit-queue@webkit.org authored
              Reviewed by Ryosuke Niwa.
      
              Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
              https://bugs.webkit.org/show_bug.cgi?id=57921
      
              Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
              that the same logic can be used for a HitTestResult.
      
              No visible changes, just cleanup, so no tests.
      
              * page/EventHandler.cpp:
              (WebCore::EventHandler::selectClosestWordFromMouseEvent):
              (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
              (WebCore::EventHandler::handleMousePressEventTripleClick):
              (WebCore::EventHandler::handleMousePressEventSingleClick):
              (WebCore::EventHandler::handleMousePressEvent):
              (WebCore::EventHandler::handleMouseDraggedEvent):
              (WebCore::EventHandler::handleMouseReleaseEvent):
              (WebCore::EventHandler::subframeForHitTestResult):
              Made public static member, so that it can access targetNode(), and be accessed by
              webkitwebview in gtk.
              (WebCore::EventHandler::selectCursor):
              (WebCore::EventHandler::targetNode):
              (WebCore::EventHandler::handleMouseDoubleClickEvent):
              (WebCore::EventHandler::handleMouseMoveEvent):
              (WebCore::EventHandler::updateDragAndDrop):
              (WebCore::EventHandler::sendContextMenuEvent):
              * page/EventHandler.h:
              * page/MouseEventWithHitTestResults.cpp:
              (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
              * page/MouseEventWithHitTestResults.h:
              * page/android/EventHandlerAndroid.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/brew/EventHandlerBrew.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/chromium/EventHandlerChromium.cpp:
              (WebCore::EventHandler::passMousePressEventToSubframe):
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/efl/EventHandlerEfl.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/gtk/EventHandlerGtk.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/haiku/EventHandlerHaiku.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              * page/mac/EventHandlerMac.mm:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
              (WebCore::EventHandler::passSubframeEventToSubframe):
              * page/wx/EventHandlerWx.cpp:
              (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
      2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
      
              Reviewed by Ryosuke Niwa.
      
              Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
              https://bugs.webkit.org/show_bug.cgi?id=57921
      
              * webkit/webkitwebview.cpp:
              (webkit_web_view_forward_context_menu_event):
              Call subframeForHitTestResult rather than subframeForTargetNode as the targetNode()
              method has moved on to EventHandler.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a892eb1c
    • podivilov@chromium.org's avatar
      2011-04-07 Pavel Podivilov <podivilov@chromium.org> · dc47c49d
      podivilov@chromium.org authored
              Reviewed by Pavel Feldman.
      
              Web Inspector: build mapping for formatted scripts based on keywords positions.
              https://bugs.webkit.org/show_bug.cgi?id=57936
      
              Mapping based on [\$\.\w]+ was not accurate because string literals representation
              may be different in original and formatted scripts.
      
              * inspector/front-end/ScriptFormatterWorker.js:
              (buildMapping.regexp.b):
              (buildMapping):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83151 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc47c49d
    • tkent@chromium.org's avatar
      Spinbuttons become unclickable if right padding is large. · 508868bc
      tkent@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=56298
      
      Reviewed by NOBODY (OOPS!).
      
      Source/WebCore:
      
      An inner-spin-button is put on the right border and ignores right
      padding in RenderTextControlSingleLine::layout(), but forwardEvent()
      checks if a point is in an area just right of an internal text block.
      This inconsistency caused a bug that an inner-spin-button with large
      padding didn't receive mouse events.
      
      To fix this bug, we render spin buttons as layers, and remove manual
      event forwarding code.
      
      Test: fast/forms/input-number-large-padding.html
      
      * css/html.css: Add "position:relative" to make a spin-button a layer.
      (input::-webkit-inner-spin-button):
      (input::-webkit-outer-spin-button):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::forwardEvent):
        Remove manual event forwarding code.
      
      LayoutTests:
      
      Add a test, and skip on platforms which has no inner-spin-button implementation.
      
      * fast/forms/input-number-large-padding-expected.txt: Added.
      * fast/forms/input-number-large-padding.html: Added.
      * platform/chromium/test_expectations.txt:
      * platform/mac/Skipped:
      * platform/mac/fast/forms/input-appearance-spinbutton-disabled-readonly-expected.txt:
      * platform/mac/fast/forms/input-appearance-spinbutton-expected.txt:
      * platform/mac/fast/forms/input-appearance-spinbutton-layer-expected.txt:
      * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt:
      * platform/mac/fast/forms/input-appearance-spinbutton-visibility-expected.txt:
      * platform/qt/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      508868bc
  2. 06 Apr, 2011 4 commits
    • abarth@webkit.org's avatar
      2011-04-06 Adam Barth <abarth@webkit.org> · 15f9e21f
      abarth@webkit.org authored
              Reviewed by Eric Seidel.
      
              CSP object-src should block plugin loads
              https://bugs.webkit.org/show_bug.cgi?id=57283
      
              This change is pretty straight-forward.  It's slighly unclear to me
              whether this patch is correct w.r.t. the code in DocumentWriter.  I've
              added a FIXME comment, and I'll investigate that case more in the future.
      
              Test: http/tests/security/contentSecurityPolicy/object-src-none.html
      
              * loader/DocumentWriter.cpp:
              (WebCore::DocumentWriter::begin):
              * loader/SubframeLoader.cpp:
              (WebCore::SubframeLoader::requestPlugin):
              * page/ContentSecurityPolicy.cpp:
              (WebCore::ContentSecurityPolicy::allowObjectFromSource):
              (WebCore::ContentSecurityPolicy::addDirective):
              * page/ContentSecurityPolicy.h:
      2011-04-06  Adam Barth  <abarth@webkit.org>
      
              Reviewed by Eric Seidel.
      
              CSP object-src should block plugin loads
              https://bugs.webkit.org/show_bug.cgi?id=57283
      
              * http/tests/security/contentSecurityPolicy/object-src-none-expected.txt: Added.
              * http/tests/security/contentSecurityPolicy/object-src-none.html: Added.
              * http/tests/security/contentSecurityPolicy/resources/echo-object-data.pl: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83141 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      15f9e21f
    • bdakin@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=58009 · 04df6373
      bdakin@apple.com authored
      Frame::scalePage() results in visual artifacts with scale factors less than 1
      -and corresponding-
      <rdar://problem/8683230>
      
      Reviewed by Dan Bernstein.
      
      Source/WebCore: 
      
      Fall into the case where we fill with a background base color when there is a page 
      scale factor that is less than 1.
      * rendering/RenderView.cpp:
      (WebCore::RenderView::paintBoxDecorations):
      
      LayoutTests: 
      
      * fast/repaint/scale-page-shrink.html: Added.
      * platform/gtk/Skipped:
      * platform/mac/fast/repaint/scale-page-shrink-expected.checksum: Added.
      * platform/mac/fast/repaint/scale-page-shrink-expected.png: Added.
      * platform/mac/fast/repaint/scale-page-shrink-expected.txt: Added.
      * platform/qt/Skipped:
      * platform/win/Skipped:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04df6373
    • jer.noble@apple.com's avatar
      2011-04-06 Jer Noble <jer.noble@apple.com> · 2f78a59c
      jer.noble@apple.com authored
              Reviewed by Darin Adler.
      
              AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
              https://bugs.webkit.org/show_bug.cgi?id=57982
      
              Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
      
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
              (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2f78a59c
    • jer.noble@apple.com's avatar
      2011-04-06 Jer Noble <jer.noble@apple.com> · e3b8e30d
      jer.noble@apple.com authored
              Reviewed by Eric Carlson.
      
              MediaPlayerPrivateAVFoundation does not change rate due to setRate().
              https://bugs.webkit.org/show_bug.cgi?id=57919
      
              * media/video-set-rate-from-pause-expected.txt: Added.
              * media/video-set-rate-from-pause.html: Added.
      2011-04-06  Jer Noble  <jer.noble@apple.com>
      
              Reviewed by Eric Carlson.
      
              MediaPlayerPrivateAVFoundation does not change rate due to setRate().
              https://bugs.webkit.org/show_bug.cgi?id=57919
      
              Test: media/video-set-rate-from-pause.html
      
              The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
              of the media; instead a subclass must do that work.  So when setRate() is called,
              inform a subclass through a new pure virtual updateRate() function that there's
              work to be done.
      
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
              (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
              * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
              (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3b8e30d