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

Side by Side Diff: sky/engine/core/dom/Element.h

Issue 709573002: Remove custom style callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | sky/engine/core/dom/Element.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) 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 * (C) 2001 Peter Kelly (pmk@post.com) 4 * (C) 2001 Peter Kelly (pmk@post.com)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved. 6 * Copyright (C) 2003-2011, 2013, 2014 Apple Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 protected: 308 protected:
309 Element(const QualifiedName& tagName, Document*, ConstructionType); 309 Element(const QualifiedName& tagName, Document*, ConstructionType);
310 310
311 const ElementData* elementData() const { return m_elementData.get(); } 311 const ElementData* elementData() const { return m_elementData.get(); }
312 UniqueElementData& ensureUniqueElementData(); 312 UniqueElementData& ensureUniqueElementData();
313 313
314 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override; 314 virtual InsertionNotificationRequest insertedInto(ContainerNode*) override;
315 virtual void removedFrom(ContainerNode*) override; 315 virtual void removedFrom(ContainerNode*) override;
316 virtual void childrenChanged(const ChildrenChange&) override; 316 virtual void childrenChanged(const ChildrenChange&) override;
317 317
318 virtual void willRecalcStyle(StyleRecalcChange);
319 virtual void didRecalcStyle(StyleRecalcChange);
320 virtual PassRefPtr<RenderStyle> customStyleForRenderer();
321
322 void clearTabIndexExplicitlyIfNeeded(); 318 void clearTabIndexExplicitlyIfNeeded();
323 void setTabIndexExplicitly(short); 319 void setTabIndexExplicitly(short);
324 // Subclasses may override this method to affect focusability. Unlike 320 // Subclasses may override this method to affect focusability. Unlike
325 // supportsFocus, this method must be called on an up-to-date layout, so it 321 // supportsFocus, this method must be called on an up-to-date layout, so it
326 // may use the renderer to reason about focusability. This method cannot be 322 // may use the renderer to reason about focusability. This method cannot be
327 // moved to RenderObject because some focusable nodes don't have renderers, 323 // moved to RenderObject because some focusable nodes don't have renderers,
328 // e.g., HTMLOptionElement. 324 // e.g., HTMLOptionElement.
329 virtual bool rendererIsFocusable() const; 325 virtual bool rendererIsFocusable() const;
330 326
331 // These methods are overridden by subclasses whose default focus appearance should not remain hidden on mouse focus. 327 // These methods are overridden by subclasses whose default focus appearance should not remain hidden on mouse focus.
332 virtual bool wasFocusedByMouse() const { return false; } 328 virtual bool wasFocusedByMouse() const { return false; }
333 virtual void setWasFocusedByMouse(bool) { } 329 virtual void setWasFocusedByMouse(bool) { }
334 330
335 // classAttributeChanged() exists to share code between 331 // classAttributeChanged() exists to share code between
336 // parseAttribute (called via setAttribute()) and 332 // parseAttribute (called via setAttribute()) and
337 // svgAttributeChanged (called when element.className.baseValue is set) 333 // svgAttributeChanged (called when element.className.baseValue is set)
338 void classAttributeChanged(const AtomicString& newClassString); 334 void classAttributeChanged(const AtomicString& newClassString);
339 335
340 PassRefPtr<RenderStyle> originalStyleForRenderer();
341
342 private: 336 private:
343 void attributeChanged(const QualifiedName&, const AtomicString&, AttributeMo dificationReason = ModifiedDirectly); 337 void attributeChanged(const QualifiedName&, const AtomicString&, AttributeMo dificationReason = ModifiedDirectly);
344 338
345 bool hasElementFlag(ElementFlags mask) const { return hasRareData() && hasEl ementFlagInternal(mask); } 339 bool hasElementFlag(ElementFlags mask) const { return hasRareData() && hasEl ementFlagInternal(mask); }
346 void setElementFlag(ElementFlags, bool value = true); 340 void setElementFlag(ElementFlags, bool value = true);
347 void clearElementFlag(ElementFlags); 341 void clearElementFlag(ElementFlags);
348 bool hasElementFlagInternal(ElementFlags) const; 342 bool hasElementFlagInternal(ElementFlags) const;
349 343
350 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check. 344 bool isElementNode() const = delete; // This will catch anyone doing an unne cessary check.
351 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check. 345 bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check.
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 static PassRefPtr<T> create(const QualifiedName&, Document&) 595 static PassRefPtr<T> create(const QualifiedName&, Document&)
602 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \ 596 #define DEFINE_ELEMENT_FACTORY_WITH_TAGNAME(T) \
603 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \ 597 PassRefPtr<T> T::create(const QualifiedName& tagName, Document& document) \
604 { \ 598 { \
605 return adoptRef(new T(tagName, document)); \ 599 return adoptRef(new T(tagName, document)); \
606 } 600 }
607 601
608 } // namespace 602 } // namespace
609 603
610 #endif // Element_h 604 #endif // Element_h
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698