1. 08 Apr, 2011 2 commits
  2. 07 Apr, 2011 7 commits
    • commit-queue@webkit.org's avatar
      2011-04-07 Ian Henderson <ianh@apple.com> · c0295d8f
      commit-queue@webkit.org authored
              Reviewed by Simon Fraser.
      
              Optimize filling rounded rects that are actually ellipses
              https://bugs.webkit.org/show_bug.cgi?id=58098
      
              In CG, drawing an ellipse directly is faster than constructing and
              filling a rounded rect path.  Detect when the given rounded rect is
              actually an ellipse and draw it directly in this case.
      
              * platform/graphics/cg/GraphicsContextCG.cpp:
              (WebCore::GraphicsContext::fillRoundedRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c0295d8f
    • commit-queue@webkit.org's avatar
      2011-04-07 Ned Holbrook <nholbrook@apple.com> · 4c749b2e
      commit-queue@webkit.org authored
              Reviewed by Dan Bernstein.
      
              CTLine objects should outlive their CTRuns
              https://bugs.webkit.org/show_bug.cgi?id=58063
      
              * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
              * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
              (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
              (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4c749b2e
    • commit-queue@webkit.org's avatar
      2011-04-07 Nat Duca <nduca@chromium.org> · 118a5518
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              [chromium] Compositor thread infrastructure
              https://bugs.webkit.org/show_bug.cgi?id=56131
      
              Introduce chrome compositor thread and related
              infrastructure.
      
              * WebCore.gypi:
              * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
              (WebCore::CCMainThread::performTask):
              (WebCore::CCMainThread::postTask):
              * platform/graphics/chromium/cc/CCMainThread.h: Added.
              (WebCore::CCMainThread::Task::~Task):
              (WebCore::CCMainThread::Task::instance):
              (WebCore::CCMainThread::Task::Task):
              * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
              (WebCore::MainThreadTask0::create):
              (WebCore::MainThreadTask0::MainThreadTask0):
              (WebCore::MainThreadTask0::performTask):
              (WebCore::MainThreadTask1::create):
              (WebCore::MainThreadTask1::MainThreadTask1):
              (WebCore::MainThreadTask1::performTask):
              (WebCore::MainThreadTask2::create):
              (WebCore::MainThreadTask2::MainThreadTask2):
              (WebCore::MainThreadTask2::performTask):
              (WebCore::MainThreadTask3::create):
              (WebCore::MainThreadTask3::MainThreadTask3):
              (WebCore::MainThreadTask3::performTask):
              (WebCore::createMainThreadTask):
              * platform/graphics/chromium/cc/CCThread.cpp: Added.
              (WebCore::CCThread::create):
              (WebCore::CCThread::CCThread):
              (WebCore::CCThread::~CCThread):
              (WebCore::CCThread::postTask):
              (WebCore::CCThread::compositorThreadStart):
              (WebCore::CCThread::runLoop):
              * platform/graphics/chromium/cc/CCThread.h: Added.
              (WebCore::CCThread::Task::~Task):
              (WebCore::CCThread::Task::instance):
              (WebCore::CCThread::Task::Task):
              (WebCore::CCThread::threadID):
              (WebCore::CCCompletionEvent::CCCompletionEvent):
              (WebCore::CCCompletionEvent::~CCCompletionEvent):
              (WebCore::CCCompletionEvent::wait):
              (WebCore::CCCompletionEvent::signal):
              * platform/graphics/chromium/cc/CCThreadTask.h: Added.
              (WebCore::CCThreadTask0::create):
              (WebCore::CCThreadTask0::CCThreadTask0):
              (WebCore::CCThreadTask0::performTask):
              (WebCore::CCThreadTask1::create):
              (WebCore::CCThreadTask1::CCThreadTask1):
              (WebCore::CCThreadTask1::performTask):
              (WebCore::CCThreadTask2::create):
              (WebCore::CCThreadTask2::CCThreadTask2):
              (WebCore::CCThreadTask2::performTask):
              (WebCore::CCThreadTask3::create):
              (WebCore::CCThreadTask3::CCThreadTask3):
              (WebCore::CCThreadTask3::performTask):
              (WebCore::createCCThreadTask):
      2011-04-07  Nat Duca  <nduca@chromium.org>
      
              Reviewed by David Levin.
      
              [chromium] Compositor thread infrastructure
              https://bugs.webkit.org/show_bug.cgi?id=56131
      
              Tests for chrome compositor thread and related infrastructure.
      
              * WebKit.gyp:
              * WebKit.gypi:
              * tests/CCThreadTaskTest.cpp: Added.
              (WebCore::TEST):
              * tests/CCThreadTest.cpp: Added.
              (WebCore::TEST):
              (WebCore::PingPongUsingCondition::ping):
              (WebCore::PingPongTestUsingTasks::ping):
              (WebCore::PingPongTestUsingTasks::pong):
              * tests/RunAllTests.cpp:
              (main):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83249 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      118a5518
    • 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
    • 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
    • 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
    • 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
  3. 06 Apr, 2011 8 commits
    • 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
    • mitz@apple.com's avatar
      <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has... · 39d6aca5
      mitz@apple.com authored
      <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
      https://bugs.webkit.org/show_bug.cgi?id=58002
      
      Reviewed by Darin Adler.
      
      Source/WebCore: 
      
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
      does not require the vertical metrics tweaks that were needed in Leopard. That the
      tweaks were being applied went mostly unnoticed until r73993, because until then it
      only affected cases where Geeza Pro was specified, not when it occurred as a fallback
      font.
      
      LayoutTests: 
      
      * platform/mac/fast/dom/52776-expected.checksum:
      * platform/mac/fast/dom/52776-expected.png:
      * platform/mac/fast/dom/52776-expected.txt:
      * platform/mac/fast/text/complex-text-opacity-expected.txt:
      * platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.txt:
      * platform/mac/fast/text/international/bidi-AN-after-L-expected.checksum:
      * platform/mac/fast/text/international/bidi-AN-after-L-expected.png:
      * platform/mac/fast/text/international/bidi-AN-after-L-expected.txt:
      * platform/mac/fast/text/international/bidi-AN-after-empty-run-expected.checksum:
      * platform/mac/fast/text/international/bidi-AN-after-empty-run-expected.png:
      * platform/mac/fast/text/international/bidi-AN-after-empty-run-expected.txt:
      * platform/mac/fast/text/international/bidi-CS-after-AN-expected.txt:
      * platform/mac/fast/text/international/bidi-mirror-he-ar-expected.txt:
      * platform/mac/fast/text/international/bidi-neutral-run-expected.checksum:
      * platform/mac/fast/text/international/bidi-neutral-run-expected.png:
      * platform/mac/fast/text/international/bidi-neutral-run-expected.txt:
      * platform/mac/platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.checksum:
      * platform/mac/platform/mac/fast/text/international/Geeza-Pro-vertical-metrics-adjustment-expected.png:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39d6aca5
    • beidson@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973 · 452dbe28
      beidson@apple.com authored
      WK2 icon database should be able to get a CGImage of a specific size
      
      Reviewed by Anders Carlsson.
      
      ../WebCore: 
      
      * platform/graphics/BitmapImage.h:
      * platform/graphics/Image.h:
      (WebCore::Image::getFirstCGImageRefOfSize):
              
      * platform/graphics/cg/ImageCG.cpp:
      (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
        first frame of the requested size.
      
      ../WebKit2: 
      
      * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
      (WKIconDatabaseTryGetCGImageForURL): Change this API to take a requested size, and find the first matching
        CGImage in the icon.
      * UIProcess/API/C/cg/WKIconDatabaseCG.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      452dbe28
    • alexis.menard@openbossa.org's avatar
      2011-04-06 Alexis Menard <alexis.menard@openbossa.org> · a98ed549
      alexis.menard@openbossa.org authored
              Reviewed by Andreas Kling.
      
              [Qt] Implement fullscreen playback for the GStreamer backend.
              https://bugs.webkit.org/show_bug.cgi?id=56826
      
              Implement support for fullscreen playback when building the
              Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
              The implementation is done in FullScreenVideoQt alongside with
              the Qt Multimedia support.
      
              No new tests because layout tests cover it. They are not yet activated
              but will be any time soon.
      
              * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
              * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
              (FullScreenVideoWindow::FullScreenVideoWindow):
              (FullScreenVideoWindow::setVideoElement):
              (FullScreenVideoWindow::closeEvent):
              (FullScreenVideoWindow::keyPressEvent):
              (FullScreenVideoWindow::event):
              (FullScreenVideoWindow::showFullScreen):
              (FullScreenVideoWindow::hideCursor):
              (FullScreenVideoWindow::showCursor):
      2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
      
              Reviewed by Andreas Kling.
      
              [Qt] Implement fullscreen playback for the GStreamer backend.
              https://bugs.webkit.org/show_bug.cgi?id=56826
      
              Implement support for fullscreen playback when building the
              Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
              The implementation is done in FullScreenVideoQt alongside with
              the Qt Multimedia support.
      
              No new tests because layout tests cover it. They are not yet activated
              but will be any time soon.
      
              * QtWebKit.pro:
              * WebCoreSupport/ChromeClientQt.cpp:
              (WebCore::ChromeClientQt::ChromeClientQt):
              (WebCore::ChromeClientQt::~ChromeClientQt):
              (WebCore::ChromeClientQt::enterFullscreenForNode):
              (WebCore::ChromeClientQt::exitFullscreenForNode):
              * WebCoreSupport/ChromeClientQt.h:
              * WebCoreSupport/FullScreenVideoQt.cpp:
              (WebCore::GStreamerFullScreenVideoHandler::GStreamerFullScreenVideoHandler):
              (WebCore::GStreamerFullScreenVideoHandler::setVideoElement):
              (WebCore::GStreamerFullScreenVideoHandler::enterFullScreen):
              (WebCore::GStreamerFullScreenVideoHandler::windowClosed):
              (WebCore::GStreamerFullScreenVideoHandler::exitFullScreen):
              (WebCore::DefaultFullScreenVideoHandler::DefaultFullScreenVideoHandler):
              (WebCore::FullScreenVideoQt::FullScreenVideoQt):
              (WebCore::FullScreenVideoQt::~FullScreenVideoQt):
              (WebCore::FullScreenVideoQt::enterFullScreenForNode):
              (WebCore::FullScreenVideoQt::exitFullScreenForNode):
              (WebCore::FullScreenVideoQt::requiresFullScreenForVideoPlayback):
              (WebCore::FullScreenVideoQt::isValid):
              * WebCoreSupport/FullScreenVideoQt.h:
              (WebCore::GStreamerFullScreenVideoHandler::~GStreamerFullScreenVideoHandler):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a98ed549
    • hyatt@apple.com's avatar
      https://bugs.webkit.org/show_bug.cgi?id=57916 · a61b8a36
      hyatt@apple.com authored
              
      Reviewed by Dan Bernstein.
      
      Implement an optimization to the line box tree to cull out most of the intermediate
      line boxes that can occur between the root line box and the leaves of the tree (images
      and text).
      
      Source/WebCore: 
      
      RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
      that starts off as false. Only if it gets flipped to true will there be any line boxes
      created for that RenderInline.
              
      * page/FocusController.cpp:
      (WebCore::FocusController::advanceFocusDirectionally):
      Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
      is up to date.
      
      * page/SpatialNavigation.cpp:
      (WebCore::hasOffscreenRect):
      (WebCore::nodeRectInAbsoluteCoordinates):
      Add asserts in spatial navigation code to catch any future bad queries that might be made
      for rectangles without layout being up to date.
      
      * platform/graphics/FloatRect.cpp:
      (WebCore::FloatRect::uniteIfNonZero):
      * platform/graphics/FloatRect.h:
      * platform/graphics/IntRect.cpp:
      (WebCore::IntRect::uniteIfNonZero):
      * platform/graphics/IntRect.h:
      Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
      version allows rect unites to happen if either width or height is nonzero.
      
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::addNodeToRectBasedTestResult):
      Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
      if content inside those inlines is hit.
      
      * rendering/InlineBox.h:
      (WebCore::InlineBox::logicalFrameRect):
      Fix a bug in this function for obtaining the logical frame rect of an inline box.
      
      * rendering/InlineFlowBox.cpp:
      (WebCore::InlineFlowBox::addToLine):
      addToLine now also checks line gap in the line box tree optimization checks.
          
      (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
      (WebCore::InlineFlowBox::computeOverflow):
      * rendering/InlineFlowBox.h:
      Rewritten to add the text box overflow to the text box itself.
      
       * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::destroy):
      Destroy has been changed to call a helper function to remove and destroy the line boxes that
      is now called from one additional spot.
      
      (WebCore::InlineTextBox::logicalOverflowRect):
      (WebCore::InlineTextBox::setLogicalOverflowRect):
      Text boxes now cache their own overflow in a global hash table.
      
      (WebCore::InlineTextBox::baselinePosition):
      (WebCore::InlineTextBox::lineHeight):
      Changed to not assume that the parent line box's renderer is the RenderText's immediate
      parent, since intermediate line boxes may have been culled.
      
      (WebCore::InlineTextBox::paint):
      Paint now properly checks only the text box overflow instead of the parent line box's overflow.
      
      * rendering/InlineTextBox.h:
      (WebCore::InlineTextBox::logicalTopVisualOverflow):
      (WebCore::InlineTextBox::logicalBottomVisualOverflow):
      (WebCore::InlineTextBox::logicalLeftVisualOverflow):
      (WebCore::InlineTextBox::logicalRightVisualOverflow):
      New accessors to obtain overflow for inline text boxes.
      
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::updateFirstLetter):
      updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
      text boxes may not have anything in between them and the block that contains the inline first letter
      container.
      
      * rendering/RenderBlockLineLayout.cpp:
      (WebCore::RenderBlock::createLineBoxes):
      The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
      be created.
      
      (WebCore::RenderBlock::layoutInlineChildren):
      The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
      This is done before any lines are built.
      
      * rendering/RenderInline.cpp:
      (WebCore::RenderInline::RenderInline):
      The new m_alwaysCreateLineBoxes flag has been added to the constructor.
      
      (WebCore::RenderInline::styleDidChange):
      An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
      (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
      the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
      
      (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
      The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
      vertical alignment, line height, etc.).
      
      (WebCore::RenderInline::absoluteRects):
      (WebCore::RenderInline::culledInlineAbsoluteRects):
      absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::absoluteQuads):
      (WebCore::RenderInline::culledInlineAbsoluteQuads):
      absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::offsetLeft):
      (WebCore::RenderInline::offsetTop):
      offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::linesBoundingBox):
      (WebCore::RenderInline::culledInlineBoundingBox):
      lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::culledInlineFirstLineBox):
      (WebCore::RenderInline::culledInlineLastLineBox):
      Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
      lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
      
      (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
      (WebCore::RenderInline::linesVisualOverflowBoundingBox):
      linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::clippedOverflowRectForRepaint):
      The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
      
      (WebCore::RenderInline::dirtyLineBoxes):
      dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
      m_alwaysCreateLineBoxes is false.
      
      (WebCore::RenderInline::createAndAppendInlineFlowBox):
      Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
      when line-box-contain is set to an unusual value.
      
      (WebCore::RenderInline::addFocusRingRects):
      Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
      
      * rendering/RenderInline.h:
      (WebCore::RenderInline::firstLineBoxIncludingCulling):
      (WebCore::RenderInline::lastLineBoxIncludingCulling):
      Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
      is all that needs checking.
      
      (WebCore::RenderInline::alwaysCreateLineBoxes):
      (WebCore::RenderInline::setAlwaysCreateLineBoxes):
      Functions for getting and setting the m_alwaysCreateLineBoxes flag.
      
      * rendering/RenderLineBoxList.cpp:
      (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
      Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
      lines get dirtied.
      
      * rendering/RenderText.cpp:
      (WebCore::RenderText::removeAndDestroyTextBoxes):
      New helper invoked by destroy and also from updateFirstLetter.
      
      (WebCore::RenderText::destroy):
      Changed to call removeAndDestroyTextBoxes.
      
      (WebCore::RenderText::absoluteRects):
      Fixed to be properly physical instead of logical.
      
      (WebCore::RenderText::linesVisualOverflowBoundingBox):
      New implementation for RenderText that gives the bounding box of the text boxes including overflow from
      shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.
      
      * rendering/RenderText.h:
      * rendering/svg/RenderSVGInline.cpp:
      (WebCore::RenderSVGInline::RenderSVGInline):
      RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
      
      * rendering/svg/SVGRootInlineBox.cpp:
      (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
      (WebCore::SVGRootInlineBox::layoutChildBoxes):
      Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
      now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
      
      LayoutTests: 
      
      RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
      that starts off as false. Only if it gets flipped to true will there be any line boxes
      created for that RenderInline.
      
      * platform/mac/fast/blockflow/text-orientation-basic-expected.txt:
      * platform/mac/fast/text/capitalize-empty-generated-string-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a61b8a36
    • mrobinson@webkit.org's avatar
      2011-04-06 Martin Robinson <mrobinson@igalia.com> · 62f5d3b2
      mrobinson@webkit.org authored
              Build fix for debug Cairo builds.
      
              * platform/graphics/cairo/PlatformContextCairo.cpp:
              (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83048 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      62f5d3b2
    • mrobinson@webkit.org's avatar
      2011-04-06 Martin Robinson <mrobinson@igalia.com> · 69a5cea7
      mrobinson@webkit.org authored
              Reviewed by Xan Lopez.
      
              [Cairo] Hide the details of image masking in PlatformContextCairo
              https://bugs.webkit.org/show_bug.cgi?id=57878
      
              No new tests. This is just a refactor.
      
              * platform/graphics/GraphicsContext.h:
              * platform/graphics/cairo/GraphicsContextCairo.cpp:
              (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
              do the actual cairo_save. Remove information about image masking.
              (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
              do the actual cairo_restore. Remove information about image masking.
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
              * platform/graphics/cairo/ImageBufferCairo.cpp:
              (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
              * platform/graphics/cairo/PlatformContextCairo.cpp:
              (WebCore::PlatformContextCairo::restore): Added.
              (WebCore::PlatformContextCairo::save): Added.
              (WebCore::PlatformContextCairo::pushImageMask): Added.
              * platform/graphics/cairo/PlatformContextCairo.h:
              (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
              (WebCore::ImageMaskInformation::isValid): Ditto.
              (WebCore::ImageMaskInformation::maskSurface): Ditto.
              (WebCore::ImageMaskInformation::maskRect): Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      69a5cea7
  4. 05 Apr, 2011 4 commits
    • commit-queue@webkit.org's avatar
      2011-04-05 Steve VanDeBogart <vandebo@chromium.org> · a7f5fa91
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              Update call to SkAdvancedTypefaceMetrics to new API.
              https://bugs.webkit.org/show_bug.cgi?id=57887
      
              * platform/graphics/chromium/FontPlatformDataLinux.cpp:
              (WebCore::FontPlatformData::emSizeInFontUnits):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a7f5fa91
    • commit-queue@webkit.org's avatar
      2011-04-05 Steve VanDeBogart <vandebo@chromium.org> · 66ede261
      commit-queue@webkit.org authored
              Reviewed by David Levin.
      
              Update deprecated include: platform_canvas_win.h to platform_canvas.h.
              https://bugs.webkit.org/show_bug.cgi?id=57896
      
              * platform/graphics/chromium/FontChromiumWin.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83013 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66ede261
    • enne@google.com's avatar
      2011-04-05 Adrienne Walker <enne@google.com> · b32fa1f7
      enne@google.com authored
              Reviewed by Tony Chang.
      
              Correctly set color when using skia's fillRoundedRect.
              https://bugs.webkit.org/show_bug.cgi?id=57907
      
              * platform/graphics/skia/GraphicsContextSkia.cpp:
              (WebCore::GraphicsContext::fillRoundedRect):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83002 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b32fa1f7
    • mrobinson@webkit.org's avatar
      2011-04-05 Martin Robinson <mrobinson@igalia.com> · 66a7bfb3
      mrobinson@webkit.org authored
              Reviewed by Eric Seidel.
      
              [Cairo] Better separate the concerns of GraphicsContextCairo
              https://bugs.webkit.org/show_bug.cgi?id=55150
      
              Add a PlatformContextCairo which right now stores the cairo_t* for a
              GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
              and image masking layers into this PlatformContextCairo class.
      
              No new tests. This patch is only a code cleanup.
      
              * GNUmakefile.am:
              * platform/graphics/GraphicsContext.h: The platform context is no longer a
              cairo_t, but our new class the PlatformContextCairo.
              * platform/graphics/cairo/ContextShadowCairo.cpp: Updated to reflect new class.j
              * platform/graphics/cairo/FontCairo.cpp: Ditto.
              * platform/graphics/cairo/GradientCairo.cpp: Ditto.
              * platform/graphics/cairo/GraphicsContextCairo.cpp: Mostly mechanical
              changes which now reference platformContext()->cr() to get the cairo_t.
              * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: Now hold the
              PlatformContextCairo instead of the cairo_t.
              * platform/graphics/cairo/ImageBufferCairo.cpp: Update to reflect new class.
              * platform/graphics/cairo/ImageCairo.cpp: Ditto.
              * platform/graphics/cairo/PathCairo.cpp: Ditto.
              * platform/graphics/cairo/PlatformContextCairo.cpp: Added.
              * platform/graphics/cairo/PlatformContextCairo.h: Added.
              * platform/graphics/gtk/FontGtk.cpp: Update to reflect new class.
              * platform/graphics/gtk/IconGtk.cpp: Ditto.
              * platform/graphics/win/GraphicsContextCairoWin.cpp: Now fill out
              m_data with a private section containing the platform context instead of
              just a cairo_t.
              * platform/gtk/RenderThemeGtk.cpp: Update to reflect new class.
              * platform/gtk/WidgetRenderingContext.cpp: Ditto.
              (WebCore::WidgetRenderingContext::~WidgetRenderingContext): Ditto.
              * plugins/gtk/PluginViewGtk.cpp: Ditto.
      2011-04-05  Martin Robinson  <mrobinson@igalia.com>
      
              Reviewed by Eric Seidel.
      
              [Cairo] Better separate the concerns of GraphicsContextCairo
              https://bugs.webkit.org/show_bug.cgi?id=55150
      
              Add a PlatformContextCairo which right now stores the cairo_t* for a
              GraphicsContextCairo. Later patches will move logic for tracking ContextShadow
              and image masking layers into this PlatformContextCairo class.
      
              * webkit/webkitwebframe.cpp:
              (draw_page_callback):
              * webkit/webkitwebview.cpp:
              (webkit_web_view_expose_event):
              (webkit_web_view_draw):
      2011-04-05  Martin Robinson  <mrobinson@igalia.com>
      
              Reviewed by Eric Seidel.
      
              [Cairo] Better separate the concerns of GraphicsContextCairo
              https://bugs.webkit.org/show_bug.cgi?id=55150
      
              * WebFrame.cpp:
              (hdcFromContext): Modify this method to take PlatformContextCairo
              instead of a cairo_t.
              (WebFrame::spoolPage): Update to reflect new platform context.
              (WebFrame::spoolPages): Ditto.
              * WebFrame.h: Ditto.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82962 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66a7bfb3
  5. 04 Apr, 2011 3 commits
    • mrobinson@webkit.org's avatar
      2011-04-04 Martin Robinson <mrobinson@igalia.com> · e9b53367
      mrobinson@webkit.org authored
              Reviewed by Xan Lopez.
      
              [Cairo] Memory leak in RefPtrCairo
              https://bugs.webkit.org/show_bug.cgi?id=57758
      
              No new tests. This just fixes a memory leak.
      
              * platform/graphics/cairo/RefPtrCairo.cpp:
              (WTF::derefIfNotNull): Deref should unref the cairo_font_fact_t, not reference it.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e9b53367
    • mrobinson@webkit.org's avatar
      2011-04-04 Martin Robinson <mrobinson@igalia.com> · 2c1bbeda
      mrobinson@webkit.org authored
              Reviewed by Gustavo Noronha Silva.
      
              [GTK] WebGL support
              https://bugs.webkit.org/show_bug.cgi?id=31517
      
              * configure.ac: Update configure.ac to ensure that GL/GLX headers exist.
      2011-04-04  Martin Robinson  <mrobinson@igalia.com>
      
              Reviewed by Gustavo Noronha Silva.
      
              [GTK] WebGL support
              https://bugs.webkit.org/show_bug.cgi?id=31517
      
              Add WebGL support for the GTK+ bits of WebCore.
      
              No new tests. This will be covered by the existing WebGL tests once
              the bots are capable of running WebGL tests.
      
              * GNUmakefile.am: Added new files required for WebGL support.
              * html/HTMLCanvasElement.cpp:
              (WebCore::HTMLCanvasElement::getContext): Extend #ifdef to cover GTK+ as well, which does not
              yet support accelerated compositing.
              * platform/graphics/ANGLEWebKitBridge.h: Update to reflect the fact that ANGLE isn't compiled as
              a framework for GTK+.
              * platform/graphics/GraphicsContext3D.h:
              (WebCore::GraphicsContext3D::platformTexture): Added a declaration of this method for Cairo.
              (WebCore::GraphicsContext3D::paintsIntoCanvasBuffer): Ditto.
              * platform/graphics/cairo/GraphicsContext3DCairo.cpp: Added.
              (WebCore::GraphicsContext3D::getImageData): Added.
              (WebCore::GraphicsContext3D::paintToCanvas): Added.
              * platform/graphics/cairo/OpenGLShims.cpp: Added. This file controls loading of GL extension
              functions dynamically. They have different names across the different vendors' GL implementations.
              (WebCore::lookupOpenGLFunctionAddress): Added
              (WebCore::openGLFunctionTable): Added
              (WebCore::initializeOpenGLShims): Added
              * platform/graphics/cairo/OpenGLShims.h: Added.
              * platform/graphics/gtk/DrawingBufferGtk.cpp: Added.
              (WebCore::DrawingBuffer::DrawingBuffer): Very generic implementation for Cairo.
              (WebCore::DrawingBuffer::~DrawingBuffer): Ditto.
              (WebCore::DrawingBuffer::didReset): Ditto.
              (WebCore::DrawingBuffer::platformColorBuffer): Ditto.
              * platform/graphics/gtk/GraphicsContext3DGtk.cpp: Added.
              (WebCore::GraphicsContext3D::create): Initial implementation.
              (WebCore::GraphicsContext3D::GraphicsContext3D): Ditto.
              (WebCore::GraphicsContext3D::~GraphicsContext3D): Ditto.
              (WebCore::GraphicsContext3D::makeContextCurrent): Ditto.
              (WebCore::GraphicsContext3D::platformGraphicsContext3D): Ditto.
              (WebCore::GraphicsContext3D::isGLES2Compliant): Ditto.
              * platform/graphics/gtk/GraphicsContext3DInternal.cpp: Added.
              (sharedDisplay): Added this shared display which is required by some
              display drivers.
              (WebCore::activeGraphicsContexts): This method keeps track of all active GraphicsContext3D
              contexts, in order to clean them up at exit. This prevents crashes on certain OpenGL drivers.
              (WebCore::GraphicsContext3DInternal::addActiveGraphicsContext): Ditto.
              (WebCore::GraphicsContext3DInternal::removeActiveGraphicsContext): Ditto.
              (WebCore::GraphicsContext3DInternal::cleanupActiveContextsAtExit): Ditto.
              (WebCore::GraphicsContext3DInternal::create): Figure out the best way to create an OpenGL
              context given the current environment.
              (WebCore::GraphicsContext3DInternal::createPbufferContext): Pbuffer context initializer.
              (WebCore::GraphicsContext3DInternal::createPixmapContext): Pixmap context initializer.
              (WebCore::GraphicsContext3DInternal::GraphicsContext3DInternal): Initial implementation.
              (WebCore::GraphicsContext3DInternal::~GraphicsContext3DInternal): Ditto.
              (WebCore::GraphicsContext3DInternal::makeContextCurrent): Ditto.
              * platform/graphics/gtk/GraphicsContext3DInternal.h: Added.
              * platform/graphics/opengl/Extensions3DOpenGL.cpp: Added generic implementation.
              (WebCore::Extensions3DOpenGL::ensureEnabled): Ditto.
              * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
              (WebCore::GraphicsContext3D::reshape): Test for the context using the public API rather than
              the private bits that are specific to the Apple port.
      2011-04-04  Martin Robinson  <mrobinson@igalia.com>
      
              Reviewed by Gustavo Noronha Silva.
      
              [GTK] WebGL support
              https://bugs.webkit.org/show_bug.cgi?id=31517
      
              Add support for toggling WebGL at runtime when it's enabled.
      
              * webkit/webkitwebsettings.cpp: Add the enable-webgl property. When ENABLE_WEBGL
              is not enabled, it's a no-op.
              (webkit_web_settings_class_init): Update to support enable-webgl.
              (webkit_web_settings_set_property): Ditto.
              (webkit_web_settings_get_property): Ditto.
              * webkit/webkitwebview.cpp:
              (webkit_web_view_update_settings): Ditto.
      2011-04-04  Martin Robinson  <mrobinson@igalia.com>
      
              Reviewed by Gustavo Noronha Silva.
      
              [GTK] WebGL support
              https://bugs.webkit.org/show_bug.cgi?id=31517
      
              Add support to the DRT for turning on WebGL when a layout tests requests it.
      
              * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
              (LayoutTestController::overridePreference): Allow turning on WebGL from tests.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2c1bbeda
    • mdelaney@apple.com's avatar
      2011-04-01 Matthew Delaney <mdelaney@apple.com> · ec03ff19
      mdelaney@apple.com authored
              Reviewed by Simon Fraser.
      
              [CG] Do not accelerate small canvases
              https://bugs.webkit.org/show_bug.cgi?id=57596
      
              No new tests. No outward behavior changes.
      
              * platform/graphics/cg/ImageBufferCG.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82860 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec03ff19
  6. 02 Apr, 2011 1 commit
  7. 01 Apr, 2011 4 commits
  8. 31 Mar, 2011 9 commits
    • aroben@apple.com's avatar
      Add a new AbstractCACFLayerTreeHost base class · 667261a8
      aroben@apple.com authored
      This class exposes the interface that LayerChangesFlusher and PlatformCALayer rely on.
      CACFLayerTreeHost now derives from AbstractCACFLayerTreeHost. In the future, WebKit2's
      LayerTreeHostCA will also derive from it (on Windows).
      
      This should cause no change in behavior.
      
      Fixes <http://webkit.org/b/57598> Coupling between CACFLayerTreeHost and other CACF-related
      code is too high
      
      Reviewed by Anders Carlsson.
      
      * WebCore.vcproj/WebCore.vcproj: Added AbstractCACFLayerTreeHost, and let VS reorder files.
      
      * platform/graphics/ca/win/AbstractCACFLayerTreeHost.h: Added.
      
      * platform/graphics/ca/win/CACFLayerTreeHost.h: Changed to derive from
      AbstractCACFLayerTreeHost, and annotated the overrides of its functions.
      AbstractCACFLayerTreeHost also allows us to get rid of the friend relationship with
      PlatformCALayer.
      
      * platform/graphics/ca/win/LayerChangesFlusher.cpp:
      (WebCore::LayerChangesFlusher::flushPendingLayerChangesSoon):
      (WebCore::LayerChangesFlusher::cancelPendingFlush):
      (WebCore::LayerChangesFlusher::hookFired):
      * platform/graphics/ca/win/LayerChangesFlusher.h:
      * platform/graphics/ca/win/PlatformCALayerWin.cpp:
      (layerTreeHostForLayer):
      (PlatformCALayer::rootLayer):
      (PlatformCALayer::setNeedsCommit):
      (PlatformCALayer::addAnimationForKey):
      (PlatformCALayer::removeAnimationForKey):
      Changed to use AbstractCACFLayerTreeHost instead of using CACFLayerTreeHost directly.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      667261a8
    • bfulgham@webkit.org's avatar
      Reviewed Adam Roben. · bc5dae9f
      bfulgham@webkit.org authored
      [WinCairo] Implement Missing drawWindowsBitmap method.
      https://bugs.webkit.org/show_bug.cgi?id=57409
      
      * WebCore.vcproj/WebCore.vcproj: Add new DIBPixelData files.
      * platform/graphics/GraphicsContext.h:
      (WebCore::GraphicsContext::WindowsBitmap::buffer):
      (WebCore::GraphicsContext::WindowsBitmap::bufferLength):
      (WebCore::GraphicsContext::WindowsBitmap::size):
      (WebCore::GraphicsContext::WindowsBitmap::bytesPerRow):
      (WebCore::GraphicsContext::WindowsBitmap::bitsPerPixel):
      (WebCore::GraphicsContext::WindowsBitmap::windowsDIB):
      * platform/graphics/win/GraphicsContextCGWin.cpp:
      (WebCore::CGContextWithHDC):
      (WebCore::GraphicsContext::releaseWindowsContext): Modified to use
      new common routines.
      * platform/graphics/win/GraphicsContextCairoWin.cpp:
      (WebCore::drawBitmapToContext): New common drawing implementation.
      (WebCore::GraphicsContext::releaseWindowsContext): Modified to use
      new common routines.
      (WebCore::GraphicsContext::drawWindowsBitmap):
      * platform/graphics/win/GraphicsContextWin.cpp:
      (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap): Modified
      to use new DIBPixelData data type.
      * platform/graphics/win/DIBPixelData.cpp: Added.
      (WebCore::DIBPixelData::DIBPixelData):
      (WebCore::DIBPixelData::initialize):
      * platform/graphics/win/DIBPixelData.h: Added.
      (WebCore::DIBPixelData::DIBPixelData):
      (WebCore::DIBPixelData::buffer):
      (WebCore::DIBPixelData::bufferLength):
      (WebCore::DIBPixelData::size):
      (WebCore::DIBPixelData::bytesPerRow):
      (WebCore::DIBPixelData::bitsPerPixel):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bc5dae9f
    • aroben@apple.com's avatar
      Don't ref CACFLayerTreeHosts when telling them to flush layer changes · 21b38e2e
      aroben@apple.com authored
      LayerChangesFlusher was reffing CACFLayerTreeHosts before calling out to them. This would
      have protected us if calling out to one CACFLayerTreeHost could cause a different
      CACFLayerTreeHost to be destroyed. But that isn't possible; each CACFLayerTreeHost is
      associated with its own page, and flushing layer changes doesn't touch any other page. So it
      isn't possible for a CACFLayerTreeHost to be deleted while another one is flushing layer
      changes.
      
      One benefit of this change is that it will make it easier to make LayerChangesFlusher
      interact with a forthcoming abstract base class, rather than with CACFLayerTreeHost itself.
      
      This should cause no change in behavior.
      
      Fixes <http://webkit.org/b/57590> LayerChangesFlusher unnecessarily refs CACFLayerTreeHost
      before calling out to it
      
      Reviewed by Darin Adler.
      
      * platform/graphics/ca/win/LayerChangesFlusher.cpp:
      (WebCore::LayerChangesFlusher::hookFired): Just store bare pointers to the
      CACFLayerTreeHosts.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      21b38e2e
    • enne@google.com's avatar
      2011-03-31 Adrienne Walker <enne@google.com> · fdff3249
      enne@google.com authored
              Reviewed by James Robinson.
      
              [chromium] Fix ownership semantics for LayerChromium/CCLayerImpl
              https://bugs.webkit.org/show_bug.cgi?id=57577
      
              LayerRendererChromium now uses a RefPtr to preserve ownership of all
              of the CCLayerImpl layers that it is using during the update/draw
              pass.  Addtionally, when a LayerChromium is destroyed, the weak
              owner pointer from its CCLayerImpl is correctly unset.
      
              * platform/graphics/chromium/LayerRendererChromium.cpp:
              (WebCore::LayerRendererChromium::compareLayerZ):
              (WebCore::LayerRendererChromium::updateAndDrawLayers):
              (WebCore::LayerRendererChromium::updateLayers):
              (WebCore::LayerRendererChromium::drawLayers):
              (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
              (WebCore::LayerRendererChromium::drawLayer):
              * platform/graphics/chromium/LayerRendererChromium.h:
              * platform/graphics/chromium/RenderSurfaceChromium.h:
              * platform/graphics/chromium/VideoLayerChromium.cpp:
              (WebCore::VideoLayerChromium::updateCompositorResources):
              * platform/graphics/chromium/cc/CCLayerImpl.cpp:
              (WebCore::CCLayerImpl::drawsContent):
              (WebCore::CCLayerImpl::cleanupResources):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82624 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fdff3249
    • senorblanco@chromium.org's avatar
      2011-03-31 Stephen White <senorblanco@chromium.org> · 0c8e644f
      senorblanco@chromium.org authored
              Reviewed by Kenneth Russell.
      
              Speed up accelerated path drawing.
              https://bugs.webkit.org/show_bug.cgi?id=57371
              This CL does three things:  re-uses the same vertex and index buffer
              for all path draws, converts all vertex layouts from vec3 to vec2, and
              does a convexity check for polygons before passing them to the
              tesselator.
      
              Covered by canvas/philip/tests/2d.path.bezierCurveTo.*, and others.
      
              * platform/graphics/chromium/GLES2Canvas.cpp:
              Replace the Vector<double> for interpolated curves with a
              Vector<FloatPoint>.
              (WebCore::Cubic::evaluate):
              Inline the evaluation function (as Quadratic does).
              (WebCore::GLES2Canvas::GLES2Canvas):
              Initialize the m_pathIndexBuffer.
              (WebCore::GLES2Canvas::~GLES2Canvas):
              Delete the path vertex and index buffers on destruction.
              (WebCore::interpolateQuadratic):
              (WebCore::interpolateCubic):
              Interpolate directly to a Vector<FloatPoint>, rather than
              Vector<double>.
              (WebCore::PolygonData::PolygonData):
              (WebCore::combineData):
              Replace the DoubleVector with a FloatPointVector.
              (WebCore::GLES2Canvas::tesselateAndFillPath):
              Move curve drawing into this function, and rename it to reflect the
              new behaviour.  Re-use the common vertex and index buffers.  If the
              curve consists of a single convex polygon, draw the curve as a single
              triangle fan.  Otherwise, convert it to doubles and pass it to the
              tesselator.
              (WebCore::GLES2Canvas::fillPathInternal):
              * platform/graphics/chromium/GLES2Canvas.h:
              Rename createVertexBufferFromPath() -> tesselateAndFillPath().
              Add a persistent index buffer for all path draws.
              * platform/graphics/gpu/BicubicShader.cpp:
              (WebCore::BicubicShader::create):
              (WebCore::BicubicShader::use):
              * platform/graphics/gpu/ConvolutionShader.cpp:
              (WebCore::ConvolutionShader::create):
              (WebCore::ConvolutionShader::use):
              Use vec2s instead of vec3s for all vertex data.
              * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
              (WebCore::LoopBlinnMathUtils::convexCompare):
              (WebCore::LoopBlinnMathUtils::convexCross):
              (WebCore::LoopBlinnMathUtils::convexCheckTriple):
              (WebCore::LoopBlinnMathUtils::isConvex):
              * platform/graphics/gpu/LoopBlinnMathUtils.h:
              Implement a convexity check, based on the code in Graphics Gems IV.
              * platform/graphics/gpu/Shader.cpp:
              (WebCore::Shader::generateVertex):
              * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
              (WebCore::SharedGraphicsContext3D::useQuadVertices):
              * platform/graphics/gpu/SolidFillShader.cpp:
              (WebCore::SolidFillShader::use):
              * platform/graphics/gpu/TexShader.cpp:
              (WebCore::TexShader::use):
              Use vec2s instead of vec3s for all vertex data.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0c8e644f
    • aroben@apple.com's avatar
      Update WKCACFViewLayerTreeHost for changes to WKCACFView API · 563e8853
      aroben@apple.com authored
      This should not result in any change in behavior.
      
      Fixes <http://webkit.org/b/57560> WKCACFViewLayerTreeHost needs to tell WKCACFView where to
      render
      
      Reviewed by Darin Adler.
      
      * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Updated API declarations.
      (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Tell WKCACFView it should
      render into the window we give it.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82608 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      563e8853
    • commit-queue@webkit.org's avatar
      2011-03-31 Sheriff Bot <webkit.review.bot@gmail.com> · b8a6dc7f
      commit-queue@webkit.org authored
              Unreviewed, rolling out r82565.
              http://trac.webkit.org/changeset/82565
              https://bugs.webkit.org/show_bug.cgi?id=57541
      
              Caused assertion failures. (Requested by bbandix on #webkit).
      
              * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.checksum: Removed.
              * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.png: Removed.
              * platform/mac/svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.checksum: Removed.
              * platform/mac/svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.png: Removed.
              * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.checksum: Removed.
              * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png: Removed.
              * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.checksum: Removed.
              * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png: Removed.
              * svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.txt: Removed.
              * svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.html: Removed.
              * svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.txt: Removed.
              * svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html: Removed.
              * svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.txt: Removed.
              * svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.html: Removed.
              * svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.txt: Removed.
              * svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop.html: Removed.
              * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.js: Removed.
              * svg/dynamic-updates/script-tests/SVGFEFloodElement-inherit-flood-color-css-prop.js: Removed.
              * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.js: Removed.
              * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-lighting-color-css-prop.js: Removed.
      2011-03-31  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r82565.
              http://trac.webkit.org/changeset/82565
              https://bugs.webkit.org/show_bug.cgi?id=57541
      
              Caused assertion failures. (Requested by bbandix on #webkit).
      
              * platform/graphics/filters/FEFlood.cpp:
              (WebCore::FEFlood::setFloodColor):
              (WebCore::FEFlood::setFloodOpacity):
              * platform/graphics/filters/FEFlood.h:
              * platform/graphics/filters/FESpecularLighting.cpp:
              (WebCore::FESpecularLighting::setLightingColor):
              * platform/graphics/filters/FESpecularLighting.h:
              * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
              * rendering/svg/RenderSVGResourceFilterPrimitive.h:
              * rendering/svg/SVGResourcesCache.cpp:
              (WebCore::SVGResourcesCache::clientStyleChanged):
              * svg/SVGFEDiffuseLightingElement.cpp:
              (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
              * svg/SVGFEFloodElement.cpp:
              * svg/SVGFEFloodElement.h:
              * svg/SVGFESpecularLightingElement.cpp:
              (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82571 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b8a6dc7f
    • reni@webkit.org's avatar
      CSS related SVG*Element changes doesn't require relayout · 8e0d384d
      reni@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=56906
      
      Reviewed by Dirk Schulze.
      
      Source/WebCore: 
      
      The changes of some CSS related SVGFilter properties e.g. lighting-color, flood-color, flood-opacity
      need only repaint. To avoid the default invalidation of filters in SVGResourceCache::clientStyleChange()
      we need an early return. So RenderSVGResourceFilterPrimitive::styleDidChange() can handle these properties
      via RenderSVGResourceFilter::primitiveAttributeChanged() the same way like we do it for the other SVGAttributes.
      
      Tests: svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.html
             svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html
             svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.html
             svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop.html
      
      * platform/graphics/filters/FEFlood.cpp:
      (WebCore::FEFlood::setFloodColor):
      (WebCore::FEFlood::setFloodOpacity):
      * platform/graphics/filters/FEFlood.h:
      * platform/graphics/filters/FESpecularLighting.cpp:
      (WebCore::FESpecularLighting::setLightingColor):
      * platform/graphics/filters/FESpecularLighting.h:
      * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
      (WebCore::RenderSVGResourceFilterPrimitive::styleDidChange):
      * rendering/svg/RenderSVGResourceFilterPrimitive.h:
      * rendering/svg/SVGResourcesCache.cpp:
      (WebCore::SVGResourcesCache::clientStyleChanged):
      * svg/SVGFEDiffuseLightingElement.cpp:
      (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
      * svg/SVGFEFloodElement.cpp:
      (WebCore::SVGFEFloodElement::setFilterEffectAttribute):
      * svg/SVGFEFloodElement.h:
      * svg/SVGFESpecularLightingElement.cpp:
      (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
      
      LayoutTests: 
      
      Testing inherited CSS related SVG property changes by FEFlood, FESpecularLighting and FEDiffuseLighing filters.
      Adding a missing test to check the dynamic update of lighting-color property of FESpecularLighting.
      All the other modifications are covered by the existing dyanmic-update tests.
      
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.png: Added.
      * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.checksum: Added.
      * platform/mac/svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.png: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.html: Added.
      * svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color-expected.txt: Added.
      * svg/dynamic-updates/SVGFEFloodElement-inherit-flood-color.html: Added.
      * svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.html: Added.
      * svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop-expected.txt: Added.
      * svg/dynamic-updates/SVGFESpecularLightingElement-lighting-color-css-prop.html: Added.
      * svg/dynamic-updates/script-tests/SVGFEDiffuseLightingElement-inherit-lighting-color-css-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFEFloodElement-inherit-flood-color-css-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-inherit-lighting-color-css-prop.js: Added.
      (executeTest):
      * svg/dynamic-updates/script-tests/SVGFESpecularLightingElement-lighting-color-css-prop.js: Added.
      (executeTest):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8e0d384d
    • philn@webkit.org's avatar
      Unreviewed, rolling out r82496 and its 8 follow-up build fixes: · ff539f43
      philn@webkit.org authored
      r82504, r82513, r82541, r82544, r82548, r82549, r82526, r82551
      
      https://bugs.webkit.org/show_bug.cgi?id=55150
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@82553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff539f43
  9. 30 Mar, 2011 2 commits