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

Side by Side Diff: third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp

Issue 2693433002: Migrate WTF::HashMap::add() to ::insert() [final] (Closed)
Patch Set: more platform-specific references Created 3 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/InlineTextBoxPainter.h" 5 #include "core/paint/InlineTextBoxPainter.h"
6 6
7 #include "core/editing/CompositionUnderline.h" 7 #include "core/editing/CompositionUnderline.h"
8 #include "core/editing/Editor.h" 8 #include "core/editing/Editor.h"
9 #include "core/editing/markers/DocumentMarkerController.h" 9 #include "core/editing/markers/DocumentMarkerController.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 void InlineTextBoxPainter::removeFromTextBlobCache( 451 void InlineTextBoxPainter::removeFromTextBlobCache(
452 const InlineTextBox& inlineTextBox) { 452 const InlineTextBox& inlineTextBox) {
453 if (gTextBlobCache) 453 if (gTextBlobCache)
454 gTextBlobCache->remove(&inlineTextBox); 454 gTextBlobCache->remove(&inlineTextBox);
455 } 455 }
456 456
457 static TextBlobPtr* addToTextBlobCache(const InlineTextBox& inlineTextBox) { 457 static TextBlobPtr* addToTextBlobCache(const InlineTextBox& inlineTextBox) {
458 if (!gTextBlobCache) 458 if (!gTextBlobCache)
459 gTextBlobCache = new InlineTextBoxBlobCacheMap; 459 gTextBlobCache = new InlineTextBoxBlobCacheMap;
460 return &gTextBlobCache->add(&inlineTextBox, nullptr).storedValue->value; 460 return &gTextBlobCache->insert(&inlineTextBox, nullptr).storedValue->value;
461 } 461 }
462 462
463 LayoutObject& InlineTextBoxPainter::inlineLayoutObject() const { 463 LayoutObject& InlineTextBoxPainter::inlineLayoutObject() const {
464 return *LineLayoutAPIShim::layoutObjectFrom( 464 return *LineLayoutAPIShim::layoutObjectFrom(
465 m_inlineTextBox.getLineLayoutItem()); 465 m_inlineTextBox.getLineLayoutItem());
466 } 466 }
467 467
468 bool InlineTextBoxPainter::paintsMarkerHighlights( 468 bool InlineTextBoxPainter::paintsMarkerHighlights(
469 const LayoutObject& layoutObject) { 469 const LayoutObject& layoutObject) {
470 return layoutObject.node() && 470 return layoutObject.node() &&
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 1390
1391 LayoutRect boxRect(boxOrigin, LayoutSize(m_inlineTextBox.logicalWidth(), 1391 LayoutRect boxRect(boxOrigin, LayoutSize(m_inlineTextBox.logicalWidth(),
1392 m_inlineTextBox.logicalHeight())); 1392 m_inlineTextBox.logicalHeight()));
1393 context.clip(FloatRect(boxRect)); 1393 context.clip(FloatRect(boxRect));
1394 context.drawHighlightForText(font, run, FloatPoint(boxOrigin), 1394 context.drawHighlightForText(font, run, FloatPoint(boxOrigin),
1395 boxRect.height().toInt(), color, 1395 boxRect.height().toInt(), color,
1396 paintOffsets.first, paintOffsets.second); 1396 paintOffsets.first, paintOffsets.second);
1397 } 1397 }
1398 1398
1399 } // namespace blink 1399 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698