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

Side by Side Diff: Source/core/rendering/RenderCounter.cpp

Issue 613783002: Smaller vtbls in RenderObject (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase better. Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderCounter.h ('k') | Source/core/rendering/RenderDetailsMarker.h » ('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) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 2 * Copyright (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (view()) 371 if (view())
372 view()->removeRenderCounter(); 372 view()->removeRenderCounter();
373 RenderText::willBeDestroyed(); 373 RenderText::willBeDestroyed();
374 } 374 }
375 375
376 const char* RenderCounter::renderName() const 376 const char* RenderCounter::renderName() const
377 { 377 {
378 return "RenderCounter"; 378 return "RenderCounter";
379 } 379 }
380 380
381 bool RenderCounter::isCounter() const
382 {
383 return true;
384 }
385
386 PassRefPtr<StringImpl> RenderCounter::originalText() const 381 PassRefPtr<StringImpl> RenderCounter::originalText() const
387 { 382 {
388 if (!m_counterNode) { 383 if (!m_counterNode) {
389 RenderObject* beforeAfterContainer = parent(); 384 RenderObject* beforeAfterContainer = parent();
390 while (true) { 385 while (true) {
391 if (!beforeAfterContainer) 386 if (!beforeAfterContainer)
392 return nullptr; 387 return nullptr;
393 if (!beforeAfterContainer->isAnonymous() && !beforeAfterContainer->i sPseudoElement()) 388 if (!beforeAfterContainer->isAnonymous() && !beforeAfterContainer->i sPseudoElement())
394 return nullptr; // RenderCounters are restricted to before and a fter pseudo elements 389 return nullptr; // RenderCounters are restricted to before and a fter pseudo elements
395 PseudoId containerStyle = beforeAfterContainer->style()->styleType() ; 390 PseudoId containerStyle = beforeAfterContainer->style()->styleType() ;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 fprintf(stderr, " "); 608 fprintf(stderr, " ");
614 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n", 609 fprintf(stderr, "%p N:%p P:%p PS:%p NS:%p C:%p\n",
615 current, current->node(), current->parent(), current->previousSiblin g(), 610 current, current->node(), current->parent(), current->previousSiblin g(),
616 current->nextSibling(), current->hasCounterNodeMap() ? 611 current->nextSibling(), current->hasCounterNodeMap() ?
617 counterName ? blink::counterMaps().get(current)->get(identifier) : ( blink::CounterNode*)1 : (blink::CounterNode*)0); 612 counterName ? blink::counterMaps().get(current)->get(identifier) : ( blink::CounterNode*)1 : (blink::CounterNode*)0);
618 } 613 }
619 fflush(stderr); 614 fflush(stderr);
620 } 615 }
621 616
622 #endif // NDEBUG 617 #endif // NDEBUG
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderCounter.h ('k') | Source/core/rendering/RenderDetailsMarker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698