⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Nov 28, 2016:

11:34 PM Changeset in webkit [209064] by Carlos Garcia Campos
  • 7 edits in trunk/Source/WebCore

[GTK] Crash in WebCore::PlatformDisplayX11::supportsXComposite when running under Wayland
https://bugs.webkit.org/show_bug.cgi?id=164917

Reviewed by Michael Catanzaro.

WebKitGTK+ appplications are expected to call gtk_init(), because WebKitGTK+, like GTK+ itself, requires a
display to work. We currently fallback to create a X11 display when X11 is enabled in cases where GTK+ doesn't
have a default display (gtk_init() wasn't called or failed). That's why we end up creating an X11 display under
Wayland when both Wayland and X11 option are enabled. The code assumes X11 display creation will always work if
X11 is enabled, but that's not true now that we support also Wayland at runtime. So, we should try to get a
native display before creating the PlatformDisplay. Rendering will not work in any case when gtk_init() is not
called, but in most of the cases those applications are not actually going to render anything, so this way at
least we will not crash.

  • platform/graphics/PlatformDisplay.cpp:

(WebCore::PlatformDisplay::createPlatformDisplay): Use create() method for X11 and Wayland if we couldn't get a
native display from GTK+. If everything fails create a display with no native.
(WebCore::PlatformDisplay::PlatformDisplay): Add NativeDisplayOwned parameter.

  • platform/graphics/PlatformDisplay.h:
  • platform/graphics/wayland/PlatformDisplayWayland.cpp:

(WebCore::PlatformDisplayWayland::create): Try to create a native Wayland display or return nullptr.
(WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Initialize NativeDisplayOwned parameter.
(WebCore::PlatformDisplayWayland::~PlatformDisplayWayland): Destroy the display if owned.
(WebCore::PlatformDisplayWayland::initialize): Return early if native display is nullptr.

  • platform/graphics/wayland/PlatformDisplayWayland.h:
  • platform/graphics/x11/PlatformDisplayX11.cpp:

(WebCore::PlatformDisplayX11::create): Try to create a native X11 display or return nullptr.
(WebCore::PlatformDisplayX11::PlatformDisplayX11): Use NativeDisplayOwned now.
(WebCore::PlatformDisplayX11::~PlatformDisplayX11): Ditto.

  • platform/graphics/x11/PlatformDisplayX11.h:
11:27 PM Changeset in webkit [209063] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] BadDamage X Window System error in WebKit::AcceleratedBackingStoreX11::update when called from WebPageProxy::exitAcceleratedCompositingMode
https://bugs.webkit.org/show_bug.cgi?id=164303

Reviewed by Michael Catanzaro.

Trap also BadDrawable and BadDamage X errors when creating the surface and damage.

  • UIProcess/gtk/AcceleratedBackingStoreX11.cpp:

(WebKit::AcceleratedBackingStoreX11::update):

11:08 PM Changeset in webkit [209062] by Matt Baker
  • 24 edits
    2 adds in trunk

Web Inspector: Debugger should have an option for showing asynchronous call stacks
https://bugs.webkit.org/show_bug.cgi?id=163230
<rdar://problem/28698683>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/ScriptCallFrame.cpp:

(Inspector::ScriptCallFrame::isNative):
Encapsulate check for native code source URL.

  • inspector/ScriptCallFrame.h:
  • inspector/ScriptCallStack.cpp:

(Inspector::ScriptCallStack::firstNonNativeCallFrame):
(Inspector::ScriptCallStack::buildInspectorArray):

  • inspector/ScriptCallStack.h:

Replace use of Console::StackTrace with Array<Console::CallFrame>.

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::setAsyncStackTraceDepth):
Set number of async frames to store (including boundary frames).
A value of zero disables recording of async call stacks.

(Inspector::InspectorDebuggerAgent::buildAsyncStackTrace):
Helper function for building a linked list StackTraces.
(Inspector::InspectorDebuggerAgent::didScheduleAsyncCall):
Store a call stack for the script that scheduled the async call.
If the call repeats (e.g. setInterval), the starting reference count is
set to 1. This ensures that dereffing after dispatch won't clear the stack.
If another async call is currently being dispatched, increment the
AsyncCallData reference count for that call.

(Inspector::InspectorDebuggerAgent::didCancelAsyncCall):
Decrement the reference count for the canceled call.

(Inspector::InspectorDebuggerAgent::willDispatchAsyncCall):
Set the identifier for the async callback currently being dispatched,
so that if the debugger pauses during dispatch a stack trace can be
associated with the pause location. If an async call is already being
dispatched, which could be the case when a script schedules an async
call in a nested runloop, do nothing.

(Inspector::InspectorDebuggerAgent::didDispatchAsyncCall):
Decrement the reference count for the canceled call.
(Inspector::InspectorDebuggerAgent::didPause):
If a stored stack trace exists for this location, convert to a protocol
object and send to the frontend.

(Inspector::InspectorDebuggerAgent::didClearGlobalObject):
(Inspector::InspectorDebuggerAgent::clearAsyncStackTraceData):
(Inspector::InspectorDebuggerAgent::refAsyncCallData):
Increment AsyncCallData reference count.
(Inspector::InspectorDebuggerAgent::derefAsyncCallData):
Decrement AsyncCallData reference count. If zero, deref its parent
(if it exists) and remove the AsyncCallData entry.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/protocol/Console.json:
  • inspector/protocol/Network.json:

Replace use of Console.StackTrace with array of Console.CallFrame.

  • inspector/protocol/Debugger.json:

New protocol command and event data.

Source/WebCore:

Test: inspector/debugger/async-stack-trace.html

  • inspector/InspectorInstrumentation.cpp:

(WebCore::didScheduleAsyncCall):
Helper function used by by instrumentation hooks. Informs the debugger
agent that an asynchronous call was scheduled for the current script
execution state.

(WebCore::InspectorInstrumentation::didInstallTimerImpl):
(WebCore::InspectorInstrumentation::didRemoveTimerImpl):
(WebCore::InspectorInstrumentation::willFireTimerImpl):
(WebCore::InspectorInstrumentation::didFireTimerImpl):
Asynchronous stack trace plumbing for timers (setTimeout, setInterval).
(WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
(WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
(WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
Asynchronous stack trace plumbing for requestAnimationFrame.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:

New string for generic async call stack boundary label: "(async)".

  • UserInterface/Controllers/DebuggerManager.js:

Create async stack depth setting and set default depth.
(WebInspector.DebuggerManager.prototype.get asyncStackTraceDepth):
(WebInspector.DebuggerManager.prototype.set asyncStackTraceDepth):
Make async stack depth setting accessible to the frontend.
(WebInspector.DebuggerManager.prototype.initializeTarget):
Set async stack depth value on the target.
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Plumbing for the async stack trace payload.

  • UserInterface/Models/ConsoleMessage.js:

(WebInspector.ConsoleMessage):
Updated for new StackTrace.fromPayload use.

  • UserInterface/Models/DebuggerData.js:

(WebInspector.DebuggerData):
(WebInspector.DebuggerData.prototype.get asyncStackTrace):
(WebInspector.DebuggerData.prototype.updateForPause):
(WebInspector.DebuggerData.prototype.updateForResume):
More plumbing.

  • UserInterface/Models/StackTrace.js:

Update frontend model for use as new protocol object Console.StackTrace,
which was previously an alias for a simple array of Console.CallFrames.

(WebInspector.StackTrace):
(WebInspector.StackTrace.fromPayload):
(WebInspector.StackTrace.fromString):
(WebInspector.StackTrace.prototype.get topCallFrameIsBoundary):
(WebInspector.StackTrace.prototype.get parentStackTrace):

  • UserInterface/Protocol/DebuggerObserver.js:

(WebInspector.DebuggerObserver.prototype.paused):
More plumbing.

  • UserInterface/Views/CallFrameTreeElement.css:

(.tree-outline .item.call-frame.async-boundary):
Use default cursor since boundary element is not selectable.
(.tree-outline .item.call-frame.async-boundary .icon):
(.tree-outline .item.call-frame.async-boundary::before,):
(.tree-outline .item.call-frame.async-boundary::after):
(.tree-outline .item.call-frame.async-boundary::before):
Dimmed text and divider line styles for boundary element.

  • UserInterface/Views/CallFrameTreeElement.js:

(WebInspector.CallFrameTreeElement):
Add a flag denoting whether the call frame is an async call trace
boundary, and set styles accordingly.

  • UserInterface/Views/DebuggerSidebarPanel.js:

Set async stack trace depth, if supported.
(WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
Add call frames for async stack traces to the call stack TreeOutline.
(WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
Ensure that async call frames cannot become the active call frame.

  • UserInterface/Views/Variables.css:

(:root):
Add --text-color-gray-medium, for dimmed text in async boundary element.

LayoutTests:

Add basic tests for async stack trace data included in Debugger.paused, and
check that requestAnimationFrame, setTimeout, and setInterval are supported.

  • inspector/debugger/async-stack-trace-expected.txt: Added.
  • inspector/debugger/async-stack-trace.html: Added.
9:49 PM Changeset in webkit [209061] by jiewen_tan@apple.com
  • 4 edits in trunk/Source/WebCore

Unreviewed, followup patch after r209059.

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

9:37 PM Changeset in webkit [209060] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[Mac][WK2] Enable HTML interactive form validation
https://bugs.webkit.org/show_bug.cgi?id=165123
<rdar://problem/28944652>

Reviewed by Simon Fraser.

Enable HTML interactive form validation now that we have a native UI
for it.

  • Shared/WebPreferencesDefinitions.h:
8:49 PM Changeset in webkit [209059] by jiewen_tan@apple.com
  • 4 edits in trunk/Source/WebCore

ASSERTION FAILED: m_scriptExecutionContext->isContextThread() seen with LayoutTest crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
https://bugs.webkit.org/show_bug.cgi?id=165124
<rdar://problem/29413805>

Reviewed by Daniel Bates.

We should only dereference callbacks after being back to the Document/Worker threads as
it might destroy promises in the work queue which will then trigger the assertion.

Covered by existing tests.

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

8:29 PM Changeset in webkit [209058] by Darin Adler
  • 40 edits in trunk/Source

Streamline and speed up tokenizer and segmented string classes
https://bugs.webkit.org/show_bug.cgi?id=165003

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendStringifiedValue): Use viewWithUnderlyingString when calling
StringBuilder::appendQuotedJSONString, since it now takes a StringView and there is
no benefit in creating a String for that function if one doesn't already exist.

Source/WebCore:

Profiling Speedometer on my iMac showed the tokenizer as one of the
hottest functions. This patch streamlines the segmented string class,
removing various unused features, and also improves some other functions
seen on the Speedometer profile. On my iMac I measured a speedup of
about 3%. Changes include:

  • Removed m_pushedChar1, m_pushedChar2, and m_empty data members from the SegmentedString class and all the code that used to handle them.
  • Simplified the SegmentedString advance functions so they are small enough to get inlined in the HTML tokenizer.
  • Updated callers to call the simpler SegmentedString advance functions that don't handle newlines in as many cases as possible.
  • Cut down on allocations of SegmentedString and made code move the segmented string and the strings that are moved into it rather than copying them whenever possible.
  • Simplified segmented string functions, removing some branches, mostly from the non-fast paths.
  • Removed small unused functions and small functions used in only one or two places, made more functions private and renamed for clarity.
  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::documentWrite): Moved a little more of the common code in here
from the two functions belwo. Removed obsolete comment saying this was not
following the DOM specification because it is. Removed unneeded special
cases for 1 argument and no arguments. Take a reference instead of a pointer.
(WebCore::JSHTMLDocument::write): Updated for above.
(WebCore::JSHTMLDocument::writeln): Ditto.

  • css/parser/CSSTokenizer.cpp: Added now-needed include.
  • css/parser/CSSTokenizer.h: Removed unneeded include.
  • css/parser/CSSTokenizerInputStream.h: Added definition of kEndOfFileMarker

here; this is now separate from the use in the HTMLParser. In the long run,
unclear to me whether it is really needed in either.

  • dom/Document.cpp:

(WebCore::Document::prepareToWrite): Added. Helper function used by the three
different variants of write. Using this may prevent us from having to construct
a SegmentedString just to append one string after future refactoring.
(WebCore::Document::write): Updated to take an rvalue reference and move the
value through.
(WebCore::Document::writeln): Use a single write call instead of two.

  • dom/Document.h: Changed write to take an rvalue reference to SegmentedString

rather than a const reference.

  • dom/DocumentParser.h: Changed insert to take an rvalue reference to

SegmentedString. In the future, should probably overload to take a single
string since that is the normal case.

  • dom/RawDataDocumentParser.h: Updated for change to DocumentParser.
  • html/FTPDirectoryDocument.cpp:

(WebCore::FTPDirectoryDocumentParser::append): Refactored a bit, just enough
so that we don't need an assignment operator for SegmentedString that can
copy a String.

  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::insert): Updated to take an rvalue reference,
and move the value through.

  • html/parser/HTMLDocumentParser.h: Updated for the above.
  • html/parser/HTMLEntityParser.cpp:

(WebCore::HTMLEntityParser::consumeNamedEntity): Updated for name changes.
Changed the twao calls to advance here to call advancePastNonNewline; no
change in behavior, but asserts what the code was assuming before, that the
character was not a newline.

  • html/parser/HTMLInputStream.h:

(WebCore::HTMLInputStream::appendToEnd): Updated to take an rvalue reference,
and move the value through.
(WebCore::HTMLInputStream::insertAtCurrentInsertionPoint): Ditto.
(WebCore::HTMLInputStream::markEndOfFile): Removed the code to construct a
SegmentedString, overkill since we can just append an individual string.
(WebCore::HTMLInputStream::splitInto): Rewrote the move idiom here to actually
use move, which will reduce reference count churn and other unneeded work.

  • html/parser/HTMLMetaCharsetParser.cpp:

(WebCore::HTMLMetaCharsetParser::checkForMetaCharset): Removed unneeded
construction of a SegmentedString, just to append a string.

  • html/parser/HTMLSourceTracker.cpp:

(WebCore::HTMLSourceTracker::HTMLSourceTracker): Moved to the class definition.
(WebCore::HTMLSourceTracker::source): Updated for function name change.

  • html/parser/HTMLSourceTracker.h: Updated for above.
  • html/parser/HTMLTokenizer.cpp: Added now-needed include.

(WebCore::HTMLTokenizer::emitAndResumeInDataState): Use advancePastNonNewline,
since this function is never called in response to a newline character.
(WebCore::HTMLTokenizer::commitToPartialEndTag): Ditto.
(WebCore::HTMLTokenizer::commitToCompleteEndTag): Ditto.
(WebCore::HTMLTokenizer::processToken): Use ADVANCE_PAST_NON_NEWLINE_TO macro
instead of ADVANCE_TO in cases where the character we are advancing past is
known not to be a newline, so we can use the more efficient advance function
that doesn't check for the newline character.

  • html/parser/InputStreamPreprocessor.h: Moved kEndOfFileMarker to

SegmentedString.h; not sure that's a good place for it either. In the long run,
unclear to me whether this is really needed.
(WebCore::InputStreamPreprocessor::peek): Added UNLIKELY for the empty check.
Added LIKELY for the not-special character check.
(WebCore::InputStreamPreprocessor::advance): Updated for the new name of the
advanceAndUpdateLineNumber function.
(WebCore::InputStreamPreprocessor::advancePastNonNewline): Added. More
efficient than advance for cases where the last characer is known not to be
a newline character.
(WebCore::InputStreamPreprocessor::skipNextNewLine): Deleted. Was unused.
(WebCore::InputStreamPreprocessor::reset): Deleted. Was unused except in the
constructor; added initial values for the data members to replace.
(WebCore::InputStreamPreprocessor::processNextInputCharacter): Removed long
FIXME comment that didn't really need to be here. Reorganized a bit.
(WebCore::InputStreamPreprocessor::isAtEndOfFile): Renamed and made static.

  • html/track/BufferedLineReader.cpp:

(WebCore::BufferedLineReader::nextLine): Updated to not use the poorly named
scanCharacter function to advance past a newline. Also renamed from getLine
and changed to return Optional<String> instead of using a boolean to indicate
failure and an out argument.

  • html/track/BufferedLineReader.h:

(WebCore::BufferedLineReader::BufferedLineReader): Use the default, putting
initial values on each data member below.
(WebCore::BufferedLineReader::append): Updated to take an rvalue reference,
and move the value through.
(WebCore::BufferedLineReader::scanCharacter): Deleted. Was poorly named,
and easy to replace with two lines of code at its two call sites.
(WebCore::BufferedLineReader::reset): Rewrote to correctly clear all the
data members of the class, not just the segmented string.

  • html/track/InbandGenericTextTrack.cpp:

(WebCore::InbandGenericTextTrack::parseWebVTTFileHeader): Updated to take
an rvalue reference and move the value through.

  • html/track/InbandGenericTextTrack.h: Updated for the above.
  • html/track/InbandTextTrack.h: Updated since parseWebVTTFileHeader now

takes an rvalue reference.

  • html/track/WebVTTParser.cpp:

(WebCore::WebVTTParser::parseFileHeader): Updated to take an rvalue reference
and move the value through.
(WebCore::WebVTTParser::parseBytes): Updated to pass ownership of the string
in to the line reader append function.
(WebCore::WebVTTParser::parseCueData): Use auto and WTFMove for WebVTTCueData.
(WebCore::WebVTTParser::flush): More of the same.
(WebCore::WebVTTParser::parse): Changed to use nextLine instead of getLine.

  • html/track/WebVTTParser.h: Updated for the above.
  • html/track/WebVTTTokenizer.cpp:

(WebCore::advanceAndEmitToken): Use advanceAndUpdateLineNumber by its new
name, just advance. No change in behavior.
(WebCore::WebVTTTokenizer::WebVTTTokenizer): Pass a String, not a
SegmentedString, to add the end of file marker.

  • platform/graphics/InbandTextTrackPrivateClient.h: Updated since

parseWebVTTFileHeader takes an rvalue reference.

  • platform/text/SegmentedString.cpp:

(WebCore::SegmentedString::Substring::appendTo): Moved here from the header.
The only caller is SegmentedString::toString, inside this file.
(WebCore::SegmentedString::SegmentedString): Deleted the copy constructor.
No longer needed.
(WebCore::SegmentedString::operator=): Defined a move assignment operator
rather than an ordinary assignment operator, since that's what the call
sites really need.
(WebCore::SegmentedString::length): Simplified since we no longer need to
support pushed characters.
(WebCore::SegmentedString::setExcludeLineNumbers): Simplified, since we
can just iterate m_otherSubstrings without an extra check. Also changed to
write directly to the data member of Substring instead of using a function.
(WebCore::SegmentedString::updateAdvanceFunctionPointersForEmptyString):
Added. Used when we run out of characters.
(WebCore::SegmentedString::clear): Removed code to clear now-deleted members.
Updated for changes to other member names.
(WebCore::SegmentedString::appendSubstring): Renamed from just append to
avoid ambiguity with the public append function. Changed to take an rvalue
reference, and move in, and added code to set m_currentCharacter properly,
so the caller doesn't have to deal with that.
(WebCore::SegmentedString::close): Updated to use m_isClosed by its new name.
Also removed unneeded comment about assertion that fires when trying to close
an already closed string.
(WebCore::SegmentedString::append): Added overloads for rvalue references of
both entire SegmentedString objects and of String. Streamlined to just call
appendSubstring and append to the deque.
(WebCore::SegmentedString::pushBack): Tightened up since we don't allow empty
strings and changed to take just a string, not an entire segmented string.
(WebCore::SegmentedString::advanceSubstring): Moved logic into the
advancePastSingleCharacterSubstringWithoutUpdatingLineNumber function.
(WebCore::SegmentedString::toString): Simplified now that we don't need to
support pushed characters.
(WebCore::SegmentedString::advancePastNonNewlines): Deleted.
(WebCore::SegmentedString::advance8): Deleted.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber16): Renamed from
advance16. Simplified now that there are no pushed characters. Also changed to
access data members of m_currentSubstring directly instead of calling a function.
(WebCore::SegmentedString::advanceAndUpdateLineNumber8): Deleted.
(WebCore::SegmentedString::advanceAndUpdateLineNumber16): Ditto.
(WebCore::SegmentedString::advancePastSingleCharacterSubstringWithoutUpdatingLineNumber):
Renamed from advanceSlowCase. Removed uneeded logic to handle pushed characters.
Moved code in here from advanceSubstring.
(WebCore::SegmentedString::advancePastSingleCharacterSubstring): Renamed from
advanceAndUpdateLineNumberSlowCase. Simplified by calling the function above.
(WebCore::SegmentedString::advanceEmpty): Broke assertion up into two.
(WebCore::SegmentedString::updateSlowCaseFunctionPointers): Updated for name changes.
(WebCore::SegmentedString::advancePastSlowCase): Changed name and meaning of
boolean argument. Rewrote to use the String class less; it's now used only when
we fail to match after the first character rather than being used for the actual
comparison with the literal.

  • platform/text/SegmentedString.h: Moved all non-trivial function bodies out of

the class definition to make things easier to read. Moved the SegmentedSubstring
class inside the SegmentedString class, making it a private struct named Substring.
Removed the m_ prefix from data members of the struct, removed many functions from
the struct and made its union be anonymous instead of naming it m_data. Removed
unneeded StringBuilder.h include.
(WebCore::SegmentedString::isEmpty): Changed to use the length of the substring
instead of a separate boolean. We never create an empty substring, nor leave one
in place as the current substring unless the entire segmented string is empty.
(WebCore::SegmentedString::advancePast): Updated to use the new member function
template instead of a non-template member function. The new member function is
entirely rewritten and does the matching directly rather than allocating a string
just to do prefix matching.
(WebCore::SegmentedString::advancePastLettersIgnoringASCIICase): Renamed to make
it clear that the literal must be all non-letters or lowercase letters as with
the other "letters ignoring ASCII case" functions. The three call sites all fit
the bill. Implement by calling the new function template.
(WebCore::SegmentedString::currentCharacter): Renamed from currentChar.
(WebCore::SegmentedString::Substring::Substring): Use an rvalue reference and
move the string in.
(WebCore::SegmentedString::Substring::currentCharacter): Simplified since this
is never used on an empty substring.
(WebCore::SegmentedString::Substring::incrementAndGetCurrentCharacter): Ditto.
(WebCore::SegmentedString::SegmentedString): Overload to take an rvalue reference.
Simplified since there are now fewer data members.
(WebCore::SegmentedString::advanceWithoutUpdatingLineNumber): Renamed from
advance, since this is only safe to use if there is some reason it is OK to skip
updating the line number.
(WebCore::SegmentedString::advance): Renamed from advanceAndUpdateLineNumber,
since doing that is the normal desired behavior and not worth mentioning in the
public function name.
(WebCore::SegmentedString::advancePastNewline): Renamed from
advancePastNewlineAndUpdateLineNumber.
(WebCore::SegmentedString::numberOfCharactersConsumed): Greatly simplified since
pushed characters are no longer supported.
(WebCore::SegmentedString::characterMismatch): Added. Used by advancePast.

  • xml/parser/CharacterReferenceParserInlines.h:

(WebCore::unconsumeCharacters): Use toString rather than toStringPreserveCapacity
because the SegmentedString is going to take ownership of the string.
(WebCore::consumeCharacterReference): Updated to use the pushBack that takes just
a String, not a SegmentedString. Also use advancePastNonNewline.

  • xml/parser/MarkupTokenizerInlines.h: Added ADVANCE_PAST_NON_NEWLINE_TO.
  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::insert): Updated since this takes an rvalue reference.
(WebCore::XMLDocumentParser::append): Removed unnecessary code to create a
SegmentedString.

  • xml/parser/XMLDocumentParser.h: Updated for above. Also fixed indentation

and initialized most data members.

  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::XMLDocumentParser): Moved most data member
initialization into the class definition.
(WebCore::XMLDocumentParser::resumeParsing): Removed code that copied a
segmented string, but converted the whole thing into a string before using it.
Now we convert to a string right away.

Source/WTF:

  • wtf/text/StringBuilder.cpp:

(WTF::StringBuilder::bufferCharacters<LChar>): Moved this here from
the header since it is only used inside the class. Also renamed from
getBufferCharacters.
(WTF::StringBuilder::bufferCharacters<UChar>): Ditto.
(WTF::StringBuilder::appendUninitializedUpconvert): Added. Helper
for the upconvert case in the 16-bit overload of StrinBuilder::append.
(WTF::StringBuilder::append): Changed to use appendUninitializedUpconvert.
(WTF::quotedJSONStringLength): Added. Used in new appendQuotedJSONString
implementation below that now correctly determines the size of what will
be appended by walking thorugh the string twice.
(WTF::appendQuotedJSONStringInternal): Moved the code that writes the
quote marks in here. Also made a few coding style tweaks.
(WTF::StringBuilder::appendQuotedJSONString): Rewrote to use a much
simpler algorithm that grows the string the same way the append function
does. The old code would use reserveCapacity in a way that was costly when
doing a lot of appends on the same string, and also allocated far too much
memory for normal use cases where characters did not need to be turned
into escape sequences.

  • wtf/text/StringBuilder.h:

(WTF::StringBuilder::append): Tweaked style a bit, fixed a bug where the
m_is8Bit field wasn't set correctly in one case, optimized the function that
adds substrings for the case where this is the first append and the substring
happens to cover the entire string. Also clarified the assertions and removed
an unneeded check from that substring overload.
(WTF::equal): Reimplemented, using equalCommon.

6:29 PM Changeset in webkit [209057] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

Generated sandbox profile is not being put in the correct Resources directory
https://bugs.webkit.org/show_bug.cgi?id=165126

Reviewed by Tim Horton.

  • WebKit2.xcodeproj/project.pbxproj: Copy the generated file to the 'PlugInSandboxProfiles'

sub-directory.

6:24 PM Changeset in webkit [209056] by matthew_hanson@apple.com
  • 5 edits
    1 move in tags/Safari-603.1.13.1/Source/WebKit2

Roll out r208589. rdar://problem/29277451

6:20 PM Changeset in webkit [209055] by matthew_hanson@apple.com
  • 5 edits
    1 move in trunk/Source/WebKit2

Roll r208589 back in. The rollout will be on the Safari-603.1.13.1 tag. rdar://problem/29277451

6:16 PM Changeset in webkit [209054] by matthew_hanson@apple.com
  • 5 edits
    1 move in trunk/Source/WebKit2

Roll out r208589. rdar://problem/29277451

5:53 PM Changeset in webkit [209053] by bshafiei@apple.com
  • 5 edits in branches/safari-602.3.12.0-branch/Source

Versioning.

5:32 PM Changeset in webkit [209052] by bshafiei@apple.com
  • 2 edits in tags/Safari-603.1.13.1/Source/WebKit2

Roll out r208835. rdar://problem/29277451

5:26 PM Changeset in webkit [209051] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.3.12.0.1

New tag.

5:08 PM Changeset in webkit [209050] by Chris Dumez
  • 4 edits in trunk/Source/WebCore

[iOS] Use UIKit SPI to force popover presentation style on iPhone for html validation popovers
https://bugs.webkit.org/show_bug.cgi?id=165107

Reviewed by Simon Fraser.

Use UIKit SPI to force popover presentation style on iPhone for html validation
popovers as this results in simpler code and achieves the same behavior.

  • platform/ValidationBubble.h:
  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::ValidationBubble::setAnchorRect):
(-[WebValidationBubbleDelegate adaptivePresentationStyleForPresentationController:traitCollection:]): Deleted.

  • platform/spi/ios/UIKitSPI.h:
5:08 PM Changeset in webkit [209049] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[Mac] Clicking on an HTML validation bubble should dismiss it
https://bugs.webkit.org/show_bug.cgi?id=165117
<rdar://problem/29409837>

Reviewed by Simon Fraser.

Clicking on an HTML validation bubble should dismiss it. It previously
did nothing.

No new tests, this is not easily testable as EventSender.keyDown() sends
the event to the view, not to a particular screen location.

  • platform/mac/ValidationBubbleMac.mm:

(-[WebValidationPopover mouseDown:]):
(WebCore::ValidationBubble::ValidationBubble):

5:03 PM Changeset in webkit [209048] by weinig@apple.com
  • 4 edits in trunk/Source/WebCore

Make CanvasRenderingContext2D use WebIDL unions / Variants for createPattern and drawImage
https://bugs.webkit.org/show_bug.cgi?id=165086

Reviewed by Darin Adler.

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::size):
Add overloads of size for each type of CanvasSource.
(WebCore::CanvasRenderingContext2D::drawImage):
(WebCore::CanvasRenderingContext2D::createPattern):

  • html/canvas/CanvasRenderingContext2D.h:
  • html/canvas/CanvasRenderingContext2D.idl:

Use variants to reduce code duplication and match spec language in drawImage and createPattern.

4:23 PM Changeset in webkit [209047] by bshafiei@apple.com
  • 2 edits in branches/safari-602.3.12.0-branch/Source/WebCore

Merge r209045. rdar://problem/29404778

4:22 PM Changeset in webkit [209046] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r209045. rdar://problem/29404778

4:14 PM Changeset in webkit [209045] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Blacklist Netflix for TouchBar support
https://bugs.webkit.org/show_bug.cgi?id=165104
-and corresponding-
rdar://problem/29404778

Reviewed by Tim Horton.

This patch moves the algorithm to
bestMediaElementForShowingPlaybackControlsManager() so that Now Playing can also
use it.

  • html/HTMLMediaElement.cpp:

(WebCore::needsPlaybackControlsManagerQuirk):
(WebCore::HTMLMediaElement::bestMediaElementForShowingPlaybackControlsManager):
(WebCore::HTMLMediaElement::updatePlaybackControlsManager):

3:58 PM Changeset in webkit [209044] by bshafiei@apple.com
  • 2 edits in branches/safari-602.3.12.0-branch/Source/WebCore

Merge r209013. rdar://problem/29404778

3:56 PM Changeset in webkit [209043] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/Intl* files.
https://bugs.webkit.org/show_bug.cgi?id=165014

Reviewed by Saam Barati.

  • runtime/IntlCollatorConstructor.cpp:

(JSC::constructIntlCollator):
(JSC::IntlCollatorConstructorFuncSupportedLocalesOf):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorPrototypeFuncResolvedOptions):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::constructIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatFuncFormatDateTime):
(JSC::IntlDateTimeFormatPrototypeGetterFormat):
(JSC::IntlDateTimeFormatPrototypeFuncResolvedOptions):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::constructIntlNumberFormat):
(JSC::IntlNumberFormatConstructorFuncSupportedLocalesOf):

  • runtime/IntlNumberFormatPrototype.cpp:

(JSC::IntlNumberFormatFuncFormatNumber):
(JSC::IntlNumberFormatPrototypeGetterFormat):
(JSC::IntlNumberFormatPrototypeFuncResolvedOptions):

  • runtime/IntlObject.cpp:

(JSC::lookupSupportedLocales):

  • runtime/IntlObjectInlines.h:

(JSC::constructIntlInstanceWithWorkaroundForLegacyIntlConstructor):

3:56 PM Changeset in webkit [209042] by bshafiei@apple.com
  • 5 edits in branches/safari-602.3.12.0-branch/Source

Versioning.

3:55 PM Changeset in webkit [209041] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.13.1

Merge r208906. rdar://problem/29324149

3:55 PM Changeset in webkit [209040] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13.1/Source/WebKit/mac

Merge r208877. rdar://problem/29326204

3:55 PM Changeset in webkit [209039] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.13.1/Source

Versioning.

3:54 PM Changeset in webkit [209038] by bshafiei@apple.com
  • 1 copy in branches/safari-602.3.12.0-branch

New Branch.

3:53 PM Changeset in webkit [209037] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in IteratorOperations.h.
https://bugs.webkit.org/show_bug.cgi?id=165015

Reviewed by Saam Barati.

  • runtime/IteratorOperations.h:

(JSC::forEachInIterable):

3:50 PM Changeset in webkit [209036] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSArray* files.
https://bugs.webkit.org/show_bug.cgi?id=165016

Reviewed by Saam Barati.

  • runtime/JSArray.cpp:

(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::put):
(JSC::JSArray::setLength):
(JSC::JSArray::pop):
(JSC::JSArray::push):
(JSC::JSArray::unshiftCountWithAnyIndexingType):

  • runtime/JSArrayBuffer.cpp:

(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):

  • runtime/JSArrayInlines.h:

(JSC::getLength):
(JSC::toLength):

3:42 PM Changeset in webkit [209035] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.13.1

New tag.

3:40 PM Changeset in webkit [209034] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSDataView.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165020

Reviewed by Saam Barati.

  • runtime/JSDataView.cpp:

(JSC::JSDataView::put):

3:38 PM Changeset in webkit [209033] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-603.1.13.1

Remove tag.

3:38 PM Changeset in webkit [209032] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSFunction.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165021

Reviewed by Saam Barati.

  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

3:30 PM Changeset in webkit [209031] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/JSGenericTypedArrayView* files.
https://bugs.webkit.org/show_bug.cgi?id=165022

Reviewed by Saam Barati.

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewFromIterator):
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayView):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::set):
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncJoin):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):

3:23 PM Changeset in webkit [209030] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/Operations.cpp/h.
https://bugs.webkit.org/show_bug.cgi?id=165046

Reviewed by Saam Barati.

Also switched to using returning { } instead of JSValue().

  • runtime/Operations.cpp:

(JSC::jsAddSlowCase):
(JSC::jsIsObjectTypeOrNull):

  • runtime/Operations.h:

(JSC::jsStringFromRegisterArray):
(JSC::jsStringFromArguments):
(JSC::jsLess):
(JSC::jsLessEq):

3:17 PM Changeset in webkit [209029] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit2

Merge r208835. rdar://problem/29277451

3:14 PM Changeset in webkit [209028] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSScope.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165047

Reviewed by Saam Barati.

  • runtime/JSScope.cpp:

(JSC::JSScope::resolve):

3:07 PM Changeset in webkit [209027] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in JSTypedArrayViewPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165049

Reviewed by Saam Barati.

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::typedArrayViewPrivateFuncSort):
(JSC::typedArrayViewProtoFuncSet):
(JSC::typedArrayViewProtoFuncCopyWithin):
(JSC::typedArrayViewProtoFuncIncludes):
(JSC::typedArrayViewProtoFuncLastIndexOf):
(JSC::typedArrayViewProtoFuncIndexOf):
(JSC::typedArrayViewProtoFuncJoin):
(JSC::typedArrayViewProtoGetterFuncBuffer):
(JSC::typedArrayViewProtoGetterFuncLength):
(JSC::typedArrayViewProtoGetterFuncByteLength):
(JSC::typedArrayViewProtoGetterFuncByteOffset):
(JSC::typedArrayViewProtoFuncReverse):
(JSC::typedArrayViewPrivateFuncSubarrayCreate):
(JSC::typedArrayViewProtoFuncSlice):

3:00 PM Changeset in webkit [209026] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/Map* files.
https://bugs.webkit.org/show_bug.cgi?id=165050

Reviewed by Saam Barati.

  • runtime/MapConstructor.cpp:

(JSC::constructMap):

  • runtime/MapIteratorPrototype.cpp:

(JSC::MapIteratorPrototypeFuncNext):

  • runtime/MapPrototype.cpp:

(JSC::privateFuncMapIteratorNext):

2:56 PM Changeset in webkit [209025] by mark.lam@apple.com
  • 8 edits in trunk/Source

Fix exception scope verification failures in more miscellaneous files.
https://bugs.webkit.org/show_bug.cgi?id=165102

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • wasm/js/WebAssemblyInstanceConstructor.cpp:

(JSC::constructJSWebAssemblyInstance):

Source/WebCore:

No new tests because these are fixes to failures detected by existing tests when
exception check verification is enabled.

  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::toJS):

  • bindings/js/JSCommandLineAPIHostCustom.cpp:

(WebCore::getJSListenerFunctions):

  • bindings/js/JSCryptoKeySerializationJWK.cpp:

(WebCore::buildJSONForRSAComponents):
(WebCore::addUsagesToJSON):

  • bindings/js/JSDOMBinding.h:

(WebCore::toJS):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::put):

2:41 PM Changeset in webkit [209024] by Ryan Haddad
  • 17 edits
    2 deletes in trunk

Unreviewed, rolling out r209008.

This change appears to have caused two fast/mediastrem
LayoutTests to fail.

Reverted changeset:

"[MediaStream] Don't request user permission for a device if
it has already been granted in the current browsing context"
https://bugs.webkit.org/show_bug.cgi?id=164760
http://trac.webkit.org/changeset/209008

2:39 PM Changeset in webkit [209023] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/Weak* files.
https://bugs.webkit.org/show_bug.cgi?id=165096

Reviewed by Geoffrey Garen.

  • runtime/WeakMapConstructor.cpp:

(JSC::constructWeakMap):

  • runtime/WeakMapPrototype.cpp:

(JSC::protoFuncWeakMapSet):

  • runtime/WeakSetConstructor.cpp:

(JSC::constructWeakSet):

  • runtime/WeakSetPrototype.cpp:

(JSC::protoFuncWeakSetAdd):

2:35 PM Changeset in webkit [209022] by mark.lam@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in runtime/String* files.
https://bugs.webkit.org/show_bug.cgi?id=165067

Reviewed by Saam Barati.

  • runtime/StringConstructor.cpp:

(JSC::stringFromCodePoint):
(JSC::constructWithStringConstructor):

  • runtime/StringObject.cpp:

(JSC::StringObject::put):
(JSC::StringObject::putByIndex):
(JSC::StringObject::defineOwnProperty):

  • runtime/StringPrototype.cpp:

(JSC::jsSpliceSubstrings):
(JSC::jsSpliceSubstringsWithSeparators):
(JSC::replaceUsingRegExpSearch):
(JSC::replaceUsingStringSearch):
(JSC::repeatCharacter):
(JSC::replace):
(JSC::stringProtoFuncReplaceUsingStringSearch):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCodePointAt):
(JSC::stringProtoFuncConcat):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncLastIndexOf):
(JSC::splitStringByOneCharacterImpl):
(JSC::stringProtoFuncSplitFast):
(JSC::stringProtoFuncSubstring):
(JSC::stringProtoFuncToLowerCase):
(JSC::stringProtoFuncToUpperCase):
(JSC::toLocaleCase):
(JSC::trimString):
(JSC::stringProtoFuncIncludes):
(JSC::builtinStringIncludesInternal):
(JSC::stringProtoFuncIterator):
(JSC::normalize):
(JSC::stringProtoFuncNormalize):

2:30 PM Changeset in webkit [209021] by hyatt@apple.com
  • 4 edits in trunk/Source/WebCore

[CSS Parser] Fix bugs in the @supports parser
https://bugs.webkit.org/show_bug.cgi?id=165115

Reviewed by Zalan Bujtas.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
Clean up the display property to match the old parser to ensure
that @supports conditions on display are the same.

  • css/parser/CSSSupportsParser.cpp:

(WebCore::CSSSupportsParser::consumeCondition):
(WebCore::CSSSupportsParser::consumeNegation):
(WebCore::CSSSupportsParser::consumeConditionInParenthesis):

  • css/parser/CSSSupportsParser.h:

What follows are all bugs in Blink that need to be fixed to pass our
tests.

Fix the supports parser to allow the whitespace after not/or/and to
be optional. Allow the whitespace following parenthetical conditions
to be optional.

With whitespace being optional, this means that "not(" will parse
as a FunctionToken type, as will "or(" and "and(". Handle this situation
by checking for FunctionToken along with IdentToken and parameterizing
consumeConditionInParenthesis to do the right thing when it starts with
a FunctionToken instead of an IdentToken.

Fix the general enclosure FunctionToken for forward compatibility to require that
the function still be enclosed within parentheses.

2:29 PM Changeset in webkit [209020] by mark.lam@apple.com
  • 5 edits in trunk/Source

Fix exception scope verification failures in ObjectConstructor.cpp and ObjectPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165051

Reviewed by Saam Barati.

Source/JavaScriptCore:

Also,

  1. Replaced returning JSValue() with returning { }.
  2. Replaced uses of exec->propertyNames() with vm.propertyNames.
  • runtime/ObjectConstructor.cpp:

(JSC::constructObject):
(JSC::objectConstructorGetPrototypeOf):
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
(JSC::objectConstructorGetOwnPropertyNames):
(JSC::objectConstructorGetOwnPropertySymbols):
(JSC::objectConstructorKeys):
(JSC::ownEnumerablePropertyKeys):
(JSC::toPropertyDescriptor):
(JSC::defineProperties):
(JSC::objectConstructorDefineProperties):
(JSC::objectConstructorCreate):
(JSC::setIntegrityLevel):
(JSC::objectConstructorSeal):
(JSC::objectConstructorPreventExtensions):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::ownPropertyKeys):

  • runtime/ObjectPrototype.cpp:

(JSC::objectProtoFuncValueOf):
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncIsPrototypeOf):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):
(JSC::objectProtoFuncToLocaleString):
(JSC::objectProtoFuncToString):

Source/WebCore:

No new tests because this is covered by the existing test
http/tests/security/cross-frame-access-object-prototype.html with the help of a
new ASSERT in ObjectPrototype.cpp.

Fixed jsDOMWindowGetOwnPropertySlotRestrictedAccess() to return false when it
throws an exception.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

2:24 PM Changeset in webkit [209019] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Obvious change in saturation/color when swiping to a previously visited page
https://bugs.webkit.org/show_bug.cgi?id=165112
<rdar://problem/29257229>

Reviewed by Simon Fraser.

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::createFromImage):
IOSurface::createFromImage should take into account the colorspace of the
originating image, instead of just hardcoding sRGB.

Otherwise, on a non-sRGB display, the display-space snapshot that we take
for back-forward swipe is converted to sRGB, then the colorspace information
is lost (without a way to maintain it inside the IOSurface), and displayed
as layer contents interpreted as display space (instead of sRGB).

2:21 PM Changeset in webkit [209018] by mark.lam@apple.com
  • 9 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in miscellaneous files.
https://bugs.webkit.org/show_bug.cgi?id=165055

Reviewed by Saam Barati.

  • runtime/MathObject.cpp:

(JSC::mathProtoFuncIMul):

  • runtime/ModuleLoaderPrototype.cpp:

(JSC::moduleLoaderPrototypeParseModule):
(JSC::moduleLoaderPrototypeRequestedModules):

  • runtime/NativeErrorConstructor.cpp:

(JSC::Interpreter::constructWithNativeErrorConstructor):

  • runtime/NumberConstructor.cpp:

(JSC::constructWithNumberConstructor):

  • runtime/SetConstructor.cpp:

(JSC::constructSet):

  • runtime/SetIteratorPrototype.cpp:

(JSC::SetIteratorPrototypeFuncNext):

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayEntry::put):

  • runtime/TemplateRegistry.cpp:

(JSC::TemplateRegistry::getTemplateObject):

2:19 PM Changeset in webkit [209017] by matthew_hanson@apple.com
  • 2 edits in branches/safari-602-branch/Source/WebCore

Merge r209013. rdar://problem/29404778

2:16 PM Changeset in webkit [209016] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix crashes on Yosemite after r209009

NSTextField's maximumNumberOfLines was introduced in ElCapitan so
disable it at compile-time on previous OSes for now.

  • platform/mac/ValidationBubbleMac.mm:

(WebCore::ValidationBubble::ValidationBubble):

2:13 PM Changeset in webkit [209015] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ReflectObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=165066

Reviewed by Saam Barati.

  • runtime/ReflectObject.cpp:

(JSC::reflectObjectConstruct):
(JSC::reflectObjectDefineProperty):
(JSC::reflectObjectEnumerate):
(JSC::reflectObjectGet):
(JSC::reflectObjectGetOwnPropertyDescriptor):
(JSC::reflectObjectGetPrototypeOf):
(JSC::reflectObjectOwnKeys):
(JSC::reflectObjectSet):

1:57 PM Changeset in webkit [209014] by Keith Rollin
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r208607.

The actual changes aren't inline with what was requested.

Reverted changeset:

"Reduce number of platformMemoryUsage calls"
https://bugs.webkit.org/show_bug.cgi?id=164375
http://trac.webkit.org/changeset/208607

1:42 PM Changeset in webkit [209013] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Blacklist Netflix for TouchBar support
https://bugs.webkit.org/show_bug.cgi?id=165104
-and corresponding-
rdar://problem/29404778

Reviewed by Darin Adler.

  • html/HTMLMediaElement.cpp:

(WebCore::needsPlaybackControlsManagerQuirk):
(WebCore::HTMLMediaElement::updatePlaybackControlsManager):

1:37 PM Changeset in webkit [209012] by dbates@webkit.org
  • 3 edits in trunk/Tools

Teach webkitpy how to read CSSProperties.json r209001
https://bugs.webkit.org/show_bug.cgi?id=165108

Reviewed by Simon Fraser.

Fix webkitpy logic so that it can read CSS property names from CSSProperties.json following r209001.

Following r209001 CSSPropertyNames.in no longer exists as it was replaced with CSSProperties.json.
We need to modify the webkitpy machinery that processed CSSPropertyNames.in to process CSSProperties.json.

  • Scripts/webkitpy/w3c/test_converter.py:

(_W3CTestConverter.init): Make self._css_property_file and self._css_property_value_file local
variables as it is unnecessary for them to be instance variables. Call read_webkit_prefixed_css_property_list()
to read the property names from file CSSProperties.json. Call legacy_read_webkit_prefixed_css_property_list() to
read CSS keyword values from CSSValueKeywords.in.
(_W3CTestConverter.read_webkit_prefixed_css_property_list): Added.
(_W3CTestConverter):
(_W3CTestConverter.legacy_read_webkit_prefixed_css_property_list): Renamed from read_webkit_prefixed_css_property_list.

  • Scripts/webkitpy/w3c/test_importer_unittest.py:

(TestImporterTest.test_harnesslinks_conversion): Substitute CSSProperties.json for CSSPropertyNames.in.

1:26 PM Changeset in webkit [209011] by mark.lam@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ArrayConstructor.cpp and ArrayPrototype.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164972

Reviewed by Geoffrey Garen.

  • runtime/ArrayConstructor.cpp:

(JSC::constructArrayWithSizeQuirk):

  • runtime/ArrayPrototype.cpp:

(JSC::getProperty):
(JSC::putLength):
(JSC::speciesWatchpointsValid):
(JSC::speciesConstructArray):
(JSC::shift):
(JSC::unshift):
(JSC::arrayProtoFuncToString):
(JSC::arrayProtoFuncToLocaleString):
(JSC::slowJoin):
(JSC::fastJoin):
(JSC::arrayProtoFuncJoin):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncPush):
(JSC::arrayProtoFuncReverse):
(JSC::arrayProtoFuncShift):
(JSC::arrayProtoFuncSlice):
(JSC::arrayProtoFuncSplice):
(JSC::arrayProtoFuncUnShift):
(JSC::arrayProtoFuncIndexOf):
(JSC::arrayProtoFuncLastIndexOf):
(JSC::concatAppendOne):
(JSC::arrayProtoPrivateFuncConcatMemcpy):
(JSC::ArrayPrototype::attemptToInitializeSpeciesWatchpoint):

12:46 PM Changeset in webkit [209010] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebKit2

Support for HTML Media Capture API
https://bugs.webkit.org/show_bug.cgi?id=43239

Patch by Andrew Gold <agold@apple.com> on 2016-11-28
Reviewed by Tim Horton.

In order to enable media capture on iOS, we must first use the AVFoundation API to
check/request capture permission from the user for Safari. Then, Safari must request
permission on behalf of the webpage to use the capture devices. Additionally, Safari
must present UI when the capture is taking place, so WebKit needs to notify the client
of a capture session beginning and ending. To do this, we added four methods to
WKUIDelegatePrivate to request permission from the user, check for permissions, notify
that a capture session has begun, and notify that a capture session has ended. Additionally,
we added a private method to WKWebView that allows the client to stop a capture session.

  • UIProcess/API/APIUIClient.h:

(API::UIClient::didBeginCaptureSession): Notifies the client of a capture session beginning.
(API::UIClient::didEndCaptureSession): Notifies the client of a capture session ending.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added new delegate methods to request permission,

check for permission, notify of a capture session beginning, and notify of a capture session
ending.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _stopMediaCapture]): Cancels a media capture session.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate): Added the new delegate methods.
(WebKit::UIDelegate::UIClient::decidePolicyForUserMediaPermissionRequest):
First checks if the user has authorized the client application access capture devices,
then uses the WKUIDelegate to request permission for a site from the user.
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin): Checks the client
for permission to access capture devices.
(WebKit::UIDelegate::UIClient::didBeginCaptureSession): Notifies the client of a capture
session beginning.
(WebKit::UIDelegate::UIClient::didEndCaptureSession): Notifies the client of a capture
session ending.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange): Calls UIDelegate method to notify the
client of a capture session beginning/ending.

12:45 PM Changeset in webkit [209009] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Limit HTML Form validation popovers to 4 lines
https://bugs.webkit.org/show_bug.cgi?id=165098
<rdar://problem/29403286>

Reviewed by Darin Adler.

Limit HTML Form validation popovers to 4 lines as per recent feedback.

  • platform/ios/ValidationBubbleIOS.mm:

(WebCore::ValidationBubble::ValidationBubble):

  • platform/mac/ValidationBubbleMac.mm:

(WebCore::ValidationBubble::ValidationBubble):

12:45 PM Changeset in webkit [209008] by eric.carlson@apple.com
  • 17 edits
    2 adds in trunk

[MediaStream] Don't request user permission for a device if it has already been granted in the current browsing context
https://bugs.webkit.org/show_bug.cgi?id=164760
Source/WebKit2:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::FrameAuthorizationState::FrameAuthorizationState):
(WebKit::FrameAuthorizationState::hasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::setHasPermissionToUseCaptureDevice):
(WebKit::FrameAuthorizationState::reset):
(WebKit::FrameAuthorizationState::securityOriginsAreEqual):
(WebKit::UserMediaPermissionRequestManagerProxy::stateForRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::invalidateRequests):
(WebKit::UserMediaPermissionRequestManagerProxy::createRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasGranted):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

(WebKit::FrameAuthorizationState::~FrameAuthorizationState):
(WebKit::FrameAuthorizationState::frameID):

  • UIProcess/UserMediaPermissionRequestProxy.cpp:

(WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):

  • UIProcess/UserMediaPermissionRequestProxy.h:

(WebKit::UserMediaPermissionRequestProxy::create):
(WebKit::UserMediaPermissionRequestProxy::frameID):
(WebKit::UserMediaPermissionRequestProxy::userMediaDocumentSecurityOrigin):
(WebKit::UserMediaPermissionRequestProxy::topLevelDocumentSecurityOrigin):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didCommitLoadForFrame):

  • WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:

(WebKit::UserMediaPermissionRequestManager::removeMediaRequestFromMaps):

Tools:

<rdar://problem/29261266>

Reviewed by Youenn Fablet.

Allow scripts to determine the number of times the user has been prompted for capture device access.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::setUserMediaPersistentPermissionForOrigin):
(WTR::InjectedBundle::userMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::resetUserMediaPermissionRequestCountForOrigin):
(WTR::InjectedBundle::setUserMediaPermissionForOrigin): Deleted.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setUserMediaPersistentPermissionForOrigin):
(WTR::TestRunner::userMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestRunner::setUserMediaPermissionForOrigin): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::OriginSettings::incrementRequestCount):
(WTR::OriginSettings::resetRequestCount):
(WTR::OriginSettings::requestCount):
(WTR::TestController::saltForOrigin):
(WTR::TestController::setUserMediaPersistentPermissionForOrigin):
(WTR::TestController::handleCheckOfUserMediaPermissionForOrigin):
(WTR::TestController::settingsForOrigin):
(WTR::TestController::userMediaPermissionRequestCountForOrigin):
(WTR::TestController::resetUserMediaPermissionRequestCountForOrigin):
(WTR::TestController::decidePolicyForUserMediaPermissionRequestIfPossible):
(WTR::TestController::setUserMediaPermissionForOrigin): Deleted.

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Reviewed by Youenn Fablet.

  • fast/mediastream/MediaDevices-getUserMedia-expected.txt:
  • fast/mediastream/MediaDevices-getUserMedia.html:
12:44 PM Changeset in webkit [209007] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in LLIntSlowPaths.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164969

Reviewed by Geoffrey Garen.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::getByVal):
(JSC::LLInt::setUpCall):
(JSC::LLInt::varargsSetup):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

12:28 PM Changeset in webkit [209006] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Filters and Reflections Fixes
https://bugs.webkit.org/show_bug.cgi?id=165103

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeReflect):
Support the "none" keyword for box-reflect.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
Don't rely on range checking, since invert isn't grouped with the other
function values. Actually check every keyword.

12:27 PM Changeset in webkit [209005] by Brent Fulgham
  • 3 edits in trunk/Source/WebCore

ImageData does not match specification
https://bugs.webkit.org/show_bug.cgi?id=164663

Reviewed by Simon Fraser.

The W3C specification https://www.w3.org/TR/2dcontext/ clearly states that
the width and height attributes of the ImageData type should be unsigned.
Our current implementation has signed integer values.

In practice, we have enforced the unsigned requirement by throwing a TypeError
if you attempt to construct an ImageData with negative width or height.

This change simply updates the IDL and impelemntation to match the spec.

Test coverage is already provided by fast/canvas/canvas-imageData.html

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readTerminal): Serialize as uint32_t values.

  • html/ImageData.idl: Revise width and height to be unsigned long.
12:18 PM Changeset in webkit [209004] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.13.1

New tag.

11:55 AM Changeset in webkit [209003] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] flex-basis should be pixel units not percentages.
https://bugs.webkit.org/show_bug.cgi?id=165100

Reviewed by Zalan Bujtas.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::consumeFlex):

11:52 AM Changeset in webkit [209002] by matthew_hanson@apple.com
  • 9 edits in tags/Safari-603.1.13

Roll back the Safari-603.1.13 tag to r208793, which is the revision that the tag was created in.

11:11 AM Changeset in webkit [209001] by dbates@webkit.org
  • 5 edits
    1 add
    1 delete in trunk/Source/WebCore

Replace CSSPropertyNames.in with a JSON file
https://bugs.webkit.org/show_bug.cgi?id=164691

Reviewed by Simon Fraser.

Convert CSSPropertyNames.in to a structured JSON file. This is the first step towards
exposing a CSS feature status dashboard and generating more of the boilerplate code
for a CSS property.

A side effect of this change is that makeprop.pl no longer detects duplicate CSS property
definitions. We will look to bring such duplication detection back in a subsequent
commit.

  • CMakeLists.txt: Substitute CSSProperties.json for CSSPropertyNames.in and update the

invocation of makeprop.pl as we no longer need to pass the bindings/scripts/preprocessor.pm
Perl module. Makeprop.pl supports conditional CSS properties and values without the need
to preprocess CSSProperties.json using the C preprocessor.

  • DerivedSources.make: Ditto. Pass WTF_PLATFORM_IOS to makeprop.pl when building for iOS

as we no longer make use of bindings/scripts/preprocessor.pm.

  • css/CSSProperties.json: Added.
  • css/CSSPropertyNames.in: Removed.
  • css/StyleResolver.cpp: Remove variable lastHighPriorityProperty as we now generate it.
  • css/makeprop.pl: Extracted the input file name, now CSSProperties.json, into a global variable

and referenced this variable throughout this script instead of hardcoding the input file name at
each call site. Updated code to handle CSS longhand names being encoded in a JSON array as opposed
to a string of '|'-separated values. I added a FIXME comment to do the same for the codegen property
"custom". Fixed Perl uninitialized variable warnings when die()-ing with error "Unknown CSS property
used in all shorthand ..." or "Unknown CSS property used in longhands ...".
(isPropertyEnabled): Added. Determine whether code should be generated for a property.
(addProperty): Added.
(sortByDescendingPriorityAndName): Added.
(getScopeForFunction): Lowercase option names so that we can use a consistent case throughout
the JSON file.
(getNameForMethods): Ditto.
(generateColorValueSetter):
(generateAnimationPropertyInitialValueSetter): Ditto.
(generateAnimationPropertyInheritValueSetter): Ditto.
(generateFillLayerPropertyInitialValueSetter): Ditto.
(generateFillLayerPropertyInheritValueSetter): Ditto.
(generateSetValueStatement): Ditto.
(generateInitialValueSetter): Ditto.
(generateInheritValueSetter): Ditto.
(generateValueSetter): Ditto.

10:28 AM Changeset in webkit [209000] by hyatt@apple.com
  • 3 edits in trunk/Source/WebCore

[CSS Parser] Support -webkit-animation-trigger
https://bugs.webkit.org/show_bug.cgi?id=165095

Reviewed by Zalan Bujtas.

  • css/CSSValueKeywords.in:
  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeWebkitAnimationTrigger):
(WebCore::consumeAnimationValue):
(WebCore::CSSPropertyParser::parseSingleValue):

9:22 AM Changeset in webkit [208999] by jer.noble@apple.com
  • 4 edits
    39 adds in trunk

Add some performance tests for various aspects of media loading and playback.
https://bugs.webkit.org/show_bug.cgi?id=164977

Reviewed by Darin Adler.

PerformanceTests:

Add new tests for a few aspects of media playback; namely: how quickly media elements fire
the "canplaythrough" event when all data is immediately available, how quickly HLS playback
switches resolutions, and at what playback rate MSE-backed video can play without dropping
frames. Skip these tests by default, as they're not runnable on all ports, and they require
a webserver (run-webkit-httpd) to complete on macOS.

  • Media/HLSCanPlayThrough.html: Added.
  • Media/HLSGearChange.html: Added.
  • Media/MSECanPlayThrough.html: Added.
  • Media/MSEPlaybackRate.html: Added.
  • Media/StandardCanPlayThrough.html: Added.
  • Media/hls/1080p/iframe_index.m3u8: Added.
  • Media/hls/1080p/prog_index.m3u8: Added.
  • Media/hls/1080p/test.ts: Added.
  • Media/hls/480p/iframe_index.m3u8: Added.
  • Media/hls/480p/prog_index.m3u8: Added.
  • Media/hls/480p/test.ts: Added.
  • Media/hls/720p/iframe_index.m3u8: Added.
  • Media/hls/720p/prog_index.m3u8: Added.
  • Media/hls/720p/test.ts: Added.
  • Media/hls/720p/test.ts.back: Added.
  • Media/hls/index.m3u8: Added.
  • Media/media-source-loader.js: Added.

(MediaSourceLoader):
(MediaSourceLoader.prototype.loadManifest):
(MediaSourceLoader.prototype.loadManifestSucceeded):
(MediaSourceLoader.prototype.loadManifestFailed):
(MediaSourceLoader.prototype.loadMediaData):
(MediaSourceLoader.prototype.loadMediaDataSucceeded):
(MediaSourceLoader.prototype.loadMediaDataFailed):
(MediaSourceLoader.prototype.get type):
(MediaSourceLoader.prototype.get duration):
(MediaSourceLoader.prototype.get initSegment):
(MediaSourceLoader.prototype.get mediaSegmentsLength):
(MediaSourceLoader.prototype.mediaSegments):
(MediaSourceLoader.prototype.get everyMediaSegment):

  • Media/test-fragmented-video.json: Added.
  • Media/test-fragmented-video.mp4: Added.
  • Media/test.mp4: Added.
  • Skipped:

Tools:

Allow callers to pass in extra alias/directory pairs to run-webkit-httpd.

  • Scripts/run-webkit-httpd:

(parse_args):
(main):

7:58 AM Changeset in webkit [208998] by Antti Koivisto
  • 11 edits in trunk

Remove FIRST_LINE_INHERITED fake pseudo style
https://bugs.webkit.org/show_bug.cgi?id=165071

Reviewed by Andreas Kling.

Source/WebCore:

These are create during layout an then cached to the RenderStyle. Cache computed first line style to
RenderObject rare data instead, avoiding style mutation an other confusing messiness.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::RenderElement):
(WebCore::RenderElement::computeFirstLineStyle):
(WebCore::RenderElement::firstLineStyle):

Cache the first line style.

(WebCore::RenderElement::invalidateCachedFirstLineStyle):
(WebCore::RenderElement::styleWillChange):

Invalidate subtree if we have cached first line style.

(WebCore::RenderElement::getUncachedPseudoStyle):
(WebCore::RenderElement::uncachedFirstLineStyle): Deleted.
(WebCore::RenderElement::cachedFirstLineStyle): Deleted.

  • rendering/RenderElement.h:
  • rendering/RenderObject.cpp:

(WebCore::RenderObject::rareDataMap):
(WebCore::RenderObject::rareData):
(WebCore::RenderObject::ensureRareData):

  • rendering/RenderObject.h:

Stop copying rare data objects.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::changeRequiresLayout):

Use the normal mechanism for invalidating layout for first-line instead of a hack in pseudoStyleCacheIsInvalid.

  • rendering/style/RenderStyleConstants.h:
  • style/RenderTreeUpdater.cpp:

(WebCore::pseudoStyleCacheIsInvalid):

Simplify.

LayoutTests:

Expand the test case a bit.

  • fast/css/pseudo-cache-stale-expected.html:
  • fast/css/pseudo-cache-stale.html:
7:00 AM Changeset in webkit [208997] by magomez@igalia.com
  • 11 edits in trunk/Source/WebCore

[GTK] Dramatic increase on memory usage since 2.14.x
https://bugs.webkit.org/show_bug.cgi?id=164049

Reviewed by Žan Doberšek.

Use OpenGL version 3.2 Core for rendering when available.
Update some operations that have changed when using 3.2 Core:

  • Use glGetStringi to get the extensions list.
  • Do not use GL_POINT_SPRITE.
  • Always use a VAO when rendering.
  • Use a GLSL 1.50 compatible shader.

No new tests needed.

  • platform/graphics/GLContext.cpp:

(WebCore::GLContext::version):
Add a method to get OpenGL version we are using.

  • platform/graphics/GLContext.h:

Ditto.

  • platform/graphics/GraphicsContext3D.h:

Add an attribute to store the VAO used for rendering.

  • platform/graphics/OpenGLShims.cpp:

(WebCore::initializeOpenGLShims):
Add glGetStringi to the list of functions.

  • platform/graphics/OpenGLShims.h:

Ditto.

  • platform/graphics/cairo/GraphicsContext3DCairo.cpp:

(WebCore::GraphicsContext3D::GraphicsContext3D):
Set appropriate output to the shader compiler and initalize the VAO if needed.
(WebCore::GraphicsContext3D::~GraphicsContext3D):
Delete the VAO if needed.
(WebCore::GraphicsContext3D::getExtensions):
Use glGetExtensionsi for OpenGL versions >= 3.2.

  • platform/graphics/glx/GLContextGLX.cpp:

(WebCore::hasGLXARBCreateContextExtension):
Check whether the GLX_ARB_create_context extension is available.
(WebCore::GLContextGLX::createWindowContext):
Use glXCreateContextAttribsARB() if possible to request an OpenGL 3.2 context.
(WebCore::GLContextGLX::createPbufferContext):
Ditto.

  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
Enable glGetStringi for GTK.

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

Do not use default getExtensions() method for GTK.

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

Ditto.

5:53 AM Changeset in webkit [208996] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] WebCrypto tests are failing.
https://bugs.webkit.org/show_bug.cgi?id=165090

Unreviewed test gardening.

  • platform/win/TestExpectations:
3:28 AM Changeset in webkit [208995] by svillar@igalia.com
  • 3 edits in trunk/Source/WebCore

[css-grid] Move attributes from RenderGrid to the new Grid class
https://bugs.webkit.org/show_bug.cgi?id=165065

Reviewed by Darin Adler.

A new class called Grid was added in 208973. This is the first of a couple of patches moving
private attributes from RenderGrid to Grid.

Apart from that this is adding a couple of new helper functions that will decouple the
existence of in-flow items from the actual data structures storing that information.

Last but not least, the Grid::insert() method does not only insert the item in the m_grid
data structure, but also stores the GridArea associated to that item, so there is no need to
do it in two different calls.

No new tests required as this is a refactoring.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::Grid::insert): Added a new parameter.
(WebCore::RenderGrid::Grid::setSmallestTracksStart):
(WebCore::RenderGrid::Grid::smallestTrackStart):
(WebCore::RenderGrid::Grid::gridItemArea):
(WebCore::RenderGrid::Grid::setGridItemArea):
(WebCore::RenderGrid::Grid::clear): Clear the newly added attributes.
(WebCore::RenderGrid::repeatTracksSizingIfNeeded):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::RenderGrid::rawGridTrackSize):
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
(WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
(WebCore::RenderGrid::clearGrid):
(WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
(WebCore::RenderGrid::cachedGridSpan):
(WebCore::RenderGrid::cachedGridArea): Deleted.

  • rendering/RenderGrid.h:

Nov 27, 2016:

8:30 PM Changeset in webkit [208994] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline inspector/dom/getAccessibilityPropertiesForNode.html for macOS.
https://bugs.webkit.org/show_bug.cgi?id=165087

Unreviewed test gardening.

  • inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
4:10 PM Changeset in webkit [208993] by commit-queue@webkit.org
  • 3 edits
    1 delete in trunk/Source/WebCore

Remove unused DOMRequestState
https://bugs.webkit.org/show_bug.cgi?id=165085

Patch by Sam Weinig <sam@webkit.org> on 2016-11-27
Reviewed by Simon Fraser.

Remove DOMRequestState. It was unused.

  • Modules/fetch/FetchBody.cpp:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/DOMRequestState.h: Removed.
1:57 PM Changeset in webkit [208992] by dino@apple.com
  • 2 edits in trunk/Source/WebKit2

Removed a WTFLogAlways I left in with a recent commit.

  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKAccessibilitySettingsObserver _settingsDidChange:]):

10:16 AM Changeset in webkit [208991] by Csaba Osztrogonác
  • 4 edits in trunk/Source/WebCore

Fix various --minimal build issues
https://bugs.webkit.org/show_bug.cgi?id=165060

Reviewed by Darin Adler.

  • css/parser/CSSPropertyParser.cpp:
  • dom/Document.cpp:
  • loader/EmptyClients.cpp:
10:14 AM Changeset in webkit [208990] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebKit2

Fix unused-private-field build warning in WebKit2/Platform/SharedMemory.h
https://bugs.webkit.org/show_bug.cgi?id=165069

Reviewed by Darin Adler.

  • Platform/SharedMemory.h:
12:06 AM Changeset in webkit [208989] by Simon Fraser
  • 3 edits in trunk/Tools

Another fix for CMake.

  • DumpRenderTree/TestOptions.h:
  • DumpRenderTree/TestOptions.mm:
Note: See TracTimeline for information about the timeline view.