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

Unified Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 672953002: Convert first letter into a pseudo element. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 69d48478fe7973028a88bf5f18a5f9356ea76bee..76ecbf15576a4116374d482d8c63f1fc14f1a175 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -60,11 +60,6 @@ namespace blink {
typedef WillBeHeapHashMap<RawPtrWillBeMember<const RenderBoxModelObject>, RawPtrWillBeMember<RenderBoxModelObject> > ContinuationMap;
static OwnPtrWillBePersistent<ContinuationMap>* continuationMap = 0;
-// This HashMap is similar to the continuation map, but connects first-letter
-// renderers to their remaining text fragments.
-typedef WillBeHeapHashMap<RawPtrWillBeMember<const RenderBoxModelObject>, RawPtrWillBeMember<RenderTextFragment> > FirstLetterRemainingTextMap;
-static OwnPtrWillBePersistent<FirstLetterRemainingTextMap>* firstLetterRemainingTextMap = 0;
-
void RenderBoxModelObject::setSelectionState(SelectionState state)
{
if (state == SelectionInside && selectionState() != SelectionNone)
@@ -113,11 +108,6 @@ void RenderBoxModelObject::willBeDestroyed()
// A continuation of this RenderObject should be destroyed at subclasses.
ASSERT(!continuation());
- // If this is a first-letter object with a remaining text fragment then the
- // entry needs to be cleared from the map.
- if (firstLetterRemainingText())
- setFirstLetterRemainingText(0);
-
RenderLayerModelObject::willBeDestroyed();
}
@@ -492,24 +482,6 @@ void RenderBoxModelObject::computeLayerHitTestRects(LayerHitTestRects& rects) co
continuation()->computeLayerHitTestRects(rects);
}
-RenderTextFragment* RenderBoxModelObject::firstLetterRemainingText() const
-{
- if (!firstLetterRemainingTextMap)
- return 0;
- return (*firstLetterRemainingTextMap)->get(this);
-}
-
-void RenderBoxModelObject::setFirstLetterRemainingText(RenderTextFragment* remainingText)
-{
- if (remainingText) {
- if (!firstLetterRemainingTextMap)
- firstLetterRemainingTextMap = new OwnPtrWillBePersistent<FirstLetterRemainingTextMap>(adoptPtrWillBeNoop(new FirstLetterRemainingTextMap));
- (*firstLetterRemainingTextMap)->set(this, remainingText);
- } else if (firstLetterRemainingTextMap) {
- (*firstLetterRemainingTextMap)->remove(this);
- }
-}
-
LayoutRect RenderBoxModelObject::localCaretRectForEmptyElement(LayoutUnit width, LayoutUnit textIndentOffset)
{
ASSERT(!slowFirstChild());
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.h ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698