The FTP view is squished to the left
https://bugs.webkit.org/show_bug.cgi?id=128856

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-02-16
Reviewed by Andreas Kling.

* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::createBasicDocument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split compilation state between querySelector and CSS matching
https://bugs.webkit.org/show_bug.cgi?id=128869

Reviewed by Antti Koivisto.

Cleanup after recent changes:
-SelectorCompiler now has a SelectorContext defining if the code is compiled for QuerySelector
 or for ElementRuleCollector.
-Generalize m_selectorCannotMatchAnything by making it part of the FunctionType. FunctionType now
 fully represent the type of code generation and we don't rely implicitly on m_selectorFragments being
 empty.

* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::ruleMatches):

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::compileSelector):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
There is no tree marking for QuerySelector, so we can generate a simple selector
for the sibling selectors.

(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):
The code is split to make it simpler. The classic code generation has been moved
to generateSelectorChecker().
The decision on what to generate is reduced to a simple switch-case.

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
The code that was previously in compile().

(WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
We should not generate tree marking on querySelector traversal. Since the constructor
now generate a SimpleChecker, it would also be incorrect to attempt to access the checkingContext
on the stack.
We can just skip the marking entierly.

* cssjit/SelectorCompiler.h:
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):
With the changes of SelectorContext, we can no longer generate a complex checker for querySelector.
This code may come back in the future but at the moment it is useless.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
When applying style, attribute value matching should be case sensitive for SVG
https://bugs.webkit.org/show_bug.cgi?id=128882

Reviewed by Andreas Kling.

Source/WebCore: 

SelectorChecker was incorrectly matching attribute values with a case insensitve comparison
in some cases.

The choice to use case sensitive matching was taking into account the document type but not
the element type. As a result, SVG (and likely MHTML) elements were incorrectly being tested
as if they were HTML element.

With the patch, WebKit also matches the behavior of Firefox, which is great.

Tests: fast/css/case-insensitive-attribute-with-svg.html
       fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):

LayoutTests: 

* fast/css/case-insensitive-attribute-with-svg-expected.html: Added.
* fast/css/case-insensitive-attribute-with-svg.html: Added.
* fast/selectors/querySelector-case-insensitive-attribute-match-with-svg-expected.txt: Added.
* fast/selectors/querySelector-case-insensitive-attribute-match-with-svg.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@164203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Ensure that removing an iframe from the DOM tree disconnects its Frame.
<https://webkit.org/b/128889>
<rdar://problem/15671221>

Merged from Blink (patch by Adam Klein):
https://src.chromium.org/viewvc/blink?revision=156174&view=revision

Source/WebCore:

SubframeLoadingDisabler wasn't catching the case when an <iframe> was,
in its unload handler, removed and re-added to the same parent.
Fix this by using a count of SubframeLoadingDisablers that are on the
stack for a given root, rather than a simple boolean.

Test: fast/frames/reattach-in-unload.html

* html/HTMLFrameOwnerElement.h:
(WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):

LayoutTests:

* fast/frames/reattach-in-unload-expected.txt: Added.
* fast/frames/reattach-in-unload.html: Added.

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