Changeset 256697 in webkit
- Timestamp:
- Feb 14, 2020 7:19:00 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r256659 r256697 1 2020-02-14 Jon Lee <jonlee@apple.com> 2 3 Mask WebGL strings 4 https://bugs.webkit.org/show_bug.cgi?id=207608 5 6 Reviewed by Dean Jackson. 7 8 * platform/mac/webgl/fingerprinting-strings-expected.txt: Added. 9 * platform/mac/webgl/fingerprinting-strings.html: Added. 10 1 11 2020-02-14 Nikos Mouchtaris <nmouchtaris@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r256664 r256697 1 2020-02-14 Jon Lee <jonlee@apple.com> 2 3 Mask WebGL strings 4 https://bugs.webkit.org/show_bug.cgi?id=207608 5 6 Reviewed by Dean Jackson. 7 8 Test: platform/mac/webgl/fingerprinting-strings.html 9 10 Add new experimental feature to mask WebGL vendor, renderer, and shading language strings. 11 12 * html/canvas/WebGL2RenderingContext.cpp: Whitespace cleanup also. 13 (WebCore::WebGL2RenderingContext::getParameter): Check against the runtime feature to return the 14 old string. 15 * html/canvas/WebGLRenderingContext.cpp: 16 (WebCore::WebGLRenderingContext::getParameter): Ditto. 17 * page/RuntimeEnabledFeatures.h: 18 (WebCore::RuntimeEnabledFeatures::setMaskWebGLStringsEnabled): 19 (WebCore::RuntimeEnabledFeatures::maskWebGLStringsEnabled const): 20 1 21 2020-02-14 Youenn Fablet <youenn@apple.com> 2 22 -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
r256418 r256697 1 1 /* 2 * Copyright (C) 2015-20 17Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 44 44 #include "OESTextureHalfFloatLinear.h" 45 45 #include "RenderBox.h" 46 #include "RuntimeEnabledFeatures.h" 46 47 #include "WebGLActiveInfo.h" 47 48 #include "WebGLCompressedTextureASTC.h" … … 941 942 if (isContextLostOrPending()) 942 943 return; 943 944 944 945 WebGLRenderingContextBase::vertexAttribDivisor(index, divisor); 945 946 } … … 1517 1518 if (isContextLost()) 1518 1519 return nullptr; 1519 1520 1520 1521 auto object = WebGLVertexArrayObject::create(*this, WebGLVertexArrayObject::Type::User); 1521 1522 addContextObject(object.get()); … … 1527 1528 if (!arrayObject || isContextLost()) 1528 1529 return; 1529 1530 1530 1531 if (arrayObject->isDeleted()) 1531 1532 return; 1532 1533 1533 1534 if (!arrayObject->isDefaultObject() && arrayObject == m_boundVertexArrayObject) 1534 1535 #if USE(OPENGL_ES) … … 1537 1538 bindVertexArray(nullptr); // The default VAO was removed in OpenGL 3.3 but not from WebGL 2; bind the default for WebGL to use. 1538 1539 #endif 1539 1540 1540 1541 arrayObject->deleteObject(graphicsContextGL()); 1541 1542 } … … 1545 1546 if (!arrayObject || isContextLost()) 1546 1547 return false; 1547 1548 1548 1549 if (!arrayObject->hasEverBeenBound() || !arrayObject->validate(0, *this)) 1549 1550 return false; 1550 1551 1551 1552 return m_context->isVertexArray(arrayObject->object()); 1552 1553 } … … 1556 1557 if (isContextLost()) 1557 1558 return; 1558 1559 1559 1560 if (arrayObject && (arrayObject->isDeleted() || !arrayObject->validate(0, *this) || !m_contextObjects.contains(arrayObject))) { 1560 1561 m_context->synthesizeGLError(GraphicsContextGL::INVALID_OPERATION); … … 1563 1564 if (arrayObject && !arrayObject->isDefaultObject() && arrayObject->object()) { 1564 1565 m_context->bindVertexArray(arrayObject->object()); 1565 1566 1566 1567 arrayObject->setHasEverBeenBound(); 1567 1568 setBoundVertexArrayObject(arrayObject); … … 1611 1612 1612 1613 Vector<String> result; 1613 1614 1614 1615 if (m_isPendingPolicyResolution) 1615 1616 return result; … … 1705 1706 } 1706 1707 } 1707 1708 1708 1709 if (object->isTexture()) { 1709 1710 switch (pname) { … … 2115 2116 return getBooleanParameter(pname); 2116 2117 case GraphicsContextGL::SHADING_LANGUAGE_VERSION: 2117 return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContextGL::SHADING_LANGUAGE_VERSION) + ")"; 2118 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 2119 return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContextGL::SHADING_LANGUAGE_VERSION) + ")"; 2120 return "WebGL GLSL ES 1.0 (1.0)"_str; 2118 2121 case GraphicsContextGL::STENCIL_BACK_FAIL: 2119 2122 return getUnsignedIntParameter(pname); … … 2174 2177 case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL: 2175 2178 if (m_webglDebugRendererInfo) { 2176 #if PLATFORM(IOS_FAMILY) 2179 #if !PLATFORM(IOS_FAMILY) 2180 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 2181 return m_context->getString(GraphicsContextGL::RENDERER); 2182 #endif 2177 2183 return "Apple GPU"_str; 2178 #else 2179 return m_context->getString(GraphicsContextGL::RENDERER); 2184 } 2185 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 2186 return nullptr; 2187 case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL: 2188 if (m_webglDebugRendererInfo) { 2189 #if !PLATFORM(IOS_FAMILY) 2190 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 2191 return m_context->getString(GraphicsContextGL::VENDOR); 2180 2192 #endif 2181 } 2182 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 2183 return nullptr; 2184 case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL: 2185 if (m_webglDebugRendererInfo) 2186 return m_context->getString(GraphicsContextGL::VENDOR); 2193 return "Apple Inc."_str; 2194 } 2187 2195 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 2188 2196 return nullptr; … … 2242 2250 case GraphicsContextGL::MAX_VERTEX_UNIFORM_BLOCKS: 2243 2251 return getIntParameter(pname); 2244 case GraphicsContextGL::MAX_VERTEX_UNIFORM_COMPONENTS: 2245 return getIntParameter(pname); 2252 case GraphicsContextGL::MAX_VERTEX_UNIFORM_COMPONENTS: 2253 return getIntParameter(pname); 2246 2254 case GraphicsContextGL::MIN_PROGRAM_TEXEL_OFFSET: 2247 2255 return getIntParameter(pname); … … 2307 2315 case GraphicsContextGL::COPY_READ_BUFFER: 2308 2316 case GraphicsContextGL::COPY_WRITE_BUFFER: 2309 case GraphicsContextGL::PIXEL_PACK_BUFFER_BINDING: 2317 case GraphicsContextGL::PIXEL_PACK_BUFFER_BINDING: 2310 2318 case GraphicsContextGL::PIXEL_UNPACK_BUFFER_BINDING: 2311 2319 case GraphicsContextGL::READ_BUFFER: … … 2328 2336 // index, skips the expensive per-draw-call iteration in 2329 2337 // validateIndexArrayPrecise. 2330 2338 2331 2339 RefPtr<WebGLBuffer> elementArrayBuffer = m_boundVertexArrayObject->getElementArrayBuffer(); 2332 2340 2333 2341 if (!elementArrayBuffer) 2334 2342 return false; 2335 2343 2336 2344 GCGLsizeiptr numElements = elementArrayBuffer->byteLength(); 2337 2345 // The case count==0 is already dealt with in drawElements before validateIndexArrayConservative. … … 2340 2348 auto buffer = elementArrayBuffer->elementArrayBuffer(); 2341 2349 ASSERT(buffer); 2342 2350 2343 2351 Optional<unsigned> maxIndex = elementArrayBuffer->getCachedMaxIndex(type); 2344 2352 if (!maxIndex) { … … 2360 2368 elementArrayBuffer->setCachedMaxIndex(type, maxIndex.value()); 2361 2369 } 2362 2370 2363 2371 if (!maxIndex) 2364 2372 return false; -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp
r254214 r256697 1 1 /* 2 * Copyright (C) 2015-20 17Apple Inc. All rights reserved.2 * Copyright (C) 2015-2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 … … 50 50 #include "OESVertexArrayObject.h" 51 51 #include "RenderBox.h" 52 #include "RuntimeEnabledFeatures.h" 52 53 #include "WebGLCompressedTextureASTC.h" 53 54 #include "WebGLCompressedTextureATC.h" … … 192 193 193 194 Vector<String> result; 194 195 195 196 if (m_isPendingPolicyResolution) 196 197 return result; 197 198 198 199 if (m_context->getExtensions().supports("GL_EXT_blend_minmax"_s)) 199 200 result.append("EXT_blend_minmax"_s); … … 250 251 if (isContextLostOrPending() || !validateFramebufferFuncParameters("getFramebufferAttachmentParameter", target, attachment)) 251 252 return nullptr; 252 253 253 254 if (!m_framebufferBinding || !m_framebufferBinding->object()) { 254 255 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getFramebufferAttachmentParameter", "no framebuffer bound"); 255 256 return nullptr; 256 257 } 257 258 258 259 auto object = makeRefPtr(m_framebufferBinding->getAttachmentObject(attachment)); 259 260 if (!object) { … … 265 266 return nullptr; 266 267 } 267 268 268 269 if (object->isTexture()) { 269 270 switch (pname) { … … 332 333 } 333 334 } 334 335 335 336 void WebGLRenderingContext::renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) 336 337 { … … 397 398 m_context->hint(target, mode); 398 399 } 399 400 400 401 void WebGLRenderingContext::clear(GCGLbitfield mask) 401 402 { … … 547 548 return getBooleanParameter(pname); 548 549 case GraphicsContextGL::SHADING_LANGUAGE_VERSION: 549 return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContextGL::SHADING_LANGUAGE_VERSION) + ")"; 550 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 551 return "WebGL GLSL ES 1.0 (" + m_context->getString(GraphicsContextGL::SHADING_LANGUAGE_VERSION) + ")"; 552 return "WebGL GLSL ES 1.0 (1.0)"_str; 550 553 case GraphicsContextGL::STENCIL_BACK_FAIL: 551 554 return getUnsignedIntParameter(pname); … … 611 614 case WebGLDebugRendererInfo::UNMASKED_RENDERER_WEBGL: 612 615 if (m_webglDebugRendererInfo) { 613 #if PLATFORM(IOS_FAMILY) 616 #if !PLATFORM(IOS_FAMILY) 617 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 618 return m_context->getString(GraphicsContextGL::RENDERER); 619 #endif 614 620 return "Apple GPU"_str; 615 #else 616 return m_context->getString(GraphicsContextGL::RENDERER); 621 } 622 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 623 return nullptr; 624 case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL: 625 if (m_webglDebugRendererInfo) { 626 #if !PLATFORM(IOS_FAMILY) 627 if (!RuntimeEnabledFeatures::sharedFeatures().maskWebGLStringsEnabled()) 628 return m_context->getString(GraphicsContextGL::VENDOR); 617 629 #endif 618 } 619 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 620 return nullptr; 621 case WebGLDebugRendererInfo::UNMASKED_VENDOR_WEBGL: 622 if (m_webglDebugRendererInfo) 623 return m_context->getString(GraphicsContextGL::VENDOR); 630 return "Apple Inc."_str; 631 } 624 632 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "invalid parameter name, WEBGL_debug_renderer_info not enabled"); 625 633 return nullptr; … … 683 691 return m_maxColorAttachments; 684 692 } 685 693 686 694 bool WebGLRenderingContext::validateIndexArrayConservative(GCGLenum type, unsigned& numElementsRequired) 687 695 { … … 691 699 // index, skips the expensive per-draw-call iteration in 692 700 // validateIndexArrayPrecise. 693 701 694 702 RefPtr<WebGLBuffer> elementArrayBuffer = m_boundVertexArrayObject->getElementArrayBuffer(); 695 703 696 704 if (!elementArrayBuffer) 697 705 return false; 698 706 699 707 GCGLsizeiptr numElements = elementArrayBuffer->byteLength(); 700 708 // The case count==0 is already dealt with in drawElements before validateIndexArrayConservative. … … 703 711 auto buffer = elementArrayBuffer->elementArrayBuffer(); 704 712 ASSERT(buffer); 705 713 706 714 Optional<unsigned> maxIndex = elementArrayBuffer->getCachedMaxIndex(type); 707 715 if (!maxIndex) { … … 736 744 elementArrayBuffer->setCachedMaxIndex(type, maxIndex.value()); 737 745 } 738 746 739 747 if (!maxIndex) 740 748 return false; -
trunk/Source/WebCore/page/RuntimeEnabledFeatures.h
r255406 r256697 79 79 void setMenuItemElementEnabled(bool isEnabled) { m_isMenuItemElementEnabled = isEnabled; } 80 80 bool menuItemElementEnabled() const { return m_isMenuItemElementEnabled; } 81 81 82 82 void setDirectoryUploadEnabled(bool isEnabled) { m_isDirectoryUploadEnabled = isEnabled; } 83 83 bool directoryUploadEnabled() const { return m_isDirectoryUploadEnabled; } … … 88 88 void setCustomPasteboardDataEnabled(bool isEnabled) { m_isCustomPasteboardDataEnabled = isEnabled; } 89 89 bool customPasteboardDataEnabled() const { return m_isCustomPasteboardDataEnabled; } 90 90 91 91 void setWebShareEnabled(bool isEnabled) { m_isWebShareEnabled = isEnabled; } 92 92 bool webShareEnabled() const { return m_isWebShareEnabled; } … … 177 177 void setPointerEventsEnabled(bool isEnabled) { m_pointerEventsEnabled = isEnabled; } 178 178 bool pointerEventsEnabled() const { return m_pointerEventsEnabled; } 179 179 180 180 void setSyntheticEditingCommandsEnabled(bool isEnabled) { m_syntheticEditingCommandsEnabled = isEnabled; } 181 181 bool syntheticEditingCommandsEnabled() const { return m_syntheticEditingCommandsEnabled; } … … 184 184 void setLayoutFormattingContextEnabled(bool isEnabled) { m_layoutFormattingContextEnabled = isEnabled; } 185 185 bool layoutFormattingContextEnabled() const { return m_layoutFormattingContextEnabled; } 186 186 187 187 void setLayoutFormattingContextIntegrationEnabled(bool isEnabled) { m_layoutFormattingContextIntegrationEnabled = isEnabled; } 188 188 bool layoutFormattingContextIntegrationEnabled() const { return m_layoutFormattingContextIntegrationEnabled; } … … 207 207 void setKeygenElementEnabled(bool isEnabled) { m_keygenElementEnabled = isEnabled; } 208 208 bool keygenElementEnabled() const { return m_keygenElementEnabled; } 209 209 210 210 void setHighlightAPIEnabled(bool isEnabled) { m_highlightAPIEnabled = isEnabled; } 211 211 bool highlightAPIEnabled() const { return m_highlightAPIEnabled; } … … 299 299 bool webGL2Enabled() const { return m_isWebGL2Enabled; } 300 300 #endif 301 301 302 302 #if ENABLE(WEBGPU) 303 303 void setWebGPUEnabled(bool isEnabled) { m_isWebGPUEnabled = isEnabled; } 304 304 bool webGPUEnabled() const { return m_isWebGPUEnabled; } 305 #endif 306 307 #if ENABLE(WEBGL) || ENABLE(WEBGL2) 308 void setMaskWebGLStringsEnabled(bool isEnabled) { m_isMaskWebGLStringsEnabled = isEnabled; } 309 bool maskWebGLStringsEnabled() const { return m_isMaskWebGLStringsEnabled; } 305 310 #endif 306 311 … … 311 316 bool writableStreamAPIEnabled() const { return m_isWritableStreamAPIEnabled; } 312 317 #endif 313 318 314 319 #if ENABLE(DOWNLOAD_ATTRIBUTE) 315 320 void setDownloadAttributeEnabled(bool isEnabled) { m_isDownloadAttributeEnabled = isEnabled; } … … 359 364 void setTouchEventsEnabled(bool isEnabled) { m_touchEventsEnabled = isEnabled; } 360 365 #endif 361 366 362 367 bool referrerPolicyAttributeEnabled() const { return m_referrerPolicyAttributeEnabled; } 363 368 void setReferrerPolicyAttributeEnabled(bool isEnabled) { m_referrerPolicyAttributeEnabled = isEnabled; } … … 535 540 bool m_isWebGL2Enabled { false }; 536 541 #endif 537 542 538 543 #if ENABLE(WEBGPU) 539 544 bool m_isWebGPUEnabled { false }; 545 #endif 546 547 #if ENABLE(WEBGL) || ENABLE(WEBGL2) 548 bool m_isMaskWebGLStringsEnabled { false }; 540 549 #endif 541 550 -
trunk/Source/WebKit/ChangeLog
r256664 r256697 1 2020-02-14 Jon Lee <jonlee@apple.com> 2 3 Mask WebGL strings 4 https://bugs.webkit.org/show_bug.cgi?id=207608 5 6 Reviewed by Dean Jackson. 7 8 Test: platform/mac/webgl/fingerprinting-strings.html 9 10 * Shared/WebPreferences.yaml: Add new experimental feature. 11 1 12 2020-02-14 Youenn Fablet <youenn@apple.com> 2 13 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r256661 r256697 769 769 webcoreBinding: RuntimeEnabledFeatures 770 770 condition: ENABLE(GAMEPAD) 771 771 772 772 HighlightAPIEnabled: 773 773 type: bool … … 1385 1385 webcoreBinding: RuntimeEnabledFeatures 1386 1386 condition: ENABLE(WEBGPU) 1387 1388 MaskWebGLStringsEnabled: 1389 type: bool 1390 defaultValue: true 1391 humanReadableName: "Mask WebGL Strings" 1392 humanReadableDescription: "Mask WebGL Vendor, Renderer, Shader Language Strings" 1393 category: experimental 1394 webcoreBinding: RuntimeEnabledFeatures 1395 condition: ENABLE(WEBGL) || ENABLE(WEBGL2) 1387 1396 1388 1397 AccessibilityObjectModelEnabled: -
trunk/Source/WebKitLegacy/mac/ChangeLog
r256512 r256697 1 2020-02-14 Jon Lee <jonlee@apple.com> 2 3 Mask WebGL strings 4 https://bugs.webkit.org/show_bug.cgi?id=207608 5 6 Reviewed by Dean Jackson. 7 8 Test: platform/mac/webgl/fingerprinting-strings.html 9 10 * WebView/WebPreferenceKeysPrivate.h: 11 * WebView/WebPreferences.mm: 12 * WebView/WebPreferencesPrivate.h: 13 * WebView/WebView.mm: 14 1 15 2020-02-13 Said Abou-Hallawa <said@apple.com> 2 16 -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
r256512 r256697 7 7 * 8 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution. 13 13 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 14 14 * its contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 15 * from this software without specific prior written permission. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 123 123 #define WebKitWebGPUEnabledPreferenceKey @"WebKitWebGPUEnabled" 124 124 #define WebKitForceWebGLUsesLowPowerPreferenceKey @"WebKitForceWebGLUsesLowPower" 125 #define WebKitMaskWebGLStringsEnabledPreferenceKey @"WebKitMaskWebGLStringsEnabled" 125 126 #define WebKitAccelerated2dCanvasEnabledPreferenceKey @"WebKitAccelerated2dCanvasEnabled" 126 127 #define WebKitFrameFlatteningPreferenceKey @"WebKitFrameFlattening" -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferences.mm
r256512 r256697 8 8 * 9 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer. 11 11 * 2. Redistributions in binary form must reproduce the above copyright 12 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution. 14 14 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 15 15 * its contributors may be used to endorse or promote products derived 16 * from this software without specific prior written permission. 16 * from this software without specific prior written permission. 17 17 * 18 18 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 91 91 static const char* const documentViewerIDs[] = { 92 92 "Microsoft/com.microsoft.Messenger", 93 "com.adiumX.adiumX", 93 "com.adiumX.adiumX", 94 94 "com.alientechnology.Proteus", 95 95 "com.apple.Dashcode", 96 "com.apple.iChat", 96 "com.apple.iChat", 97 97 "com.barebones.bbedit", 98 98 "com.barebones.textwrangler", … … 108 108 "de.codingmonkeys.SubEthaEdit", 109 109 "fi.karppinen.Pyro", 110 "info.colloquy", 110 "info.colloquy", 111 111 "kungfoo.tv.ecto", 112 112 }; … … 229 229 static int instanceCount = 1; 230 230 NSString *fakeIdentifier; 231 232 // At least ensure that identifier hasn't been already used. 231 232 // At least ensure that identifier hasn't been already used. 233 233 fakeIdentifier = [NSString stringWithFormat:@"WebPreferences%d", instanceCount++]; 234 234 while ([[self class] _getInstanceForIdentifier:fakeIdentifier]){ 235 235 fakeIdentifier = [NSString stringWithFormat:@"WebPreferences%d", instanceCount++]; 236 236 } 237 237 238 238 return [self initWithIdentifier:fakeIdentifier]; 239 239 } … … 596 596 @YES, WebKitHiddenPageCSSAnimationSuspensionEnabledPreferenceKey, 597 597 @NO, WebKitLowPowerVideoAudioBufferSizeEnabledPreferenceKey, 598 598 599 599 @NO, WebKitUseLegacyTextAlignPositionedElementBehaviorPreferenceKey, 600 600 #if ENABLE(MEDIA_SOURCE) … … 643 643 #if ENABLE(WEBGPU) 644 644 @NO, WebKitWebGPUEnabledPreferenceKey, 645 #endif 646 #if ENABLE(WEBGL) || ENABLE(WEBGL2) 647 @YES, WebKitMaskWebGLStringsEnabledPreferenceKey, 645 648 #endif 646 649 @NO, WebKitCacheAPIEnabledPreferenceKey, … … 969 972 } 970 973 971 - (void)setSerifFontFamily:(NSString *)family 974 - (void)setSerifFontFamily:(NSString *)family 972 975 { 973 976 [self _setStringValue: family forKey: WebKitSerifFontPreferenceKey]; … … 1068 1071 { 1069 1072 NSString *locationString = [self _stringValueForKey: WebKitUserStyleSheetLocationPreferenceKey]; 1070 1073 1071 1074 if ([locationString _webkit_looksLikeAbsoluteURL]) { 1072 1075 return [NSURL _web_URLWithDataAsString:locationString]; … … 1080 1083 { 1081 1084 NSString *locationString; 1082 1085 1083 1086 if ([URL isFileURL]) { 1084 1087 locationString = [[URL path] _web_stringByAbbreviatingWithTildeInPath]; … … 1101 1104 // wrong for iOS, where WebViews are used for various purposes, like 1102 1105 // text editing, text rendering, and displaying web content. 1103 // 1106 // 1104 1107 // I have changed the user style sheet mechanism to be a per-WebView 1105 1108 // setting, rather than a per-process preference. This seems to give the … … 1806 1809 value = WebKitEditableLinkDefaultBehavior; 1807 1810 } 1808 1811 1809 1812 return value; 1810 1813 } … … 1890 1893 if (!ident) 1891 1894 return _standardPreferences; 1892 1895 1893 1896 WebPreferences *instance = [webPreferencesInstances objectForKey:[self _concatenateKeyWithIBCreatorID:ident]]; 1894 1897 … … 2202 2205 { 2203 2206 [self _setBoolValue:enabled forKey:WebKitWebGPUEnabledPreferenceKey]; 2207 } 2208 2209 - (BOOL)maskWebGLStringsEnabled 2210 { 2211 return [self _boolValueForKey:WebKitMaskWebGLStringsEnabledPreferenceKey]; 2212 } 2213 2214 - (void)setMaskWebGLStringsEnabled:(BOOL)enabled 2215 { 2216 [self _setBoolValue:enabled forKey:WebKitMaskWebGLStringsEnabledPreferenceKey]; 2204 2217 } 2205 2218 … … 2644 2657 storageBlockingPolicy = WebBlockAllStorage; 2645 2658 break; 2646 } 2659 } 2647 2660 2648 2661 [self setStorageBlockingPolicy:storageBlockingPolicy]; -
trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
r256512 r256697 7 7 * 8 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer. 10 10 * 2. Redistributions in binary form must reproduce the above copyright 11 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution. 13 13 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 14 14 * its contributors may be used to endorse or promote products derived 15 * from this software without specific prior written permission. 15 * from this software without specific prior written permission. 16 16 * 17 17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 284 284 - (BOOL)webGPUEnabled; 285 285 - (void)setWebGPUEnabled:(BOOL)enabled; 286 287 - (BOOL)maskWebGLStringsEnabled; 288 - (void)setMaskWebGLStringsEnabled:(BOOL)enabled; 286 289 287 290 - (BOOL)accelerated2dCanvasEnabled; … … 418 421 419 422 // Full screen support is dependent on WebCore/WebKit being 420 // compiled with ENABLE_FULLSCREEN_API. 423 // compiled with ENABLE_FULLSCREEN_API. 421 424 - (void)setFullScreenEnabled:(BOOL)flag; 422 425 - (BOOL)fullScreenEnabled; -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r256512 r256697 9 9 * 10 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer. 12 12 * 2. Redistributions in binary form must reproduce the above copyright 13 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution. 15 15 * 3. Neither the name of Apple Inc. ("Apple") nor the names of 16 16 * its contributors may be used to endorse or promote products derived 17 * from this software without specific prior written permission. 17 * from this software without specific prior written permission. 18 18 * 19 19 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY … … 689 689 if (!(self = [super init])) 690 690 return nil; 691 691 692 692 _dataInteractionImage = [PAL::allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored]; 693 693 _selectionRectInRootViewCoordinates = indicatorData.selectionRectInRootViewCoordinates; 694 694 _textBoundingRectInRootViewCoordinates = indicatorData.textBoundingRectInRootViewCoordinates; 695 695 696 696 NSMutableArray *textRectsInBoundingRectCoordinates = [NSMutableArray array]; 697 697 for (auto rect : indicatorData.textRectsInBoundingRectCoordinates) … … 722 722 if (!(self = [super init])) 723 723 return nil; 724 724 725 725 _dataInteractionImage = [PAL::allocUIImageInstance() initWithCGImage:image scale:scale orientation:UIImageOrientationDownMirrored]; 726 726 727 727 return self; 728 728 } … … 1354 1354 WTF::RefCountedLeakCounter::suppressMessages(webViewIsOpen); 1355 1355 #endif 1356 1356 1357 1357 WebPreferences *standardPreferences = [WebPreferences standardPreferences]; 1358 1358 [standardPreferences willAddToWebView]; … … 1411 1411 [WebDatabaseManager sharedWebDatabaseManager]; 1412 1412 1413 #if PLATFORM(IOS_FAMILY) 1413 #if PLATFORM(IOS_FAMILY) 1414 1414 if ([standardPreferences storageTrackerEnabled]) 1415 1415 #endif … … 1539 1539 1540 1540 [self _addToAllWebViewsSet]; 1541 1541 1542 1542 // If there's already a next key view (e.g., from a nib), wire it up to our 1543 1543 // contained frame view. In any case, wire our next key view up to the our 1544 // contained frame view. This works together with our becomeFirstResponder 1544 // contained frame view. This works together with our becomeFirstResponder 1545 1545 // and setNextKeyView overrides. 1546 1546 NSView *nextKeyView = [self nextKeyView]; … … 1680 1680 if (!self) 1681 1681 return nil; 1682 1682 1683 1683 _private = [[WebViewPrivate alloc] init]; 1684 1684 1685 1685 #ifndef NDEBUG 1686 1686 WTF::RefCountedLeakCounter::suppressMessages(webViewIsOpen); 1687 1687 #endif 1688 1688 1689 1689 if (!preferences) 1690 1690 preferences = [WebPreferences standardPreferences]; 1691 1691 [preferences willAddToWebView]; 1692 1692 1693 1693 _private->preferences = [preferences retain]; 1694 1694 _private->mainFrameDocumentReady = NO; … … 1737 1737 _private->page = new WebCore::Page(WTFMove(pageConfiguration)); 1738 1738 storageProvider->setPage(*_private->page); 1739 1739 1740 1740 [self setSmartInsertDeleteEnabled:YES]; 1741 1741 1742 1742 // FIXME: <rdar://problem/6851451> Should respect preferences in fast path WebView initialization 1743 1743 // We are ignoring the preferences object on fast path and just using Settings defaults (everything fancy off). … … 1749 1749 _private->page->settings().setAcceleratedDrawingEnabled([preferences acceleratedDrawingEnabled]); 1750 1750 _private->page->settings().setDisplayListDrawingEnabled([preferences displayListDrawingEnabled]); 1751 1751 1752 1752 _private->page->settings().setFontFallbackPrefersPictographs(true); 1753 1753 _private->page->settings().setPictographFontFamily("AppleColorEmoji"); 1754 1754 1755 1755 _private->page->settings().setScriptMarkupEnabled(false); 1756 1756 _private->page->settings().setScriptEnabled(true); 1757 1757 1758 1758 // FIXME: this is a workaround for <rdar://problem/11518688> REGRESSION: Quoted text font changes when replying to certain email 1759 1759 _private->page->settings().setStandardFontFamily([_private->preferences standardFontFamily]); 1760 1760 1761 1761 // FIXME: this is a workaround for <rdar://problem/11820090> Quoted text changes in size when replying to certain email 1762 1762 _private->page->settings().setMinimumFontSize([_private->preferences minimumFontSize]); … … 1770 1770 _private->page->setRemoteInspectionAllowed(isInternalInstall()); 1771 1771 #endif 1772 1772 1773 1773 [self _updateScreenScaleFromWindow]; 1774 1774 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_wakWindowScreenScaleChanged:) name:WAKWindowScreenScaleDidChangeNotification object:nil]; … … 1776 1776 1777 1777 [WebFrame _createMainFrameWithSimpleHTMLDocumentWithPage:_private->page frameView:frameView style:style]; 1778 1778 1779 1779 [self _addToAllWebViewsSet]; 1780 1780 1781 1781 ++WebViewCount; 1782 1782 1783 1783 WebCore::SecurityPolicy::setLocalLoadPolicy(WebCore::SecurityPolicy::AllowLocalLoadsForLocalAndSubstituteData); 1784 1784 1785 1785 WebCore::RuntimeEnabledFeatures::sharedFeatures().setAttachmentElementEnabled(self.preferences.attachmentElementEnabled); 1786 1786 … … 2036 2036 { 2037 2037 static NSMutableSet *mimeTypes = [[NSMutableSet alloc] init]; 2038 2038 2039 2039 return mimeTypes; 2040 2040 } … … 2076 2076 repClass = [[WebDataSource _repTypesAllowImageTypeOmission:NO] _webkit_objectForMIMEType:MIMEType]; 2077 2077 } 2078 2078 2079 2079 if (viewClass && repClass) { 2080 2080 if (viewClass == [WebHTMLView class] && repClass == [WebHTMLRepresentation class]) { … … 2087 2087 BOOL isSupportedByWebKit = [[WebHTMLView supportedNonImageMIMETypes] containsObject:MIMEType] || 2088 2088 [[WebHTMLView supportedMIMETypes] containsObject:MIMEType]; 2089 2089 2090 2090 // If this is a known plug-in MIME type and WebKit can't show it natively, we don't want to show it. 2091 2091 if (!isSupportedByWebKit) … … 2099 2099 return YES; 2100 2100 } 2101 2101 2102 2102 return NO; 2103 2103 } … … 2262 2262 2263 2263 #if !PLATFORM(IOS_FAMILY) 2264 // Unload the WebView local plug-in database. 2264 // Unload the WebView local plug-in database. 2265 2265 if (_private->pluginDatabase) { 2266 2266 [_private->pluginDatabase destroyAllPluginInstanceViews]; … … 2270 2270 } 2271 2271 #endif 2272 2272 2273 2273 // Keep the global plug-in database active until the app terminates to avoid having to reload plug-in bundles. 2274 2274 if (!pluginDatabaseClientCount && applicationIsTerminating) … … 2276 2276 } 2277 2277 2278 - (void)_closeWithFastTeardown 2278 - (void)_closeWithFastTeardown 2279 2279 { 2280 2280 #ifndef NDEBUG … … 2321 2321 // Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts] 2322 2322 WebThreadRun(^{ 2323 #endif 2323 #endif 2324 2324 2325 2325 if (!_private || _private->closed) … … 2429 2429 // Fix for problems such as <rdar://problem/5774587> Crash closing tab in WebCore::Frame::page() from -[WebCoreFrameBridge pauseTimeouts] 2430 2430 }); 2431 #endif 2431 #endif 2432 2432 } 2433 2433 … … 2471 2471 { 2472 2472 ASSERT(URL); 2473 2473 2474 2474 NSURLRequest *request = [[NSURLRequest alloc] initWithURL:URL]; 2475 2475 ALLOW_DEPRECATED_DECLARATIONS_BEGIN … … 2665 2665 if (!_private->page) 2666 2666 return; 2667 2667 2668 2668 if (!otherView->_private->page) 2669 2669 return; 2670 2670 2671 2671 // It turns out the right combination of behavior is done with the back/forward load 2672 2672 // type. (See behavior matrix at the top of WebFramePrivate.) So we copy all the items … … 2679 2679 if (!otherBackForward.currentItem()) 2680 2680 return; // empty back forward list, bail 2681 2681 2682 2682 WebCore::HistoryItem* newItemToGoTo = nullptr; 2683 2683 … … 2691 2691 } 2692 2692 Ref<WebCore::HistoryItem> newItem = otherBackForward.itemAtIndex(i)->copy(); 2693 if (i == 0) 2693 if (i == 0) 2694 2694 newItemToGoTo = newItem.ptr(); 2695 2695 backForward.client().addItem(WTFMove(newItem)); … … 2773 2773 { 2774 2774 static BOOL needsQuirk = _CFAppVersionCheckLessThan(CFSTR("com.apple.iAdProducer"), -1, 2.1); 2775 2775 2776 2776 return needsQuirk; 2777 2777 } … … 2797 2797 2798 2798 - (BOOL)_needsPreHTML5ParserQuirks 2799 { 2799 { 2800 2800 #if !PLATFORM(IOS_FAMILY) 2801 2801 // AOL Instant Messenger and Microsoft My Day contain markup incompatible 2802 2802 // with the new HTML5 parser. If these applications were linked against a 2803 2803 // version of WebKit prior to the introduction of the HTML5 parser, enable 2804 // parser quirks to maintain compatibility. For details, see 2804 // parser quirks to maintain compatibility. For details, see 2805 2805 // <https://bugs.webkit.org/show_bug.cgi?id=46134> and 2806 2806 // <https://bugs.webkit.org/show_bug.cgi?id=46334>. 2807 2807 static bool isApplicationNeedingParserQuirks = !WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_HTML5_PARSER) 2808 2808 && (WebCore::MacApplication::isAOLInstantMessenger() || WebCore::MacApplication::isMicrosoftMyDay()); 2809 2809 2810 2810 // Mail.app must continue to display HTML email that contains quirky markup. 2811 2811 static bool isAppleMail = WebCore::MacApplication::isAppleMail(); … … 3167 3167 RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled([preferences webGL2Enabled]); 3168 3168 #endif 3169 3169 3170 3170 #if ENABLE(WEBGPU) 3171 3171 RuntimeEnabledFeatures::sharedFeatures().setWebGPUEnabled([preferences webGPUEnabled]); 3172 #endif 3173 3174 #if ENABLE(WEBGL) || ENABLE(WEBGL2) 3175 RuntimeEnabledFeatures::sharedFeatures().setMaskWebGLStringsEnabled([preferences maskWebGLStringsEnabled]); 3172 3176 #endif 3173 3177 … … 3291 3295 if (_private->closing) 3292 3296 return nil; 3293 3297 3294 3298 if (!_private->UIKitDelegateForwarder) 3295 3299 _private->UIKitDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget:_private->UIKitDelegate defaultTarget:[WebDefaultUIKitDelegate sharedUIKitDelegate]]; … … 3492 3496 if (_private->closing) 3493 3497 return nil; 3494 #endif 3498 #endif 3495 3499 // This can be called during window deallocation by QTMovieView in the QuickTime Cocoa Plug-in. 3496 3500 // Not sure if that is a bug or not. … … 3507 3511 [[WebFrameView _viewTypesAllowImageTypeOmission:NO] removeObjectForKey:MIMEType]; 3508 3512 [[WebDataSource _repTypesAllowImageTypeOmission:NO] removeObjectForKey:MIMEType]; 3509 3513 3510 3514 // FIXME: We also need to maintain MIMEType registrations (which can be dynamically changed) 3511 3515 // in the WebCore MIMEType registry. For now we're doing this in a safe, limited manner … … 3524 3528 if ([viewClass class] == [WebHTMLView class]) 3525 3529 WebCore::MIMETypeRegistry::supportedNonImageMIMETypes().add(MIMEType); 3526 3530 3527 3531 // This is used to make _representationExistsForURLScheme faster. 3528 3532 // Without this set, we'd have to create the MIME type each time. … … 3704 3708 if (needsSelfRetainWhileLoadingQuirk()) 3705 3709 [self performSelector:@selector(release) withObject:nil afterDelay:0]; 3706 3710 3707 3711 [self _didChangeBackForwardKeys]; 3708 3712 if (frame == [self mainFrame]){ … … 3738 3742 [self _willChangeValueForKey: _WebIsLoadingKey]; 3739 3743 [self _didChangeValueForKey: _WebIsLoadingKey]; 3740 3744 3741 3745 [self _didChangeValueForKey: _WebMainFrameURLKey]; 3742 3746 } … … 3768 3772 element:domElement 3769 3773 URL:linkURL ? linkURL : (NSURL *)[element objectForKey:WebElementImageURLKey] 3770 title:[element objectForKey:WebElementImageAltStringKey] 3774 title:[element objectForKey:WebElementImageAltStringKey] 3771 3775 archive:[[element objectForKey:WebElementDOMNodeKey] webArchive] 3772 3776 types:types … … 3890 3894 _private->_caretChangeListeners = [[NSMutableSet alloc] init]; 3891 3895 } 3892 3896 3893 3897 [_private->_caretChangeListeners addObject:listener]; 3894 3898 } … … 3917 3921 { 3918 3922 ASSERT(WebThreadIsLocked() || !WebThreadIsEnabled()); 3919 3923 3920 3924 [self _setFormDelegate:nil]; 3921 3925 [self _setUIKitDelegate:nil]; … … 3923 3927 [self removeAllCaretChangeListeners]; 3924 3928 [self setWebMailDelegate:nil]; 3925 3929 3926 3930 [self setDownloadDelegate:nil]; 3927 [self setEditingDelegate:nil]; 3931 [self setEditingDelegate:nil]; 3928 3932 [self setFrameLoadDelegate:nil]; 3929 3933 [self setPolicyDelegate:nil]; 3930 3934 [self setResourceLoadDelegate:nil]; 3931 3935 [self setScriptDebugDelegate:nil]; 3932 [self setUIDelegate:nil]; 3936 [self setUIDelegate:nil]; 3933 3937 } 3934 3938 … … 4023 4027 if (!_private->pluginDatabase) 4024 4028 _private->pluginDatabase = [[WebPluginDatabase alloc] init]; 4025 4029 4026 4030 [_private->pluginDatabase setPlugInPaths:newPaths]; 4027 4031 [_private->pluginDatabase refresh]; … … 4047 4051 return YES; 4048 4052 } 4049 4053 4050 4054 return NO; 4051 4055 } … … 4117 4121 if (!layerForWidget) 4118 4122 continue; 4119 4123 4120 4124 if (layerForWidget->contentsLayerForMedia() != layer) { 4121 4125 layerForWidget->setContentsToPlatformLayer(layer, WebCore::GraphicsLayer::ContentsLayerPurpose::Media); … … 4318 4322 { 4319 4323 ASSERT(WebThreadIsLocked()); 4320 4324 4321 4325 if (auto* coreFrame = [self _mainCoreFrame]) 4322 4326 coreFrame->viewportOffsetChanged(WebCore::Frame::IncrementalScrollOffset); … … 4346 4350 if (!frame) 4347 4351 return nil; 4348 4352 4349 4353 auto* document = frame->document(); 4350 4354 if (!document) … … 4409 4413 WebCore::IntPoint rectStart(rect.origin.x, rect.origin.y); 4410 4414 WebCore::IntPoint rectEnd(rect.origin.x + rect.size.width, rect.origin.y + rect.size.height); 4411 4415 4412 4416 auto* coreFrame = [self _mainCoreFrame]; 4413 4417 if (!coreFrame) 4414 4418 return nil; 4415 4419 4416 4420 WebCore::VisibleSelection selectionInsideRect(coreFrame->visiblePositionForPoint(rectStart), coreFrame->visiblePositionForPoint(rectEnd)); 4417 4421 4418 4422 return [[[WebTextIterator alloc] initWithRange:kit(selectionInsideRect.toNormalizedRange().get())] autorelease]; 4419 4423 } … … 4547 4551 if (auto* view = coreFrame->view()) 4548 4552 return view->isTrackingRepaints(); 4549 4553 4550 4554 return NO; 4551 4555 } … … 4567 4571 const Vector<WebCore::FloatRect>& repaintRects = view->trackedRepaintRects(); 4568 4572 NSMutableArray* rectsArray = [[NSMutableArray alloc] initWithCapacity:repaintRects.size()]; 4569 4573 4570 4574 for (unsigned i = 0; i < repaintRects.size(); ++i) 4571 4575 [rectsArray addObject:[NSValue valueWithRect:snappedIntRect(WebCore::LayoutRect(repaintRects[i]))]]; … … 4817 4821 if (suspended == frame->animation().isSuspended()) 4818 4822 return; 4819 4823 4820 4824 if (suspended) 4821 4825 frame->animation().suspendAnimations(); … … 4876 4880 if (!coreFrame) 4877 4881 return; 4878 4882 4879 4883 auto* view = coreFrame->view(); 4880 4884 if (!view) 4881 4885 return; 4882 4886 4883 4887 view->setFixedLayoutSize(WebCore::IntSize(size)); 4884 4888 view->forceLayout(); … … 4891 4895 if (!coreFrame) 4892 4896 return NO; 4893 4897 4894 4898 auto* view = coreFrame->view(); 4895 4899 if (!view) 4896 4900 return NO; 4897 4901 4898 4902 return view->useFixedLayout(); 4899 4903 } … … 4905 4909 if (!coreFrame) 4906 4910 return WebCore::IntSize(); 4907 4911 4908 4912 auto* view = coreFrame->view(); 4909 4913 if (!view) … … 5088 5092 if (!page) 5089 5093 return; 5090 5094 5091 5095 page->setPaginationLineGridEnabled(lineGridEnabled); 5092 5096 } … … 5097 5101 if (!page) 5098 5102 return NO; 5099 5103 5100 5104 return page->paginationLineGridEnabled(); 5101 5105 } … … 5142 5146 } 5143 5147 5144 + (void)_setLoadResourcesSerially:(BOOL)serialize 5148 + (void)_setLoadResourcesSerially:(BOOL)serialize 5145 5149 { 5146 5150 WebPlatformStrategies::initializeIfNecessary(); … … 5560 5564 5561 5565 + (void)_applicationWillTerminate 5562 { 5566 { 5563 5567 applicationIsTerminating = YES; 5564 5568 … … 5596 5600 if (pluginPackage) 5597 5601 return pluginPackage; 5598 5602 5599 5603 #if !PLATFORM(IOS_FAMILY) 5600 5604 if (_private->pluginDatabase) 5601 5605 return [_private->pluginDatabase pluginForMIMEType:MIMEType]; 5602 5606 #endif 5603 5607 5604 5608 return nil; 5605 5609 } … … 5613 5617 if (pluginPackage) 5614 5618 return pluginPackage; 5615 5619 5616 5620 #if !PLATFORM(IOS_FAMILY) 5617 5621 if (_private->pluginDatabase) 5618 5622 return [_private->pluginDatabase pluginForExtension:extension]; 5619 5623 #endif 5620 5624 5621 5625 return nil; 5622 5626 } … … 5633 5637 { 5634 5638 if (_private->pluginDatabase) 5635 [_private->pluginDatabase removePluginInstanceView:view]; 5639 [_private->pluginDatabase removePluginInstanceView:view]; 5636 5640 } 5637 5641 … … 5639 5643 { 5640 5644 if (_private->pluginDatabase) 5641 [_private->pluginDatabase removePluginInstanceViewsFor:webFrame]; 5645 [_private->pluginDatabase removePluginInstanceViewsFor:webFrame]; 5642 5646 } 5643 5647 #endif … … 5650 5654 if ([[WebPluginDatabase sharedDatabase] isMIMETypeRegistered:MIMEType]) 5651 5655 return YES; 5652 5656 5653 5657 #if !PLATFORM(IOS_FAMILY) 5654 5658 if (_private->pluginDatabase && [_private->pluginDatabase isMIMETypeRegistered:MIMEType]) 5655 5659 return YES; 5656 5660 #endif 5657 5661 5658 5662 return NO; 5659 5663 } … … 5676 5680 id key; 5677 5681 NSMutableArray *array = [[[NSMutableArray alloc] init] autorelease]; 5678 5682 5679 5683 while ((key = [enumerator nextObject])) { 5680 5684 if ([viewTypes objectForKey:key] == [WebHTMLView class]) 5681 5685 [array addObject:key]; 5682 5686 } 5683 5687 5684 5688 return array; 5685 5689 } … … 5694 5698 [WebView _unregisterViewClassAndRepresentationClassForMIMEType:key]; 5695 5699 } 5696 5700 5697 5701 int i, count = [MIMETypes count]; 5698 5702 for (i = 0; i < count; i++) { 5699 [WebView registerViewClass:[WebHTMLView class] 5700 representationClass:[WebHTMLRepresentation class] 5703 [WebView registerViewClass:[WebHTMLView class] 5704 representationClass:[WebHTMLRepresentation class] 5701 5705 forMIMEType:[MIMETypes objectAtIndex:i]]; 5702 5706 } … … 5807 5811 BOOL useBackForwardList = NO; 5808 5812 BOOL allowsUndo = YES; 5809 5813 5810 5814 result = [super initWithCoder:decoder]; 5811 5815 result->_private = [[WebViewPrivate alloc] init]; … … 5953 5957 // FIXME: Use AppKit constants for these when they are available. 5954 5958 static NSString * const windowDidChangeBackingPropertiesNotification = @"NSWindowDidChangeBackingPropertiesNotification"; 5955 static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOldScaleFactorKey"; 5959 static NSString * const backingPropertyOldScaleFactorKey = @"NSBackingPropertyOldScaleFactorKey"; 5956 5960 5957 5961 - (void)addWindowObserversForWindow:(NSWindow *)window … … 6023 6027 if (window) { 6024 6028 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_windowWillClose:) name:NSWindowWillCloseNotification object:window]; 6025 6029 6026 6030 // Ensure that we will receive the events that WebHTMLView (at least) needs. 6027 6031 // The following are expensive enough that we don't want to call them over … … 6033 6037 _private->page->setIsInWindow(false); 6034 6038 } 6035 6039 6036 6040 if (window != [self window]) { 6037 6041 [self removeWindowObservers]; … … 6149 6153 - (void)_windowDidChangeBackingProperties:(NSNotification *)notification 6150 6154 { 6151 CGFloat oldBackingScaleFactor = [[notification.userInfo objectForKey:backingPropertyOldScaleFactorKey] doubleValue]; 6155 CGFloat oldBackingScaleFactor = [[notification.userInfo objectForKey:backingPropertyOldScaleFactorKey] doubleValue]; 6152 6156 CGFloat newBackingScaleFactor = [self _deviceScaleFactor]; 6153 if (oldBackingScaleFactor == newBackingScaleFactor) 6154 return; 6157 if (oldBackingScaleFactor == newBackingScaleFactor) 6158 return; 6155 6159 6156 6160 _private->page->setDeviceScaleFactor(newBackingScaleFactor); … … 6355 6359 if (focusedFrame) 6356 6360 return focusedFrame; 6357 6361 6358 6362 // If the first responder is outside of our view tree, we search for a frame containing a selection. 6359 6363 // There should be at most only one of these. … … 6382 6386 if (!_private->page) 6383 6387 return NO; 6384 6388 6385 6389 #if PLATFORM(IOS_FAMILY) 6386 6390 if (WebThreadIsCurrent() || !WebThreadIsEnabled()) … … 6469 6473 if (!_private->page) 6470 6474 return NO; 6471 6475 6472 6476 return _private->zoomsTextOnly; 6473 6477 } … … 6706 6710 if (!_private) 6707 6711 return nil; 6708 6712 6709 6713 return _private->hostWindow; 6710 6714 } … … 6735 6739 #if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC) 6736 6740 // The following 2 internal NSView methods are called on the drag destination to make scrolling while dragging work. 6737 // Scrolling while dragging will only work if the drag destination is in a scroll view. The WebView is the drag destination. 6738 // When dragging to a WebView, the document subview should scroll, but it doesn't because it is not the drag destination. 6741 // Scrolling while dragging will only work if the drag destination is in a scroll view. The WebView is the drag destination. 6742 // When dragging to a WebView, the document subview should scroll, but it doesn't because it is not the drag destination. 6739 6743 // Forward these calls to the document subview to make its scroll view scroll. 6740 6744 - (void)_autoscrollForDraggingInfo:(id)draggingInfo timeDelta:(NSTimeInterval)repeatDelta … … 6816 6820 NSArray* types = draggingInfo.draggingPasteboard.types; 6817 6821 if (![types containsObject:WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) { 6818 6822 6819 6823 // FIXME: legacyFilesPromisePasteboardType() contains UTIs, not path names. Also, it's not 6820 6824 // guaranteed that the count of UTIs equals the count of files, since some clients only write … … 6886 6890 return NO; 6887 6891 } 6888 6892 6889 6893 // This works together with setNextKeyView to splice the WebView into 6890 6894 // the key loop similar to the way NSScrollView does this. Note that … … 6922 6926 #endif 6923 6927 return YES; 6924 } 6928 } 6925 6929 6926 6930 return NO; … … 6966 6970 [[WebFrameView _viewTypesAllowImageTypeOmission:YES] setObject:viewClass forKey:MIMEType]; 6967 6971 [[WebDataSource _repTypesAllowImageTypeOmission:YES] setObject:representationClass forKey:MIMEType]; 6968 6972 6969 6973 // FIXME: We also need to maintain MIMEType registrations (which can be dynamically changed) 6970 6974 // in the WebCore MIMEType registry. For now we're doing this in a safe, limited manner … … 7137 7141 if (!coreMainFrame) 7138 7142 return nil; 7139 7143 7140 7144 auto* documentLoader = coreMainFrame->loader().documentLoader(); 7141 7145 if (!documentLoader) 7142 7146 return nil; 7143 7147 7144 7148 auto& linkIcons = documentLoader->linkIcons(); 7145 7149 if (linkIcons.isEmpty()) … … 7471 7475 { 7472 7476 NSString *URLString = [sender stringValue]; 7473 7477 7474 7478 [[self mainFrame] loadRequest: [NSURLRequest requestWithURL: [NSURL _web_URLWithDataAsString: URLString]]]; 7475 7479 } … … 7557 7561 #if PLATFORM(IOS_FAMILY) 7558 7562 WebThreadRun(^{ 7559 #endif 7563 #endif 7560 7564 [[self mainFrame] reload]; 7561 7565 #if PLATFORM(IOS_FAMILY) 7562 7566 }); 7563 #endif 7567 #endif 7564 7568 } 7565 7569 … … 7749 7753 if (_private->closed) 7750 7754 return NO; 7751 7755 7752 7756 // Get the frame holding the selection, or start with the main frame 7753 7757 WebFrame *startFrame = [self _selectedOrMainFrame]; 7754 7758 7755 7759 // Search the first frame, then all the other frames, in order 7756 7760 NSView <WebDocumentSearching> *startSearchView = nil; … … 7758 7762 do { 7759 7763 WebFrame *nextFrame = incrementFrame(frame, options); 7760 7764 7761 7765 BOOL onlyOneFrame = (frame == nextFrame); 7762 7766 ASSERT(!onlyOneFrame || frame == startFrame); 7763 7767 7764 7768 id <WebDocumentView> view = [[frame frameView] documentView]; 7765 7769 if ([view conformsToProtocol:@protocol(WebDocumentSearching)]) { 7766 7770 NSView <WebDocumentSearching> *searchView = (NSView <WebDocumentSearching> *)view; 7767 7771 7768 7772 if (frame == startFrame) 7769 7773 startSearchView = searchView; 7770 7774 7771 7775 // In some cases we have to search some content twice; see comment later in this method. 7772 // We can avoid ever doing this in the common one-frame case by passing the wrap option through 7776 // We can avoid ever doing this in the common one-frame case by passing the wrap option through 7773 7777 // here, and then bailing out before we get to the code that would search again in the 7774 7778 // same content. … … 7781 7785 return YES; 7782 7786 } 7783 7787 7784 7788 if (onlyOneFrame) 7785 7789 return NO; … … 7787 7791 frame = nextFrame; 7788 7792 } while (frame && frame != startFrame); 7789 7790 // If there are multiple frames and WebFindOptionsWrapAround is set and we've visited each one without finding a result, we still need to search in the 7791 // first-searched frame up to the selection. However, the API doesn't provide a way to search only up to a particular point. The only 7793 7794 // If there are multiple frames and WebFindOptionsWrapAround is set and we've visited each one without finding a result, we still need to search in the 7795 // first-searched frame up to the selection. However, the API doesn't provide a way to search only up to a particular point. The only 7792 7796 // way to make sure the entire frame is searched is to pass WebFindOptionsWrapAround. When there are no matches, this will search 7793 7797 // some content that we already searched on the first pass. In the worst case, we could search the entire contents of this frame twice. … … 7852 7856 return _private->scriptDebugDelegate; 7853 7857 } 7854 7858 7855 7859 - (void)setHistoryDelegate:(id)delegate 7856 7860 { … … 7952 7956 if (view && ![view conformsToProtocol:@protocol(WebMultipleTextMatches)]) 7953 7957 return NO; 7954 7958 7955 7959 frame = incrementFrame(frame); 7956 7960 } while (frame); 7957 7961 7958 7962 return YES; 7959 7963 } … … 7976 7980 if (markMatches) 7977 7981 [(NSView <WebMultipleTextMatches>*)view setMarkedTextMatchesAreHighlighted:highlight]; 7978 7982 7979 7983 ASSERT(limit == 0 || matchCount < limit); 7980 7984 matchCount += [(NSView <WebMultipleTextMatches>*)view countMatchesForText:string inDOMRange:range options:options limit:(limit == 0 ? 0 : limit - matchCount) markMatches:markMatches]; … … 7984 7988 break; 7985 7989 } 7986 7990 7987 7991 frame = incrementFrame(frame); 7988 7992 } while (frame); 7989 7993 7990 7994 return matchCount; 7991 7995 } … … 8001 8005 if ([view conformsToProtocol:@protocol(WebMultipleTextMatches)]) 8002 8006 [(NSView <WebMultipleTextMatches>*)view unmarkAllTextMatches]; 8003 8007 8004 8008 frame = incrementFrame(frame); 8005 8009 } while (frame); … … 8035 8039 frame = incrementFrame(frame); 8036 8040 } while (frame); 8037 8041 8038 8042 return result; 8039 8043 } … … 8188 8192 [currentContext restoreGraphicsState]; 8189 8193 #endif 8190 8194 8191 8195 SEL selector = @selector(webView:drawFooterInRect:); 8192 8196 if (![_private->UIDelegate respondsToSelector:selector]) … … 8207 8211 NSPrintInfo *info = [op printInfo]; 8208 8212 NSMutableDictionary *infoDictionary = [info dictionary]; 8209 8213 8210 8214 // We need to modify the top and bottom margins in the NSPrintInfo to account for the space needed by the 8211 8215 // header and footer. Because this method can be called more than once on the same NSPrintInfo (see 5038087), … … 8227 8231 originalBottomMargin = [[infoDictionary objectForKey:WebKitOriginalBottomPrintingMarginKey] floatValue]; 8228 8232 } 8229 8233 8230 8234 float scale = [op _web_pageSetupScaleFactor]; 8231 8235 [info setTopMargin:originalTopMargin + [self _headerHeight] * scale]; … … 8243 8247 float headerFooterLeft = [printInfo leftMargin]/scale; 8244 8248 float headerFooterWidth = (paperSize.width - ([printInfo leftMargin] + [printInfo rightMargin]))/scale; 8245 NSRect footerRect = NSMakeRect(headerFooterLeft, [printInfo bottomMargin]/scale - [self _footerHeight] , 8249 NSRect footerRect = NSMakeRect(headerFooterLeft, [printInfo bottomMargin]/scale - [self _footerHeight] , 8246 8250 headerFooterWidth, [self _footerHeight]); 8247 NSRect headerRect = NSMakeRect(headerFooterLeft, (paperSize.height - [printInfo topMargin])/scale, 8251 NSRect headerRect = NSMakeRect(headerFooterLeft, (paperSize.height - [printInfo topMargin])/scale, 8248 8252 headerFooterWidth, [self _headerHeight]); 8249 8253 8250 8254 [self _drawHeaderInRect:headerRect]; 8251 8255 [self _drawFooterInRect:footerRect]; … … 8476 8480 [defaultCenter removeObserver:_private->editingDelegate name:WebViewDidChangeTypingStyleNotification object:self]; 8477 8481 [defaultCenter removeObserver:_private->editingDelegate name:WebViewDidChangeSelectionNotification object:self]; 8478 8482 8479 8483 _private->editingDelegate = delegate; 8480 8484 [_private->editingDelegateForwarder release]; 8481 8485 _private->editingDelegateForwarder = nil; 8482 8486 8483 8487 // add notifications for new delegate 8484 8488 [self registerForEditingDelegateNotification:WebViewDidBeginEditingNotification selector:@selector(webViewDidBeginEditing:)]; … … 8518 8522 if (grammarCheckingEnabled == flag) 8519 8523 return; 8520 8524 8521 8525 grammarCheckingEnabled = flag; 8522 [[NSUserDefaults standardUserDefaults] setBool:grammarCheckingEnabled forKey:WebGrammarCheckingEnabled]; 8526 [[NSUserDefaults standardUserDefaults] setBool:grammarCheckingEnabled forKey:WebGrammarCheckingEnabled]; 8523 8527 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8524 8528 8525 8529 // We call _preflightSpellChecker when turning continuous spell checking on, but we don't need to do that here 8526 8530 // because grammar checking only occurs on code paths that already preflight spell checking appropriately. 8527 8531 8528 8532 if (![self isGrammarCheckingEnabled]) 8529 8533 [[self mainFrame] _unmarkAllBadGrammar]; … … 8593 8597 return; 8594 8598 automaticQuoteSubstitutionEnabled = flag; 8595 [[NSUserDefaults standardUserDefaults] setBool:automaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled]; 8599 [[NSUserDefaults standardUserDefaults] setBool:automaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled]; 8596 8600 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8597 8601 } … … 8607 8611 return; 8608 8612 automaticLinkDetectionEnabled = flag; 8609 [[NSUserDefaults standardUserDefaults] setBool:automaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled]; 8613 [[NSUserDefaults standardUserDefaults] setBool:automaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled]; 8610 8614 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8611 8615 } … … 8621 8625 return; 8622 8626 automaticDashSubstitutionEnabled = flag; 8623 [[NSUserDefaults standardUserDefaults] setBool:automaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled]; 8627 [[NSUserDefaults standardUserDefaults] setBool:automaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled]; 8624 8628 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8625 8629 } … … 8635 8639 return; 8636 8640 automaticTextReplacementEnabled = flag; 8637 [[NSUserDefaults standardUserDefaults] setBool:automaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled]; 8641 [[NSUserDefaults standardUserDefaults] setBool:automaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled]; 8638 8642 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8639 8643 } … … 8649 8653 return; 8650 8654 automaticSpellingCorrectionEnabled = flag; 8651 [[NSUserDefaults standardUserDefaults] setBool:automaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled]; 8655 [[NSUserDefaults standardUserDefaults] setBool:automaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled]; 8652 8656 [[NSSpellChecker sharedSpellChecker] updatePanels]; 8653 8657 } … … 8667 8671 { 8668 8672 [[self _selectedOrMainFrame] _replaceSelectionWithNode:node selectReplacement:YES smartReplace:NO matchStyle:NO]; 8669 } 8673 } 8670 8674 8671 8675 - (void)replaceSelectionWithText:(NSString *)text … … 8691 8695 coreFrame->editor().deleteSelectionWithSmartDelete([(WebHTMLView *)[[webFrame frameView] documentView] _canSmartCopyOrDelete]); 8692 8696 } 8693 8697 8694 8698 - (void)applyStyle:(DOMCSSStyleDeclaration *)style 8695 8699 { … … 8750 8754 if (!coreFrame) 8751 8755 return; 8752 8756 8753 8757 coreFrame->editor().insertDictationPhrases(vectorForDictationPhrasesArray(dictationPhrases), metadata); 8754 8758 } … … 8764 8768 if (auto* coreFrame = core([self _selectedOrMainFrame])) 8765 8769 return coreFrame->editor().fontAttributesAtSelectionStart().createDictionary().autorelease(); 8766 8770 8767 8771 return nil; 8768 8772 } … … 8854 8858 #if PLATFORM(IOS_FAMILY) 8855 8859 else 8856 cacheTotalCapacity = 4 * 1024 * 1024; 8860 cacheTotalCapacity = 4 * 1024 * 1024; 8857 8861 #endif 8858 8862 … … 8905 8909 nsurlCacheMemoryCapacity = 1 * 1024 * 1024; 8906 8910 else 8907 nsurlCacheMemoryCapacity = 512 * 1024; 8911 nsurlCacheMemoryCapacity = 512 * 1024; 8908 8912 8909 8913 // Foundation disk cache capacity (in bytes) … … 8937 8941 // Object cache capacities (in bytes) 8938 8942 // (Testing indicates that value / MB depends heavily on content and 8939 // browsing pattern. Even growth above 128MB can have substantial 8943 // browsing pattern. Even growth above 128MB can have substantial 8940 8944 // value / MB for some content / browsing patterns.) 8941 8945 if (memSize >= 4096) … … 8972 8976 nsurlCacheMemoryCapacity = 1 * 1024 * 1024; 8973 8977 else 8974 nsurlCacheMemoryCapacity = 512 * 1024; 8978 nsurlCacheMemoryCapacity = 512 * 1024; 8975 8979 #endif 8976 8980 … … 9048 9052 NSURLRequest *request = [[dataSource request] copy]; 9049 9053 ASSERT(request); 9050 9054 9051 9055 [self _openNewWindowWithRequest:request]; 9052 9056 [request release]; … … 9059 9063 return; 9060 9064 } 9061 9065 9062 9066 NSString *selectedString = [(id <WebDocumentText>)documentView selectedString]; 9063 9067 if ([selectedString length] == 0) { 9064 9068 return; 9065 9069 } 9066 9070 9067 9071 NSPasteboard *pasteboard = [NSPasteboard pasteboardWithUniqueName]; 9068 9072 [pasteboard declareTypes:[NSArray arrayWithObject:WebCore::legacyStringPasteboardType()] owner:nil]; … … 9073 9077 [pasteboard setString:s forType:WebCore::legacyStringPasteboardType()]; 9074 9078 [s release]; 9075 9079 9076 9080 // FIXME: seems fragile to use the service by name, but this is what AppKit does 9077 9081 NSPerformService(@"Search With Google", pasteboard); … … 9111 9115 9112 9116 // If the identifier map is initially empty it means we're starting a load 9113 // of something. The semantic is that the web view should be around as long 9117 // of something. The semantic is that the web view should be around as long 9114 9118 // as something is loading. Because of that we retain the web view. 9115 9119 if (_private->identifierMap.isEmpty()) 9116 9120 CFRetain(self); 9117 9121 9118 9122 _private->identifierMap.set(identifier, object); 9119 9123 } … … 9128 9132 ASSERT(_private->identifierMap.contains(identifier)); 9129 9133 _private->identifierMap.remove(identifier); 9130 9134 9131 9135 // If the identifier map is now empty it means we're no longer loading anything 9132 9136 // and we should release the web view. Autorelease rather than release in order to … … 9160 9164 9161 9165 [self _retrieveKeyboardUIModeFromPreferences:nil]; 9162 9166 9163 9167 #if !PLATFORM(IOS_FAMILY) 9164 [[NSDistributedNotificationCenter defaultCenter] 9165 addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 9168 [[NSDistributedNotificationCenter defaultCenter] 9169 addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 9166 9170 name:KeyboardUIModeDidChangeNotification object:nil]; 9167 9171 #endif 9168 9172 9169 [[NSNotificationCenter defaultCenter] 9170 addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 9173 [[NSNotificationCenter defaultCenter] 9174 addObserver:self selector:@selector(_retrieveKeyboardUIModeFromPreferences:) 9171 9175 name:WebPreferencesChangedInternalNotification object:nil]; 9172 9176 } … … 9219 9223 /* 9220 9224 The order of events with compositing updates is this: 9221 9225 9222 9226 Start of runloop End of runloop 9223 9227 | | … … 9226 9230 | | | 9227 9231 NSWindow update, | CA commit 9228 NSView drawing | 9229 flush | 9232 NSView drawing | 9233 flush | 9230 9234 layerSyncRunLoopObserverCallBack 9231 9235 … … 9237 9241 its "CA commit" observer. Those changes can then appear onscreen at any time 9238 9242 when the display link fires, which can result in unsynchronized rendering. 9239 9243 9240 9244 To fix this, the GraphicsLayerCA code in WebCore does not change the CA 9241 9245 layer tree during style changes and layout; it stores up all changes and 9242 9246 commits them via flushCompositingState(). There are then two situations in 9243 9247 which we can call flushCompositingState(): 9244 9248 9245 9249 1. When painting. FrameView::paintContents() makes a call to flushCompositingState(). 9246 9250 9247 9251 2. When style changes/layout have made changes to the layer tree which do not 9248 9252 result in painting. In this case we need a run loop observer to do a 9249 9253 flushCompositingState() at an appropriate time. The observer will keep firing 9250 9254 until the time is right (essentially when there are no more pending layouts). 9251 9255 9252 9256 */ 9253 9257 bool LayerFlushController::flushLayers() … … 9413 9417 [_private->newFullscreenController setElement:element.get()]; 9414 9418 [_private->newFullscreenController setWebView:self]; 9415 [_private->newFullscreenController enterFullScreen:[[self window] screen]]; 9419 [_private->newFullscreenController enterFullScreen:[[self window] screen]]; 9416 9420 } 9417 9421 … … 9552 9556 9553 9557 _private->hasInitializedLookupObserver = YES; 9554 9558 9555 9559 #if !ENABLE(REVEAL) 9556 9560 if (PAL::canLoad_Lookup_LUNotificationPopoverWillClose()) 9557 9561 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_dictionaryLookupPopoverWillClose:) name:PAL::get_Lookup_LUNotificationPopoverWillClose() object:nil]; 9558 9562 #endif // !ENABLE(REVEAL) 9559 9563 9560 9564 } 9561 9565 … … 9816 9820 if (![documentView isKindOfClass:[WebHTMLView class]]) 9817 9821 return; 9818 9822 9819 9823 WebHTMLView *webHTMLView = (WebHTMLView *)documentView; 9820 9824 if (![webHTMLView _isEditable])
Note: See TracChangeset
for help on using the changeset viewer.