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

Side by Side Diff: Source/WebKit/chromium/src/WebAccessibilityObject.cpp

Issue 14740025: Simplify and add caching for accessible bounding box calculation. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Re-landing with null check fix Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityListBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 return WebString(); 484 return WebString();
485 485
486 return m_private->ariaLiveRegionStatus(); 486 return m_private->ariaLiveRegionStatus();
487 } 487 }
488 488
489 WebRect WebAccessibilityObject::boundingBoxRect() const 489 WebRect WebAccessibilityObject::boundingBoxRect() const
490 { 490 {
491 if (isDetached()) 491 if (isDetached())
492 return WebRect(); 492 return WebRect();
493 493
494 return m_private->pixelSnappedBoundingBoxRect(); 494 return pixelSnappedIntRect(m_private->elementRect());
495 } 495 }
496 496
497 bool WebAccessibilityObject::canvasHasFallbackContent() const 497 bool WebAccessibilityObject::canvasHasFallbackContent() const
498 { 498 {
499 if (isDetached()) 499 if (isDetached())
500 return false; 500 return false;
501 501
502 return m_private->canvasHasFallbackContent(); 502 return m_private->canvasHasFallbackContent();
503 } 503 }
504 504
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 { 554 {
555 if (isDetached()) 555 if (isDetached())
556 return WebAccessibilityObject(); 556 return WebAccessibilityObject();
557 557
558 IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(po int); 558 IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(po int);
559 RefPtr<AccessibilityObject> hit = m_private->accessibilityHitTest(contentsPo int); 559 RefPtr<AccessibilityObject> hit = m_private->accessibilityHitTest(contentsPo int);
560 560
561 if (hit) 561 if (hit)
562 return WebAccessibilityObject(hit); 562 return WebAccessibilityObject(hit);
563 563
564 if (m_private->boundingBoxRect().contains(contentsPoint)) 564 if (m_private->elementRect().contains(contentsPoint))
565 return *this; 565 return *this;
566 566
567 return WebAccessibilityObject(); 567 return WebAccessibilityObject();
568 } 568 }
569 569
570 WebString WebAccessibilityObject::keyboardShortcut() const 570 WebString WebAccessibilityObject::keyboardShortcut() const
571 { 571 {
572 if (isDetached()) 572 if (isDetached())
573 return WebString(); 573 return WebString();
574 574
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 m_private = object; 1058 m_private = object;
1059 return *this; 1059 return *this;
1060 } 1060 }
1061 1061
1062 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const 1062 WebAccessibilityObject::operator WTF::PassRefPtr<WebCore::AccessibilityObject>() const
1063 { 1063 {
1064 return m_private.get(); 1064 return m_private.get();
1065 } 1065 }
1066 1066
1067 } // namespace WebKit 1067 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | Source/core/accessibility/AccessibilityListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698