[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

mitz at apple.com mitz at apple.com
Wed Dec 22 18:39:01 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 2f695604adce48cf4aa86f46ed67d222a76c6ee3
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 15 03:37:09 2010 +0000

    Additional RenderStyle support for the text-emphasis CSS property
    Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
    https://bugs.webkit.org/show_bug.cgi?id=48539
    
    Reviewed by Sam Weinig.
    
    No test possible, since this is just adding a function to be used by upcoming patches.
    
    * platform/text/CharacterNames.h: Added characters used as emphasis marks.
    * rendering/style/RenderStyle.cpp:
    (WebCore::RenderStyle::textEmphasisMarkString): Added. Returns a string containing the
    emphasis mark, or the null AtomicString if there is none.
    * rendering/style/RenderStyle.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74095 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2fbd30f..ebe2aaa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-12-14  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Additional RenderStyle support for the text-emphasis CSS property
+        Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
+        https://bugs.webkit.org/show_bug.cgi?id=48539
+
+        No test possible, since this is just adding a function to be used by upcoming patches.
+
+        * platform/text/CharacterNames.h: Added characters used as emphasis marks.
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::textEmphasisMarkString): Added. Returns a string containing the
+        emphasis mark, or the null AtomicString if there is none.
+        * rendering/style/RenderStyle.h:
+
 2010-12-14  Anton D'Auria  <adauria at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/ChangeLog-2010-12-06 b/WebCore/ChangeLog-2010-12-06
index 34dd023..bb63c76 100644
--- a/WebCore/ChangeLog-2010-12-06
+++ b/WebCore/ChangeLog-2010-12-06
@@ -1490,6 +1490,7 @@
         Reviewed by Dave Hyatt.
 
         CSS support for the text-emphasis properties
+        Part of <rdar://problem/7720300> Support the CSS3 text-emphasis property
         https://bugs.webkit.org/show_bug.cgi?id=48539
 
         Test: fast/css/parsing-text-emphasis.html
diff --git a/WebCore/platform/text/CharacterNames.h b/WebCore/platform/text/CharacterNames.h
index 9f8f807..b05b09d 100644
--- a/WebCore/platform/text/CharacterNames.h
+++ b/WebCore/platform/text/CharacterNames.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -35,10 +35,14 @@ namespace WebCore {
 // Note, these are UChar constants, not UChar32, which makes them
 // more convenient for WebCore code that mostly uses UTF-16.
 
+const UChar blackCircle = 0x25CF;
 const UChar blackSquare = 0x25A0;
+const UChar blackUpPointingTriangle = 0x25B2;
 const UChar bullet = 0x2022;
+const UChar bullseye = 0x25CE;
 const UChar carriageReturn = 0x000D;
 const UChar ethiopicPrefaceColon = 0x1366;
+const UChar fisheye = 0x25C9;
 const UChar hebrewPunctuationGeresh = 0x05F3;
 const UChar hebrewPunctuationGershayim = 0x05F4;
 const UChar horizontalEllipsis = 0x2026;
@@ -63,9 +67,13 @@ const UChar rightSingleQuotationMark = 0x2019;
 const UChar rightToLeftEmbed = 0x202B;
 const UChar rightToLeftMark = 0x200F;
 const UChar rightToLeftOverride = 0x202E;
+const UChar sesameDot = 0xFE45;
 const UChar softHyphen = 0x00AD;
 const UChar space = 0x0020;
 const UChar whiteBullet = 0x25E6;
+const UChar whiteCircle = 0x25CB;
+const UChar whiteSesameDot = 0xFE46;
+const UChar whiteUpPointingTriangle = 0x25B3;
 const UChar yenSign = 0x00A5;
 const UChar zeroWidthJoiner = 0x200D;
 const UChar zeroWidthNonJoiner = 0x200C;
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index fcca465..37ed391 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -847,6 +847,47 @@ const AtomicString& RenderStyle::hyphenString() const
     return hyphenMinusString;
 }
 
+const AtomicString& RenderStyle::textEmphasisMarkString() const
+{
+    switch (textEmphasisMark()) {
+    case TextEmphasisMarkNone:
+        return nullAtom;
+    case TextEmphasisMarkCustom:
+        return textEmphasisCustomMark();
+    case TextEmphasisMarkDot: {
+        DEFINE_STATIC_LOCAL(AtomicString, filledDotString, (&bullet, 1));
+        DEFINE_STATIC_LOCAL(AtomicString, openDotString, (&whiteBullet, 1));
+        return textEmphasisFill() == TextEmphasisFillFilled ? filledDotString : openDotString;
+    }
+    case TextEmphasisMarkCircle: {
+        DEFINE_STATIC_LOCAL(AtomicString, filledCircleString, (&blackCircle, 1));
+        DEFINE_STATIC_LOCAL(AtomicString, openCircleString, (&whiteCircle, 1));
+        return textEmphasisFill() == TextEmphasisFillFilled ? filledCircleString : openCircleString;
+    }
+    case TextEmphasisMarkDoubleCircle: {
+        DEFINE_STATIC_LOCAL(AtomicString, filledDoubleCircleString, (&fisheye, 1));
+        DEFINE_STATIC_LOCAL(AtomicString, openDoubleCircleString, (&bullseye, 1));
+        return textEmphasisFill() == TextEmphasisFillFilled ? filledDoubleCircleString : openDoubleCircleString;
+    }
+    case TextEmphasisMarkTriangle: {
+        DEFINE_STATIC_LOCAL(AtomicString, filledTriangleString, (&blackUpPointingTriangle, 1));
+        DEFINE_STATIC_LOCAL(AtomicString, openTriangleString, (&whiteUpPointingTriangle, 1));
+        return textEmphasisFill() == TextEmphasisFillFilled ? filledTriangleString : openTriangleString;
+    }
+    case TextEmphasisMarkSesame: {
+        DEFINE_STATIC_LOCAL(AtomicString, filledSesameString, (&sesameDot, 1));
+        DEFINE_STATIC_LOCAL(AtomicString, openSesameString, (&whiteSesameDot, 1));
+        return textEmphasisFill() == TextEmphasisFillFilled ? filledSesameString : openSesameString;
+    }
+    case TextEmphasisMarkAuto:
+        ASSERT_NOT_REACHED();
+        return nullAtom;
+    }
+
+    ASSERT_NOT_REACHED();
+    return nullAtom;
+}
+
 #if ENABLE(DASHBOARD_SUPPORT)
 const Vector<StyleDashboardRegion>& RenderStyle::initialDashboardRegions()
 {
diff --git a/WebCore/rendering/style/RenderStyle.h b/WebCore/rendering/style/RenderStyle.h
index e907cc0..cbc5c17 100644
--- a/WebCore/rendering/style/RenderStyle.h
+++ b/WebCore/rendering/style/RenderStyle.h
@@ -718,6 +718,7 @@ public:
     TextEmphasisMark textEmphasisMark() const;
     const AtomicString& textEmphasisCustomMark() const { return rareInheritedData->textEmphasisCustomMark; }
     TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextEmphasisPosition>(rareInheritedData->textEmphasisPosition); }
+    const AtomicString& textEmphasisMarkString() const;
     
     // Return true if any transform related property (currently transform, transformStyle3D or perspective) 
     // indicates that we are transforming

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list