Title: [98192] trunk/Source/WebCore
Revision
98192
Author
[email protected]
Date
2011-10-22 03:53:41 -0700 (Sat, 22 Oct 2011)

Log Message

REGRESSION(r92480): Passing uninitialized variable in HTMLElement::calculateAndAdjustDirectionality()
https://bugs.webkit.org/show_bug.cgi?id=70582

Reviewed by Darin Adler.

No new tests. It's very hard to make a reliable test.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::directionality):
Clear *strongDirectionalityTextNode even if hasStrongDirectionality is false.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (98191 => 98192)


--- trunk/Source/WebCore/ChangeLog	2011-10-22 05:52:52 UTC (rev 98191)
+++ trunk/Source/WebCore/ChangeLog	2011-10-22 10:53:41 UTC (rev 98192)
@@ -1,3 +1,16 @@
+2011-10-22  Kent Tamura  <[email protected]>
+
+        REGRESSION(r92480): Passing uninitialized variable in HTMLElement::calculateAndAdjustDirectionality()
+        https://bugs.webkit.org/show_bug.cgi?id=70582
+
+        Reviewed by Darin Adler.
+
+        No new tests. It's very hard to make a reliable test.
+
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::directionality):
+        Clear *strongDirectionalityTextNode even if hasStrongDirectionality is false.
+
 2011-10-21  Dan Bernstein  <[email protected]>
 
         Caret is drawn in the wrong place in multi-column blocks

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (98191 => 98192)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2011-10-22 05:52:52 UTC (rev 98191)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2011-10-22 10:53:41 UTC (rev 98192)
@@ -879,8 +879,8 @@
     if (HTMLTextFormControlElement* textElement = toTextFormControl(const_cast<HTMLElement*>(this))) {
         bool hasStrongDirectionality;
         Unicode::Direction textDirection = textElement->value().defaultWritingDirection(&hasStrongDirectionality);
-        if (hasStrongDirectionality && strongDirectionalityTextNode)
-            *strongDirectionalityTextNode = textElement;
+        if (strongDirectionalityTextNode)
+            *strongDirectionalityTextNode = hasStrongDirectionality ? textElement : 0;
         return (textDirection == Unicode::LeftToRight) ? LTR : RTL;
     }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to