Title: [204453] trunk/Source/WebCore
- Revision
- 204453
- Author
- [email protected]
- Date
- 2016-08-14 11:29:24 -0700 (Sun, 14 Aug 2016)
Log Message
Fix GTK Debug bots after r204400
https://bugs.webkit.org/show_bug.cgi?id=160818
Reviewed by Carlos Garcia Campos.
Because the GTK EWS bot doesn't run tests, I missed this.
No new tests because there is no behavior change.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::selectionRect):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (204452 => 204453)
--- trunk/Source/WebCore/ChangeLog 2016-08-14 01:29:50 UTC (rev 204452)
+++ trunk/Source/WebCore/ChangeLog 2016-08-14 18:29:24 UTC (rev 204453)
@@ -1,3 +1,17 @@
+2016-08-14 Myles C. Maxfield <[email protected]>
+
+ Fix GTK Debug bots after r204400
+ https://bugs.webkit.org/show_bug.cgi?id=160818
+
+ Reviewed by Carlos Garcia Campos.
+
+ Because the GTK EWS bot doesn't run tests, I missed this.
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+ (WebCore::HarfBuzzShaper::selectionRect):
+
2016-08-13 Chris Dumez <[email protected]>
'compatMode' property should be on Document, not HTMLDocument
Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (204452 => 204453)
--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2016-08-14 01:29:50 UTC (rev 204452)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp 2016-08-14 18:29:24 UTC (rev 204453)
@@ -648,6 +648,9 @@
bool foundFromX = false;
bool foundToX = false;
+ Optional<unsigned> fromIndex = from;
+ Optional<unsigned> toIndex = to;
+
if (m_run.rtl())
currentX = m_totalWidth;
for (unsigned i = 0; i < m_harfBuzzRuns.size(); ++i) {
@@ -654,20 +657,24 @@
if (m_run.rtl())
currentX -= m_harfBuzzRuns[i]->width();
unsigned numCharacters = m_harfBuzzRuns[i]->numCharacters();
- if (!foundFromX && from < numCharacters) {
- fromX = m_harfBuzzRuns[i]->xPositionForOffset(from) + currentX;
+ if (!foundFromX && fromIndex.value() < numCharacters) {
+ fromX = m_harfBuzzRuns[i]->xPositionForOffset(fromIndex.value()) + currentX;
foundFromX = true;
} else {
- ASSERT(from >= numCharacters);
- from -= numCharacters;
+ if (fromIndex && fromIndex.value() >= numCharacters)
+ fromIndex.value() -= numCharacters;
+ else
+ fromIndex = Nullopt;
}
- if (!foundToX && to < numCharacters) {
- toX = m_harfBuzzRuns[i]->xPositionForOffset(to) + currentX;
+ if (!foundToX && toIndex.value() < numCharacters) {
+ toX = m_harfBuzzRuns[i]->xPositionForOffset(toIndex.value()) + currentX;
foundToX = true;
} else {
- ASSERT(to >= numCharacters);
- to -= numCharacters;
+ if (toIndex && toIndex.value() >= numCharacters)
+ toIndex.value() -= numCharacters;
+ else
+ toIndex = Nullopt;
}
if (foundFromX && foundToX)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes