https://bugs.webkit.org/show_bug.cgi?id=128456
Reviewed by Anders Carlsson.
Source/WebCore:
Updated fast/css/getComputedStyle and svg/css results.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::propertyValue): Removed CSSPropertyWebKitHighlight case.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Ditto.
* css/CSSPropertyNames.in: Removed -webkit-highlight.
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Removed
CSSPropertyWebKitHighlight handler.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty): Removed CSSPropertyWebKitHighlight case.
* page/Chrome.cpp: Removed customHighlightRect and paintCustomHighlight.
* page/ChromeClient.h: Ditto.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Removed painting custom highlight.
* rendering/InlineTextBox.h:
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Removed adding overflow for custom
highlights.
* rendering/RenderBox.cpp: Removed paintCustomHighlight.
* rendering/RenderBox.h:
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced): Removed painting custom highlight.
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint): Ditto.
* rendering/RenderSnapshottedPlugIn.cpp:
(WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
* rendering/RenderWidget.cpp:
(WebCore::RenderWidget::paint): Ditto.
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::paint): Ditto.
* rendering/RootInlineBox.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout): Removed highlight comparison.
* rendering/style/RenderStyle.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Removed initializer.
(WebCore::StyleRareInheritedData::operator==): Removed highlight comparison.
* rendering/style/StyleRareInheritedData.h: Removed highlight member variable.
Source/WebInspectorUI:
* UserInterface/CSSKeywordCompletions.js: Removed -webkit-highlight.
Source/WebKit/mac:
* WebCoreSupport/WebChromeClient.h:
* WebCoreSupport/WebChromeClient.mm: Removed customHighlightRect and paintCustomHighlight.
* WebView/WebHTMLView.mm:
(-[WebHTMLViewPrivate dealloc]): Removed highlighters ivar.
(-[WebHTMLViewPrivate clear]): Ditto.
* WebView/WebHTMLViewInternal.h: Removed declaration.
* WebView/WebHTMLViewPrivate.h: Removed WebHTMLHighlighter protocol and method declarations.
Source/WebKit2:
* WebProcess/WebCoreSupport/WebChromeClient.cpp: Removed customHighlightRect and
paintCustomHighlight.
* WebProcess/WebCoreSupport/WebChromeClient.h:
LayoutTests:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163717
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-02-08 Dan Bernstein <mitz@apple.com>
+
+ Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
+ https://bugs.webkit.org/show_bug.cgi?id=128456
+
+ Reviewed by Anders Carlsson.
+
+ * fast/css/getComputedStyle/computed-style-expected.txt:
+ * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+ * svg/css/getComputedStyle-basic-expected.txt:
+
2014-02-08 Zan Dobersek <zdobersek@igalia.com>
Convert current MHTML tests into reftests
-webkit-font-kerning: auto;
-webkit-font-smoothing: auto;
-webkit-font-variant-ligatures: normal;
--webkit-highlight: none;
-webkit-hyphenate-character: auto;
-webkit-hyphenate-limit-after: auto;
-webkit-hyphenate-limit-before: auto;
-webkit-font-kerning: auto
-webkit-font-smoothing: auto
-webkit-font-variant-ligatures: normal
--webkit-highlight: none
-webkit-hyphenate-character: auto
-webkit-hyphenate-limit-after: auto
-webkit-hyphenate-limit-before: auto
rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-font-variant-ligatures) : normal
rect: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue]
-rect: style.getPropertyValue(-webkit-highlight) : none
-rect: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-hyphenate-character) : auto
rect: style.getPropertyCSSValue(-webkit-hyphenate-character) : [object CSSPrimitiveValue]
rect: style.getPropertyValue(-webkit-hyphenate-limit-after) : auto
g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-font-variant-ligatures) : normal
g: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue]
-g: style.getPropertyValue(-webkit-highlight) : none
-g: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-hyphenate-character) : auto
g: style.getPropertyCSSValue(-webkit-hyphenate-character) : [object CSSPrimitiveValue]
g: style.getPropertyValue(-webkit-hyphenate-limit-after) : auto
+2014-02-08 Dan Bernstein <mitz@apple.com>
+
+ Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
+ https://bugs.webkit.org/show_bug.cgi?id=128456
+
+ Reviewed by Anders Carlsson.
+
+ Updated fast/css/getComputedStyle and svg/css results.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::ComputedStyleExtractor::propertyValue): Removed CSSPropertyWebKitHighlight case.
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue): Ditto.
+ * css/CSSPropertyNames.in: Removed -webkit-highlight.
+ * css/DeprecatedStyleBuilder.cpp:
+ (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): Removed
+ CSSPropertyWebKitHighlight handler.
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty): Removed CSSPropertyWebKitHighlight case.
+ * page/Chrome.cpp: Removed customHighlightRect and paintCustomHighlight.
+ * page/ChromeClient.h: Ditto.
+ * rendering/InlineTextBox.cpp:
+ (WebCore::InlineTextBox::paint): Removed painting custom highlight.
+ * rendering/InlineTextBox.h:
+ * rendering/RenderBlockLineLayout.cpp:
+ (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Removed adding overflow for custom
+ highlights.
+ * rendering/RenderBox.cpp: Removed paintCustomHighlight.
+ * rendering/RenderBox.h:
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::paintReplaced): Removed painting custom highlight.
+ * rendering/RenderListMarker.cpp:
+ (WebCore::RenderListMarker::paint): Ditto.
+ * rendering/RenderSnapshottedPlugIn.cpp:
+ (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::paint): Ditto.
+ * rendering/RootInlineBox.cpp:
+ (WebCore::RootInlineBox::paint): Ditto.
+ * rendering/RootInlineBox.h:
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::changeRequiresLayout): Removed highlight comparison.
+ * rendering/style/RenderStyle.h:
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData): Removed initializer.
+ (WebCore::StyleRareInheritedData::operator==): Removed highlight comparison.
+ * rendering/style/StyleRareInheritedData.h: Removed highlight member variable.
+
2014-02-08 Dan Bernstein <mitz@apple.com>
One more build fix fix.
CSSPropertyWebkitGridTemplateRows,
CSSPropertyWebkitGridRowEnd,
CSSPropertyWebkitGridRowStart,
- CSSPropertyWebkitHighlight,
CSSPropertyWebkitHyphenateCharacter,
CSSPropertyWebkitHyphenateLimitAfter,
CSSPropertyWebkitHyphenateLimitBefore,
return zoomAdjustedPixelValue(sizingBox(renderer).height(), style.get());
}
return zoomAdjustedPixelValueForLength(style->height(), style.get());
- case CSSPropertyWebkitHighlight:
- if (style->highlight() == nullAtom)
- return cssValuePool().createIdentifierValue(CSSValueNone);
- return cssValuePool().createValue(style->highlight(), CSSPrimitiveValue::CSS_STRING);
case CSSPropertyWebkitHyphens:
return cssValuePool().createValue(style->hyphens());
case CSSPropertyWebkitHyphenateCharacter:
validPrimitive = validUnit(value, FLength);
break;
- case CSSPropertyWebkitHighlight:
- if (id == CSSValueNone || value->unit == CSSPrimitiveValue::CSS_STRING)
- validPrimitive = true;
- break;
-
case CSSPropertyWebkitHyphenateCharacter:
if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING)
validPrimitive = true;
-webkit-grid-row
-webkit-grid-template
-webkit-grid-auto-flow
--webkit-highlight [Inherited]
-webkit-hyphenate-character [Inherited]
-webkit-hyphenate-limit-after [Inherited]
-webkit-hyphenate-limit-before [Inherited]
setPropertyHandler(CSSPropertyWebkitFontKerning, ApplyPropertyFont<FontDescription::Kerning, &FontDescription::kerning, &FontDescription::setKerning, FontDescription::AutoKerning>::createHandler());
setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler());
setPropertyHandler(CSSPropertyWebkitFontVariantLigatures, ApplyPropertyFontVariantLigatures::createHandler());
- setPropertyHandler(CSSPropertyWebkitHighlight, ApplyPropertyString<MapNoneToNull, &RenderStyle::highlight, &RenderStyle::setHighlight, &RenderStyle::initialHighlight>::createHandler());
setPropertyHandler(CSSPropertyWebkitHyphenateCharacter, ApplyPropertyString<MapAutoToNull, &RenderStyle::hyphenationString, &RenderStyle::setHyphenationString, &RenderStyle::initialHyphenationString>::createHandler());
setPropertyHandler(CSSPropertyWebkitHyphenateLimitAfter, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitAfter, &RenderStyle::setHyphenationLimitAfter, &RenderStyle::initialHyphenationLimitAfter>::createHandler());
setPropertyHandler(CSSPropertyWebkitHyphenateLimitBefore, ApplyPropertyNumber<short, &RenderStyle::hyphenationLimitBefore, &RenderStyle::setHyphenationLimitBefore, &RenderStyle::initialHyphenationLimitBefore>::createHandler());
case CSSPropertyWebkitFontKerning:
case CSSPropertyWebkitFontSmoothing:
case CSSPropertyWebkitFontVariantLigatures:
- case CSSPropertyWebkitHighlight:
case CSSPropertyWebkitHyphenateCharacter:
case CSSPropertyWebkitHyphenateLimitAfter:
case CSSPropertyWebkitHyphenateLimitBefore:
{
}
-FloatRect ChromeClient::customHighlightRect(Node*, const AtomicString&, const FloatRect&)
-{
- return FloatRect();
-}
-
-void ChromeClient::paintCustomHighlight(Node*, const AtomicString&, const FloatRect&, const FloatRect&, bool, bool)
-{
-}
-
bool ChromeClient::shouldReplaceWithGeneratedFileForUpload(const String&, String&)
{
return false;
virtual void populateVisitedLinks();
- virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);
- virtual void paintCustomHighlight(Node*, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect, bool behindText, bool entireLine);
-
virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename);
virtual String generateReplacementFile(const String& path);
// 1. Paint backgrounds behind text if needed. Examples of such backgrounds include selection
// and composition underlines.
if (paintInfo.phase != PaintPhaseSelection && paintInfo.phase != PaintPhaseTextClip && !isPrinting) {
-#if PLATFORM(MAC)
- // Custom highlighters go behind everything else.
- if (lineStyle.highlight() != nullAtom && !context->paintingDisabled())
- paintCustomHighlight(adjustedPaintOffset, lineStyle.highlight());
-#endif
-
if (containsComposition && !useCustomUnderlines)
paintCompositionBackground(context, boxOrigin, lineStyle, font,
renderer().frame().editor().compositionStart(),
context->drawHighlightForText(font, constructTextRun(style, font), localOrigin, selHeight, c, style.colorSpace(), sPos, ePos);
}
-#if PLATFORM(MAC)
-
-void InlineTextBox::paintCustomHighlight(const LayoutPoint& paintOffset, const AtomicString& type)
-{
- Page* page = renderer().frame().page();
- if (!page)
- return;
-
- const RootInlineBox& rootBox = root();
- FloatRect rootRect(paintOffset.x() + rootBox.x(), paintOffset.y() + selectionTop(), rootBox.logicalWidth(), selectionHeight());
- FloatRect textRect(paintOffset.x() + x(), rootRect.y(), logicalWidth(), rootRect.height());
-
- page->chrome().client().paintCustomHighlight(renderer().textNode(), type, textRect, rootRect, true, false);
-}
-
-#endif
-
static StrokeStyle textDecorationStyleToStrokeStyle(TextDecorationStyle decorationStyle)
{
StrokeStyle strokeStyle = SolidStroke;
void paintCompositionBackground(GraphicsContext*, const FloatPoint& boxOrigin, const RenderStyle&, const Font&, int startPos, int endPos);
void paintDocumentMarkers(GraphicsContext*, const FloatPoint& boxOrigin, const RenderStyle&, const Font&, bool background);
void paintCompositionUnderline(GraphicsContext*, const FloatPoint& boxOrigin, const CompositionUnderline&);
-#if PLATFORM(MAC)
- void paintCustomHighlight(const LayoutPoint&, const AtomicString& type);
-#endif
private:
void paintDecoration(GraphicsContext&, const FloatPoint& boxOrigin, TextDecoration, TextDecorationStyle, const ShadowData*, TextPainter&);
// Compute our overflow now.
lineBox->computeOverflow(lineBox->lineTop(), lineBox->lineBottom(), textBoxDataMap);
-#if PLATFORM(MAC)
- // Highlight acts as an overflow inflation.
- if (style().highlight() != nullAtom)
- lineBox->addHighlightOverflow();
-#endif
return lineBox;
}
return false;
}
-#if PLATFORM(MAC)
-
-void RenderBox::paintCustomHighlight(const LayoutPoint& paintOffset, const AtomicString& type, bool behindText)
-{
- Page* page = frame().page();
- if (!page)
- return;
-
- InlineBox* boxWrap = inlineBoxWrapper();
- RootInlineBox* r = boxWrap ? &boxWrap->root() : 0;
- if (r) {
- FloatRect rootRect(paintOffset.x() + r->x(), paintOffset.y() + r->selectionTop(), r->logicalWidth(), r->selectionHeight());
- FloatRect imageRect(paintOffset.x() + x(), rootRect.y(), width(), rootRect.height());
- page->chrome().client().paintCustomHighlight(element(), type, imageRect, rootRect, behindText, false);
- } else {
- FloatRect imageRect(paintOffset.x() + x(), paintOffset.y() + y(), width(), height());
- page->chrome().client().paintCustomHighlight(element(), type, imageRect, imageRect, behindText, false);
- }
-}
-
-#endif
-
bool RenderBox::pushContentsClip(PaintInfo& paintInfo, const LayoutPoint& accumulatedOffset)
{
if (paintInfo.phase == PaintPhaseBlockBackground || paintInfo.phase == PaintPhaseSelfOutline || paintInfo.phase == PaintPhaseMask)
BackgroundBleedAvoidance determineBackgroundBleedAvoidance(GraphicsContext*) const;
bool backgroundHasOpaqueTopLayer() const;
-#if PLATFORM(MAC)
- void paintCustomHighlight(const LayoutPoint&, const AtomicString& type, bool behindText);
-#endif
-
void computePositionedLogicalWidth(LogicalExtentComputedValues&, RenderRegion* = 0) const;
LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
return;
}
-#if PLATFORM(MAC)
- if (style().highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(toPoint(paintOffset - location()), style().highlight(), true);
-#endif
-
LayoutRect contentRect = contentBoxRect();
contentRect.moveBy(paintOffset);
LayoutRect paintRect = replacedContentRect(intrinsicSize());
GraphicsContext* context = paintInfo.context;
if (isImage()) {
-#if PLATFORM(MAC)
- if (style().highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(paintOffset, style().highlight(), true);
-#endif
context->drawImage(m_image->image(this, marker.size()).get(), style().colorSpace(), marker);
if (selectionState() != SelectionNone) {
LayoutRect selRect = localSelectionRect();
return;
}
-#if PLATFORM(MAC)
- // FIXME: paint gap between marker and list item proper
- if (style().highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(paintOffset, style().highlight(), true);
-#endif
-
if (selectionState() != SelectionNone) {
LayoutRect selRect = localSelectionRect();
selRect.moveBy(boxOrigin);
return;
GraphicsContext* context = paintInfo.context;
-#if PLATFORM(MAC)
- if (style().highlight() != nullAtom && !context->paintingDisabled())
- paintCustomHighlight(toPoint(paintOffset - location()), style().highlight(), true);
-#endif
LayoutSize contentSize(cWidth, cHeight);
LayoutPoint contentLocation = location() + paintOffset;
if (paintInfo.phase != PaintPhaseForeground)
return;
-#if PLATFORM(MAC)
- if (style().highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(paintOffset, style().highlight(), true);
-#endif
-
if (style().hasBorderRadius()) {
LayoutRect borderRect = LayoutRect(adjustedPaintOffset, size());
ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
}
-#if PLATFORM(MAC)
-
-void RootInlineBox::addHighlightOverflow()
-{
- Page* page = renderer().frame().page();
- if (!page)
- return;
-
- // Highlight acts as a selection inflation.
- FloatRect rootRect(0, selectionTop(), logicalWidth(), selectionHeight());
- IntRect inflatedRect = enclosingIntRect(page->chrome().client().customHighlightRect(renderer().element(), renderer().style().highlight(), rootRect));
- setOverflowFromLogicalRects(inflatedRect, inflatedRect, lineTop(), lineBottom());
-}
-
-void RootInlineBox::paintCustomHighlight(PaintInfo& paintInfo, const LayoutPoint& paintOffset, const AtomicString& highlightType)
-{
- if (!paintInfo.shouldPaintWithinRoot(renderer()) || renderer().style().visibility() != VISIBLE || paintInfo.phase != PaintPhaseForeground)
- return;
-
- Page* page = renderer().frame().page();
- if (!page)
- return;
-
- // Get the inflated rect so that we can properly hit test.
- FloatRect rootRect(paintOffset.x() + x(), paintOffset.y() + selectionTop(), logicalWidth(), selectionHeight());
- FloatRect inflatedRect = page->chrome().client().customHighlightRect(renderer().element(), highlightType, rootRect);
- if (inflatedRect.intersects(paintInfo.rect))
- page->chrome().client().paintCustomHighlight(renderer().element(), highlightType, rootRect, rootRect, false, true);
-}
-
-#endif
-
void RootInlineBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
{
// Check if we are in the correct region.
InlineFlowBox::paint(paintInfo, paintOffset, lineTop, lineBottom);
paintEllipsisBox(paintInfo, paintOffset, lineTop, lineBottom);
-#if PLATFORM(MAC)
- const RenderStyle& lineStyle = this->lineStyle();
- if (lineStyle.highlight() != nullAtom && !paintInfo.context->paintingDisabled())
- paintCustomHighlight(paintInfo, paintOffset, lineStyle.highlight());
-#endif
}
bool RootInlineBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom)
virtual int baselinePosition(FontBaseline baselineType) const override final;
virtual LayoutUnit lineHeight() const override final;
-#if PLATFORM(MAC)
- void addHighlightOverflow();
- void paintCustomHighlight(PaintInfo&, const LayoutPoint&, const AtomicString& highlightType);
-#endif
-
virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) override final;
}
if (rareInheritedData.get() != other->rareInheritedData.get()) {
- if (rareInheritedData->highlight != other->rareInheritedData->highlight
- || rareInheritedData->indent != other->rareInheritedData->indent
+ if (rareInheritedData->indent != other->rareInheritedData->indent
#if ENABLE(CSS3_TEXT)
|| rareInheritedData->m_textAlignLast != other->rareInheritedData->m_textAlignLast
|| rareInheritedData->m_textIndentLine != other->rareInheritedData->m_textIndentLine
EOverflowWrap overflowWrap() const { return static_cast<EOverflowWrap>(rareInheritedData->overflowWrap); }
ENBSPMode nbspMode() const { return static_cast<ENBSPMode>(rareInheritedData->nbspMode); }
LineBreak lineBreak() const { return static_cast<LineBreak>(rareInheritedData->lineBreak); }
- const AtomicString& highlight() const { return rareInheritedData->highlight; }
Hyphens hyphens() const { return static_cast<Hyphens>(rareInheritedData->hyphens); }
short hyphenationLimitBefore() const { return rareInheritedData->hyphenationLimitBefore; }
short hyphenationLimitAfter() const { return rareInheritedData->hyphenationLimitAfter; }
void setOverflowWrap(EOverflowWrap b) { SET_VAR(rareInheritedData, overflowWrap, b); }
void setNBSPMode(ENBSPMode b) { SET_VAR(rareInheritedData, nbspMode, b); }
void setLineBreak(LineBreak b) { SET_VAR(rareInheritedData, lineBreak, b); }
- void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); }
void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
void setHyphenationLimitBefore(short limit) { SET_VAR(rareInheritedData, hyphenationLimitBefore, limit); }
void setHyphenationLimitAfter(short limit) { SET_VAR(rareInheritedData, hyphenationLimitAfter, limit); }
static EOverflowWrap initialOverflowWrap() { return NormalOverflowWrap; }
static ENBSPMode initialNBSPMode() { return NBNORMAL; }
static LineBreak initialLineBreak() { return LineBreakAuto; }
- static const AtomicString& initialHighlight() { return nullAtom; }
static ESpeak initialSpeak() { return SpeakNormal; }
static Hyphens initialHyphens() { return HyphensManual; }
static short initialHyphenationLimitBefore() { return -1; }
, visitedLinkTextFillColor(o.visitedLinkTextFillColor)
, visitedLinkTextEmphasisColor(o.visitedLinkTextEmphasisColor)
, textShadow(o.textShadow ? adoptPtr(new ShadowData(*o.textShadow)) : nullptr)
- , highlight(o.highlight)
, cursorData(o.cursorData)
, indent(o.indent)
, m_effectiveZoom(o.m_effectiveZoom)
&& tapHighlightColor == o.tapHighlightColor
#endif
&& shadowDataEquivalent(o)
- && highlight == o.highlight
&& cursorDataEquivalent(cursorData.get(), o.cursorData.get())
&& indent == o.indent
&& m_effectiveZoom == o.m_effectiveZoom
Color visitedLinkTextEmphasisColor;
OwnPtr<ShadowData> textShadow; // Our text shadow information for shadowed text drawing.
- AtomicString highlight; // Apple-specific extension for custom highlight rendering.
RefPtr<CursorList> cursorData;
Length indent;
+2014-02-08 Dan Bernstein <mitz@apple.com>
+
+ Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
+ https://bugs.webkit.org/show_bug.cgi?id=128456
+
+ Reviewed by Anders Carlsson.
+
+ * UserInterface/CSSKeywordCompletions.js: Removed -webkit-highlight.
+
2014-02-07 Brian Burg <bburg@apple.com>
Web Inspector: Clean up DataGrid and add table columns incrementally
"text-shadow", "text-transform", "visibility", "voice-family", "volume", "white-space", "widows", "word-break",
"word-spacing", "word-wrap", "writing-mode", "-webkit-aspect-ratio", "-webkit-border-horizontal-spacing",
"-webkit-border-vertical-spacing", "-webkit-box-direction", "-webkit-color-correction", "-webkit-font-feature-settings",
- "-webkit-font-kerning", "-webkit-font-smoothing", "-webkit-font-variant-ligatures", "-webkit-highlight",
+ "-webkit-font-kerning", "-webkit-font-smoothing", "-webkit-font-variant-ligatures",
"-webkit-hyphenate-character", "-webkit-hyphenate-limit-after", "-webkit-hyphenate-limit-before",
"-webkit-hyphenate-limit-lines", "-webkit-hyphens", "-webkit-line-align", "-webkit-line-box-contain",
"-webkit-line-break", "-webkit-line-grid", "-webkit-line-snap", "-webkit-locale", "-webkit-nbsp-mode",
"-webkit-column-width": [
"auto", "calc()", "-webkit-calc()"
],
- "-webkit-highlight": [
- "none"
- ],
"-webkit-hyphenate-character": [
"none"
],
+2014-02-08 Dan Bernstein <mitz@apple.com>
+
+ Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
+ https://bugs.webkit.org/show_bug.cgi?id=128456
+
+ Reviewed by Anders Carlsson.
+
+ * WebCoreSupport/WebChromeClient.h:
+ * WebCoreSupport/WebChromeClient.mm: Removed customHighlightRect and paintCustomHighlight.
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLViewPrivate dealloc]): Removed highlighters ivar.
+ (-[WebHTMLViewPrivate clear]): Ditto.
+ * WebView/WebHTMLViewInternal.h: Removed declaration.
+ * WebView/WebHTMLViewPrivate.h: Removed WebHTMLHighlighter protocol and method declarations.
+
2014-02-08 Dan Bernstein <mitz@apple.com>
iOS build fix after r163712.
virtual void setCursorHiddenUntilMouseMoves(bool) override;
#endif
- virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type, const WebCore::FloatRect& lineRect) override;
- virtual void paintCustomHighlight(WebCore::Node*, const WTF::AtomicString& type, const WebCore::FloatRect& boxRect, const WebCore::FloatRect& lineRect, bool behindText, bool entireLine) override;
-
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassOwnPtr<WebCore::ColorChooser> createColorChooser(WebCore::ColorChooserClient*, const WebCore::Color&) override;
#endif
#endif
-FloatRect WebChromeClient::customHighlightRect(Node* node, const AtomicString& type, const FloatRect& lineRect)
-{
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
- NSView *documentView = [[kit(node->document().frame()) frameView] documentView];
- if (![documentView isKindOfClass:[WebHTMLView class]])
- return NSZeroRect;
-
- WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
- id<WebHTMLHighlighter> highlighter = [webHTMLView _highlighterForType:type];
- return [highlighter highlightRectForLine:lineRect representedNode:kit(node)];
-
- END_BLOCK_OBJC_EXCEPTIONS;
-
- return NSZeroRect;
-}
-
-void WebChromeClient::paintCustomHighlight(Node* node, const AtomicString& type, const FloatRect& boxRect, const FloatRect& lineRect,
- bool behindText, bool entireLine)
-{
- BEGIN_BLOCK_OBJC_EXCEPTIONS;
-
- NSView *documentView = [[kit(node->document().frame()) frameView] documentView];
- if (![documentView isKindOfClass:[WebHTMLView class]])
- return;
-
- WebHTMLView *webHTMLView = (WebHTMLView *)documentView;
- id<WebHTMLHighlighter> highlighter = [webHTMLView _highlighterForType:type];
- [highlighter paintHighlightForBox:boxRect onLine:lineRect behindText:behindText entireLine:entireLine representedNode:kit(node)];
-
- END_BLOCK_OBJC_EXCEPTIONS;
-}
-
#if ENABLE(INPUT_TYPE_COLOR)
PassOwnPtr<ColorChooser> WebChromeClient::createColorChooser(ColorChooserClient* client, const Color& initialColor)
{
NSArray *pageRects;
- NSMutableDictionary *highlighters;
-
-
#if !PLATFORM(IOS)
WebTextCompletionController *completionController;
#endif
[completionController release];
#endif
[dataSource release];
- [highlighters release];
#if !PLATFORM(IOS)
[trackingAreaForNonKeyWindow release];
if (promisedDragTIFFDataSource)
[completionController release];
#endif
[dataSource release];
- [highlighters release];
#if !PLATFORM(IOS)
[trackingAreaForNonKeyWindow release];
if (promisedDragTIFFDataSource)
completionController = nil;
#endif
dataSource = nil;
- highlighters = nil;
#if !PLATFORM(IOS)
trackingAreaForNonKeyWindow = nil;
promisedDragTIFFDataSource = 0;
coreFrame->editor().decreaseSelectionListLevel();
}
-- (void)_setHighlighter:(id<WebHTMLHighlighter>)highlighter ofType:(NSString*)type
-{
- if (!_private->highlighters)
- _private->highlighters = [[NSMutableDictionary alloc] init];
- [_private->highlighters setObject:highlighter forKey:type];
-}
-
-- (void)_removeHighlighterOfType:(NSString*)type
-{
- [_private->highlighters removeObjectForKey:type];
-}
-
#if !PLATFORM(IOS)
- (void)_writeSelectionToPasteboard:(NSPasteboard *)pasteboard
{
}
#endif
-- (id<WebHTMLHighlighter>)_highlighterForType:(NSString*)type
-{
- return [_private->highlighters objectForKey:type];
-}
-
- (WebFrame *)_frame
{
return [_private->dataSource webFrame];
#endif
- (BOOL)_canSmartCopyOrDelete;
-- (id <WebHTMLHighlighter>)_highlighterForType:(NSString*)type;
- (WebFrame *)_frame;
#if !PLATFORM(IOS)
- (void)_lookUpInDictionaryFromMenu:(id)sender;
@class DOMRange;
@class WebPluginController;
-@protocol WebHTMLHighlighter
-- (NSRect)highlightRectForLine:(NSRect)lineRect representedNode:(DOMNode *)node;
-- (void)paintHighlightForBox:(NSRect)boxRect onLine:(NSRect)lineRect behindText:(BOOL)text entireLine:(BOOL)line representedNode:(DOMNode *)node;
-@end
-
extern const float _WebHTMLViewPrintingMinimumShrinkFactor;
extern const float _WebHTMLViewPrintingMaximumShrinkFactor;
- (DOMNode *)_increaseSelectionListLevelOrdered;
- (DOMNode *)_increaseSelectionListLevelUnordered;
- (void)_decreaseSelectionListLevel;
-- (void)_setHighlighter:(id <WebHTMLHighlighter>)highlighter ofType:(NSString *)type;
-- (void)_removeHighlighterOfType:(NSString *)type;
- (DOMDocumentFragment *)_documentFragmentFromPasteboard:(NSPasteboard *)pasteboard forType:(NSString *)pboardType inContext:(DOMRange *)context subresources:(NSArray **)subresources;
#endif
+2014-02-08 Dan Bernstein <mitz@apple.com>
+
+ Remove client-drawn highlights (-webkit-highlight, WebHTMLHighlighter)
+ https://bugs.webkit.org/show_bug.cgi?id=128456
+
+ Reviewed by Anders Carlsson.
+
+ * WebProcess/WebCoreSupport/WebChromeClient.cpp: Removed customHighlightRect and
+ paintCustomHighlight.
+ * WebProcess/WebCoreSupport/WebChromeClient.h:
+
2014-02-08 Darin Adler <darin@apple.com>
Change TextIterator to use StringView, preparing to wean it from deprecatedCharacters
{
}
-FloatRect WebChromeClient::customHighlightRect(Node*, const AtomicString& /*type*/, const FloatRect& /*lineRect*/)
-{
- notImplemented();
- return FloatRect();
-}
-
-void WebChromeClient::paintCustomHighlight(Node*, const AtomicString& /*type*/, const FloatRect& /*boxRect*/, const FloatRect& /*lineRect*/,
- bool /*behindText*/, bool /*entireLine*/)
-{
- notImplemented();
-}
-
bool WebChromeClient::shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename)
{
generatedFilename = m_page->injectedBundleUIClient().shouldGenerateFileForUpload(m_page, path);
virtual void populateVisitedLinks() override;
- virtual WebCore::FloatRect customHighlightRect(WebCore::Node*, const WTF::AtomicString& type, const WebCore::FloatRect& lineRect) override;
- virtual void paintCustomHighlight(WebCore::Node*, const AtomicString& type, const WebCore::FloatRect& boxRect, const WebCore::FloatRect& lineRect,
- bool behindText, bool entireLine) override;
-
virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename) override;
virtual String generateReplacementFile(const String& path) override;