Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp

Issue 1774943003: blink: Rename platform/ methods to prefix with get when they collide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clash-platform: rebase-yayyyyyyyy Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 if (isWebArea()) 240 if (isWebArea())
241 return documentFrameView(); 241 return documentFrameView();
242 242
243 if (!m_layoutObject || !m_layoutObject->isBox()) 243 if (!m_layoutObject || !m_layoutObject->isBox())
244 return 0; 244 return 0;
245 245
246 LayoutBox* box = toLayoutBox(m_layoutObject); 246 LayoutBox* box = toLayoutBox(m_layoutObject);
247 if (!box->canBeScrolledAndHasScrollableArea()) 247 if (!box->canBeScrolledAndHasScrollableArea())
248 return 0; 248 return 0;
249 249
250 return box->scrollableArea(); 250 return box->getScrollableArea();
251 } 251 }
252 252
253 static bool isImageOrAltText(LayoutBoxModelObject* box, Node* node) 253 static bool isImageOrAltText(LayoutBoxModelObject* box, Node* node)
254 { 254 {
255 if (box && box->isImage()) 255 if (box && box->isImage())
256 return true; 256 return true;
257 if (isHTMLImageElement(node)) 257 if (isHTMLImageElement(node))
258 return true; 258 return true;
259 if (isHTMLInputElement(node) && toHTMLInputElement(node)->hasFallbackContent ()) 259 if (isHTMLInputElement(node) && toHTMLInputElement(node)->hasFallbackContent ())
260 return true; 260 return true;
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 if (!m_layoutObject) 945 if (!m_layoutObject)
946 return AXNodeObject::getTextStyle(); 946 return AXNodeObject::getTextStyle();
947 947
948 const ComputedStyle* style = m_layoutObject->style(); 948 const ComputedStyle* style = m_layoutObject->style();
949 if (!style) 949 if (!style)
950 return AXNodeObject::getTextStyle(); 950 return AXNodeObject::getTextStyle();
951 951
952 unsigned textStyle = TextStyleNone; 952 unsigned textStyle = TextStyleNone;
953 if (style->fontWeight() == FontWeightBold) 953 if (style->fontWeight() == FontWeightBold)
954 textStyle |= TextStyleBold; 954 textStyle |= TextStyleBold;
955 if (style->fontDescription().style() == FontStyleItalic) 955 if (style->getFontDescription().style() == FontStyleItalic)
956 textStyle |= TextStyleItalic; 956 textStyle |= TextStyleItalic;
957 if (style->getTextDecoration() == TextDecorationUnderline) 957 if (style->getTextDecoration() == TextDecorationUnderline)
958 textStyle |= TextStyleUnderline; 958 textStyle |= TextStyleUnderline;
959 if (style->getTextDecoration() == TextDecorationLineThrough) 959 if (style->getTextDecoration() == TextDecorationLineThrough)
960 textStyle |= TextStyleLineThrough; 960 textStyle |= TextStyleLineThrough;
961 961
962 return static_cast<TextStyle>(textStyle); 962 return static_cast<TextStyle>(textStyle);
963 } 963 }
964 964
965 KURL AXLayoutObject::url() const 965 KURL AXLayoutObject::url() const
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 1386
1387 if (!m_layoutObject->isBox()) 1387 if (!m_layoutObject->isBox())
1388 return; 1388 return;
1389 1389
1390 bool dirty = false; 1390 bool dirty = false;
1391 LayoutBox* box = toLayoutBox(m_layoutObject); 1391 LayoutBox* box = toLayoutBox(m_layoutObject);
1392 if (box->frameRect() != m_cachedFrameRect) 1392 if (box->frameRect() != m_cachedFrameRect)
1393 dirty = true; 1393 dirty = true;
1394 1394
1395 if (box->canBeScrolledAndHasScrollableArea()) { 1395 if (box->canBeScrolledAndHasScrollableArea()) {
1396 ScrollableArea* scrollableArea = box->scrollableArea(); 1396 ScrollableArea* scrollableArea = box->getScrollableArea();
1397 if (scrollableArea && scrollableArea->scrollPosition() != m_cachedScroll Position) 1397 if (scrollableArea && scrollableArea->scrollPosition() != m_cachedScroll Position)
1398 dirty = true; 1398 dirty = true;
1399 } 1399 }
1400 1400
1401 if (dirty) 1401 if (dirty)
1402 markCachedElementRectDirty(); 1402 markCachedElementRectDirty();
1403 } 1403 }
1404 1404
1405 void AXLayoutObject::updateCachedElementRect() const 1405 void AXLayoutObject::updateCachedElementRect() const
1406 { 1406 {
1407 if (!m_cachedElementRectDirty) 1407 if (!m_cachedElementRectDirty)
1408 return; 1408 return;
1409 1409
1410 if (!m_layoutObject) 1410 if (!m_layoutObject)
1411 return; 1411 return;
1412 1412
1413 if (!m_layoutObject->isBox()) 1413 if (!m_layoutObject->isBox())
1414 return; 1414 return;
1415 1415
1416 LayoutBox* box = toLayoutBox(m_layoutObject); 1416 LayoutBox* box = toLayoutBox(m_layoutObject);
1417 m_cachedFrameRect = box->frameRect(); 1417 m_cachedFrameRect = box->frameRect();
1418 1418
1419 if (box->canBeScrolledAndHasScrollableArea()) { 1419 if (box->canBeScrolledAndHasScrollableArea()) {
1420 ScrollableArea* scrollableArea = box->scrollableArea(); 1420 ScrollableArea* scrollableArea = box->getScrollableArea();
1421 if (scrollableArea) 1421 if (scrollableArea)
1422 m_cachedScrollPosition = scrollableArea->scrollPosition(); 1422 m_cachedScrollPosition = scrollableArea->scrollPosition();
1423 } 1423 }
1424 1424
1425 m_cachedElementRect = computeElementRect(); 1425 m_cachedElementRect = computeElementRect();
1426 m_cachedElementRectDirty = false; 1426 m_cachedElementRectDirty = false;
1427 } 1427 }
1428 1428
1429 void AXLayoutObject::markCachedElementRectDirty() const 1429 void AXLayoutObject::markCachedElementRectDirty() const
1430 { 1430 {
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2520 if (label && label->layoutObject()) { 2520 if (label && label->layoutObject()) {
2521 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct(); 2521 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe ct();
2522 result.unite(labelRect); 2522 result.unite(labelRect);
2523 } 2523 }
2524 } 2524 }
2525 2525
2526 return result; 2526 return result;
2527 } 2527 }
2528 2528
2529 } // namespace blink 2529 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698