Remove expectations for a couple tests that were marked as flaky on WK1 only,
as they don't appear to be flaky any more.

* platform/mac-wk1/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
https://bugs.webkit.org/show_bug.cgi?id=138619

Reviewed by Darin Adler.

Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
- Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
  not returning null is sufficient.
- Caching the result of innerTextElement() instead of repeatedly calling that
  virtual function.
- De-virtualizing setFormControlValueMatchesRenderer() /
  formControlValueMatchesRenderer() as these are never overridden.
- Moving the code constructing the innerTextValue from a
  TextControlInnerTextElement from innerTextValue() to a new
  innerTextValueFrom(TextControlInnerTextElement&) function and call this new
  function from setInnerTextValue() to avoid calling innerTextElement() again
  and making sure it is non-null
- Do the tree traversal from innerTextElement's firstChild instead of from
  innerTextElement. The innerTextElement is a TextControlInnerTextElement.
  Therefore, it cannot be an HTMLBRElement or a Text node.

No new tests, no behavior change.

* html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
(WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
* html/HTMLTextFormControlElement.cpp:
(WebCore::stripTrailingNewline):
(WebCore::innerTextValueFrom):
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
(WebCore::HTMLTextFormControlElement::innerTextValue):
(WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
(WebCore::finishText): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename USE(MASM_PROBE) to ENABLE(MASM_PROBE).
<https://webkit.org/b/138661>

Reviewed by Michael Saboff.

Also move the switch for enabling the use of MASM_PROBE from JavaScriptCore's
config.h to WTF's Platform.h.  This ensures that the setting is consistently
applied even when building WebCore parts as well.

Source/JavaScriptCore:

* assembler/ARMAssembler.h:
* assembler/ARMv7Assembler.h:
* assembler/MacroAssemblerARM.cpp:
* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARMv7.cpp:
* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerX86.h:
* assembler/MacroAssemblerX86Common.cpp:
* assembler/MacroAssemblerX86Common.h:
* assembler/MacroAssemblerX86_64.h:
* assembler/X86Assembler.h:
* config.h:
* jit/JITStubs.h:
* jit/JITStubsARM.h:
* jit/JITStubsARMv7.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86Common.h:
* jit/JITStubsX86_64.h:

Source/WTF:

* wtf/Platform.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Minor improvements to RenderListItem
https://bugs.webkit.org/show_bug.cgi?id=138601

Reviewed by Darin Adler.

Make several minor improvements to RenderListItem and clean up the
code a bit.

No new tests, no behavior change.

* rendering/RenderListItem.cpp:
(WebCore::isHTMLListElement):
- Rename isList to isHTMLListElement() for clarity as it checks
  for HTMLOListElement and HTMLUListElement types
- Inline the function as it is short.
- Use is<HTML*Element>() for type checking
- Update the argument to take a Node& instead of an Element*. This
  is because the argument is expected to the non-null. Also using
  looser typing here allows us to use this utility function is one
  more place, without impacting performance as
  hasTagName(HTMLQualifiedName) is defined on Node.

(WebCore::enclosingList):
- Pass the argument as a reference instead of a pointer as it is
  expected to be non-null.
- Initialize firstNode before the loop to avoid the if (!firstNode)
  check for every iteration.

(WebCore::nextListItem):
- Take an Element as second argument instead of a RenderListItem*
  and provide convenience overloads so that we don't need to do
  null checks just because some calls sites call this function
  with 2 arguments and others with 1 argument. This way, we avoid
  unnecessary null checks as most call sites already do such
  checks (or have references).
- Transform the while loop into a for loop for clarity.
- Don't traverse an Element's subtree if the Element does not have
  a renderer as it is impossible of any of its descendant to have
  a renderer (and we are looking for a specific type of renderer).

(WebCore::previousListItem):
- Pass the item argument as a reference instead of a pointer as it
  is expected to be non-null.
- Reduce the scope of the |current| so that it is now declared
  inside the loop.

(WebCore::RenderListItem::updateItemValuesForOrderedList):
(WebCore::RenderListItem::itemCountForOrderedList):
- Pass argument as a reference instead of a pointer as it was expected
  to be non-null (There was an assertion in place to make sure of it).

(WebCore::RenderListItem::calcValue):
- Use is<HTMLOListElement>() instead of hasTagName().

(WebCore::getParentOfFirstLineBox):
- Rename variables to stop using abbreviations.
- Pass arguments as references instead of pointers as they are expected
  to be non-null.
- Remove the firstChild null check before the loop as it does not
  change behavior. The loop will abort early if firstChild is null
  and we will end up returning nullptr as well.
- Use is<>() more for type checking.
- Reuse the isHTMLListElement() utility function instead of duplicating
  its code inside this function.

(WebCore::firstNonMarkerChild):
- Pass argument as a reference as it is expected to be non-null.
- Rename variable from result to child for clarity, as we are traversing
  the children.

(WebCore::RenderListItem::markerTextWithSuffix):
- Use String appending instead of StringBuilder as it simplifies the
  code a lot and should not impact performance in this case.

(WebCore::RenderListItem::explicitValueChanged):
- Restructure the code a bit to do the |listNode| null check before the
  loop, now that nextListItem() takes a reference in argument. This is
  the only call site where we didn't already know that listNode is
  non-null.

(WebCore::previousOrNextItem):
- Mark this function as inline as it is short and called repeatedly.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176032 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac-WK2 test expectations cleanup, part 1.

Put WK1 specific expectations into mac-wk1 (they used to be put in mac, and then
being overridden for wk2).
Remove expectations for tests that are no longer flaky.
Add more specific expectations to encient entries that were added in old format,
and just skipped indiscriminately.

* platform/mac-wk1/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Some platform/mac text expectation cleanup.

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generate get_by_id for bracket access with constant string subscript.
<https://webkit.org/b/138663>

Reviewed by Michael Saboff.

Transform o["f"] into o.f when generating bytecode. This allows our JIT
to inline-cache those accesses instead of always dropping out to C++.

This is surprisingly common in real-web content, less so in benchmarks.
Interestingly, Speedometer does hit the optimization quite a bit.

* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176035 268f45cc-cd09-0410-ab3c-d52691b4dbfc