Title: [128508] trunk/Source/WebCore
Revision
128508
Author
[email protected]
Date
2012-09-13 14:21:12 -0700 (Thu, 13 Sep 2012)

Log Message

Typo in RenderStyle::isFlippedLinesWritingMode(), small refactoring possible
https://bugs.webkit.org/show_bug.cgi?id=96679

Patch by Hans Muller <[email protected]> on 2012-09-13
Reviewed by Darin Adler.

Fixed a typo in the comment for RenderStyle::isFlippedLinesWritingMode() and refactored the
three RendersStyle::isXXXWritingMode() inlines to use the inlines defined in WritingMode.h.
Moved the comments to WritingMode.h

No new tests needed.

* platform/text/WritingMode.h:
(WebCore):
* rendering/style/RenderStyle.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (128507 => 128508)


--- trunk/Source/WebCore/ChangeLog	2012-09-13 21:19:41 UTC (rev 128507)
+++ trunk/Source/WebCore/ChangeLog	2012-09-13 21:21:12 UTC (rev 128508)
@@ -1,3 +1,20 @@
+2012-09-13  Hans Muller  <[email protected]>
+
+        Typo in RenderStyle::isFlippedLinesWritingMode(), small refactoring possible
+        https://bugs.webkit.org/show_bug.cgi?id=96679
+
+        Reviewed by Darin Adler.
+
+        Fixed a typo in the comment for RenderStyle::isFlippedLinesWritingMode() and refactored the
+        three RendersStyle::isXXXWritingMode() inlines to use the inlines defined in WritingMode.h.
+        Moved the comments to WritingMode.h
+
+        No new tests needed.
+
+        * platform/text/WritingMode.h:
+        (WebCore):
+        * rendering/style/RenderStyle.h:
+
 2012-09-13  Kenneth Rohde Christiansen  <[email protected]>
 
         Evas_Object* is a ref'ed structure, so tread it as such

Modified: trunk/Source/WebCore/platform/text/WritingMode.h (128507 => 128508)


--- trunk/Source/WebCore/platform/text/WritingMode.h	2012-09-13 21:19:41 UTC (rev 128507)
+++ trunk/Source/WebCore/platform/text/WritingMode.h	2012-09-13 21:21:12 UTC (rev 128508)
@@ -37,16 +37,19 @@
     TopToBottomWritingMode, RightToLeftWritingMode, LeftToRightWritingMode, BottomToTopWritingMode
 };
 
+// Lines have horizontal orientation; modes horizontal-tb or horizontal-bt.
 inline bool isHorizontalWritingMode(WritingMode writingMode)
 {
     return writingMode == TopToBottomWritingMode || writingMode == BottomToTopWritingMode;
 }
 
+// Bottom of the line occurs earlier in the block; modes vertical-lr or horizontal-bt.
 inline bool isFlippedLinesWritingMode(WritingMode writingMode)
 {
     return writingMode == LeftToRightWritingMode || writingMode == BottomToTopWritingMode;
 }
 
+// Block progression increases in the opposite direction to normal; modes vertical-rl or horizontal-bt.
 inline bool isFlippedBlocksWritingMode(WritingMode writingMode)
 {
     return writingMode == RightToLeftWritingMode || writingMode == BottomToTopWritingMode;

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (128507 => 128508)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-09-13 21:19:41 UTC (rev 128507)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2012-09-13 21:21:12 UTC (rev 128508)
@@ -959,12 +959,9 @@
     ETextSecurity textSecurity() const { return static_cast<ETextSecurity>(rareInheritedData->textSecurity); }
 
     WritingMode writingMode() const { return static_cast<WritingMode>(inherited_flags.m_writingMode); }
-    // Lines have horizontal orientation; modes horizontal-tb or horizontal-bt.
-    bool isHorizontalWritingMode() const { return writingMode() == TopToBottomWritingMode || writingMode() == BottomToTopWritingMode; }
-    // Bottom of the line occurs earlier in the block; modes vertical-rl or horizontal-bt.
-    bool isFlippedLinesWritingMode() const { return writingMode() == LeftToRightWritingMode || writingMode() == BottomToTopWritingMode; }
-    // Block progression increases in the opposite direction to normal; modes vertical-rl or horizontal-bt.
-    bool isFlippedBlocksWritingMode() const { return writingMode() == RightToLeftWritingMode || writingMode() == BottomToTopWritingMode; }
+    bool isHorizontalWritingMode() const { return WebCore::isHorizontalWritingMode(writingMode()); }
+    bool isFlippedLinesWritingMode() const { return WebCore::isFlippedLinesWritingMode(writingMode()); }
+    bool isFlippedBlocksWritingMode() const { return WebCore::isFlippedBlocksWritingMode(writingMode()); }
 
 #if ENABLE(CSS_IMAGE_ORIENTATION)
     ImageOrientationEnum imageOrientation() const { return static_cast<ImageOrientationEnum>(rareInheritedData->m_imageOrientation); }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to