Changeset 36725 in webkit


Ignore:
Timestamp:
Sep 20, 2008 6:29:08 PM (16 years ago)
Author:
mrowe@apple.com
Message:

Roll out r36719 and attempted build fixes r36121 and r36722 due to massive build breakage.

Location:
trunk/WebCore
Files:
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r36724 r36725  
    99        (WebCore::SVGInlineTextBoxQueryWalker::chunkPortionCallback): Changed to
    1010        not include the first character in the extraCharsAvailable count.
    11 
    12 2008-09-20  Dan Bernstein  <mitz@apple.com>
    13 
    14         - Mac build fix
    15 
    16         * WebCore.xcodeproj/project.pbxproj: Made DashArray.h a private header.
    17 
    18 2008-09-20  Dirk Schulze  <vbs85@gmx.de>
    19 
    20         Reviewed by eseidel.  Landed by eseidel.
    21 
    22         Moved DashArray to the GraphicsContext.
    23 
    24         * GNUmakefile.am:
    25         * platform/graphics/DashArray.h: Added.
    26         * platform/graphics/GraphicsContext.h:
    27         * platform/graphics/cairo/GraphicsContextCairo.cpp:
    28         (WebCore::GraphicsContext::setLineDash):
    29         * platform/graphics/cg/GraphicsContextCG.cpp:
    30         (WebCore::GraphicsContext::setLineDash):
    31         * platform/graphics/qt/GraphicsContextQt.cpp:
    32         (WebCore::GraphicsContext::setLineDash):
    33         * svg/graphics/SVGPaintServer.cpp:
    34         (WebCore::applyStrokeStyleToContext):
    35         * svg/graphics/SVGPaintServer.h:
    36         * svg/graphics/cg/CgSupport.cpp:
    37         * svg/graphics/cg/CgSupport.h:
    3811
    39122008-09-20  Kevin Ollivier  <kevino@theolliviers.com>
  • trunk/WebCore/GNUmakefile.am

    r36719 r36725  
    15671567        WebCore/platform/graphics/Color.cpp \
    15681568        WebCore/platform/graphics/Color.h \
    1569         WebCore/platform/graphics/DashArray.h \
    15701569        WebCore/platform/graphics/FloatPoint.cpp \
    15711570        WebCore/platform/graphics/FloatPoint.h \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r36719 r36725  
    37703770                                </File>
    37713771                                <File
    3772                                         RelativePath="..\platform\graphics\DashArray.h"
    3773                                         >
    3774                                 </File>
    3775                                 <File
    37763772                                        RelativePath="..\platform\graphics\FloatPoint.cpp"
    37773773                                        >
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r36722 r36725  
    23452345                A8C4A80E09D563270003AC8D /* Attr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C4A7FC09D563270003AC8D /* Attr.cpp */; };
    23462346                A8C4A84C09D5649D0003AC8D /* MappedAttributeEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */; settings = {ATTRIBUTES = (Private, ); }; };
    2347                 A8CB41030E85B8A50032C4F0 /* DashArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CB41020E85B8A50032C4F0 /* DashArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
    23482347                A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */; };
    23492348                A8CFF04E0A154F09000A4234 /* AutoTableLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = A8CFF0490A154F09000A4234 /* AutoTableLayout.h */; };
     
    68276826                A8C4A7FC09D563270003AC8D /* Attr.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Attr.cpp; sourceTree = "<group>"; };
    68286827                A8C4A84B09D5649D0003AC8D /* MappedAttributeEntry.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MappedAttributeEntry.h; sourceTree = "<group>"; };
    6829                 A8CB41020E85B8A50032C4F0 /* DashArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DashArray.h; sourceTree = "<group>"; };
    68306828                A8CFF0480A154F09000A4234 /* FixedTableLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FixedTableLayout.cpp; sourceTree = "<group>"; };
    68316829                A8CFF0490A154F09000A4234 /* AutoTableLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AutoTableLayout.h; sourceTree = "<group>"; };
     
    1244712445                                B27535380B053814002CE64F /* Color.cpp */,
    1244812446                                B27535390B053814002CE64F /* Color.h */,
    12449                                 A8CB41020E85B8A50032C4F0 /* DashArray.h */,
    1245012447                                B275353A0B053814002CE64F /* FloatPoint.cpp */,
    1245112448                                B275353B0B053814002CE64F /* FloatPoint.h */,
     
    1585615853                                B2F34FE60E82F81400F627CD /* DNS.h in Headers */,
    1585715854                                089582560E857A7E00F82C83 /* ImageLoader.h in Headers */,
    15858                                 A8CB41030E85B8A50032C4F0 /* DashArray.h in Headers */,
    1585915855                        );
    1586015856                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/platform/graphics/GraphicsContext.h

    r36719 r36725  
    2727#define GraphicsContext_h
    2828
    29 #include "DashArray.h"
    3029#include "FloatRect.h"
    3130#include "Image.h"
     
    233232
    234233        void setLineCap(LineCap);
    235         void setLineDash(const DashArray&, float dashOffset);
    236234        void setLineJoin(LineJoin);
    237235        void setMiterLimit(float);
  • trunk/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp

    r36719 r36725  
    806806    }
    807807    cairo_set_line_cap(m_data->cr, cairoCap);
    808 }
    809 
    810 void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
    811 {
    812     cairo_set_dash(m_data->cr, dashes.data(), dashes.size(), dashOffset);
    813808}
    814809
  • trunk/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

    r36719 r36725  
    719719}
    720720
    721 void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
    722 {
    723     CGContextSetLineDash(platformContext(), dashOffset, dashes.data(), dashes.size());
    724 }
    725 
    726721void GraphicsContext::setLineJoin(LineJoin join)
    727722{
     
    740735    }
    741736}
    742 
     737 
    743738void GraphicsContext::beginPath()
    744739{
  • trunk/WebCore/platform/graphics/qt/GraphicsContextQt.cpp

    r36719 r36725  
    4040
    4141#include "AffineTransform.h"
     42#include "Path.h"
     43#include "Pattern.h"
    4244#include "Color.h"
    43 #include "Font.h"
    4445#include "GraphicsContext.h"
    4546#include "GraphicsContextPrivate.h"
    4647#include "ImageBuffer.h"
    47 #include "Path.h"
    48 #include "Pattern.h"
     48#include "Font.h"
    4949#include "Pen.h"
    5050#include "NotImplemented.h"
    5151
     52#include <QStack>
     53#include <QPainter>
     54#include <QPolygonF>
     55#include <QPainterPath>
     56#include <QPaintDevice>
     57#include <QPixmap>
     58#include <QPaintEngine>
    5259#include <QDebug>
    53 #include <QPainter>
    54 #include <QPaintDevice>
    55 #include <QPaintEngine>
    56 #include <QPainterPath>
    57 #include <QPixmap>
    58 #include <QPolygonF>
    59 #include <QStack>
    60 #include <QVector>
    6160
    6261#ifndef M_PI
     
    786785}
    787786
    788 void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
    789 {
    790     QPainter* p = m_data->p();
    791     QPen pen = p->pen();
    792     unsigned dashLength = dashes.size();
    793     if (dashLength) {
    794         QVector<qreal> pattern;
    795         unsigned count = dashLength;
    796         if (dashLength % 2)
    797             count *= 2;
    798 
    799         for (unsigned i = 0; i < count; i++)
    800             pattern.append(dashes[i % dashLength] / narrowPrecisionToFloat(pen.widthF()));
    801 
    802         pen.setDashPattern(pattern);
    803         pen.setDashOffset(dashOffset);
    804     }
    805     p->setPen(pen);
    806 }
    807 
    808787void GraphicsContext::setLineJoin(LineJoin lj)
    809788{
  • trunk/WebCore/svg/graphics/SVGPaintServer.cpp

    r36719 r36725  
    3030#include "SVGPaintServer.h"
    3131
    32 #include "GraphicsContext.h"
    3332#include "RenderObject.h"
    3433#include "RenderStyle.h"
     
    146145}
    147146
    148 void applyStrokeStyleToContext(GraphicsContext* context, RenderStyle* style, const RenderObject* object)
    149 {
    150     context->setStrokeThickness(SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeWidth(), 1.0f));
    151     context->setLineCap(style->svgStyle()->capStyle());
    152     context->setLineJoin(style->svgStyle()->joinStyle());
    153     if (style->svgStyle()->joinStyle() == MiterJoin)
    154         context->setMiterLimit(style->svgStyle()->strokeMiterLimit());
    155 
    156     const DashArray& dashes = dashArrayFromRenderingStyle(object->style());
    157     float dashOffset = SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeDashOffset(), 0.0f);
    158     context->setLineDash(dashes, dashOffset);
    159 }
    160 
    161147DashArray dashArrayFromRenderingStyle(const RenderStyle* style)
    162148{
  • trunk/WebCore/svg/graphics/SVGPaintServer.h

    r36719 r36725  
    2929#if ENABLE(SVG)
    3030
    31 #include "DashArray.h"
    3231#include "SVGResource.h"
    3332
     
    4140class QPen;
    4241QT_END_NAMESPACE
     42#endif
     43
     44#if PLATFORM(CG)
     45    typedef Vector<CGFloat> DashArray;
     46#else
     47    typedef Vector<float> DashArray;
    4348#endif
    4449
     
    103108    SVGPaintServer* getPaintServerById(Document*, const AtomicString&);
    104109
    105     void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*);
    106110    DashArray dashArrayFromRenderingStyle(const RenderStyle* style);
    107111} // namespace WebCore
  • trunk/WebCore/svg/graphics/cg/CgSupport.cpp

    r36719 r36725  
    4747    transform = CGAffineTransformScale(transform, dest.size.width/source.size.width, dest.size.height/source.size.height);
    4848    return transform;
     49}
     50
     51void applyStrokeStyleToContext(GraphicsContext* context, RenderStyle* style, const RenderObject* object)
     52{
     53    context->setStrokeThickness(SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeWidth(), 1.0f));
     54    context->setLineCap(style->svgStyle()->capStyle());
     55    context->setLineJoin(style->svgStyle()->joinStyle());
     56    context->setMiterLimit(style->svgStyle()->strokeMiterLimit());
     57
     58    // FIXME: DashArray support could easily be moved into GraphicsContext, and this function then made x-platform
     59    const DashArray& dashes = dashArrayFromRenderingStyle(style);
     60    float dashOffset = SVGRenderStyle::cssPrimitiveToLength(object, style->svgStyle()->strokeDashOffset(), 0.0f);
     61
     62    CGContextSetLineDash(context->platformContext(), dashOffset, dashes.data(), dashes.size());
    4963}
    5064
  • trunk/WebCore/svg/graphics/cg/CgSupport.h

    r36719 r36725  
    4444CGAffineTransform CGAffineTransformMakeMapBetweenRects(CGRect source, CGRect dest);
    4545
     46void applyStrokeStyleToContext(GraphicsContext*, RenderStyle*, const RenderObject*);
     47
    4648CGContextRef scratchContext();
    4749FloatRect strokeBoundingBox(const Path& path, RenderStyle*, const RenderObject*);
Note: See TracChangeset for help on using the changeset viewer.