[CSS Grid Layout] Add parsing for grid-{start|before}
https://bugs.webkit.org/show_bug.cgi?id=110988

Reviewed by Tony Chang.

Source/WebCore:

Test: fast/css-grid-layout/grid-item-start-before-get-set.html

Refactored how we store internally grid-{row|column} to be based on grid-{before|start}.
This is required as grid-{row|column} are shorthands for resp. grid-{before|after} and grid-{start|end}
in the specification and will also be in the code. That means a lot of methods were renamed to be more
aligned with the new design.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::applyProperty):
Added the code to parse, apply and get back the new properties. Also
some renaming after the internal naming change below.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::maximumIndexInDirection):
(WebCore::RenderGrid::placeItemsOnGrid):
(WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
(WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
* rendering/style/RenderStyle.h:
* rendering/style/StyleGridItemData.cpp:
(WebCore::StyleGridItemData::StyleGridItemData):
* rendering/style/StyleGridItemData.h:
(WebCore::StyleGridItemData::operator==):
Updated the naming now that we manipulate grid-{before|start} instead of grid-{row|column}.

LayoutTests:

* fast/css-grid-layout/grid-item-column-row-get-set-expected.txt:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
Extended the test to make sure that both grid-column (resp. grid-row) and grid-start (resp. grid-before) are
in sync.

* fast/css-grid-layout/grid-item-start-before-get-set-expected.txt: Added.
* fast/css-grid-layout/grid-item-start-before-get-set.html: Added
Add this test for grid-{start|before}, similar to LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSSParser: Avoid temporary String when parsing hex colors.
<http://webkit.org/b/111341>

Reviewed by Anders Carlsson.

Templatize CSSParser::fastParseColor() so we can pass a CSSParserString as the color name.
This avoids creating a temporary WTF::String from the parser string.

* css/CSSParser.cpp:
(WebCore::CSSParser::fastParseColor):
* css/CSSParser.h:
* css/CSSParserValues.h:
(CSSParserString):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. AppleWin build fix.

* html/parser/XSSAuditor.cpp:
(WebCore::isSemicolonSeparatedAttribute):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Give ViewportConstraints classes copy constructors
https://bugs.webkit.org/show_bug.cgi?id=111367

Reviewed by Beth Dakin.

Downstream code requires that ViewportConstraints objects have
copy constructors, so add them.

Also clean up some redundant initialization of stack objects
in RenderLayerCompositor.

No behavior change.

* page/scrolling/ScrollingConstraints.h:
(WebCore::ViewportConstraints::ViewportConstraints):
(ViewportConstraints):
(WebCore::FixedPositionViewportConstraints::FixedPositionViewportConstraints):
(FixedPositionViewportConstraints):
(WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
(StickyPositionViewportConstraints):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
(WebCore::RenderLayerCompositor::computeStickyViewportConstraints):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Form controls on composited layers are not painted properly
https://bugs.webkit.org/show_bug.cgi?id=111366

Reviewed by James Robinson.

Set PlatformContextSkia::m_drawingToImageBuffer which is used as a hint to properly blend GDI-painted bitmap.

* platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
(WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS3 calc: identify divide by zero cases at parse time
https://bugs.webkit.org/show_bug.cgi?id=80411

Patch by Alan Cutter <alancutter@chromium.org> on 2013-03-04
Reviewed by Tony Chang.

Added tests to check whether divide by 0 cases are caught.

* css3/calc/catch-divide-by-0-expected.txt: Added.
* css3/calc/catch-divide-by-0.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: user agent shadow roots for plugins should be 'accessible'
https://bugs.webkit.org/show_bug.cgi?id=111339

Reviewed by Tim Horton.

If a plugin element uses a user agent shadow element, we should make that shadow element
into a button with the title and subtitle put together, and use that as the label. This
will probably be the best accessibility experience.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
More work on UI side storage
https://bugs.webkit.org/show_bug.cgi?id=111370

Reviewed by Andreas Kling.

Add a DispatchStorageEvent message and begin hooking it up.

* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):
(WebKit::StorageManager::StorageArea::setItem):
(WebKit):
(WebKit::StorageManager::StorageArea::dispatchEvents):
(WebKit::StorageManager::setItem):
(WebKit::StorageManager::findStorageArea):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
* UIProcess/Storage/StorageManager.messages.in:
* WebProcess/Storage/StorageAreaProxy.cpp:
(WebKit::StorageAreaProxy::setItem):
(WebKit::StorageAreaProxy::dispatchStorageEvent):
(WebKit):
* WebProcess/Storage/StorageAreaProxy.h:
(StorageAreaProxy):
* WebProcess/Storage/StorageAreaProxy.messages.in:

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

* platform/chromium/TestExpectations: Marking all html5lib/generated/ as crashing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix after r144675.

Work around picky/old C++ compilers by separating the '>>' in
nested templates with a space.

* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cache partitioning does not affect iframe MainResources
https://bugs.webkit.org/show_bug.cgi?id=111022

Reviewed by David Kilzer.

Source/WebCore:

Set the partition of a main resource request if in a subframe.

Test: http/tests/cache/partitioned-cache-iframe.html

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):

LayoutTests:

These tests results are for the case in which the cache is not
partitioned, as no shipping ports have cache partitioning enabled

* http/tests/cache/partitioned-cache-iframe-expected.txt: Added.
* http/tests/cache/partitioned-cache-iframe.html: Added.
* http/tests/cache/resources/random-cached-iframe.cgi: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
UI process storage areas should hold on to storage maps
https://bugs.webkit.org/show_bug.cgi?id=111374

Reviewed by Beth Dakin.

Pass the session storage quota size through to the storage area constructor and
create a StorageMap with the given quota size.

* UIProcess/Storage/StorageManager.cpp:
(StorageManager::StorageArea):
(WebKit::StorageManager::StorageArea::create):
(WebKit::StorageManager::StorageArea::StorageArea):
(StorageManager::SessionStorageNamespace):
(WebKit::StorageManager::SessionStorageNamespace::create):
(WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
(WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
(WebKit::StorageManager::createSessionStorageNamespace):
(WebKit::StorageManager::createSessionStorageNamespaceInternal):
* UIProcess/Storage/StorageManager.h:
(StorageManager):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc
https://bugs.webkit.org/show_bug.cgi?id=109061

Patch by Ruslan Abdikeev <aruslan@chromium.org> on 2013-03-04
Reviewed by Adam Barth.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

Test: fast/dom/icon-url-list-apple-touch.html

Added iconTypes parameter to Document::iconURLs().
Added Document::shortcutIconURLs() with original semantics of iconURLs().
Fixed IconController.cpp to provide iconTypesMask to iconURLs().
Renamed iconTypes to iconTypesMask to make the meaning clearer.

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::shortcutIconURLs):
(WebCore):
(WebCore::Document::iconURLs):
* dom/Document.h:
(Document):
* loader/icon/IconController.cpp:
(WebCore::IconController::iconURL):
(WebCore::IconController::urlsForTypes):
* testing/Internals.cpp:
(WebCore::Internals::iconURLs):
(WebCore::Internals::shortcutIconURLs):
(WebCore):
(WebCore::Internals::allIconURLs):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

Added test for apple-touch-icon in allIconURLs().
Changed iconURLs() to shortcutIconURLs().

* fast/dom/icon-url-change.html:
* fast/dom/icon-url-list-apple-touch-expected.txt: Added.
* fast/dom/icon-url-list-apple-touch.html: Added.
* fast/dom/icon-url-list.html:
* fast/dom/icon-url-property.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
BUILD FIX (r144657): Fix DumpRenderTree build failure on iOS

    Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm:95:29: error: class method '+stringWithJSStringRef:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
        NSString *idAttribute = [NSString stringWithJSStringRef:idAttributeRef];
                                ^         ~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

* DumpRenderTree/ios/AccessibilityControllerIOS.mm: Import
AccessibilityCommonMac.h.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support WebSpeech - Speech Synthesis
https://bugs.webkit.org/show_bug.cgi?id=106742

Reviewed by Simon Fraser.

Source/JavaScriptCore: 

Enable speech synthesis for the Mac.

* Configurations/FeatureDefines.xcconfig:

Source/WebCore: 

Enable speech synthesis for the Mac.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac: 

Enable speech synthesis for the Mac.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2: 

Enable speech synthesis for the Mac.

* Configurations/FeatureDefines.xcconfig:

LayoutTests: 

Unskip speech synthesis tests.

* fast/dom/script-tests/constructed-objects-prototypes.js:
(constructorPropertiesOnWindow):
* platform/mac/TestExpectations:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Get rid of some AppleWin VS2010 build warnings.

* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props:


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

* platform/chromium/TestExpectations: touch-gesture-noscroll-body-* are failing on mac.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Implement TRACE_EVENT macros for sampling profiling
https://bugs.webkit.org/show_bug.cgi?id=110932

Reviewed by Adam Barth.

We are implementing TRACE_EVENT macros for sampling profiling.
It works in the following mechanism:

- Chromium defines global state variables for sampling profiling.
(i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h)

- WebKit gets the addresses of the global state variables at the
initialization step. (i.e. EventTracer::initialize())

- WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE()
macros every time WebKit changes its state. (e.g. DOM attribute
getters/setters/methods)

- A sampling thread running in Chrome reads the global states
periodically and visualizes the profiling results into about://tracing.

This patch implements (1) a WebKit API to get the addresses of
the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro.

Source/Platform:

* chromium/public/Platform.h:
(Platform):
(WebKit::Platform::getTraceSamplingState):

Source/WebCore:

No tests. The sampling profiler is not enabled in Chrome by default.
I manually inserted TRACE_EVENT_SAMPLING_STATE() macros and
confirmed that the sampling profiling is working as expected.

* platform/EventTracer.cpp:
(WebCore::EventTracer::initialize):
(WebCore::EventTracer::getTraceCategoryEnabledFlag):
(WebCore):
* platform/EventTracer.h:
(WebCore):
(EventTracer):
* platform/chromium/EventTracerChromium.cpp:
(WebCore):
(WebCore::EventTracer::initialize):
* platform/chromium/TraceEvent.h:

Source/WebKit/chromium:

* src/WebKit.cpp:
(WebKit::initializeWithoutV8):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r144595.
http://trac.webkit.org/changeset/144595
https://bugs.webkit.org/show_bug.cgi?id=90341

Causing multiple crashes in fast/dom/Element/* tests (hits
assert in Attr.cp:215)

Source/WebCore:

* dom/Element.cpp:
(WebCore::Element::setAttributeNode):

LayoutTests:

* fast/dom/Element/setAttributeNode-case-insensitivity-expected.txt: Removed.
* fast/dom/Element/setAttributeNode-case-insensitivity.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@144702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support WebSpeech - Speech Synthesis
https://bugs.webkit.org/show_bug.cgi?id=106742

Build fix.

* Modules/speech/SpeechSynthesis.cpp:



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