[webkit-changes] [285018] trunk/Source/WebKitLegacy/mac

2021-10-28 Thread pvollan
Title: [285018] trunk/Source/WebKitLegacy/mac








Revision 285018
Author pvol...@apple.com
Date 2021-10-28 21:19:00 -0700 (Thu, 28 Oct 2021)


Log Message
Layout test is crashing inside WebChromeClient::createWindow
https://bugs.webkit.org/show_bug.cgi?id=232460


Reviewed by Brent Fulgham.

Add null check for local NetscapePluginHostProxy pointer variable.

* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::didCreateWindow):

Modified Paths

trunk/Source/WebKitLegacy/mac/ChangeLog
trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm




Diff

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (285017 => 285018)

--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-10-29 03:49:24 UTC (rev 285017)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-10-29 04:19:00 UTC (rev 285018)
@@ -1,3 +1,16 @@
+2021-10-28  Per Arne Vollan 
+
+Layout test is crashing inside WebChromeClient::createWindow
+https://bugs.webkit.org/show_bug.cgi?id=232460
+
+
+Reviewed by Brent Fulgham.
+
+Add null check for local NetscapePluginHostProxy pointer variable.
+
+* Plugins/Hosted/NetscapePluginHostManager.mm:
+(WebKit::NetscapePluginHostManager::didCreateWindow):
+
 2021-10-28  Alex Christensen  
 
 Disable NETSCAPE_PLUGIN_API at build time on macOS and Windows


Modified: trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm (285017 => 285018)

--- trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm	2021-10-29 03:49:24 UTC (rev 285017)
+++ trunk/Source/WebKitLegacy/mac/Plugins/Hosted/NetscapePluginHostManager.mm	2021-10-29 04:19:00 UTC (rev 285018)
@@ -311,7 +311,12 @@
 PluginHostMap::iterator end = m_pluginHosts.end();
 for (PluginHostMap::iterator it = m_pluginHosts.begin(); it != end; ++it) {
 NetscapePluginHostProxy* hostProxy = it->value;
-
+
+if (!hostProxy) {
+LOG_ERROR("Could not find a NetscapePluginHostProxy for key %s.", it->key.utf8().data());
+continue;
+}
+
 if (!hostProxy->isMenuBarVisible()) {
 // Make ourselves the front process.
 ProcessSerialNumber psn;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [285017] trunk/Source

2021-10-28 Thread timothy_horton
Title: [285017] trunk/Source








Revision 285017
Author timothy_hor...@apple.com
Date 2021-10-28 20:49:24 -0700 (Thu, 28 Oct 2021)


Log Message
Yahoo.com has fragments of wrongly-scaled content throughout when using CGDisplayListImageBufferBackend
https://bugs.webkit.org/show_bug.cgi?id=232459

Reviewed by Dean Jackson.

Source/WebCore:

* platform/graphics/GraphicsContext.h:
Add a WEBCORE_EXPORT that the compiler now wants.

* platform/graphics/cg/GraphicsContextCG.h:
Add a `final` that was missing; not sure why the compiler didn't complain
about the lack of `final` OR `override`, but it does now!
Change getCTM and setCTM to `override` instead of `final` so that
GraphicsContextCGDisplayList can override them.

Source/WebKit:

Similar to r284991, 2D transforms that getCTM() from a CGBitmap context and set
the result on a CGDisplayList with setCTM() (via BifurcatedGraphicsContext)
corrupt the display list's CTM, because it starts out in a different initial state,
because the display list is always recorded with a 1x scale.

To fix this, sneak the fake scale into setCTM/getCTM (multiplying it in in get,
dividing it out in set) so that it appears to the outside as if it has
the same base transform as the CGBitmap context.

* Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp:
(WebKit::GraphicsContextCGDisplayList::GraphicsContextCGDisplayList):
(WebKit::CGDisplayListImageBufferBackend::create):
* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
trunk/Source/WebKit/ChangeLog
trunk/Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (285016 => 285017)

--- trunk/Source/WebCore/ChangeLog	2021-10-29 02:53:47 UTC (rev 285016)
+++ trunk/Source/WebCore/ChangeLog	2021-10-29 03:49:24 UTC (rev 285017)
@@ -1,3 +1,19 @@
+2021-10-28  Tim Horton  
+
+Yahoo.com has fragments of wrongly-scaled content throughout when using CGDisplayListImageBufferBackend
+https://bugs.webkit.org/show_bug.cgi?id=232459
+
+Reviewed by Dean Jackson.
+
+* platform/graphics/GraphicsContext.h:
+Add a WEBCORE_EXPORT that the compiler now wants.
+
+* platform/graphics/cg/GraphicsContextCG.h:
+Add a `final` that was missing; not sure why the compiler didn't complain
+about the lack of `final` OR `override`, but it does now!
+Change getCTM and setCTM to `override` instead of `final` so that
+GraphicsContextCGDisplayList can override them.
+
 2021-10-28  Gabriel Nava Marino  
 
 Negative length returned by TextUtil::midWordBreak with surrogate pair


Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.h (285016 => 285017)

--- trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2021-10-29 02:53:47 UTC (rev 285016)
+++ trunk/Source/WebCore/platform/graphics/GraphicsContext.h	2021-10-29 03:49:24 UTC (rev 285017)
@@ -415,7 +415,7 @@
 
 virtual void fillRect(const FloatRect&) = 0;
 virtual void fillRect(const FloatRect&, const Color&) = 0;
-virtual void fillRect(const FloatRect&, Gradient&);
+WEBCORE_EXPORT virtual void fillRect(const FloatRect&, Gradient&);
 WEBCORE_EXPORT virtual void fillRect(const FloatRect&, const Color&, CompositeOperator, BlendMode = BlendMode::Normal);
 virtual void fillRoundedRectImpl(const FloatRoundedRect&, const Color&) = 0;
 WEBCORE_EXPORT virtual void fillRoundedRect(const FloatRoundedRect&, const Color&, BlendMode = BlendMode::Normal);


Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h (285016 => 285017)

--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h	2021-10-29 02:53:47 UTC (rev 285016)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.h	2021-10-29 03:49:24 UTC (rev 285017)
@@ -82,7 +82,7 @@
 
 ~GraphicsContextCG();
 
-bool hasPlatformContext() const;
+bool hasPlatformContext() const final;
 CGContextRef platformContext() const final;
 
 void save() final;
@@ -143,9 +143,9 @@
 void translate(float x, float y) final;
 
 void concatCTM(const AffineTransform&) final;
-void setCTM(const AffineTransform&) final;
+void setCTM(const AffineTransform&) override;
 
-AffineTransform getCTM(IncludeDeviceScale = PossiblyIncludeDeviceScale) const final;
+AffineTransform getCTM(IncludeDeviceScale = PossiblyIncludeDeviceScale) const override;
 
 FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides) final;
 


Modified: trunk/Source/WebKit/ChangeLog (285016 => 285017)

--- trunk/Source/WebKit/ChangeLog	2021-10-29 02:53:47 UTC (rev 285016)
+++ trunk/Source/WebKit/ChangeLog	2021-10-29 03:49:24 UTC (rev 285017)
@@ -1,3 +1,25 @@
+2021-10-28  Tim Horton  
+
+Yahoo.com has fragments of 

[webkit-changes] [285016] trunk

2021-10-28 Thread commit-queue
Title: [285016] trunk








Revision 285016
Author commit-qu...@webkit.org
Date 2021-10-28 19:53:47 -0700 (Thu, 28 Oct 2021)


Log Message
Source/WebCore:
Negative length returned by TextUtil::midWordBreak with surrogate pair
https://bugs.webkit.org/show_bug.cgi?id=232053

Patch by Gabriel Nava Marino  on 2021-10-28
Reviewed by Alan Bujtas.

When the substring does not fit, the right side is supposed to be the start
of the surrogate pair if applicable. However, if the start of the surrogate
pair falls to the left of the startPosition, we will end up returning a
negative length. Instead, bail out at this point since we know that our
middle point (which becomes the right) falls before the start position.
We are not going to find a non-empty fitting content anymore in here.

* layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::breakWord):

LayoutTests:
Add an additional edge case for surrogate pairs to existing tests.
https://bugs.webkit.org/show_bug.cgi?id=232053

Patch by Gabriel Nava Marino  on 2021-10-28
Reviewed by Alan Bujtas.

* fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt:
* fast/text/word-break-column-gap-display-flex-utf16-surrogates.html:
* fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt:
* fast/text/word-break-letter-spacing-utf16-surrogates.html:
* fast/text/word-break-max-width-utf16-surrogates-expected.txt:
* fast/text/word-break-max-width-utf16-surrogates.html:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt
trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates.html
trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt
trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates.html
trunk/LayoutTests/fast/text/word-break-max-width-utf16-surrogates-expected.txt
trunk/LayoutTests/fast/text/word-break-max-width-utf16-surrogates.html
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp




Diff

Modified: trunk/LayoutTests/ChangeLog (285015 => 285016)

--- trunk/LayoutTests/ChangeLog	2021-10-29 02:19:51 UTC (rev 285015)
+++ trunk/LayoutTests/ChangeLog	2021-10-29 02:53:47 UTC (rev 285016)
@@ -1,3 +1,17 @@
+2021-10-28  Gabriel Nava Marino  
+
+Add an additional edge case for surrogate pairs to existing tests.
+https://bugs.webkit.org/show_bug.cgi?id=232053
+
+Reviewed by Alan Bujtas.
+
+* fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt:
+* fast/text/word-break-column-gap-display-flex-utf16-surrogates.html:
+* fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt:
+* fast/text/word-break-letter-spacing-utf16-surrogates.html:
+* fast/text/word-break-max-width-utf16-surrogates-expected.txt:
+* fast/text/word-break-max-width-utf16-surrogates.html:
+
 2021-10-28  Nikos Mouchtaris  
 
 if border-radius includes a var(), the value is not readable from .style


Modified: trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt (285015 => 285016)

--- trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt	2021-10-29 02:19:51 UTC (rev 285015)
+++ trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates-expected.txt	2021-10-29 02:53:47 UTC (rev 285016)
@@ -12,4 +12,6 @@
 �r�
 �
 �
+r��r
+rr
 PASS


Modified: trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates.html (285015 => 285016)

--- trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates.html	2021-10-29 02:19:51 UTC (rev 285015)
+++ trunk/LayoutTests/fast/text/word-break-column-gap-display-flex-utf16-surrogates.html	2021-10-29 02:53:47 UTC (rev 285016)
@@ -48,6 +48,12 @@
 
 // surrogate lead + surrogate trail + surrogate lead
 document.getElementById("div14").append("\ud800\udc00\ud800");
+
+// single + surrogate trail + surrogate lead + single
+document.getElementById("div15").append("r\udc00\ud800r");
+
+// single + surrogate lead + surrogate trail + single
+document.getElementById("div16").append("r\ud800\udc00r");

 if (window.testRunner)
 testRunner.dumpAsText();
@@ -67,4 +73,6 @@
 
 
 
+
+
 PASS


Modified: trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt (285015 => 285016)

--- trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt	2021-10-29 02:19:51 UTC (rev 285015)
+++ trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates-expected.txt	2021-10-29 02:53:47 UTC (rev 285016)
@@ -12,4 +12,6 @@
 �r�
 �
 �
+r��r
+rr
 PASS


Modified: trunk/LayoutTests/fast/text/word-break-letter-spacing-utf16-surrogates.html (285015 => 285016)

--- 

[webkit-changes] [285015] trunk

2021-10-28 Thread nmouchtaris
Title: [285015] trunk








Revision 285015
Author nmouchta...@apple.com
Date 2021-10-28 19:19:51 -0700 (Thu, 28 Oct 2021)


Log Message
if border-radius includes a var(), the value is not readable from .style
https://bugs.webkit.org/show_bug.cgi?id=230389

Reviewed by Myles Maxfield.
Source/WebCore:

Return correct string for shorthand CSS values set by var. Add extra checks for if all
longhand properties are pending values and if the requested shorthand property was set
to a variable.

Test: css3/short-hand-var-serialization.html

* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue const):

LayoutTests:

* css3/short-hand-var-serialization-expected.txt: Added.
* css3/short-hand-var-serialization.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/logicalprops-with-variables-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-reference-shorthands-cssom-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-variables/variable-reference-shorthands-expected.txt
trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/shorthand-serialization-expected.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/css/StyleProperties.cpp
trunk/Source/WebCore/css/StyleProperties.h


Added Paths

trunk/LayoutTests/css3/short-hand-var-serialization-expected.txt
trunk/LayoutTests/css3/short-hand-var-serialization.html


Removed Paths

trunk/LayoutTests/fast/css/variables/rule-property-get-expected.html
trunk/LayoutTests/fast/css/variables/rule-property-get.html




Diff

Modified: trunk/LayoutTests/ChangeLog (285014 => 285015)

--- trunk/LayoutTests/ChangeLog	2021-10-29 02:00:18 UTC (rev 285014)
+++ trunk/LayoutTests/ChangeLog	2021-10-29 02:19:51 UTC (rev 285015)
@@ -1,3 +1,13 @@
+2021-10-28  Nikos Mouchtaris  
+
+if border-radius includes a var(), the value is not readable from .style
+https://bugs.webkit.org/show_bug.cgi?id=230389
+
+Reviewed by Myles Maxfield.
+
+* css3/short-hand-var-serialization-expected.txt: Added.
+* css3/short-hand-var-serialization.html: Added.
+
 2021-10-28  Arcady Goldmints-Orlov  
 
 [GLIB] Update test baselines. Unreviewed test gardening.


Added: trunk/LayoutTests/css3/short-hand-var-serialization-expected.txt (0 => 285015)

--- trunk/LayoutTests/css3/short-hand-var-serialization-expected.txt	(rev 0)
+++ trunk/LayoutTests/css3/short-hand-var-serialization-expected.txt	2021-10-29 02:19:51 UTC (rev 285015)
@@ -0,0 +1,15 @@
+Test that shorthand css properties set to a variable return that variable when accessed through the style sheet.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+- Tests -
+PASS styleSheet.rules[1].style.borderRadius is "var(--v0)"
+PASS styleSheet.rules[2].style.margin is "var(--v0)"
+PASS styleSheet.rules[3].style.borderBlockWidth is "var(--v0)"
+PASS styleSheet.rules[4].style.borderInlineWidth is "var(--v0)"
+PASS styleSheet.rules[5].style.perspectiveOrigin is "var(--v0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/css3/short-hand-var-serialization.html (0 => 285015)

--- trunk/LayoutTests/css3/short-hand-var-serialization.html	(rev 0)
+++ trunk/LayoutTests/css3/short-hand-var-serialization.html	2021-10-29 02:19:51 UTC (rev 285015)
@@ -0,0 +1,55 @@
+
+
+
+div {
+width: 100px;
+height: 100px;
+border: 3px solid red;
+}
+#div0 {
+--v0: 50px;
+border-radius: var(--v0);
+}
+#div1 {
+--v0: 50px;
+margin: var(--v0);
+}
+
+#div2 {
+--v0: 50px;
+border-block-width: var(--v0);
+}
+
+#div3 {
+--v0: 50px;
+border-inline-width: var(--v0);
+}
+
+#div4 {
+--v0: left;
+perspective-origin: var(--v0);
+}
+
+
+
+
+
+
+
+
+