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

Side by Side Diff: Source/core/rendering/svg/SVGTextQuery.cpp

Issue 19096011: Get rid of SVGRect special case from the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/svg/SVGTextQuery.h ('k') | Source/core/svg/SVGAnimatedRect.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) Research In Motion Limited 2010-2012. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 int startPosition = data->position; 494 int startPosition = data->position;
495 int endPosition = startPosition + 1; 495 int endPosition = startPosition + 1;
496 if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startP osition, endPosition)) 496 if (!mapStartEndPositionsIntoFragmentCoordinates(queryData, fragment, startP osition, endPosition))
497 return false; 497 return false;
498 498
499 calculateGlyphBoundaries(queryData, fragment, startPosition, data->extent); 499 calculateGlyphBoundaries(queryData, fragment, startPosition, data->extent);
500 return true; 500 return true;
501 } 501 }
502 502
503 FloatRect SVGTextQuery::extentOfCharacter(unsigned position) const 503 SVGRect SVGTextQuery::extentOfCharacter(unsigned position) const
504 { 504 {
505 if (m_textBoxes.isEmpty()) 505 if (m_textBoxes.isEmpty())
506 return FloatRect(); 506 return SVGRect();
507 507
508 ExtentOfCharacterData data(position); 508 ExtentOfCharacterData data(position);
509 executeQuery(&data, &SVGTextQuery::extentOfCharacterCallback); 509 executeQuery(&data, &SVGTextQuery::extentOfCharacterCallback);
510 return data.extent; 510 return data.extent;
511 } 511 }
512 512
513 // characterNumberAtPosition() implementation 513 // characterNumberAtPosition() implementation
514 struct CharacterNumberAtPositionData : SVGTextQuery::Data { 514 struct CharacterNumberAtPositionData : SVGTextQuery::Data {
515 CharacterNumberAtPositionData(const FloatPoint& queryPosition) 515 CharacterNumberAtPositionData(const FloatPoint& queryPosition)
516 : position(queryPosition) 516 : position(queryPosition)
(...skipping 30 matching lines...) Expand all
547 return -1; 547 return -1;
548 548
549 CharacterNumberAtPositionData data(position); 549 CharacterNumberAtPositionData data(position);
550 if (!executeQuery(&data, &SVGTextQuery::characterNumberAtPositionCallback)) 550 if (!executeQuery(&data, &SVGTextQuery::characterNumberAtPositionCallback))
551 return -1; 551 return -1;
552 552
553 return data.processedCharacters; 553 return data.processedCharacters;
554 } 554 }
555 555
556 } 556 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGTextQuery.h ('k') | Source/core/svg/SVGAnimatedRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698