Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 static PassRefPtr<PseudoElement> create(Element* parent, PseudoId pseudoId) | 39 static PassRefPtr<PseudoElement> create(Element* parent, PseudoId pseudoId) |
| 40 { | 40 { |
| 41 return adoptRef(new PseudoElement(parent, pseudoId)); | 41 return adoptRef(new PseudoElement(parent, pseudoId)); |
| 42 } | 42 } |
| 43 ~PseudoElement(); | 43 ~PseudoElement(); |
| 44 | 44 |
| 45 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; | 45 virtual PassRefPtr<RenderStyle> customStyleForRenderer() OVERRIDE; |
| 46 virtual void attach() OVERRIDE; | 46 virtual void attach() OVERRIDE; |
| 47 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; | 47 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; |
| 48 | 48 |
| 49 // As per http://dev.w3.org/csswg/css3-regions/#flow-into, pseudo-elements s uch as ::first-line, ::first-letter, ::before or ::after | |
| 50 // cannot be directly collected into a named flow. | |
| 51 virtual bool moveToFlowThreadIsNeeded(RefPtr<RenderStyle>& cachedStyle) OVER RIDE | |
|
Julien - ping for review
2013/05/09 15:30:18
I am really not a huge fan of this function naming
Mihai Maerean
2013/05/09 16:25:55
Ok, I will rename it.
PS: it may be possible in a
| |
| 52 { | |
| 53 UNUSED_PARAM(cachedStyle); | |
|
Julien - ping for review
2013/05/09 15:30:18
If you didn't put the argument in the function sig
Mihai Maerean
2013/05/09 16:25:55
That's true when declaring the function. When the
Julien - ping for review
2013/05/10 00:13:05
I don't think you are right (argument names don't
| |
| 54 return false; | |
| 55 } | |
| 56 | |
| 49 virtual bool canStartSelection() const OVERRIDE { return false; } | 57 virtual bool canStartSelection() const OVERRIDE { return false; } |
| 50 virtual bool canContainRangeEndPoint() const OVERRIDE { return false; } | 58 virtual bool canContainRangeEndPoint() const OVERRIDE { return false; } |
| 51 | 59 |
| 52 static String pseudoElementNameForEvents(PseudoId); | 60 static String pseudoElementNameForEvents(PseudoId); |
| 53 | 61 |
| 54 private: | 62 private: |
| 55 PseudoElement(Element*, PseudoId); | 63 PseudoElement(Element*, PseudoId); |
| 56 | 64 |
| 57 virtual void didRecalcStyle(StyleChange) OVERRIDE; | 65 virtual void didRecalcStyle(StyleChange) OVERRIDE; |
| 58 virtual PseudoId customPseudoId() const OVERRIDE { return m_pseudoId; } | 66 virtual PseudoId customPseudoId() const OVERRIDE { return m_pseudoId; } |
| 59 | 67 |
| 60 PseudoId m_pseudoId; | 68 PseudoId m_pseudoId; |
| 61 }; | 69 }; |
| 62 | 70 |
| 63 const QualifiedName& pseudoElementTagName(); | 71 const QualifiedName& pseudoElementTagName(); |
| 64 | 72 |
| 65 inline bool pseudoElementRendererIsNeeded(const RenderStyle* style) | 73 inline bool pseudoElementRendererIsNeeded(const RenderStyle* style) |
| 66 { | 74 { |
| 67 return style && style->display() != NONE && (style->contentData() || !style- >regionThread().isEmpty()); | 75 return style && style->display() != NONE && (style->contentData() || !style- >regionThread().isEmpty()); |
| 68 } | 76 } |
| 69 | 77 |
| 70 } // namespace | 78 } // namespace |
| 71 | 79 |
| 72 #endif | 80 #endif |
| OLD | NEW |