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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMapElement.cpp

Issue 1912863002: Fix image map focus ring painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 29 matching lines...) Expand all
40 { 40 {
41 UseCounter::count(document, UseCounter::MapElement); 41 UseCounter::count(document, UseCounter::MapElement);
42 } 42 }
43 43
44 DEFINE_NODE_FACTORY(HTMLMapElement) 44 DEFINE_NODE_FACTORY(HTMLMapElement)
45 45
46 HTMLMapElement::~HTMLMapElement() 46 HTMLMapElement::~HTMLMapElement()
47 { 47 {
48 } 48 }
49 49
50 HTMLAreaElement* HTMLMapElement::areaForPoint(LayoutPoint location, const Layout Size& containerSize) 50 HTMLAreaElement* HTMLMapElement::areaForPoint(const LayoutPoint& location, const LayoutObject* containerObject)
51 { 51 {
52 HTMLAreaElement* defaultArea = nullptr; 52 HTMLAreaElement* defaultArea = nullptr;
53 for (HTMLAreaElement& area : Traversal<HTMLAreaElement>::descendantsOf(*this )) { 53 for (HTMLAreaElement& area : Traversal<HTMLAreaElement>::descendantsOf(*this )) {
54 if (area.isDefault() && !defaultArea) 54 if (area.isDefault() && !defaultArea)
55 defaultArea = &area; 55 defaultArea = &area;
56 else if (area.pointInArea(location, containerSize)) 56 else if (area.pointInArea(location, containerObject))
57 return &area; 57 return &area;
58 } 58 }
59 59
60 return defaultArea; 60 return defaultArea;
61 } 61 }
62 62
63 HTMLImageElement* HTMLMapElement::imageElement() 63 HTMLImageElement* HTMLMapElement::imageElement()
64 { 64 {
65 HTMLCollection* images = document().images(); 65 HTMLCollection* images = document().images();
66 for (unsigned i = 0; Element* curr = images->item(i); ++i) { 66 for (unsigned i = 0; Element* curr = images->item(i); ++i) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) 119 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint)
120 { 120 {
121 if (insertionPoint->inShadowIncludingDocument()) 121 if (insertionPoint->inShadowIncludingDocument())
122 treeScope().removeImageMap(this); 122 treeScope().removeImageMap(this);
123 HTMLElement::removedFrom(insertionPoint); 123 HTMLElement::removedFrom(insertionPoint);
124 } 124 }
125 125
126 } // namespace blink 126 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698