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

Side by Side Diff: third_party/WebKit/Source/modules/exported/WebAXObject.cpp

Issue 2956053005: Keep track of fixed positioning in accessibility tree.
Patch Set: GetSimpleRelativeBounds, add failing test for fixed with transform Created 3 years, 5 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) 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 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 1500
1501 void WebAXObject::SetScrollOffset(const WebPoint& offset) const { 1501 void WebAXObject::SetScrollOffset(const WebPoint& offset) const {
1502 if (IsDetached()) 1502 if (IsDetached())
1503 return; 1503 return;
1504 1504
1505 private_->SetScrollOffset(offset); 1505 private_->SetScrollOffset(offset);
1506 } 1506 }
1507 1507
1508 void WebAXObject::GetRelativeBounds(WebAXObject& offset_container, 1508 void WebAXObject::GetRelativeBounds(WebAXObject& offset_container,
1509 WebFloatRect& bounds_in_container, 1509 WebFloatRect& bounds_in_container,
1510 SkMatrix44& container_transform) const { 1510 SkMatrix44& container_transform,
1511 bool& is_fixed_positioned) const {
1511 if (IsDetached()) 1512 if (IsDetached())
1512 return; 1513 return;
1513 1514
1514 #if DCHECK_IS_ON() 1515 #if DCHECK_IS_ON()
1515 DCHECK(IsLayoutClean(private_->GetDocument())); 1516 DCHECK(IsLayoutClean(private_->GetDocument()));
1516 #endif 1517 #endif
1517 1518
1518 AXObject* container = nullptr; 1519 AXObject* container = nullptr;
1519 FloatRect bounds; 1520 FloatRect bounds;
1520 private_->GetRelativeBounds(&container, bounds, container_transform); 1521 private_->GetRelativeBounds(&container, bounds, container_transform,
1522 is_fixed_positioned);
1521 offset_container = WebAXObject(container); 1523 offset_container = WebAXObject(container);
1522 bounds_in_container = WebFloatRect(bounds); 1524 bounds_in_container = WebFloatRect(bounds);
1523 } 1525 }
1524 1526
1525 void WebAXObject::ScrollToMakeVisible() const { 1527 void WebAXObject::ScrollToMakeVisible() const {
1526 if (!IsDetached()) 1528 if (!IsDetached())
1527 private_->ScrollToMakeVisible(); 1529 private_->ScrollToMakeVisible();
1528 } 1530 }
1529 1531
1530 void WebAXObject::ScrollToMakeVisibleWithSubFocus( 1532 void WebAXObject::ScrollToMakeVisibleWithSubFocus(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 1580
1579 // static 1581 // static
1580 WebAXObject WebAXObject::FromWebDocumentFocused( 1582 WebAXObject WebAXObject::FromWebDocumentFocused(
1581 const WebDocument& web_document) { 1583 const WebDocument& web_document) {
1582 const Document* document = web_document.ConstUnwrap<Document>(); 1584 const Document* document = web_document.ConstUnwrap<Document>();
1583 AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache()); 1585 AXObjectCacheImpl* cache = ToAXObjectCacheImpl(document->AxObjectCache());
1584 return cache ? WebAXObject(cache->FocusedObject()) : WebAXObject(); 1586 return cache ? WebAXObject(cache->FocusedObject()) : WebAXObject();
1585 } 1587 }
1586 1588
1587 } // namespace blink 1589 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXSpinButton.cpp ('k') | third_party/WebKit/public/web/WebAXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698