Title: [184381] releases/WebKitGTK/webkit-2.8/Source/WebCore
- Revision
- 184381
- Author
- [email protected]
- Date
- 2015-05-15 05:04:35 -0700 (Fri, 15 May 2015)
Log Message
Merge r184293 - Don't compute selection painting info when we don't have selection.
https://bugs.webkit.org/show_bug.cgi?id=144920
<rdar://problem/20919920>
Reviewed by Simon Fraser.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
Just set the selection paint style to the text paint style when we don't have a selection
at all. Computing the selection style takes time in the case where a ::selection pseudo is
used on the page, so we don't want to waste time computing that info unless it's actually
needed.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (184380 => 184381)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-15 11:59:25 UTC (rev 184380)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog 2015-05-15 12:04:35 UTC (rev 184381)
@@ -1,3 +1,19 @@
+2015-05-12 David Hyatt <[email protected]>
+
+ Don't compute selection painting info when we don't have selection.
+ https://bugs.webkit.org/show_bug.cgi?id=144920
+ <rdar://problem/20919920>
+
+ Reviewed by Simon Fraser.
+
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint):
+
+ Just set the selection paint style to the text paint style when we don't have a selection
+ at all. Computing the selection style takes time in the case where a ::selection pseudo is
+ used on the page, so we don't want to waste time computing that info unless it's actually
+ needed.
+
2015-05-12 Zalan Bujtas <[email protected]>
REGRESSION(r175617): Some text doesn't render on internationalculinarycenter.com
Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/InlineTextBox.cpp (184380 => 184381)
--- releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/InlineTextBox.cpp 2015-05-15 11:59:25 UTC (rev 184380)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/rendering/InlineTextBox.cpp 2015-05-15 12:04:35 UTC (rev 184381)
@@ -529,14 +529,12 @@
// Determine the text colors and selection colors.
TextPaintStyle textPaintStyle = computeTextPaintStyle(renderer().frame(), lineStyle, paintInfo);
- bool paintSelectedTextOnly;
- bool paintSelectedTextSeparately;
- const ShadowData* selectionShadow;
- TextPaintStyle selectionPaintStyle = computeTextSelectionPaintStyle(textPaintStyle, renderer(), lineStyle, paintInfo, paintSelectedTextOnly, paintSelectedTextSeparately, selectionShadow);
-
+ bool paintSelectedTextOnly = false;
+ bool paintSelectedTextSeparately = false;
+ const ShadowData* selectionShadow = nullptr;
+
// Text with custom underlines does not have selection background painted, so selection paint style is not appropriate for it.
- if (useCustomUnderlines)
- selectionPaintStyle = textPaintStyle;
+ TextPaintStyle selectionPaintStyle = haveSelection && !useCustomUnderlines ? computeTextSelectionPaintStyle(textPaintStyle, renderer(), lineStyle, paintInfo, paintSelectedTextOnly, paintSelectedTextSeparately, selectionShadow) : textPaintStyle;
// Set our font.
const FontCascade& font = fontToUse(lineStyle, renderer());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes