Timeline
Feb 21, 2016:
- 11:29 PM Changeset in webkit [196896] by
-
- 2 edits in trunk/Source/JavaScriptCore
CodeBlock always visits its unlinked code twice
https://bugs.webkit.org/show_bug.cgi?id=154494
Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-02-21
Reviewed by Saam Barati.
- bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitChildren):
The unlinked code is always visited in stronglyVisitStrongReferences.
- 10:30 PM Changeset in webkit [196895] by
-
- 2 edits in trunk/LayoutTests/imported/w3c
Unreviewed, rebaseline html/dom/interfaces.html.
- web-platform-tests/html/dom/interfaces-expected.txt:
- 10:28 PM Changeset in webkit [196894] by
-
- 19 edits in trunk
HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only return known values
https://bugs.webkit.org/show_bug.cgi?id=154502
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
- web-platform-tests/html/dom/interfaces-expected.txt:
- web-platform-tests/html/dom/reflection-embedded-expected.txt:
- web-platform-tests/html/dom/reflection-misc-expected.txt:
Source/WebCore:
HTMLScriptElement.crossOrigin / HTMLImageElement.crossOrigin should only
return known values and should be nullable as per the specification:
- https://html.spec.whatwg.org/multipage/scripting.html#attr-script-crossorigin
- https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-crossorigin
- https://html.spec.whatwg.org/multipage/infrastructure.html#cors-settings-attribute
This aligns our behavior with the HTML specification and Firefox.
No new tests, already covered by existing tests.
- bindings/scripts/CodeGeneratorJS.pm:
Add support for nullable DOMString attributes. If such attribute is
marked as nullable:
- A null string is passed to the implementation if the setter is called with null/undefined.
- null is returned to the Javascript if the getter implementation returns a null string.
- bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
- bindings/scripts/test/GObject/WebKitDOMTestObj.h:
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/ObjC/DOMTestObj.h:
- bindings/scripts/test/ObjC/DOMTestObj.mm:
- bindings/scripts/test/TestObj.idl:
Add test coverage for nullable DOMString attributes
and rebaseline bindings tests.
- html/HTMLImageElement.cpp:
- html/HTMLImageElement.h:
- html/HTMLImageElement.idl:
- html/HTMLScriptElement.cpp:
- html/HTMLScriptElement.h:
- html/HTMLScriptElement.idl:
- html/parser/HTMLParserIdioms.cpp:
- html/parser/HTMLParserIdioms.h:
- 9:52 PM Changeset in webkit [196893] by
-
- 14 edits1 add6 deletes in trunk
Make HTMLSelectElement.size behave as per the specification
https://bugs.webkit.org/show_bug.cgi?id=154504
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
- web-platform-tests/html/dom/reflection-forms-expected.txt:
- web-platform-tests/html/dom/reflection-tabular-expected.txt:
Source/WebCore:
Make HTMLSelectElement.size behave as per the specification:
- https://html.spec.whatwg.org/#htmlselectelement
- https://html.spec.whatwg.org/#dom-select-size
- https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes:idl-unsigned-long
In particular, it should be unsigned and be in the range [0; 2147483647].
Also update several unsigned long attributes in our HTML implementation to use
parseHTMLNonNegativeInteger() to parse unsigned integers as per the HTML
specification, instead of calling String::toUint().
No new tests, already covered by existing tests.
- html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::parseAttribute):
(WebCore::HTMLInputElement::size):
(WebCore::HTMLInputElement::setSize):
- html/HTMLInputElement.h:
- html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::parseAttribute):
(WebCore::HTMLSelectElement::setSize):
(WebCore::HTMLSelectElement::namedItem): Deleted.
(WebCore::HTMLSelectElement::item): Deleted.
- html/HTMLSelectElement.h:
(WebCore::HTMLSelectElement::size):
- html/HTMLSelectElement.idl:
- html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::parseAttribute):
(WebCore::HTMLTableColElement::setSpan):
- html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::parseAttribute):
(WebCore::HTMLTextAreaElement::setCols):
(WebCore::HTMLTextAreaElement::setRows):
- html/parser/HTMLParserIdioms.h:
(WebCore::limitToOnlyHTMLNonNegativeNumbersGreaterThanZero):
(WebCore::limitToOnlyHTMLNonNegative):
LayoutTests:
Update test that was covering the case of an HTMLSelectElement with an
invalid size attribute. The test was expecting the bad "size" attribute
value to get corrected so that the select element looks like a menu list.
This workaround was added back in 2007 to workaround a bug on
www.chainreaction.com (rdar://problem/4697438). This patch drops the
workaround in HTMLSelectElement::parseAttribute() because:
- This is not standard behavior as per the HTML specification
- This behavior does not match Firefox either
- The workaround is no longer needed for www.chainreaction.com.
- fast/forms/select-size-expected.html: Added.
- fast/forms/select-size.html:
- platform/efl/fast/forms/select-size-expected.txt: Removed.
- platform/gtk/fast/forms/select-size-expected.txt: Removed.
- platform/ios-simulator/fast/forms/select-size-expected.txt: Removed.
- platform/mac/fast/forms/select-size-expected.png: Removed.
- platform/mac/fast/forms/select-size-expected.txt: Removed.
- platform/win/fast/forms/select-size-expected.txt: Removed.
- 9:26 PM Changeset in webkit [196892] by
-
- 4 edits in trunk
CSP: Enable form-action directive by default
https://bugs.webkit.org/show_bug.cgi?id=154520
<rdar://problem/24762029>
Reviewed by Sam Weinig.
Source/WebCore:
- page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::addDirective): Move logic to parse the form-action
directive outside the ENABLE(CSP_NEXT) macro guarded section/experimental feature runtime flag.
(WebCore::isExperimentalDirectiveName): Remove form-action from the directives considered
experimental.
LayoutTests:
Mark form-action tests as Pass so that we run them.
- 8:49 PM Changeset in webkit [196891] by
-
- 9 edits2 moves2 adds in trunk/Source
Web Inspector: add 'Automation' protocol domain and generate its backend classes separately in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=154509
<rdar://problem/24759098>
Reviewed by Timothy Hatcher.
Source/JavaScriptCore:
Add a new 'WebKit' framework, which is used to generate protocol code
in WebKit2.
Add --backend and --frontend flags to the main generator script.
These allow a framework to trigger two different sets of generators
so they can be separately generated and compiled.
- inspector/scripts/codegen/models.py:
(Framework.fromString):
(Frameworks): Add new framework.
- inspector/scripts/generate-inspector-protocol-bindings.py:
If neither --backend or --frontend is specified, assume both are wanted.
This matches the behavior for JavaScriptCore and WebInspector frameworks.
(generate_from_specification):
Generate C++ files for the backend and Objective-C files for the frontend.
Source/WebKit2:
Add a new 'Automation' domain which presents an RPC interface
for sending automation commands to an active WebAutomationSession
in the UIProcess via RemoteInspector. This is similar to how the
Inspector backend communicates bidirectionally with a remote
Inspector frontend.
Add build system logic to generate JSON-RPC protocol bindings
for the 'Automation' domain using the inspector code generators.
Move automation-related files that are not API or SPI into their
own directory.
- Configurations/BaseTarget.xcconfig: Tell where JavaScriptCore's
private headers are, since that's where the code generators live.
- CMakeLists.txt: Look in UIProcess/Automation directory.
- PlatformMac.cmake:
- DerivedSources.make: Generate protocol bindings for a single domain.
The names of the generated files will be improved in a follow-up patch
so that they do not clash with generated files in JavaScriptCore.
- UIProcess/Automation/Automation.json: Added.
- UIProcess/Automation/WebAutomationSession.cpp: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.cpp.
(WebKit::WebAutomationSession::WebAutomationSession):
(WebKit::WebAutomationSession::~WebAutomationSession):
Set up a backend dispatcher and frontend router. They will be used later.
(WebKit::WebAutomationSession::dispatchMessageFromRemote):
Forward messages from the remote to the backend dispatcher. When
an agent / command handler is registered, it will receive the message.
(WebKit::WebAutomationSession::connect):
(WebKit::WebAutomationSession::disconnect):
Connenct and disconnect the frontend router to the remote channel.
- UIProcess/Automation/WebAutomationSession.h: Renamed from Source/WebKit2/UIProcess/WebAutomationSession.h.
- WebKit2.xcodeproj/project.pbxproj: Add and move files.
- 7:28 PM Changeset in webkit [196890] by
-
- 24 edits3 adds in trunk
Add username / password attributes to HTMLAnchorElement / HTMLAreaElement
https://bugs.webkit.org/show_bug.cgi?id=154519
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
- web-platform-tests/html/dom/interfaces-expected.txt:
Source/WebCore:
Add username / password attributes to HTMLAnchorElement / HTMLAreaElement as per:
https://html.spec.whatwg.org/#htmlhyperlinkelementutils
Firefox and Chrome already implement these.
Also stop treating null as the empty string for the HTMLHyperlinkElementUtils
attributes. This behavior does not match the specification or other browsers
(tested Firefox and Chrome).
Test: fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html
- CMakeLists.txt:
- DerivedSources.make:
- WebCore.xcodeproj/project.pbxproj:
- html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::username):
(WebCore::HTMLAnchorElement::setUsername):
(WebCore::HTMLAnchorElement::password):
(WebCore::HTMLAnchorElement::setPassword):
- html/HTMLAnchorElement.h:
- html/HTMLAnchorElement.idl:
- html/HTMLAreaElement.idl:
- html/HTMLHyperlinkElementUtils.idl: Added.
LayoutTests:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hash.js:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-hostname.js:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-pathname.js:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js:
- fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-search.js:
- fast/dom/HTMLAnchorElement/set-href-attribute-hash-expected.txt:
- fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt:
- fast/dom/HTMLAnchorElement/set-href-attribute-hostname-expected.txt:
- fast/dom/HTMLAnchorElement/set-href-attribute-pathname-expected.txt:
- fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt:
- fast/dom/HTMLAnchorElement/set-href-attribute-search-expected.txt:
Update / rebaseline tests now that we no longer treat null as the empty string.
- fast/dom/HTMLAnchorElement/set-href-attribute-user-pass-expected.txt: Added.
- fast/dom/HTMLAnchorElement/set-href-attribute-user-pass.html: Added.
Add test coverage for setting the username / password attributes.
- js/dom/dom-static-property-for-in-iteration-expected.txt:
Rebaseline now that HTMLAnchorElement / HTMLAreaElement have 2 additional
attributes: username and password.
- 7:27 PM Changeset in webkit [196889] by
-
- 6 edits2 adds in trunk
iframe/frame/object.contentDocument should be on the prototype
https://bugs.webkit.org/show_bug.cgi?id=154409
Reviewed by Sam Weinig.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
- web-platform-tests/html/dom/interfaces-expected.txt:
Source/WebCore:
Move iframe/frame/object.contentDocument to the prototype. They used
to be on the instance due to the [CheckSecurityForNode] IDL extended
attribute. This patch updates the bindings generator so that such
attributes are now on the prototype. While they are now on the
prototype, the security checks are still generated in the
corresponding getters and setters so cross origin access is still
prevented.
Test: http/tests/security/cross-origin-iframe-contentDocument.html
- bindings/scripts/CodeGeneratorJS.pm:
(AttributeShouldBeOnInstance): Deleted.
LayoutTests:
Add test coverage for trying to access iframe.contentDocument cross origin
to make sure it still fails and logs a security error.
- http/tests/security/cross-origin-iframe-contentDocument-expected.txt: Added.
- http/tests/security/cross-origin-iframe-contentDocument.html: Added.
- 6:33 PM Changeset in webkit [196888] by
-
- 15 edits in trunk/Source
Refactor LazyEventListener creation to separate Element and Document cases
https://bugs.webkit.org/show_bug.cgi?id=154231
Reviewed by Andreas Kling.
Source/WebCore:
- bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::create): Added. Newly factored to separate
Element, Document, and DOMWindow with overloading.
(WebCore::JSLazyEventListener::createForNode): Deleted.
(WebCore::JSLazyEventListener::createForDOMWindow): Deleted.
- bindings/js/JSLazyEventListener.h: Replaced the separate createForNode
and createForDOMWindow functions with a single overloaded function create,
which takes an Element, Document, or DOMWindow. Also changed indentation
to match the style guide.
- dom/Attr.h: Added newly needed forward class declaration.
- dom/ContainerNode.cpp:
(WebCore::ContainerNode::setAttributeEventListener): Deleted.
- dom/ContainerNode.h: Deleted setAttributeEventListener override; it's now
done separately by Element and Document.
- dom/Document.cpp:
(WebCore::Document::setAttributeEventListener): Added. Makes the lazy event
listener and calls through to the base class's setAttributeEventListener.
(WebCore::Document::setWindowAttributeEventListener): Updated to call just
create instead of createForDOMWindow.
- dom/Document.h: Removed some unneeded forward declarations. Added the
overload for setAttributeEventListener. Removed a no longer useful comment.
- dom/Element.cpp:
(WebCore::Element::setAttributeEventListener): Added. Makes the lazy event
listener and calls through to the base class's setAttributeEventListener.
- dom/Element.h: Removed some unneeded forward declarations. Added the
overload for setAttributeEventListener.
- dom/Node.h: Removed many unneeded forward declarations.
- dom/NodeRareData.h: Added one forward declaration.
- editing/Editor.h: Added one forward declaration.
Source/WebKit/win:
- WebView.h: Forward declare KeyboardEvent.
- 5:55 PM Changeset in webkit [196887] by
-
- 8 edits in trunk/Source/JavaScriptCore
Improvements to Intl code
https://bugs.webkit.org/show_bug.cgi?id=154486
Reviewed by Darin Adler.
This patch does several things:
- Use std::unique_ptr to store ICU objects.
- Pass Vector::size() to ICU functions that take a buffer size instead of Vector::capacity().
- If U_SUCCESS(status) is true, it means there is no error, but there could be warnings. ICU functions ignore warnings. So, there is no need to reset status to U_ZERO_ERROR.
- Remove the initialization of the String instance variables of IntlDateTimeFormat. These values are never read and cause unnecessary memory allocation.
- Fix coding style.
- Some small optimization.
- runtime/IntlCollator.cpp:
(JSC::IntlCollator::UCollatorDeleter::operator()):
(JSC::IntlCollator::createCollator):
(JSC::IntlCollator::compareStrings):
(JSC::IntlCollator::~IntlCollator): Deleted.
- runtime/IntlCollator.h:
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::UDateFormatDeleter::operator()):
(JSC::defaultTimeZone):
(JSC::canonicalizeTimeZoneName):
(JSC::toDateTimeOptionsAnyDate):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::weekdayString):
(JSC::IntlDateTimeFormat::format):
(JSC::IntlDateTimeFormat::~IntlDateTimeFormat): Deleted.
(JSC::localeData): Deleted.
- runtime/IntlDateTimeFormat.h:
- runtime/IntlDateTimeFormatConstructor.cpp:
- runtime/IntlNumberFormatConstructor.cpp:
- runtime/IntlObject.cpp:
(JSC::numberingSystemsForLocale):
- 5:45 PM Changeset in webkit [196886] by
-
- 3 edits in trunk/Source/JavaScriptCore
Remove arrowfunction test cases that rely on arguments variable in jsc
https://bugs.webkit.org/show_bug.cgi?id=154517
Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2016-02-21
Reviewed by Yusuke Suzuki.
Allow to jsc has the same behavior in javascript as browser has
- tests/stress/arrowfunction-lexical-bind-arguments-non-strict-1.js:
- tests/stress/arrowfunction-lexical-bind-arguments-strict.js:
- 5:30 PM Changeset in webkit [196885] by
-
- 1 edit3 adds in trunk/LayoutTests
CSP: sandbox directive should be ignored when contained in a policy defined via a meta element
https://bugs.webkit.org/show_bug.cgi?id=154299
<rdar://problem/24680433>
Add iOS Simulator-specific expected result for test http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe.html.
- platform/ios-simulator/http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe-expected.txt: Added.
- 5:29 PM Changeset in webkit [196884] by
-
- 1 edit1 add in trunk/LayoutTests
Adding ios-simulator baseline for js/number-toLocaleString.html
https://bugs.webkit.org/show_bug.cgi?id=154524
Unreviewed test gardening.
- platform/ios-simulator/js/number-toLocaleString-expected.txt: Added.
- 5:27 PM Changeset in webkit [196883] by
-
- 8 edits in trunk/LayoutTests/imported/w3c
Re-sync W3C HTML/DOM web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=154513
Reviewed by Darin Adler.
Re-sync W3C HTML/DOM web-platform-tests after:
- https://github.com/w3c/web-platform-tests/pull/2597
- https://github.com/w3c/web-platform-tests/pull/2598
- https://github.com/w3c/web-platform-tests/pull/2599
- web-platform-tests/html/dom/elements-embedded.js:
- web-platform-tests/html/dom/elements-misc.js:
- web-platform-tests/html/dom/interfaces.html:
- web-platform-tests/html/dom/reflection-embedded-expected.txt:
- web-platform-tests/html/dom/reflection-misc-expected.txt:
- web-platform-tests/html/dom/reflection.js:
(ReflectionTests.doReflects):
- 5:23 PM Changeset in webkit [196882] by
-
- 2 edits in trunk/LayoutTests
Rebaseline imported/w3c/web-platform-tests/html/dom/reflection-forms.html for ios-simulator after r196846
Unreviewed test gardening.
- platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-forms-expected.txt:
- 4:08 PM Changeset in webkit [196881] by
-
- 10 edits in trunk/Source/JavaScriptCore
Web Inspector: it should be possible to omit generated code guarded by INSPECTOR_ALTERNATE_DISPATCHERS
https://bugs.webkit.org/show_bug.cgi?id=154508
<rdar://problem/24759077>
Reviewed by Timothy Hatcher.
In preparation for being able to generate protocol files for WebKit2,
make it possible to not emit generated code that's guarded by
ENABLE(INSPECTOR_ALTERNATE_DISPATCHERS). This code is not needed by
backend dispatchers generated outside of JavaScriptCore. We can't just
define it to 0 for WebKit2, since it's defined to 1 in <wtf/Platform.h>
in the configurations where the code is actually used.
Add a new opt-in Framework configuration option that turns on generating
this code. Adjust how the code is generated so that it can be easily excluded.
- inspector/scripts/codegen/cpp_generator_templates.py:
Make a separate template for the declarations that are guarded.
Add an initializer expression so the order of initalizers doesn't matter.
- inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py:
(CppBackendDispatcherHeaderGenerator.generate_output): Add a setting check.
(CppBackendDispatcherHeaderGenerator._generate_dispatcher_declarations_for_domain):
If the declarations are needed, they will be appended to the end of the
declarations list.
- inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py:
(CppBackendDispatcherImplementationGenerator.generate_output): Add a setting check.
(CppBackendDispatcherImplementationGenerator._generate_dispatcher_implementation_for_command): Add a setting check.
- inspector/scripts/codegen/models.py: Set the 'alternate_dispatchers' setting
to True for Framework.JavaScriptCore only. It's not needed elsewhere.
Rebaseline affected tests.
- inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
- inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
- inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
- inspector/scripts/tests/expected/enum-values.json-result:
- inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
- 4:05 PM Changeset in webkit [196880] by
-
- 15 edits in trunk/Source/JavaScriptCore
Web Inspector: clean up generator selection in generate-inspector-protocol-bindings.py
https://bugs.webkit.org/show_bug.cgi?id=154505
<rdar://problem/24758042>
Reviewed by Timothy Hatcher.
It should be possible to generate code for a framework using some generators
that other frameworks also use. Right now the generator selection code assumes
that use of a generator is mutually exclusive among non-test frameworks.
Make this code explicitly switch on the framework. Reorder generators
alpabetically within each case.
- inspector/scripts/generate-inspector-protocol-bindings.py:
(generate_from_specification):
Rebaseline tests that are affected by generator reorderings.
- inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
- inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
- inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
- inspector/scripts/tests/expected/enum-values.json-result:
- inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
- inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
- inspector/scripts/tests/expected/same-type-id-different-domain.json-result:
- inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
- inspector/scripts/tests/expected/type-declaration-aliased-primitive-type.json-result:
- inspector/scripts/tests/expected/type-declaration-array-type.json-result:
- inspector/scripts/tests/expected/type-declaration-enum-type.json-result:
- inspector/scripts/tests/expected/type-declaration-object-type.json-result:
- inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:
- 3:02 PM Changeset in webkit [196879] by
-
- 2 edits3 moves in trunk/LayoutTests
Another attempt to fix the Content Extension test failures following <https://trac.webkit.org/changeset/196875>
(https://bugs.webkit.org/show_bug.cgi?id=154307)
Rename Content Extension JSON files so that they are associated with tests http/tests/contentextensions/block-cookies-in-csp-report.php
http/tests/contentextensions/block-csp-report.php and http/tests/contentextensions/hide-on-csp-report.php. These
files were formerly named block-cookies-in-csp-report.html, block-csp-report.html, and hide-on-csp-report.html,
respectively, prior to <https://trac.webkit.org/changeset/196878>. Also, update expected result for test block-csp-report.html
following <https://trac.webkit.org/changeset/196878>.
- http/tests/contentextensions/block-cookies-in-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.json.
- http/tests/contentextensions/block-csp-report-expected.txt:
- http/tests/contentextensions/block-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.json.
- http/tests/contentextensions/hide-on-csp-report.php.json: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.json.
- 1:37 PM Changeset in webkit [196878] by
-
- 1 edit3 moves in trunk/LayoutTests
Attempt to fix the Content Extension test failures following <https://trac.webkit.org/changeset/196875>
(https://bugs.webkit.org/show_bug.cgi?id=154307)
Convert Content Extension tests that use the Content Security Policy directive report-uri from HTML files
to PHP scripts and modified them to define the content security policy for the page via the Content-Security-Policy
HTTP header instead of via a meta element so that the report-uri directive is honored. Following
<https://trac.webkit.org/changeset/196875> the directive report-uri is only honored when contained in a
policy that is delivered via an HTTP header. That is, it is no longer honored when delivered in a meta element.
- http/tests/contentextensions/block-cookies-in-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-cookies-in-csp-report.html.
- http/tests/contentextensions/block-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/block-csp-report.html.
- http/tests/contentextensions/hide-on-csp-report.php: Renamed from LayoutTests/http/tests/contentextensions/hide-on-csp-report.html.
- 11:51 AM Changeset in webkit [196877] by
-
- 6 edits in trunk
CSP: Violation report should include column number
https://bugs.webkit.org/show_bug.cgi?id=154418
<rdar://problem/24729525>
Reviewed by Brent Fulgham.
Source/WebCore:
Include column-number in the Content Security Policy violation report for the column number
in the source script where the violation occurred (for a script violation) as per section
Reporting of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
When a CSP report is created for a script violation the source file and line number of the
source code line where the violation occurred are included in the report. We now include
the column number in the source file where the violation occurred so as to help narrow
down the operation that triggered the violation in a complicated source code line.
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation):
LayoutTests:
Update expected results to include source file column information where the violation occurred.
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
- 11:45 AM Changeset in webkit [196876] by
-
- 24 edits1 move2 adds in trunk
CSP: Violation report should include HTTP status code and effective-directive of protected resource
https://bugs.webkit.org/show_bug.cgi?id=154288
<rdar://problem/24674982>
And
https://bugs.webkit.org/show_bug.cgi?id=115707
<rdar://problem/24383128>
Reviewed by Brent Fulgham.
Source/WebCore:
Include status-code and effective-directive in the Content Security Policy violation report for
the HTTP status code of the protected resource and name of the policy directive that was violated,
respectively, as per section Reporting of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
Test: http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation): Add key status-code to the report with value
equal to the HTTP response code for the document or 0 depending on whether the document was
delivered over HTTP or not. Additionally, remove ENABLE(CSP_NEXT)-guard/experimentalFeaturesEnabled()-condition
around code to include the effective-directive property in the report.
LayoutTests:
Add new test http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html to ensure
that the CSP report property status-code is 0 when the protected document is delivered over HTTPS. Fix a
correctness issue in the result for test http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html
and update the expected results for the following tests now that the CSP violation report includes properties
status-code and effective-directive:
http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.php
http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.php
http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.php
http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.php
The rest of the changes to the expected results are cosmetic and reflect the difference in wording for inline
script violations between WebKit and Blink. We will consider adopting wording similar to Blink in
<https://bugs.webkit.org/show_bug.cgi?id=153242>.
- TestExpectations: Remove entries for tests that now pass. Add test http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.php.
- http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive-expected.txt:
- http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/1.1/report-uri-effective-directive.html. The report-uri
directive is only honored when defined in a policy delivered via an HTTP header. We convert this
HTML file to a PHP script to be able to deliver a Content-Security-Policy HTTP header.
- http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt: Update expected result now
that the report includes properties status-code and effective-directive.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-only-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-only-from-header-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt: Update expected result now
that the report includes properties status-code and effective-directive.
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt: Update expected result now
that the report includes properties status-code and effective-directive.
- http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html: Added.
- http/tests/security/contentSecurityPolicy/report-uri-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-uri-from-child-frame-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-uri-from-child-frame.html: Fix ill-formed markup; substitute </iframe> for </script>.
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt: Cosmetic change.
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt: Ditto.
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt: Ditto.
- 11:04 AM Changeset in webkit [196875] by
-
- 22 edits16 moves3 adds2 deletes in trunk
CSP: report-url directive should be ignored when contained in a policy defined via a meta element
https://bugs.webkit.org/show_bug.cgi?id=154307
<rdar://problem/24684817>
Reviewed by Brent Fulgham.
Source/WebCore:
The Content Security Policy report-uri directive should only be honored when defined via an HTTP header
as per section report-uri of the Content Security Policy 2.0 spec., <https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
Currently we honor the report-uri directive when enforcing or monitoring a policy defined either via
an HTML meta element or an HTTP header. Instead we should only honor this directive when defined
via an HTTP header and log a message to the Web Inspector console to explain that the directive
was ignored as suggested in <https://www.w3.org/TR/2015/CR-CSP2-20150721/#delivery-html-meta-element>.
Test: http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored.html
- page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::parse): Modified to ignore the directive report-uri when
the Content Security Policy came from an HTML meta element.
LayoutTests:
Add new test http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored.html and rename and modify
existing tests to make them PHP scripts that emit a Content Security Policy HTTP header.
In addition, remove file http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html that
is no longer meaningful now that we do not honor the report-uri directive defined in a policy via a meta
element. Moreover, we have not made use of this file since <http://trac.webkit.org/changeset/176413>.
- TestExpectations: Update entries for renames.
- http/tests/security/contentSecurityPolicy/report-and-enforce-expected.txt:
- http/tests/security/contentSecurityPolicy/report-and-enforce.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-and-enforce.html.
- http/tests/security/contentSecurityPolicy/report-blocked-data-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-data-uri.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-data-uri.html.
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-file-uri.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri-cross-origin.html.
- http/tests/security/contentSecurityPolicy/report-blocked-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-blocked-uri.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-blocked-uri.html.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html.
- http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html.
- http/tests/security/contentSecurityPolicy/report-only-expected.txt:
- http/tests/security/contentSecurityPolicy/report-only.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-only.html.
- http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html.
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled-expected.txt:
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html.
- http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html.
- http/tests/security/contentSecurityPolicy/report-uri-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-inline-javascript.html.
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-from-javascript.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-uri-from-javascript.html.
- http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/report-uri-in-meta-tag-ignored.html: Added.
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative-expected.txt:
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative.html: Removed.
- http/tests/security/contentSecurityPolicy/report-uri-scheme-relative.php: Added.
- http/tests/security/contentSecurityPolicy/report-uri.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/report-uri.html.
- http/tests/security/contentSecurityPolicy/resources/generate-csp-report.html: Removed. For completeness, we have
not made use of this file since <http://trac.webkit.org/changeset/176413>.
- http/tests/security/contentSecurityPolicy/resources/generate-csp-report.php:
- http/tests/security/contentSecurityPolicy/user-style-sheet-font-crasher.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/user-style-sheet-font-crasher.html.
- platform/wk2/TestExpectations: Update entries for renames.
- 10:52 AM Changeset in webkit [196874] by
-
- 7 edits2 moves6 adds6 deletes in trunk
CSP: sandbox directive should be ignored when contained in a policy defined via a meta element
https://bugs.webkit.org/show_bug.cgi?id=154299
<rdar://problem/24680433>
Reviewed by Brent Fulgham.
Source/WebCore:
The Content Security Policy sandbox directive should only be honored when enforcing a policy
defined via an HTTP header as per section sandbox of the Content Security Policy 2.0 spec.,
<https://www.w3.org/TR/2015/CR-CSP2-20150721/>.
Currently we honor the sandbox directive when enforcing a policy defined either via an HTML
meta element or an HTTP header. Instead we should only honor this directive when defined
via an HTTP header and log a message to the Web Inspector console to explain that the directive
was ignored as suggested in <https://www.w3.org/TR/2015/CR-CSP2-20150721/#delivery-html-meta-element>.
Tests: http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header2.php
http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe.php
http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header.php
http/tests/security/contentSecurityPolicy/sandbox-in-meta-tag-ignored.html
- dom/Document.cpp:
(WebCore::Document::processHttpEquiv): Substitute ContentSecurityPolicy::processHTTPEquiv() for
ContentSecurityPolicy::didReceiveHeader() as the latter was made private.
- page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::copyStateFrom): Updated as needed based on ContentSecurityPolicy::didReceiveHeader() change below.
(WebCore::ContentSecurityPolicy::didReceiveHeaders): Ditto.
(WebCore::ContentSecurityPolicy::didReceiveHeader): Modified to take argument of type ContentSecurityPolicy::PolicyFrom
and pass it through to ContentSecurityPolicyDirectiveList::create().
(WebCore::ContentSecurityPolicy::reportInvalidDirectiveInHTTPEquivMeta): Logs a message to the Web Inspector console
that the specified directive was ignored because it was delivered via an HTML meta element.
- page/csp/ContentSecurityPolicy.h: Made member function ContentSecurityPolicy::didReceiveHeader() private. Defined
enum class PolicyFrom to represent the source of the Content Security Policy: HTTP equiv meta element, HTTP header, or
inherited from another ContentSecurityPolicy object (this value is only used by ContentSecurityPolicy::copyStateFrom()).
(WebCore::ContentSecurityPolicy::processHTTPEquiv): Added; turns around and calls ContentSecurityPolicy::didReceiveHeader().
The name of this function better describes its purpose - to handle the processing of a Content Security Policy
delivered via <meta http-equiv="Content-Security-Policy" content="...">.
- page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::create): Modified to take argument of type ContentSecurityPolicy::PolicyFrom
as pass it through to ContentSecurityPolicyDirectiveList::parse().
(WebCore::ContentSecurityPolicyDirectiveList::parse): Modified to ignore the directive sandbox when the Content Security
Policy came from an HTML meta element.
- page/csp/ContentSecurityPolicyDirectiveList.h:
LayoutTests:
Add test http/tests/security/contentSecurityPolicy/sandbox-in-meta-tag-ignored.html to ensure that we ignore
the sandbox directive when delivered via an HTML meta element and log a message to the Web Inspector console.
Remove tests http/tests/security/contentSecurityPolicy/sandbox-{allow-scripts-subframe, empty, empty-subframe}.html
that are no longer meaningful now that we ignore the sandbox directive when delivered via an HTML meta element and
create analogous tests for when the sandbox directive is delivered via an HTTP header.
- http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header2-expected.txt: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-expected.txt.
- http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-in-http-header2.php: Renamed from LayoutTests/http/tests/security/contentSecurityPolicy/sandbox-allow-scripts.html.
- http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-subframe-expected.txt: Removed.
- http/tests/security/contentSecurityPolicy/sandbox-allow-scripts-subframe.html: Removed.
This test is no longer meaningful now that we ignore the sandbox directive when delivered via an HTML meta element.
An analogous test for when the directive is delivered via an HTTP header is http/tests/security/contentSecurityPolicysandbox-allow-scripts-in-http-header.html.
- http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe.php: Added. Derived from test http/tests/security/contentSecurityPolicy/sandbox-empty-subframe.html.
- http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header.php: Added. Derived from test http/tests/security/contentSecurityPolicy/sandbox-empty.html.
- http/tests/security/contentSecurityPolicy/sandbox-empty-subframe-expected.txt: Removed.
- http/tests/security/contentSecurityPolicy/sandbox-empty-subframe.html: Removed.
This test is no longer meaningful now that we ignore the sandbox directive when delivered via an HTML meta element.
The analogous test for when the directive is delivered via an HTTP header is http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header-inherited-by-subframe.php.
- http/tests/security/contentSecurityPolicy/sandbox-empty-expected.txt: Removed.
- http/tests/security/contentSecurityPolicy/sandbox-empty.html: Removed.
This test is no longer meaningful now that we ignore the sandbox directive when delivered via an HTML meta element.
The analogous test for when the directive is delivered via an HTTP header is http/tests/security/contentSecurityPolicy/sandbox-empty-in-http-header.php.
- http/tests/security/contentSecurityPolicy/sandbox-in-meta-tag-ignored-expected.txt: Added.
- http/tests/security/contentSecurityPolicy/sandbox-in-meta-tag-ignored.html: Added.
- 10:43 AM Changeset in webkit [196873] by
-
- 11 edits in trunk/Source/bmalloc
bmalloc: Don't use a whole page for metadata
https://bugs.webkit.org/show_bug.cgi?id=154510
Reviewed by Andreas Kling.
(1) Don't round up metadata to a page boundary. This saves 1.5% dirty
memory on iOS and 0.2% on Mac. It also enables a future patch to allocate
smaller chunks without wasting memory.
(2) Initialize metadata lazily. This saves dirty memory when the program
allocates primarily small or large objects (but not both), leaving some
metadata uninitialized.
- bmalloc.xcodeproj/project.pbxproj: Medium objects are gone now.
- bmalloc/BumpAllocator.h:
(bmalloc::BumpAllocator::refill): Added an ASSERT to help debug a bug
I cause while working on this patch.
- bmalloc/Heap.cpp:
(bmalloc::Heap::allocateSmallBumpRanges): Ditto.
(bmalloc::Heap::splitAndAllocate):
(bmalloc::Heap::allocateLarge): Updated for interface change.
- bmalloc/LargeChunk.h: Changed the boundaryTagCount calculation to
a static_assert.
Don't round up to page boundary. (See above.)
(bmalloc::LargeChunk::LargeChunk): Moved code here from LargeChunk::init.
A constructor is a more natural / automatic way to do this initialization.
- bmalloc/LargeObject.h:
(bmalloc::LargeObject::init): Deleted. Moved to LargeChunk.
- bmalloc/Sizes.h: Chagned largeChunkMetadataSize to a simpler constant
because metadata size no longer varies by page size.
- bmalloc/SmallChunk.h:
(bmalloc::SmallChunk::begin):
(bmalloc::SmallChunk::end):
(bmalloc::SmallChunk::lines):
(bmalloc::SmallChunk::pages): Use std::array to make begin/end
calculations easier.
(bmalloc::SmallChunk::SmallChunk): Treat our metadata like a series
of allocated objects. We used to avoid trampling our metadata by
starting object memory at the next page. Now we share the first page
between metadata and objects, and we account for metadata explicitly.
- bmalloc/SuperChunk.h:
(bmalloc::SuperChunk::SuperChunk):
(bmalloc::SuperChunk::smallChunk):
(bmalloc::SuperChunk::largeChunk):
(bmalloc::SuperChunk::create): Deleted. Don't eagerly run the SmallChunk
and LargeChunk constructors. We'll run them lazily as needed.
- bmalloc/VMHeap.cpp:
(bmalloc::VMHeap::VMHeap):
(bmalloc::VMHeap::allocateSmallChunk):
(bmalloc::VMHeap::allocateLargeChunk):
(bmalloc::VMHeap::allocateSuperChunk):
(bmalloc::VMHeap::grow): Deleted. Track small and large chunks explicitly
so we can initialize them lazily.
- bmalloc/VMHeap.h:
(bmalloc::VMHeap::allocateSmallPage):
(bmalloc::VMHeap::allocateLargeObject): Specify whether we're allocating
a small or large chunk since we don't allocate both at once anymore.
- 10:18 AM Changeset in webkit [196872] by
-
- 7 edits2 deletes in trunk
Unreviewed, rolling out r196866.
https://bugs.webkit.org/show_bug.cgi?id=154515
still crashy on EFL/GTK (Requested by smfr on #webkit).
Reverted changeset:
"Wheel event callback removing the window causes crash in
WebCore."
https://bugs.webkit.org/show_bug.cgi?id=150871
http://trac.webkit.org/changeset/196866
Feb 20, 2016:
- 10:14 PM Changeset in webkit [196871] by
-
- 4 edits in trunk/Source
Use of inlined asm statements causes problems for -std=c99 builds.
https://bugs.webkit.org/show_bug.cgi?id=154507
Reviewed by Dan Bernstein.
Source/bmalloc:
- bmalloc/BAssert.h:
Source/WTF:
WTF's Assertions.h may inadvertantly get included by other projects that are built
with -std=c99. The use of the inlined asm statements with the keyword "asm" is
not recognized when the -std compiler flag is used.
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html says "When writing code that
can be compiled with -ansi and the various -std options, use asm instead of
asm (see Alternate Keywords)."
So, to be a good citizen, we can change the use of "asm" in CRASH() to "asm"
so that we don't break the build of such other projects.
- wtf/Assertions.h:
- 5:54 PM Changeset in webkit [196870] by
-
- 3 edits in trunk/Websites/perf.webkit.org
Add the support for universal slave password
https://bugs.webkit.org/show_bug.cgi?id=154476
Reviewed by David Kilzer.
Added the support for universalSlavePassword.
- config.json:
- public/include/report-processor.php:
(ReportProcessor::process):
(ReportProcessor::authenticate_and_construct_build_data): Extracted from process().
- 4:17 PM Changeset in webkit [196869] by
-
- 5 edits in trunk/Source/WebInspectorUI
Web Inspector: Opacity slider thumb sometimes goes past the bar in Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154497
Patch by Devin Rousso <Devin Rousso> on 2016-02-20
Reviewed by Timothy Hatcher.
Since WebInspector.Slider uses CSS transforms to move the slider knob
along the track, if the width of the track changes then the position
of the knob would stay the same since it was translated instead of
adjusting its position relative to the new width.
- UserInterface/Views/Slider.js:
(WebInspector.Slider.prototype.recalculateKnobX):
Resets the maxX value to 0 to ensure that a new maxX is calculated with
the current width.
- UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set specifiedWidth): Deleted.
(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.recalculateWidth):
- UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.widthDidChange):
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
(WebInspector.VisualStyleDetailsPanel.prototype._populateDisplaySection):
- UserInterface/Views/VisualStyleUnitSlider.js:
(WebInspector.VisualStyleUnitSlider.prototype.recalculateWidth):
- 3:51 PM Changeset in webkit [196868] by
-
- 14 edits1 add in trunk/Source/JavaScriptCore
[ES6] Implement Proxy.Construct
https://bugs.webkit.org/show_bug.cgi?id=154440
Reviewed by Oliver Hunt.
This patch is mostly an implementation of
Proxy.Construct with respect to section 9.5.13
of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget
This patch also changes op_create_this to accept new.target's
that aren't JSFunctions. This is necessary implementing Proxy.Construct
because we might construct a JSFunction with a new.target being
a Proxy. This will also be needed when we implement Reflect.construct.
- dfg/DFGOperations.cpp:
- dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
- jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emitSlow_op_create_this):
- jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_this):
(JSC::JIT::emitSlow_op_create_this):
- llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
- llint/LowLevelInterpreter.asm:
- llint/LowLevelInterpreter32_64.asm:
- llint/LowLevelInterpreter64.asm:
- runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
- runtime/ProxyObject.cpp:
(JSC::ProxyObject::finishCreation):
(JSC::ProxyObject::visitChildren):
(JSC::performProxyConstruct):
(JSC::ProxyObject::getConstructData):
- runtime/ProxyObject.h:
- tests/es6.yaml:
- tests/stress/proxy-construct.js: Added.
(assert):
(throw.new.Error.let.target):
(throw.new.Error):
(assert.let.target):
(assert.let.handler.get construct):
(let.target):
(let.handler.construct):
(i.catch):
(assert.let.handler.construct):
(assert.let.construct):
(assert.else.assert.let.target):
(assert.else.assert.let.construct):
(assert.else.assert):
(new.proxy.let.target):
(new.proxy.let.construct):
(new.proxy):
- 2:47 PM Changeset in webkit [196867] by
-
- 4 edits in trunk/Source/WebInspectorUI
Web Inspector: Visual Styles: Modifying background expands Font section
https://bugs.webkit.org/show_bug.cgi?id=154491
<rdar://problem/24755440>
Patch by Devin Rousso <Devin Rousso> on 2016-02-20
Reviewed by Timothy Hatcher.
When the user selects a new style, the Visual sidebar examines the property
editors in each subsection to see if any have a value and expands/collapses
the subsection accordingly. This issue was happening because that logic was
also being triggered when the user didn't select a new style, which is
controlled by DOMNodeStyles and the significantChange value in refresh().
- UserInterface/Base/Utilities.js:
(String.prototype.toCamelCase):
Added utility function to transform a string into a camel-cased version.
- UserInterface/Models/DOMNodeStyles.js:
(WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
Dropped unused variable and added checks to make sure doubly-matching styles
don't count as a significant change and cause refreshes of the styles sidebar.
- UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
If this function has an event, meaning it was triggered by a newly selected
selector in the selector section, loop through each subsection and perform
the logic described above, but instead only to open sections.
(WebInspector.VisualStyleDetailsPanel.prototype._generateSection.replaceDashWithCapital): Deleted.
(WebInspector.VisualStyleDetailsPanel.prototype._updateProperties):
Removed logic that was already being called by _sectionModified().
- 1:21 PM Changeset in webkit [196866] by
-
- 7 edits2 adds in trunk
Wheel event callback removing the window causes crash in WebCore.
https://bugs.webkit.org/show_bug.cgi?id=150871
Reviewed by Brent Fulgham.
Source/WebCore:
Null check the FrameView before using it, since the iframe may have been removed
from its parent document inside the event handler.
The new test triggered a cross-load side-effect, where wheel event filtering wasn't
reset between page loads. Fix by calling clearLatchedState() in EventHandler::clear(),
which resets the filtering.
Test: fast/events/wheel-event-destroys-frame.html
- page/EventHandler.cpp:
(WebCore::EventHandler::clear):
(WebCore::EventHandler::clearLatchedState):
- page/Frame.cpp:
(WebCore::Frame::setView): If the view doesn't change (e.g. was and is null)
don't bother clearing the event handler; should avoid EventHandler::clearLatchedState()
from accessing a deleted MainFrame.
- page/WheelEventDeltaFilter.cpp:
(WebCore::WheelEventDeltaFilter::filteredDelta):
- page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::platformCompleteWheelEvent):
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollTo):
LayoutTests:
- fast/events/wheel-event-destroys-frame-expected.txt: Added.
- fast/events/wheel-event-destroys-frame.html: Added.
- 11:51 AM Changeset in webkit [196865] by
-
- 2 edits in trunk/LayoutTests
Rebaseline inspector/model/remote-object.html for Mac after r196846
Unreviewed test gardening.
- platform/mac/inspector/model/remote-object-expected.txt:
- 10:29 AM Changeset in webkit [196864] by
-
- 7 edits in trunk/Source/WebCore
Resolve style iteratively
https://bugs.webkit.org/show_bug.cgi?id=154355
Reviewed by Andreas Kling.
Instead of a set of recursive functions use ComposedTreeIterator for traversing the DOM
tree in composed tree order.
This, along with maintaining explicit parent stack makes style resolve code more tractable
for future work.
It also makes the ComposedTreeIterator the definite authority for the shape of the composed tree
instead of duplicating it as a set of recursive style resolve functions. This eliminates
a significant source of bugs and confusion.
The render tree building code path remains recursive for now.
- css/StyleInvalidationAnalysis.cpp:
(WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
Invalidate the host element instead of the shadow root. This reduces need for special handling for shadow roots.
- dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeContextStack):
(WebCore::ComposedTreeIterator::dropAssertions):
Add support for dropping DOM mutation assertions.
(WebCore::ComposedTreeIterator::traverseShadowRoot):
- dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::context):
(WebCore::ComposedTreeIterator::current):
- dom/PseudoElement.h:
- style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::TreeResolver):
(WebCore::Style::TreeResolver::Scope::Scope):
(WebCore::Style::TreeResolver::Parent::Parent):
(WebCore::Style::TreeResolver::pushScope):
(WebCore::Style::resetStyleForNonRenderedDescendants):
(WebCore::Style::pseudoStyleCacheIsInvalid):
(WebCore::Style::TreeResolver::resolveElement):
(WebCore::Style::resolveTextNode):
(WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement):
(WebCore::Style::TreeResolver::pushParent):
(WebCore::Style::TreeResolver::popParent):
(WebCore::Style::TreeResolver::popParentsToDepth):
Maintain explicit parent stack.
(WebCore::Style::TreeResolver::resolveComposedTree):
The main loop that iterates over the composed tree and computes style for dirty elements.
(WebCore::Style::TreeResolver::resolve):
(WebCore::Style::detachRenderTree):
(WebCore::Style::TreeResolver::resolveLocally): Deleted.
(WebCore::Style::TreeResolver::resolveChildAtShadowBoundary): Deleted.
(WebCore::Style::TreeResolver::resolveShadowTree): Deleted.
(WebCore::Style::TreeResolver::resolveChildren): Deleted.
(WebCore::Style::TreeResolver::resolveSlotAssignees): Deleted.
(WebCore::Style::TreeResolver::resolveRecursively): Deleted.
Recursive functions go away.
- style/StyleTreeResolver.h:
(WebCore::Style::TreeResolver::scope):
(WebCore::Style::TreeResolver::parent):
- 10:16 AM Changeset in webkit [196863] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Text Align segmented control blinks while editing other properties in Visual Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=154487
<rdar://problem/24754703>
Patch by Devin Rousso <Devin Rousso> on 2016-02-20
Reviewed by Timothy Hatcher.
The icon list property editor blinking issue was caused by the fact that
the selected value was toggled on/off each time the value was set on the
editor. In order to prevent this, the logic for the setter value() was
modified to just match a keyword icon to the given value and select it.
- UserInterface/Views/VisualStyleKeywordIconList.js:
(WebInspector.VisualStyleKeywordIconList.prototype.set value):
(WebInspector.VisualStyleKeywordIconList.prototype._handleKeywordChanged):
- 9:02 AM Changeset in webkit [196862] by
-
- 2 edits in trunk/Source/WebCore
REGRESSION(r196780): Fake memory handler takes too long to run now.
Unreviewed bot fix.
Put the footprint comparison code behind a compile-time flag for now.
It's taking too long to run on bots, and memory is getting measured
before all the pressure relief code has a chance to run.
- platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::install):
- 8:42 AM Changeset in webkit [196861] by
-
- 3 edits in trunk/Source/WebCore
Do not require UDate in LocaleICU with !ENABLE_DATE_AND_TIME_INPUT_TYPES
https://bugs.webkit.org/show_bug.cgi?id=154483
Patch by Olivier Blin <Olivier Blin> on 2016-02-20
Reviewed by Michael Catanzaro.
Put initializeShortDateFormat(), dateFormat(), m_shortDateFormat and
m_didCreateShortDateFormat under flag, since they are only used by
code under the ENABLE_DATE_AND_TIME_INPUT_TYPES flag.
This helps to build with a light ICU that does not provide UDate
features (with UCONFIG_NO_FORMATTING).
- platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::LocaleICU):
(WebCore::LocaleICU::~LocaleICU):
(WebCore::createFallbackMonthLabels): Deleted.
(WebCore::createFallbackAMPMLabels): Deleted.
- platform/text/LocaleICU.h:
- 8:31 AM Changeset in webkit [196860] by
-
- 2 edits in trunk/Source/WebCore
Remove declaration of unimplemented methods in LocaleICU
https://bugs.webkit.org/show_bug.cgi?id=154482
Patch by Olivier Blin <Olivier Blin> on 2016-02-20
Reviewed by Michael Catanzaro.
detectSignAndGetDigitRange() and matchedDecimalSymbolIndex() are
implemented in PlatformLocale, not LocaleICU.
They were moved out from LocaleICU to NumberLocalizer in r124459
(2012), which has then been renamed as Localizer, then Locale, and
finally PlatformLocale.
- platform/text/LocaleICU.h:
- 8:30 AM Changeset in webkit [196859] by
-
- 4 edits in trunk
[cmake] Use ICU include dirs in WebKit2 and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=154479
Patch by Olivier Blin <Olivier Blin> on 2016-02-20
Reviewed by Michael Catanzaro.
Source/WebKit2:
- CMakeLists.txt:
Tools:
- WebKitTestRunner/CMakeLists.txt:
- 3:01 AM Changeset in webkit [196858] by
-
- 6 edits2 deletes in trunk
Unreviewed, rolling out r196837.
https://bugs.webkit.org/show_bug.cgi?id=154495
It caused a lot of crashes in EFL and GTK bots (Requested by
KaL on #webkit).
Reverted changeset:
"Wheel event callback removing the window causes crash in
WebCore."
https://bugs.webkit.org/show_bug.cgi?id=150871
http://trac.webkit.org/changeset/196837
- 12:40 AM Changeset in webkit [196857] by
-
- 2 edits in trunk/Source/WebInspectorUI
Web Inspector: Placeholder text in Visual Styles sidebar table row should be white
https://bugs.webkit.org/show_bug.cgi?id=154488
<rdar://problem/24754715>
Reviewed by Timothy Hatcher.
- UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
(.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-comma-separated-keyword-list > .visual-style-comma-separated-keyword-item > .titles > .subtitle):