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

Side by Side Diff: Source/core/dom/ElementData.cpp

Issue 455223002: Make anchors mouse-focusable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move m_wasFocusedByMouse to elementData().m_shouldHideFocusRingOnMouseFocus Created 6 years, 4 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 { 48 {
49 return sizeof(ShareableElementData) + sizeof(Attribute) * count; 49 return sizeof(ShareableElementData) + sizeof(Attribute) * count;
50 } 50 }
51 51
52 ElementData::ElementData() 52 ElementData::ElementData()
53 : m_isUnique(true) 53 : m_isUnique(true)
54 , m_arraySize(0) 54 , m_arraySize(0)
55 , m_presentationAttributeStyleIsDirty(false) 55 , m_presentationAttributeStyleIsDirty(false)
56 , m_styleAttributeIsDirty(false) 56 , m_styleAttributeIsDirty(false)
57 , m_animatedSVGAttributesAreDirty(false) 57 , m_animatedSVGAttributesAreDirty(false)
58 , m_shouldHideFocusRingOnMouseFocus(false)
58 { 59 {
59 } 60 }
60 61
61 ElementData::ElementData(unsigned arraySize) 62 ElementData::ElementData(unsigned arraySize)
62 : m_isUnique(false) 63 : m_isUnique(false)
63 , m_arraySize(arraySize) 64 , m_arraySize(arraySize)
64 , m_presentationAttributeStyleIsDirty(false) 65 , m_presentationAttributeStyleIsDirty(false)
65 , m_styleAttributeIsDirty(false) 66 , m_styleAttributeIsDirty(false)
66 , m_animatedSVGAttributesAreDirty(false) 67 , m_animatedSVGAttributesAreDirty(false)
68 , m_shouldHideFocusRingOnMouseFocus(false)
67 { 69 {
68 } 70 }
69 71
70 ElementData::ElementData(const ElementData& other, bool isUnique) 72 ElementData::ElementData(const ElementData& other, bool isUnique)
71 : m_isUnique(isUnique) 73 : m_isUnique(isUnique)
72 , m_arraySize(isUnique ? 0 : other.attributes().size()) 74 , m_arraySize(isUnique ? 0 : other.attributes().size())
73 , m_presentationAttributeStyleIsDirty(other.m_presentationAttributeStyleIsDi rty) 75 , m_presentationAttributeStyleIsDirty(other.m_presentationAttributeStyleIsDi rty)
74 , m_styleAttributeIsDirty(other.m_styleAttributeIsDirty) 76 , m_styleAttributeIsDirty(other.m_styleAttributeIsDirty)
75 , m_animatedSVGAttributesAreDirty(other.m_animatedSVGAttributesAreDirty) 77 , m_animatedSVGAttributesAreDirty(other.m_animatedSVGAttributesAreDirty)
78 , m_shouldHideFocusRingOnMouseFocus(other.m_shouldHideFocusRingOnMouseFocus)
76 , m_classNames(other.m_classNames) 79 , m_classNames(other.m_classNames)
77 , m_idForStyleResolution(other.m_idForStyleResolution) 80 , m_idForStyleResolution(other.m_idForStyleResolution)
78 { 81 {
79 // NOTE: The inline style is copied by the subclass copy constructor since w e don't know what to do with it here. 82 // NOTE: The inline style is copied by the subclass copy constructor since w e don't know what to do with it here.
80 } 83 }
81 84
82 #if ENABLE(OILPAN) 85 #if ENABLE(OILPAN)
83 void ElementData::finalizeGarbageCollectedObject() 86 void ElementData::finalizeGarbageCollectedObject()
84 { 87 {
85 if (m_isUnique) 88 if (m_isUnique)
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this)); 215 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this));
213 } 216 }
214 217
215 void UniqueElementData::traceAfterDispatch(Visitor* visitor) 218 void UniqueElementData::traceAfterDispatch(Visitor* visitor)
216 { 219 {
217 visitor->trace(m_presentationAttributeStyle); 220 visitor->trace(m_presentationAttributeStyle);
218 ElementData::traceAfterDispatch(visitor); 221 ElementData::traceAfterDispatch(visitor);
219 } 222 }
220 223
221 } // namespace blink 224 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698