Timeline
Dec 4, 2016:
- 4:35 PM Changeset in webkit [209314] by
-
- 13 edits in trunk
[CSS Parser] Eliminate in-place lowercasing in the parser.
https://bugs.webkit.org/show_bug.cgi?id=165368
Reviewed by Darin Adler.
Source/WebCore:
Replace the in-place lowercasing that the parser does with new
mechanisms. In-place lowercasing ruins serialization and doesn't
work on CSS parsed from static strings. It also has the side effect
of mutating strings passed in from JavaScript like for querySelectorAll.
For class/id selectors, we now check if the string is lowercase or not.
If it contains uppercase ASCII characters, then we allocate the RareData
for the selector. RareData now has two fields instead of one for the value,
a matching value (all lowercase in quirks mode), and a serializing value (the
original string). Because this is done at the CSSSelector level, the old
parser has been patched as well for these cases.
In addition, in-place lowercasing was done for pseudo-elements, for
media query features, and for attr(). In all of these cases we do
lowercase converting by first checking if it's needed. Serialization will
not retain the original string in these cases, so we may want to revisit
these cases in the future and apply a solution similar to what we did for
selectors.
- css/CSSGrammar.y.in:
- css/CSSSelector.cpp:
(WebCore::CSSSelector::createRareData):
(WebCore::CSSSelector::selectorText):
(WebCore::CSSSelector::RareData::RareData):
(WebCore::CSSSelector::RareData::~RareData):
- css/CSSSelector.h:
(WebCore::CSSSelector::RareData::create):
(WebCore::CSSSelector::setValue):
(WebCore::CSSSelector::value):
(WebCore::CSSSelector::serializingValue):
- css/MediaQueryExp.cpp:
(WebCore::MediaQueryExpression::MediaQueryExpression):
- css/parser/CSSParserToken.cpp:
(WebCore::convertToASCIILowercaseInPlace): Deleted.
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace): Deleted.
- css/parser/CSSParserToken.h:
- css/parser/CSSParserValues.h:
(WebCore::CSSParserSelector::setValue):
- css/parser/CSSPropertyParser.cpp:
(WebCore::consumeAttr):
- css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):
- css/parser/MediaQueryParser.cpp:
(WebCore::MediaQueryParser::readFeature):
LayoutTests:
- fast/media/mq-pointer-expected.txt:
- 2:47 PM Changeset in webkit [209313] by
-
- 9 edits2 adds in trunk
Add support for Wasm ctz and popcnt
https://bugs.webkit.org/show_bug.cgi?id=165369
Reviewed by Saam Barati.
JSTests:
- wasm/function-tests/ctz.js: Added.
- wasm/function-tests/popcnt.js: Added.
Source/JavaScriptCore:
- assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::countTrailingZeros32):
(JSC::MacroAssemblerARM64::countTrailingZeros64):
- assembler/MacroAssemblerX86Common.cpp:
- assembler/MacroAssemblerX86Common.h:
(JSC::MacroAssemblerX86Common::countTrailingZeros32):
(JSC::MacroAssemblerX86Common::supportsBMI1):
(JSC::MacroAssemblerX86Common::ctzAfterBsf):
- assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::countTrailingZeros64):
- assembler/X86Assembler.h:
(JSC::X86Assembler::tzcnt_rr):
(JSC::X86Assembler::tzcntq_rr):
(JSC::X86Assembler::bsf_rr):
(JSC::X86Assembler::bsfq_rr):
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Ctz>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I32Popcnt>):
(JSC::Wasm::B3IRGenerator::addOp<OpType::I64Popcnt>):
- wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
- 1:23 PM Changeset in webkit [209312] by
-
- 22 edits2 adds in trunk/Source/JavaScriptCore
We should have a Wasm callee
https://bugs.webkit.org/show_bug.cgi?id=165163
Reviewed by Keith Miller.
This patch adds JSWebAssemblyCallee and stores it into the
callee slot in the call frame as part of the prologue of a
wasm function. This is the first step in implementing
unwinding from/through wasm frames. We will use the callee
to identify that a machine frame belongs to wasm code.
- CMakeLists.txt:
- JavaScriptCore.xcodeproj/project.pbxproj:
- jsc.cpp:
(callWasmFunction):
(functionTestWasmModuleFunctions):
- llint/LowLevelInterpreter64.asm:
- runtime/JSGlobalObject.cpp:
- runtime/VM.cpp:
(JSC::VM::VM):
- runtime/VM.h:
- wasm/JSWebAssembly.h:
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::parseAndCompile):
- wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::setupFrameInPrologue):
- wasm/WasmFormat.h:
- wasm/WasmPlan.cpp:
(JSC::Wasm::Plan::initializeCallees):
- wasm/WasmPlan.h:
(JSC::Wasm::Plan::compiledFunction):
(JSC::Wasm::Plan::getCompiledFunctions): Deleted.
- wasm/js/JSWebAssemblyCallee.cpp: Added.
(JSC::JSWebAssemblyCallee::JSWebAssemblyCallee):
(JSC::JSWebAssemblyCallee::finishCreation):
(JSC::JSWebAssemblyCallee::destroy):
- wasm/js/JSWebAssemblyCallee.h: Added.
(JSC::JSWebAssemblyCallee::create):
(JSC::JSWebAssemblyCallee::createStructure):
(JSC::JSWebAssemblyCallee::jsEntryPoint):
- wasm/js/JSWebAssemblyModule.cpp:
(JSC::JSWebAssemblyModule::create):
(JSC::JSWebAssemblyModule::JSWebAssemblyModule):
(JSC::JSWebAssemblyModule::visitChildren):
- wasm/js/JSWebAssemblyModule.h:
(JSC::JSWebAssemblyModule::moduleInformation):
(JSC::JSWebAssemblyModule::callee):
(JSC::JSWebAssemblyModule::callees):
(JSC::JSWebAssemblyModule::offsetOfCallees):
(JSC::JSWebAssemblyModule::allocationSize):
(JSC::JSWebAssemblyModule::compiledFunctions): Deleted.
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
(JSC::WebAssemblyFunction::create):
(JSC::WebAssemblyFunction::visitChildren):
(JSC::WebAssemblyFunction::finishCreation):
- wasm/js/WebAssemblyFunction.h:
(JSC::WebAssemblyFunction::webAssemblyCallee):
(JSC::WebAssemblyFunction::instance):
(JSC::WebAssemblyFunction::signature):
(JSC::CallableWebAssemblyFunction::CallableWebAssemblyFunction): Deleted.
(JSC::WebAssemblyFunction::webAssemblyFunctionCell): Deleted.
- wasm/js/WebAssemblyFunctionCell.cpp:
(JSC::WebAssemblyFunctionCell::create): Deleted.
(JSC::WebAssemblyFunctionCell::WebAssemblyFunctionCell): Deleted.
(JSC::WebAssemblyFunctionCell::destroy): Deleted.
(JSC::WebAssemblyFunctionCell::createStructure): Deleted.
- wasm/js/WebAssemblyFunctionCell.h:
(JSC::WebAssemblyFunctionCell::function): Deleted.
- wasm/js/WebAssemblyModuleConstructor.cpp:
(JSC::constructJSWebAssemblyModule):
- wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link):
- 12:22 PM Changeset in webkit [209311] by
-
- 3 edits2 adds in trunk
Web Inspector: Assertion Failures breakpoint should respect global Breakpoints enabled setting
https://bugs.webkit.org/show_bug.cgi?id=165277
<rdar://problem/29467098>
Reviewed by Mark Lam.
Source/JavaScriptCore:
- inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::handleConsoleAssert):
Check that breakpoints are active before pausing.
LayoutTests:
New test for DebuggerManager.prototype.breakPointsEnabled.
- inspector/debugger/breakpoints-disabled-expected.txt: Added.
- inspector/debugger/breakpoints-disabled.html: Added.
- 1:20 AM Changeset in webkit [209310] by
-
- 4 edits in trunk
Fix a build break on EFL since r209303.
Unreviewed build fix.
Source/WebCore:
- bindings/js/SerializedScriptValue.cpp:
(WebCore::exceptionForSerializationFailure): Add a return in the end of function.
Tools:
- Scripts/webkitperl/FeatureList.pm: Disable SS Device Adaptation temporarily.
Dec 3, 2016:
- 4:28 PM Changeset in webkit [209309] by
-
- 14 edits1 copy in trunk
Refactor SymbolImpl layout
https://bugs.webkit.org/show_bug.cgi?id=165247
Reviewed by Darin Adler.
Source/JavaScriptCore:
Use SymbolImpl::{create, createNullSymbol} instead.
- runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):
Source/WTF:
This patch moves SymbolImpl initialization from StringImpl to SymbolImpl.
In SymbolImpl, we create the appropriate fields. At that time, these fields
should be aligned to the BufferSubstring StringImpl.
And we newly create the
m_flagsin SymbolImpl. Instead of using special
StringImpl::null(), we store s_flagIsNullSymbol flag here. In WTF, we have
the invariant that StringImpl::empty() is the only atomic empty string.
But StringImpl::null() breaks this invariant. Using a special flag is safer
way to represent the null SymbolSymbol().
- WTF.xcodeproj/project.pbxproj:
- wtf/CMakeLists.txt:
- wtf/StdLibExtras.h:
(WTF::roundUpToMultipleOfImpl0):
(WTF::roundUpToMultipleOfImpl):
(WTF::roundUpToMultipleOf):
- wtf/text/StringImpl.cpp:
(WTF::StringImpl::~StringImpl):
(WTF::StringImpl::createSymbol): Deleted.
(WTF::StringImpl::createNullSymbol): Deleted.
- wtf/text/StringImpl.h:
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::requiresCopy):
(WTF::StringImpl::isNullSymbol): Deleted.
(WTF::StringImpl::symbolAwareHash): Deleted.
(WTF::StringImpl::existingSymbolAwareHash): Deleted.
(WTF::StringImpl::null): Deleted.
(WTF::StringImpl::extractFoldedStringInSymbol): Deleted.
(WTF::StringImpl::symbolRegistry): Deleted.
(WTF::StringImpl::hashForSymbol): Deleted.
- wtf/text/StringStatics.cpp:
(WTF::StringImpl::nextHashForSymbol): Deleted.
- wtf/text/SymbolImpl.cpp: Copied from Source/WTF/wtf/text/SymbolRegistry.cpp.
(WTF::SymbolImpl::nextHashForSymbol):
(WTF::SymbolImpl::create):
(WTF::SymbolImpl::createNullSymbol):
- wtf/text/SymbolImpl.h:
(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::symbolRegistry):
(WTF::SymbolImpl::isNullSymbol):
(WTF::SymbolImpl::extractFoldedString):
(WTF::SymbolImpl::SymbolImpl):
(WTF::StringImpl::symbolAwareHash):
(WTF::StringImpl::existingSymbolAwareHash):
- wtf/text/SymbolRegistry.cpp:
(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):
- wtf/text/UniquedStringImpl.h:
(WTF::UniquedStringImpl::UniquedStringImpl):
Tools:
- TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
- 4:11 PM Changeset in webkit [209308] by
-
- 2 edits in trunk/Tools
Fixed the build after r209307.
- TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm:
(TEST):
- 3:49 PM Changeset in webkit [209307] by
-
- 19 edits8 adds in trunk
[Cocoa] Expose InjectedBundlePageEditorClient via the Objective-C bundle SPI
https://bugs.webkit.org/show_bug.cgi?id=165276
<rdar://problem/29467040>
Reviewed by Darin Adler.
Source/WebCore:
- platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write): Make sure to put the client data on the pasteboard,
like we do on macOS.
Source/WebKit2:
Test: TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm
- Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Wrap InjectedBundleRangeHandle in WKWebProcessPlugInRangeHandle.
- WebKit2.xcodeproj/project.pbxproj: Added references to new files, making WKWebProcessPlugInEditingDelegate.h and WKWebProcessPlugInRangeHandle.h private headers.
- WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h: Added. An base class based on InjectedBundlePageEditorClient.
(API::InjectedBundle::EditorClient::~EditorClient):
(API::InjectedBundle::EditorClient::shouldBeginEditing):
(API::InjectedBundle::EditorClient::shouldEndEditing):
(API::InjectedBundle::EditorClient::shouldInsertNode):
(API::InjectedBundle::EditorClient::shouldInsertText):
(API::InjectedBundle::EditorClient::shouldDeleteRange):
(API::InjectedBundle::EditorClient::shouldChangeSelectedRange):
(API::InjectedBundle::EditorClient::shouldApplyStyle):
(API::InjectedBundle::EditorClient::didBeginEditing):
(API::InjectedBundle::EditorClient::didEndEditing):
(API::InjectedBundle::EditorClient::didChange):
(API::InjectedBundle::EditorClient::didChangeSelection):
(API::InjectedBundle::EditorClient::willWriteToPasteboard):
(API::InjectedBundle::EditorClient::getPasteboardDataForRange):
(API::InjectedBundle::EditorClient::didWriteToPasteboard):
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h: Added. Declares the new delegate protocol, currently comprising three methods corresponding to willWriteToPasteboard, getPasteboardDataForRange, and didWriteToPasteboard.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame jsRangeForRangeHandle:inWorld:]): Added. Gets the JS wrapper for
the specified range handle.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.h: Added.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm: Added.
(-[WKWebProcessPlugInRangeHandle dealloc]): Call the InjectedBundleRangeHandle destructor.
(+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Get or create an
InjectedBundleRangeHandle for the specified object.
(-[WKWebProcessPlugInRangeHandle frame]): Return the range’s owner document’s frame.
(-[WKWebProcessPlugInRangeHandle _rangeHandle]): Return the InjectedBundleRangeHandle.
(-[WKWebProcessPlugInRangeHandle _apiObject]): Ditto.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h: Added.
(WebKit::wrapper):
- WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetEditorClient): Updated for WebPage change.
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _editingDelegate]): Added. Returns the
delegate.
(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]): Added. Defines a
Client class, which derives from API::InjectedBundle::EditorClient, and invokes the
delegate methods. Instantiates a Client and sets it on the WebPage.
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h: Declared new _editingDelegate property.
- WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::document): Added. Returns an InjectedBundleNodeHandle
for the range’s owner document.
- WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
- WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
(WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient): Added. Calls
initialize().
(WebKit::InjectedBundlePageEditorClient::shouldBeginEditing): Updated for type change.
(WebKit::InjectedBundlePageEditorClient::shouldEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertNode): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldInsertText): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldDeleteRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::shouldApplyStyle): Ditto.
(WebKit::InjectedBundlePageEditorClient::didBeginEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didEndEditing): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didChangeSelection): Ditto.
(WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Ditto.
(WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Ditto.
(WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Ditto.
- WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Now derives from API::InjectedBundle::EditorClient.
- WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldDeleteRange): Ditto.
(WebKit::WebEditorClient::shouldBeginEditing): Ditto.
(WebKit::WebEditorClient::shouldEndEditing): Ditto.
(WebKit::WebEditorClient::shouldInsertNode): Ditto.
(WebKit::WebEditorClient::shouldInsertText): Ditto.
(WebKit::WebEditorClient::shouldChangeSelectedRange): Ditto.
(WebKit::WebEditorClient::shouldApplyStyle): Ditto.
(WebKit::WebEditorClient::didBeginEditing): Ditto.
(WebKit::WebEditorClient::respondToChangedContents): Ditto.
(WebKit::WebEditorClient::respondToChangedSelection): Ditto.
(WebKit::WebEditorClient::didEndEditing): Ditto.
(WebKit::WebEditorClient::didWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::willWriteSelectionToPasteboard): Ditto.
(WebKit::WebEditorClient::getClientPasteboardDataForRange): Ditto.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_editorClient.
(WebKit::WebPage::setInjectedBundleEditorClient): Replaces
initializeInjectedBundleEditorClient and just sets m_editorClient.
(WebKit::WebPage::close): Resets m_editorClient.
- WebProcess/WebPage/WebPage.h: Changed m_editorClient to a unique_ptr.
Tools:
- TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegate.mm: Added.
(-[BundleEditingDelegateRemoteObject willWriteToPasteboard:]):
(-[BundleEditingDelegateRemoteObject didWriteToPasteboard]):
(TEST):
- TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm: Added.
(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:willWriteRangeToPasteboard:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:pasteboardDataForRange:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextControllerDidWriteToPasteboard:]):
- TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegateProtocol.h: Added.
- 2:58 PM Changeset in webkit [209306] by
-
- 22 edits in trunk
WebAssembly: update binary format to 0xD version
https://bugs.webkit.org/show_bug.cgi?id=165345
Reviewed by Keith Miller.
As described in the following PR: https://github.com/WebAssembly/design/pull/836
Originally committed in r209175, reverted in r209242, and fixed in r209284.
JSTests:
- wasm/Builder.js:
(const._normalizeFunctionSignature):
- wasm/Builder_WebAssemblyBinary.js:
(const.emitters.Type):
(const.emitters.Code):
- wasm/LowLevelBinary.js:
(export.default.LowLevelBinary.prototype.block_type):
(export.default.LowLevelBinary.prototype.inline_signature_type): Deleted.
- wasm/WASM.js:
- wasm/js-api/test_basic_api.js:
- wasm/self-test/test_BuilderWebAssembly.js:
(EmptyModule):
(CustomSection):
- wasm/self-test/test_WASM.js:
- wasm/wasm.json:
Source/JavaScriptCore:
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::zeroForType):
(JSC::Wasm::B3IRGenerator::addConstant):
(JSC::Wasm::createJSWrapper):
- wasm/WasmCallingConvention.h:
(JSC::Wasm::CallingConvention::marshallArgument):
- wasm/WasmFormat.cpp:
(JSC::Wasm::toString): Deleted.
- wasm/WasmFormat.h:
(JSC::Wasm::isValueType):
(JSC::Wasm::toB3Type): Deleted.
- wasm/WasmFunctionParser.h:
(JSC::Wasm::FunctionParser<Context>::parseExpression):
- wasm/WasmModuleParser.cpp:
(JSC::Wasm::ModuleParser::parse):
(JSC::Wasm::ModuleParser::parseType):
- wasm/WasmModuleParser.h:
- wasm/WasmParser.h:
(JSC::Wasm::Parser::parseResultType):
- wasm/generateWasm.py:
(Wasm.init):
- wasm/generateWasmOpsHeader.py:
(cppMacro):
(typeMacroizer):
(opcodeMacroizer):
- wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):
- wasm/wasm.json:
- 1:43 PM Changeset in webkit [209305] by
-
- 1 edit2 deletes in trunk/LayoutTests
[CSS Parser] Remove Inspector test of Bison errors
https://bugs.webkit.org/show_bug.cgi?id=165362
Reviewed by Simon Fraser.
The old parser logs invalid property declaration errors whenever a Bison error
occurs. This catches only a fraction of declaration errors,
since Bison accepts practically everything and leaves it up to the specific
parser functions to determine validity of a property.
The new parser does not have this error reporting. The old reporting will be
removed from CSSParser when the new parser turns on. This patch removes the
test of Bison errors.
- inspector/console/css-source-locations-expected.txt: Removed.
- inspector/console/css-source-locations.html: Removed.
- 1:22 PM Changeset in webkit [209304] by
-
- 12 edits in trunk/Source/WebCore
[CSS Parser] Remove line numbers from StyleRule.
https://bugs.webkit.org/show_bug.cgi?id=165361
Reviewed by Simon Fraser.
StyleRules have a concept of a source line that is eventually passed
to the inspector. This was only ever used by normal rules, i.e., ones with
selectors, and set to 0 for all other rules. This line was set to the line number
at which the end of the selector text occurred.
Because Inspector already computes the start and end range for the selector
text, storing a source line on StyleRule ends up being redundant. This patch
gets rid of the source line and uses the end line of the selector text
instead.
- css/CSSGrammar.y.in:
Remove the code that updates the last seen selector line.
- css/CSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::StyleKeyframe):
- css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
No longer need to pass in a 0 line number.
- css/StyleRule.cpp:
(WebCore::StyleRule::StyleRule):
(WebCore::StyleRule::create):
(WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
(WebCore::StyleRuleFontFace::StyleRuleFontFace):
(WebCore::StyleRuleGroup::StyleRuleGroup):
(WebCore::StyleRuleCharset::StyleRuleCharset):
(WebCore::StyleRuleNamespace::StyleRuleNamespace):
- css/StyleRule.h:
(WebCore::StyleRuleBase::StyleRuleBase):
(WebCore::StyleRuleBase::sourceLine): Deleted.
- css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::StyleRuleImport):
Remove m_sourceLine and change the create methods and constructors to not
require a line number.
- css/parser/CSSParser.cpp:
(WebCore::CSSParser::createStyleRule):
Line number no longer needed.
(WebCore::CSSParser::updateLastSelectorLineAndPosition): Deleted.
- css/parser/CSSParser.h:
Got rid of the function that tracks and updates the last seen selector line.
- css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::consumeStyleRule):
Fix the rule creation in the new parser to not pass in a 0 line number.
- inspector/InspectorStyleSheet.cpp:
(WebCore::buildSourceRangeObject):
(WebCore::InspectorStyleSheet::buildObjectForSelectorList):
(WebCore::InspectorStyleSheet::buildObjectForRule):
- inspector/InspectorStyleSheet.h:
Patch the methods that build up the selector range to return the end line
information for selector text so that it can be set as the source line
for the rule (thus eliminating the need to store the line number on the style
rule itself).
- 12:22 PM Changeset in webkit [209303] by
-
- 42 edits2 deletes in trunk
optional sequence values not handled correctly by binding generator
https://bugs.webkit.org/show_bug.cgi?id=142562
Source/WebCore:
Also fixes:
Remove non-standard postMessage overload
https://bugs.webkit.org/show_bug.cgi?id=161911
and
Wrong argument order in window.postMessage
https://bugs.webkit.org/show_bug.cgi?id=63141
Reviewed by Darin Adler.
- WebCore.xcodeproj/project.pbxproj:
Remove no longer needed files.
- bindings/generic/IDLTypes.h:
- bindings/js/JSDOMConvert.h:
(WebCore::Converter<IDLObject>::convert):
Add support for the WebIDL object type.
- bindings/js/JSDOMBinding.cpp:
(WebCore::createDOMException):
Add support for throwing stack overflow errors.
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::handlePostMessage): Deleted.
(WebCore::JSDOMWindow::postMessage): Deleted.
- bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Removed.
- bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::postMessage): Deleted.
(WebCore::extractTransferables): Deleted.
- bindings/js/JSMessagePortCustom.h: Removed.
- bindings/js/JSWorkerCustom.cpp:
(WebCore::JSWorker::postMessage): Deleted.
Remove custom bindings for postMessage.
- bindings/js/SerializedScriptValue.h:
Switch to using enum class.
- bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::transferArrayBuffers):
(WebCore::SerializedScriptValue::create):
Add new create function that takes the transfer list, processes it, and returns
MessagePorts and SerializedScriptValue / exception.
(WebCore::CloneBase::throwStackOverflow): Deleted.
(WebCore::CloneDeserializer::throwValidationError): Deleted.
Remove uncalled functions.
- bindings/scripts/CodeGenerator.pm:
(IsRefPtrType):
(IsBuiltinType):
- bindings/scripts/CodeGeneratorJS.pm:
(AddToIncludesForIDLType):
(GetBaseIDLType):
Add support for the WebIDL 'object' type.
- bindings/scripts/test/JS/JSTestObj.cpp:
- bindings/scripts/test/TestObj.idl:
Add tests for 'object'.
- dom/ExceptionCode.h:
Add two new ExceptionCodes:
- ExistingExceptionError, to indicate that implementation code threw a JS exception.
- StackOverflowError, to indicate that a stack overflow exception should be thrown.
- dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
- dom/MessagePort.h:
- dom/MessagePort.idl:
- page/DOMWindow.cpp:
(WebCore::DOMWindow::postMessage):
- page/DOMWindow.h:
- page/DOMWindow.idl:
- workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
- workers/DedicatedWorkerGlobalScope.h:
- workers/DedicatedWorkerGlobalScope.idl:
- workers/Worker.cpp:
(WebCore::Worker::postMessage):
- workers/Worker.h:
- workers/Worker.idl:
Update to call new SerializedScriptValue create function.
LayoutTests:
Reviewed by Darin Adler.
- fast/canvas/webgl/resources/typed-array-worker.js:
- fast/dom/Window/window-postmessage-args-expected.txt:
- fast/dom/Window/window-postmessage-args.html:
- fast/events/message-port-deleted-document.html:
- fast/events/message-port-deleted-frame.html:
- fast/events/message-port-inactive-document.html:
- fast/events/message-port-multi-expected.txt:
- fast/events/message-port.html:
- fast/workers/worker-context-multi-port-expected.txt:
- fast/workers/worker-multi-port-expected.txt:
- webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
- webgl/1.0.3/resources/webgl_test_files/conformance/typedarrays/resources/typed-array-worker.js:
Update for new exceptions and stricter enforcement of the postMessage signature.
- 11:56 AM Changeset in webkit [209302] by
-
- 3 edits in trunk/Source/WebCore
[CSS Parser] Support Dashboard Regions
https://bugs.webkit.org/show_bug.cgi?id=165357
Reviewed by Daniel Bates.
- css/CSSValueKeywords.in:
- css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitDashboardRegion):
(WebCore::CSSPropertyParser::parseSingleValue):
- 11:05 AM Changeset in webkit [209301] by
-
- 6 edits1 add in trunk
Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355
Reviewed by Filip Pizlo.
JSTests:
- wasm/function-tests/copysign.js: Added.
Source/JavaScriptCore:
This patch also makes two other important changes:
1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead
of a Double in B3.
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
- wasm/generateWasmB3IRGeneratorInlinesHeader.py:
(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.
- wasm/wasm.json:
- 10:41 AM Changeset in webkit [209300] by
-
- 6 edits1 delete in trunk
Unreviewed, rolling out r209298.
https://bugs.webkit.org/show_bug.cgi?id=165359
broke the build (Requested by smfr on #webkit).
Reverted changeset:
"Add Wasm copysign"
https://bugs.webkit.org/show_bug.cgi?id=165355
http://trac.webkit.org/changeset/209298
- 10:33 AM Changeset in webkit [209299] by
-
- 21 edits6 adds in trunk
Improve the behavior of scroll-into-view when the target is inside position:fixed
https://bugs.webkit.org/show_bug.cgi?id=165354
Reviewed by Zalan Bujtas.
Source/WebCore:
The existing RenderLayer::scrollRectToVisible() code paid no heed to whether the
target was inside position:fixed, resulting in unwanted scrolls.
Fix this by plumbing through from the call sites a "insideFixed" flag which we get
when we call localToAbsolute(), and use this flag to avoid scrolling at all if
unzoomed.
If zoomed and we're focussing something inside position:fixed, and if visual viewports
are enabled, we can compute the visual viewport required to reveal the target rect,
which gives us the ideal scroll position.
Fix a bug on non-iOS platforms when zoomed, which is to scale the viewRect since
frameView.visibleContentRect() gives an unscaled rect on those platforms.
Not all callers of scrollRectToVisible() are fixed, but those that are not will get
the current behavior.
Tests: fast/overflow/scroll-anchor-in-position-fixed.html
fast/visual-viewport/zoomed-scroll-into-view-fixed.html
fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html
- dom/Element.cpp:
(WebCore::Element::scrollIntoView):
(WebCore::Element::scrollIntoViewIfNeeded):
(WebCore::Element::scrollIntoViewIfNotVisible):
(WebCore::Element::updateFocusAppearance):
- editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::absoluteCaretBounds):
(WebCore::FrameSelection::recomputeCaretRect):
(WebCore::FrameSelection::revealSelection):
- editing/FrameSelection.h:
- editing/VisiblePosition.cpp:
(WebCore::VisiblePosition::absoluteCaretBounds):
- editing/VisiblePosition.h:
- editing/htmlediting.cpp:
(WebCore::absoluteBoundsForLocalCaretRect):
- editing/htmlediting.h:
- page/FrameView.cpp:
(WebCore::FrameView::scrollElementToRect):
(WebCore::FrameView::scrollToAnchor):
- page/PrintContext.cpp:
(WebCore::PrintContext::outputLinkedDestinations):
- rendering/RenderElement.cpp:
(WebCore::RenderElement::getLeadingCorner):
(WebCore::RenderElement::getTrailingCorner):
(WebCore::RenderElement::absoluteAnchorRect):
(WebCore::RenderElement::anchorRect): Renamed to absoluteAnchorRect().
- rendering/RenderElement.h:
- rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
(WebCore::RenderLayer::getRectToExpose):
(WebCore::RenderLayer::autoscroll):
- rendering/RenderLayer.h:
- rendering/RenderObject.cpp:
(WebCore::RenderObject::scrollRectToVisible):
- rendering/RenderObject.h:
Source/WebKit/mac:
Plumb through 'insideFixed'. We don't get compute it, so behavior from
these call sites won't change.
- WebView/WebFrame.mm:
(-[WebFrame _scrollDOMRangeToVisible:]):
(-[WebFrame _scrollDOMRangeToVisible:withInset:]):
LayoutTests:
- fast/overflow/scroll-anchor-in-position-fixed-expected.txt: Added.
- fast/overflow/scroll-anchor-in-position-fixed.html: Added.
- fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed-expected.txt: Added.
- fast/visual-viewport/zoomed-scroll-to-anchor-in-position-fixed.html: Added.
- platform/ios-simulator/TestExpectations:
- 9:37 AM Changeset in webkit [209298] by
-
- 6 edits1 add in trunk
Add Wasm copysign
https://bugs.webkit.org/show_bug.cgi?id=165355
Reviewed by Filip Pizlo.
JSTests:
- wasm/function-tests/copysign.js: Added.
Source/JavaScriptCore:
This patch also makes two other important changes:
1) allows for i64 constants in the B3 generator language.
2) Fixes a bug with F64ConvertUI64 where the operation returned a Float instead
of a Double in B3.
- wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addOp<F64ConvertUI64>):
- wasm/generateWasmB3IRGeneratorInlinesHeader.py:
(CodeGenerator.generateOpcode):
(generateConstCode):
(generateI32ConstCode): Deleted.
- wasm/wasm.json:
- 8:36 AM Changeset in webkit [209297] by
-
- 6 edits2 adds in trunk
localToAbsolute() does incorrect conversion for elements inside position:fixed with zooming
https://bugs.webkit.org/show_bug.cgi?id=165244
Reviewed by Zalan Bujtas.
Source/WebCore:
RenderView::mapLocalToContainer() and RenderView::mapAbsoluteToLocalPoint() handle the coordinate
mapping through the RenderView's transform (when zoomed), and apply the scroll offset for position:fixed
elements.
They did this in the wrong order; "local to absolute" applied the zoom scale, and then adjusted for the scroll position,
and "absolute to local" applied the scroll position and then the transform.
However that scroll position adjustment should be in unzoomed coordinates, since it's accounting for the
layout adjustment that position:fixed receives (which actually occurs via the localToAbsolute() call
in RenderLayer's accumulateOffsetTowardsAncestor()). "local to absolute" should therefore apply the scroll
adjustment first before the transform, and "absolute to local" the reverse.
In both visual viewport mode, and legacy drifty fixed mode FrameView::scrollPositionForFixedPosition()
returns a scroll offset that is unaffected by zoom, which is correct and confirms this change.
[Confusingly, ScrollView scroll positions _are_ affected by zoom, as the entire document gets bigger.]
RenderGeometryMap::mapToContainer(), which is an optimization on top of RenderView::mapLocalToContainer(),
gets a similar fix.
Test: fast/zooming/client-rect-in-fixed-zoomed.html
- rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer):
- rendering/RenderView.cpp:
(WebCore::RenderView::mapLocalToContainer):
(WebCore::RenderView::mapAbsoluteToLocalPoint):
LayoutTests:
Test getBoundingClientRect() (which internally calls localToAbsolute())
for an element inside position:fixed after zooming.
- fast/visual-viewport/zoomed-fixed-expected.txt: Rebaseline
- fast/zooming/client-rect-in-fixed-zoomed-expected.txt: Added.
- fast/zooming/client-rect-in-fixed-zoomed.html: Added.
- platform/ios-simulator/TestExpectations: Skip new test on iOS; test requires window.scrollTo to be synchronous.