Fix post-mortem nits for r173528 & r173549
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2014 05:40:56 +0000 (05:40 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Sep 2014 05:40:56 +0000 (05:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136808

Reviewed by Darin Adler.

Fix post-mortem nits for r173528 & r173549.

No new tests, no behavior change.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
- Use auto* instead of more specific types.
- Use fastGetAttribute() instead of getAttribute() as this is
  supported for the "title" attribute.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setSelectionFromNone):
Use auto* instead of more specific types.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/editing/FrameSelection.cpp

index 67b0917..93e33e1 100644 (file)
@@ -1,3 +1,24 @@
+2014-09-14  Christophe Dumez  <cdumez@apple.com>
+
+        Fix post-mortem nits for r173528 & r173549
+        https://bugs.webkit.org/show_bug.cgi?id=136808
+
+        Reviewed by Darin Adler.
+
+        Fix post-mortem nits for r173528 & r173549.
+
+        No new tests, no behavior change.
+
+        * accessibility/AccessibilityNodeObject.cpp:
+        (WebCore::AccessibilityNodeObject::alternativeTextForWebArea):
+        - Use auto* instead of more specific types.
+        - Use fastGetAttribute() instead of getAttribute() as this is
+          supported for the "title" attribute.
+
+        * editing/FrameSelection.cpp:
+        (WebCore::FrameSelection::setSelectionFromNone):
+        Use auto* instead of more specific types.
+
 2014-09-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Introduce FONT_DATA_TYPE_CASTS, and use it
index e633c7b..fc4158d 100644 (file)
@@ -1461,9 +1461,9 @@ String AccessibilityNodeObject::alternativeTextForWebArea() const
             return ariaLabel;
     }
     
-    if (HTMLFrameOwnerElement* owner = document->ownerElement()) {
+    if (auto* owner = document->ownerElement()) {
         if (owner->hasTagName(frameTag) || owner->hasTagName(iframeTag)) {
-            const AtomicString& title = owner->getAttribute(titleAttr);
+            const AtomicString& title = owner->fastGetAttribute(titleAttr);
             if (!title.isEmpty())
                 return title;
         }
@@ -1474,7 +1474,7 @@ String AccessibilityNodeObject::alternativeTextForWebArea() const
     if (!documentTitle.isEmpty())
         return documentTitle;
     
-    if (HTMLElement* body = document->body())
+    if (auto* body = document->body())
         return body->getNameAttribute();
     
     return String();
index 7b88151..f8f240d 100644 (file)
@@ -2112,7 +2112,7 @@ void FrameSelection::setSelectionFromNone()
         return;
 #endif
 
-    Element* documentElement = document->documentElement();
+    auto* documentElement = document->documentElement();
     if (!documentElement)
         return;
     if (auto body = childrenOfType<HTMLBodyElement>(*documentElement).first())