1a0aad0145cb4c8519c7ec8183a13ea44e3f0736
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
2
3         Remove unnecessary casts in transformations.
4         https://bugs.webkit.org/show_bug.cgi?id=104376
5
6         Reviewed by Simon Fraser.
7
8         Several casts from float-to-double are performed prior to
9         storing the result in a double type. These casts are unnecessary
10         overhead and reduce the clarity of the source code.
11
12         No new tests. Covered by existing CSS test cases.
13
14         * platform/graphics/transforms/RotateTransformOperation.cpp:
15         * platform/graphics/transforms/TransformationMatrix.cpp:
16
17 2012-12-07  Antoine Quint  <graouts@apple.com>
18
19         Provide the backend for exposing the layer tree to the Web Inspector
20         https://bugs.webkit.org/show_bug.cgi?id=103513
21
22         Reviewed by Pavel Feldman.
23
24         The purpose of this patch is to provide a new agent enabling the Web Inspector to interface
25         with WebCore to access information about the render layer tree and, more specifically, expose
26         useful information about layers backed by textures composited on the GPU such as metrics and
27         backing store. Thus we now provide a LayerTreeAgent which will inform the front-end of 
28         changes to the render layer tree via a new layerTreeDidChange event, providing an object
29         containing the entire hierarchy of RenderLayers for the inspected document. This hierarchy 
30         can be queried at any time using the .getLayerTree() method on the LayerTreeAgent. Finally, 
31         the LayerTreeAgent also exposes a .nodeIdForLayerId() method allowing to get the id of the 
32         node associated with the RenderLayer with the provided layer id.
33         
34         In terms of implementation, RenderLayerCompositor has been changed such that in its 
35         updateCompositingLayers() method we call the layerTreeDidChange method on the 
36         InspectorLayerTreeAgent instance via the InspectorInstrumentation.
37
38         Test: inspector-protocol/layer-tree.html
39
40         * CMakeLists.txt:
41         * GNUmakefile.list.am:
42         * Target.pri:
43         * WebCore.gypi:
44         * WebCore.vcproj/WebCore.vcproj:
45         * WebCore.xcodeproj/project.pbxproj:
46         * inspector/Inspector.json: Define new types IntRect (x, y, width, height) and Layer, which 
47         holds the information for a RenderLayer (layerId, bounds, isComposited, memory, 
48         compositedBounds) and its children (childLayers). We also define the methods of the 
49         LayerTreeAgent object (enable, disable, getLayerTree, nodeIdForLayerId) and the 
50         layerTreeDidChange event it  
51         fires.
52         * inspector/InspectorAllInOne.cpp:
53         * inspector/InspectorController.cpp:
54         (WebCore::InspectorController::InspectorController):
55         * inspector/InspectorDOMAgent.cpp:
56         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): New method facilitating 
57         pushing the node associated with a given RenderLayer to the front-end.
58         (WebCore):
59         * inspector/InspectorDOMAgent.h:
60         (InspectorDOMAgent):
61         * inspector/InspectorInstrumentation.cpp:
62         (WebCore):
63         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
64         (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
65         (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
66         * inspector/InspectorInstrumentation.h:
67         (WebCore):
68         (InspectorInstrumentation):
69         (WebCore::InspectorInstrumentation::layerTreeDidChange):
70         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
71         * inspector/InspectorLayerTreeAgent.cpp: Added.
72         (WebCore):
73         (LayerTreeAgentState):
74         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
75         (WebCore::InspectorLayerTreeAgent::~InspectorLayerTreeAgent):
76         (WebCore::InspectorLayerTreeAgent::setFrontend):
77         (WebCore::InspectorLayerTreeAgent::clearFrontend):
78         (WebCore::InspectorLayerTreeAgent::restore):
79         (WebCore::InspectorLayerTreeAgent::reset):
80         (WebCore::InspectorLayerTreeAgent::enable):
81         (WebCore::InspectorLayerTreeAgent::disable):
82         (WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
83         (WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
84         (WebCore::InspectorLayerTreeAgent::getLayerTree):
85         (WebCore::InspectorLayerTreeAgent::buildObjectForRootLayer):
86         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Build the entire hierarchy of 
87         RenderLayers from the provided RenderLayer.
88         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
89         (WebCore::InspectorLayerTreeAgent::bind):
90         (WebCore::InspectorLayerTreeAgent::unbind):
91         (WebCore::InspectorLayerTreeAgent::nodeIdForLayerId):
92         * inspector/InspectorLayerTreeAgent.h: Added.
93         (WebCore):
94         (InspectorLayerTreeAgent):
95         (WebCore::InspectorLayerTreeAgent::create):
96         * inspector/InstrumentingAgents.h:
97         (WebCore):
98         (WebCore::InstrumentingAgents::InstrumentingAgents):
99         (InstrumentingAgents):
100         (WebCore::InstrumentingAgents::inspectorLayerTreeAgent):
101         (WebCore::InstrumentingAgents::setInspectorLayerTreeAgent):
102         * rendering/RenderLayerCompositor.cpp:
103         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call the layerTreeDidChange method 
104         on the LayerTreeAgent via the InspectorInstrumentation to inform the front-end that the 
105         RenderLayer hierarchy has changed.
106         (WebCore):
107         (WebCore::RenderLayerCompositor::layerBecameNonComposited): Call the renderLayerDestroyed 
108         method on the LayerTreeAgent via the InspectorInstrumentation to unbind the layer that is 
109         being destroyed.
110         * rendering/RenderLayerCompositor.h:
111         (RenderLayerCompositor):
112
113 2012-12-07  Joshua Bell  <jsbell@chromium.org>
114
115         IndexedDB: Check SSV version when opening database
116         https://bugs.webkit.org/show_bug.cgi?id=102243
117
118         Reviewed by Tony Chang.
119
120         Ensure that the data format (SerializedScriptValue) isn't "from the future" when opening
121         a backing store. Treat an unknown version the same as an unknown schema version.
122
123         Chromium-side test at https://codereview.chromium.org/11470013/ (same as other schema version tests)
124
125         * Modules/indexeddb/IDBBackingStore.cpp:
126         (WebCore):
127         (WebCore::isSchemaKnown): Check data version as well.
128         (WebCore::setUpMetadata): Ensure data version is recorded; bump schema version.
129         * Modules/indexeddb/IDBLevelDBCoding.cpp: Encoding for "DataVersion" global metadata entry.
130         (IDBLevelDBCoding):
131         (WebCore::IDBLevelDBCoding::compare):
132         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
133         * Modules/indexeddb/IDBLevelDBCoding.h:
134         (DataVersionKey):
135         (IDBLevelDBCoding):
136         * bindings/js/SerializedScriptValue.cpp:
137         (SerializedScriptValue::wireFormatVersion): New method (JSC side).
138         * bindings/js/SerializedScriptValue.h:
139         * bindings/v8/SerializedScriptValue.cpp:
140         (WebCore::SerializedScriptValue::wireFormatVersion): New method (V8 side).
141         (WebCore):
142         * bindings/v8/SerializedScriptValue.h:
143         (SerializedScriptValue):
144
145 2012-12-07  Andreas Kling  <akling@apple.com>
146
147         Throw away StyleResolvers that haven't been used for a long time.
148         <http://webkit.org/b/104314>
149
150         Reviewed by Antti Koivisto.
151
152         A lot of memory gets tied up in StyleResolver and the structures and caches that hang from it.
153         Add a mechanism to throw it away after it's been unused for a while (1 minute.)
154         This frees up large amounts of memory on inactive pages (background tabs) and static content.
155
156         We already have a number of scenarios where the document style is invalidated by throwing away
157         the StyleResolver so the major code paths are prepared for having a null StyleResolver* on occasion.
158
159         ~20MB progression on Membuster3.
160
161         * css/StyleResolver.cpp:
162         (WebCore::StyleResolver::styleForElement):
163         (WebCore::StyleResolver::styleForKeyframe):
164         (WebCore::StyleResolver::pseudoStyleForElement):
165         (WebCore::StyleResolver::styleForPage):
166
167             Call document()->didAccessStyleResolver() from the relevant parts of StyleResolver's public API.
168             This prevents Document from throwing the StyleResolver away for 1 minute after it's used.
169
170         * dom/Document.h:
171         * dom/Document.cpp:
172         (WebCore::Document::Document):
173         (WebCore::Document::createStyleResolver):
174         (WebCore::Document::didAccessStyleResolver):
175         (WebCore::Document::styleResolverThrowawayTimerFired):
176
177             Add a mechanism to call clearStyleResolver() on a refreshing timer.
178
179         * dom/Element.cpp:
180         (WebCore::Element::attributeChanged):
181
182             If an attribute change occurs while the document doesn't have a StyleResolver, dirty the element style
183             since we can't be sure that the attribute change didn't affect any rules.
184
185 2012-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>
186
187         REGRESSION(r136947): Made two tests fail on all platforms (Requested by tonikitoo-ll on #webkit).
188         https://bugs.webkit.org/show_bug.cgi?id=104368
189
190         Unreviewed partial rollout.
191
192         r136947 was too aggressive in the sense of fixing RenderBox::canBeScrolledAndHasScrollableArea
193         as part of itself. Revert the related changes in order to fix both
194         fast/events/autoscroll-should-not-stop-on-keypress.html and
195         fast/events/autoscroll-in-textfield.html
196
197         * rendering/RenderBox.cpp:
198         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
199         * rendering/RenderBox.h:
200
201 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
202
203         [TexMap] Can not do multiple accelerated animations
204         https://bugs.webkit.org/show_bug.cgi?id=104364
205
206         Reviewed by Kenneth Rohde Christiansen.
207
208         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
209         Instead only remove any animations with both same name and property.
210
211         Covered by animations/opacity-transform-animation.html.
212
213         * platform/graphics/GraphicsLayerAnimation.cpp:
214         (WebCore::GraphicsLayerAnimations::add):
215         (WebCore::GraphicsLayerAnimations::remove):
216         * platform/graphics/GraphicsLayerAnimation.h:
217         (GraphicsLayerAnimations):
218
219 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
220
221         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
222         https://bugs.webkit.org/show_bug.cgi?id=104262
223
224         Reviewed by Alexis Menard.
225
226         EFL port treats build warning as compile error and there are
227         maybe-uninitialized when building with gcc 4.7.2.
228         This patch adds default case to resolve a build break.
229
230         * css/StyleResolver.cpp:
231         (WebCore::getFontAndGlyphOrientation):
232
233 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
234
235         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
236         https://bugs.webkit.org/show_bug.cgi?id=104250
237
238         Reviewed by Pavel Feldman.
239
240         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
241
242         * inspector/front-end/InspectorView.js:
243         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
244
245 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
246
247         Web Inspector: provide a way to reload page with given script preprocessor.
248         https://bugs.webkit.org/show_bug.cgi?id=80992
249
250         Reviewed by Yury Semikhatsky.
251
252         This change introduces a way to inject 'preprocessor' script that would process
253         each JavaScript file before it gets into the VM for compilation. That way inspector
254         can expose capabilities such as assessing code coverage or tracing all the calls.
255
256         Preprocessor script is stored in the page agent where it waits for reload to happen.
257         Upon reload, ScriptDebugServer is using it to patch the script sources.
258
259         
260         Test: inspector/debugger/debugger-script-preprocessor.html
261
262         * bindings/js/ScriptDebugServer.h:
263         (WebCore::ScriptDebugServer::setScriptPreprocessor):
264         (ScriptDebugServer):
265         * bindings/v8/DebuggerScript.js:
266         * bindings/v8/ScriptDebugServer.cpp:
267         (ScriptDebugServer::ScriptPreprocessor):
268         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
269         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
270         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
271         (WebCore):
272         (WebCore::ScriptDebugServer::~ScriptDebugServer):
273         (WebCore::ScriptDebugServer::setScriptSource):
274         (WebCore::ScriptDebugServer::setScriptPreprocessor):
275         (WebCore::ScriptDebugServer::handleV8DebugEvent):
276         * bindings/v8/ScriptDebugServer.h:
277         (ScriptDebugServer):
278         * bindings/v8/custom/V8InjectedScriptManager.cpp:
279         (WebCore::InjectedScriptManager::createInjectedScript):
280         * inspector/Inspector.json:
281         * inspector/InspectorController.cpp:
282         (WebCore::InspectorController::InspectorController):
283         * inspector/InspectorDebuggerAgent.h:
284         (InspectorDebuggerAgent):
285         * inspector/InspectorPageAgent.cpp:
286         (WebCore::InspectorPageAgent::reload):
287         (WebCore::InspectorPageAgent::frameNavigated):
288         * inspector/InspectorPageAgent.h:
289         (WebCore::InspectorPageAgent::page):
290         (WebCore::InspectorPageAgent::scriptPreprocessor):
291         (InspectorPageAgent):
292         * inspector/PageDebuggerAgent.cpp:
293         (WebCore::PageDebuggerAgent::create):
294         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
295         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
296         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
297         (WebCore::PageDebuggerAgent::injectedScriptForEval):
298         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
299         (WebCore):
300         * inspector/PageDebuggerAgent.h:
301         (WebCore):
302         (PageDebuggerAgent):
303
304 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
305
306         Web Inspector: the "Sources" column is always empty in CSS selector profiles
307         https://bugs.webkit.org/show_bug.cgi?id=104225
308
309         Reviewed by Pavel Feldman.
310
311         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
312         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
313         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
314         has a valid parent CSSStyleSheet.
315
316         Test: inspector/profiler/selector-profiler-url.html
317
318         * css/StyleResolver.cpp:
319         (WebCore::StyleResolver::collectMatchingRulesForList):
320         (WebCore::StyleResolver::applyProperties):
321         * inspector/InspectorInstrumentation.cpp:
322         (WebCore):
323         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
324         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
325         * inspector/InspectorInstrumentation.h:
326         (WebCore):
327         (InspectorInstrumentation):
328         (WebCore::InspectorInstrumentation::willMatchRule):
329         (WebCore::InspectorInstrumentation::willProcessRule):
330
331 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
332
333         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
334         https://bugs.webkit.org/show_bug.cgi?id=103999
335
336         Reviewed by James Robinson.
337
338         Patch makes it possible for methods like
339         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
340         to not depend on RenderLayer::allowsScrolling to determine if a layer should
341         be added or removed from its FrameView's ScrollableArea set.
342
343         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
344         method to take into account the box' scroll allowance in a given direction only
345         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
346         (@WebKit/blackberry/Api/InRegionScroller.cpp).
347
348         The naming pattern for the newly added methods were chosen to keep the consistency
349         with the existing ones, in the same class.
350
351         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
352
353         * rendering/RenderBox.cpp:
354         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
355         * rendering/RenderBox.h:
356         (RenderBox):
357         (WebCore::RenderBox::hasScrollableOverflowX):
358         (WebCore::RenderBox::hasScrollableOverflowY):
359         * rendering/RenderLayer.cpp:
360         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
361         (WebCore):
362         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
363         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
364         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
365         * rendering/RenderLayer.h:
366         (RenderLayer):
367
368 2012-12-07  Max Feil  <mfeil@rim.com>
369
370         [BlackBerry] make "isVideo" information available to platform media player
371         https://bugs.webkit.org/show_bug.cgi?id=104334
372
373         Reviewed by Rob Buis.
374
375         The platform player needs to know whether the element is <video>
376         or <audio>, so it can make certain decisions before metadata
377         is ready. This is part of a performance optimization refactor
378         which does not change functionality so no new tests are required.
379
380         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
381         (WebCore::MediaPlayerPrivate::load):
382
383 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
384
385         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
386         https://bugs.webkit.org/show_bug.cgi?id=104271.
387
388         Reviewed by Kenneth Rohde Christiansen.
389
390         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
391
392         Covered by existing tests.
393
394         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
395         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
396         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
397
398 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
399
400         Use always the order iterator from data member in RenderFlexibleBox
401         https://bugs.webkit.org/show_bug.cgi?id=104112
402
403         Reviewed by Tony Chang.
404
405         Some methods receive it as parameter and others use the data
406         member.
407
408         * rendering/RenderFlexibleBox.cpp:
409         (WebCore::RenderFlexibleBox::layoutBlock):
410         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
411         (WebCore::RenderFlexibleBox::layoutFlexItems):
412         (WebCore::RenderFlexibleBox::computeNextFlexLine):
413         (WebCore::RenderFlexibleBox::alignFlexLines):
414         (WebCore::RenderFlexibleBox::alignChildren):
415         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
416         (WebCore::RenderFlexibleBox::flipForWrapReverse):
417         * rendering/RenderFlexibleBox.h:
418
419 2012-12-07  Kent Tamura  <tkent@chromium.org>
420
421         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
422         https://bugs.webkit.org/show_bug.cgi?id=104353
423
424         Reviewed by Kentaro Hara.
425
426         This doesn't change any behavior because call sites of
427         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
428         similarly.
429
430         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
431         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
432         Checks element()->disabled, not readOnly.
433         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
434         Checks element()->readOnly, not disabled.
435
436 2012-12-07  Jon Lee  <jonlee@apple.com>
437
438         Build fix.
439
440         * plugins/PlugInOriginHash.cpp:
441         (WebCore::PlugInOriginHash::hash):
442
443 2012-12-04  Jon Lee  <jonlee@apple.com>
444
445         Add PlugInOriginHash
446         https://bugs.webkit.org/show_bug.cgi?id=103655
447         <rdar://problem/12778949>
448
449         Reviewed by Alexey Proskuryakov.
450
451         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
452         page's main frame and the plug-in, and the plug-in MIME type.
453
454         * plugins/PlugInOriginHash.cpp: Added.
455         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
456         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
457         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
458         masks out 8 of the hash bits to make room for bit flags.
459         * plugins/PlugInOriginHash.h: Added.
460
461         * CMakeLists.txt:
462         * GNUmakefile.list.am:
463         * Target.pri:
464         * WebCore.gypi:
465         * WebCore.vcproj/WebCore.vcproj:
466         * WebCore.xcodeproj/project.pbxproj:
467
468 2012-12-06  Kent Tamura  <tkent@chromium.org>
469
470         Refactoring: Clean up placeholder attribute usage
471         https://bugs.webkit.org/show_bug.cgi?id=104337
472
473         Reviewed by Kentaro Hara.
474
475         No new tests. This doesn't change any behavior.
476
477         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
478         * html/HTMLInputElement.h: Ditto.
479         * html/HTMLTextFormControlElement.cpp:
480         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
481         We can use fastGetAttribute for placeholder.
482         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
483         Ditto.
484
485 2012-12-06  Kent Tamura  <tkent@chromium.org>
486
487         Refactoring: Rename HTMLFormControlElement::required to isRequired
488         https://bugs.webkit.org/show_bug.cgi?id=104336
489
490         Reviewed by Kentaro Hara.
491
492         m_required should be m_isRequired, and required() should be
493         isRequired. It's safe to rename them because HTML*Element::required IDL
494         attributes are [Reflected].
495         http://www.webkit.org/coding/coding-style.html#names-bool
496
497         * accessibility/AccessibilityNodeObject.cpp:
498         (WebCore::AccessibilityNodeObject::isRequired):
499         * css/StyleResolver.cpp:
500         (WebCore::StyleResolver::canShareStyleWithControl):
501         * dom/CheckedRadioButtons.cpp:
502         (WebCore::RadioButtonGroup::add):
503         (WebCore::RadioButtonGroup::requiredAttributeChanged):
504         (WebCore::RadioButtonGroup::remove):
505         * html/CheckboxInputType.cpp:
506         (WebCore::CheckboxInputType::valueMissing):
507         * html/FileInputType.cpp:
508         (WebCore::FileInputType::valueMissing):
509         * html/HTMLFormControlElement.cpp:
510         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
511         (WebCore::HTMLFormControlElement::parseAttribute):
512         (WebCore::HTMLFormControlElement::isRequired):
513         * html/HTMLFormControlElement.h:
514         (HTMLFormControlElement):
515         * html/HTMLInputElement.cpp:
516         (WebCore::HTMLInputElement::isRequiredFormControl):
517         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
518         * html/HTMLSelectElement.cpp:
519         (WebCore::HTMLSelectElement::valueMissing):
520         (WebCore::HTMLSelectElement::isRequiredFormControl):
521         * html/HTMLTextAreaElement.h:
522         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
523         * html/TextFieldInputType.cpp:
524         (WebCore::TextFieldInputType::valueMissing):
525
526 2012-12-06  Hajime Morrita  <morrita@google.com>
527
528         [Shadow DOM] Implement Element::shadowRoot with prefix
529         https://bugs.webkit.org/show_bug.cgi?id=102912
530
531         Reviewed by Dimitri Glazkov.
532
533         - Added Element::shadowRoot() which return the youngest author shadow root.
534         - Renamed existing Node::shadowRoot() to containingShadowRoot() to avoid name shadowing.
535           The name shadowRoot() is confusing anyway so this is good opportunity to rename it.
536
537         Test: fast/dom/shadow/shadow-aware-shadow-root.html
538
539         * css/SelectorChecker.cpp:
540         (WebCore::SelectorChecker::checkSelector):
541         * css/StyleScopeResolver.cpp:
542         (WebCore::StyleScopeResolver::scopeFor):
543         (WebCore::StyleScopeResolver::addHostRule):
544         * dom/Element.cpp:
545         (WebCore::Element::shadowRoot):
546         (WebCore):
547         * dom/Element.h:
548         (Element):
549         * dom/Element.idl:
550         * dom/ElementShadow.cpp:
551         (WebCore::ElementShadow::setShouldCollectSelectFeatureSet):
552         * dom/Node.cpp:
553         (WebCore::Node::rendererIsEditable):
554         (WebCore::Node::shadowHost):
555         (WebCore::Node::shadowAncestorNode):
556         (WebCore::Node::containingShadowRoot):
557         * dom/Node.h:
558         (Node):
559         * dom/Range.cpp:
560         (WebCore::Range::shadowRoot):
561         * dom/ShadowRoot.cpp:
562         (WebCore::ShadowRoot::insertedInto):
563         (WebCore::ShadowRoot::removedFrom):
564         * dom/ShadowRoot.h:
565         (WebCore::ShadowRoot::isAccessible):
566         * editing/TextIterator.cpp:
567         (WebCore::TextIterator::handleReplacedElement):
568         * editing/htmlediting.cpp:
569         (WebCore::indexForVisiblePosition):
570         * html/HTMLStyleElement.cpp:
571         (WebCore::HTMLStyleElement::scopedAttributeChanged):
572         (WebCore::HTMLStyleElement::registerWithScopingNode):
573         (WebCore::HTMLStyleElement::removedFrom):
574         * html/shadow/ContentDistributor.cpp:
575         (WebCore::ContentDistributor::distribute):
576         * html/shadow/HTMLContentElement.cpp:
577         (WebCore::HTMLContentElement::parseAttribute):
578         (WebCore::HTMLContentElement::insertedInto):
579         (WebCore::HTMLContentElement::removedFrom):
580         * html/shadow/HTMLShadowElement.cpp:
581         (WebCore::HTMLShadowElement::insertedInto):
582         (WebCore::HTMLShadowElement::removedFrom):
583         * html/shadow/InsertionPoint.cpp:
584         (WebCore::InsertionPoint::attach):
585         (WebCore::InsertionPoint::detach):
586         (WebCore::InsertionPoint::isActive):
587         (WebCore::InsertionPoint::childrenChanged):
588         (WebCore::InsertionPoint::insertedInto):
589         (WebCore::InsertionPoint::removedFrom):
590         (WebCore::InsertionPoint::setResetStyleInheritance):
591         * page/EventHandler.cpp:
592         (WebCore::instanceAssociatedWithShadowTreeElement):
593         * svg/SVGElement.cpp:
594         (WebCore::SVGElement::correspondingElement):
595         (WebCore::collectInstancesForSVGElement):
596
597 2012-12-06  Michael Pruett  <michael@68k.org>
598
599         IndexedDB: Replace int64 with int64_t
600         https://bugs.webkit.org/show_bug.cgi?id=104338
601
602         Reviewed by Kentaro Hara.
603
604         Cleaning up coding inconsistencies, no change in behavior.
605
606         Tests: storage/indexeddb/*
607
608         * Modules/indexeddb/IDBFactory.cpp:
609         (WebCore::IDBFactory::openInternal):
610
611 2012-12-06  James Simonsen  <simonjam@chromium.org>
612
613         [Resource Timing] Allow detailed timing on same origin sites
614         https://bugs.webkit.org/show_bug.cgi?id=104328
615
616         Reviewed by Tony Gentilcore.
617
618         This block was lost when I moved it to PerformanceResourceTiming.cpp.
619
620         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
621
622         * page/PerformanceResourceTiming.cpp:
623         (WebCore::passesTimingAllowCheck):
624
625 2012-12-06  Rick Byers  <rbyers@chromium.org>
626
627         CSS cursor property should support webkit-image-set
628         https://bugs.webkit.org/show_bug.cgi?id=99493
629
630         Reviewed by Beth Dakin.
631
632         Add support for image scale factors attached to custom mouse cursor images
633         behind ENABLE(MOUSE_CURSOR_SCALE).
634
635         This required refactoring CSSCursorImageValue to derive directly from
636         CSSValue since it can contain either a CSSImageValue or a CSSImageSetValue.
637         If it contains an image-set, then we can plumb directly through to the
638         CSSImageSetValue.  If it contains an image, then either we can plumb directly
639         through to the CSSImageValue, or if the URL represents an SVG cursor we have
640         to intercept the image loading in order to substitute the actual SVG image URL
641         and do the appropriate lifetime management.
642
643         Tests: fast/css/cursor-parsing-image-set.html
644                fast/events/mouse-cursor-image-set.html
645
646         * Configurations/FeatureDefines.xcconfig: Add ENABLE_MOUSE_CURSOR_SCALE - disabled
647         * GNUmakefile.features.am: ditto
648         * css/CSSCursorImageValue.cpp: Refactor to inherit directly from CSSValue and support image sets
649         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
650         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
651         (WebCore::CSSCursorImageValue::customCssText):
652         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
653         (WebCore::CSSCursorImageValue::cachedImage):
654         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
655         (WebCore::CSSCursorImageValue::isSVGCursor):
656         (WebCore::CSSCursorImageValue::cachedImageURL):
657         (WebCore::CSSCursorImageValue::clearCachedImage):
658         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
659         * css/CSSCursorImageValue.h: Remove cursor-specific hacks
660         (WebCore::CSSCursorImageValue::create):
661         (CSSCursorImageValue):
662         * css/CSSImageValue.cpp:
663         (WebCore::CSSImageValue::cachedImage):
664         * css/CSSImageValue.h:
665         (CSSImageValue):
666         * css/CSSParser.cpp:
667         (WebCore::CSSParser::parseValue): Parse cursor(-webkit-image-set(...)) rules
668         * css/CSSValue.h:
669         (WebCore::CSSValue::isImageValue):
670         * css/StyleBuilder.cpp:
671         (WebCore::ApplyPropertyCursor::applyValue):
672         * css/StyleResolver.cpp: Hook up new CSSCursorImageValue support since it can't be handled like other images any more.
673         (WebCore::StyleResolver::styleImage):
674         (WebCore::StyleResolver::cursorOrPendingFromValue):
675         (WebCore::StyleResolver::loadPendingImage):
676         * css/StyleResolver.h:
677         (StyleResolver):
678         * page/EventHandler.cpp:
679         (WebCore::EventHandler::selectCursor): Handle StyleCachedImageSet images and plumb scale factor through
680         * platform/Cursor.cpp:
681         (WebCore::Cursor::Cursor): Add imageScaleFactor
682         * platform/Cursor.h: Add imageScaleFactor
683         (Cursor):
684         (WebCore::Cursor::imageScaleFactor):
685         * platform/chromium/CursorChromium.cpp: Add imageScaleFactor
686         (WebCore::Cursor::Cursor):
687         (WebCore::Cursor::operator=):
688         * rendering/style/CursorData.h: Clarify hotspot units
689         (CursorData):
690         * rendering/style/StyleCachedImage.h:
691         (StyleCachedImage::cachedImage): Override new virtual.
692         * rendering/style/StyleCachedImageSet.h:
693         (StyleCachedImageSet::cachedImage): Override new virtual.
694         * rendering/style/StyleImage.h:
695         (StyleImage::cachedImage): Add new virtual method to avoid lots of casts and typechecks.
696         * rendering/style/StylePendingImage.h: Add CSSCursorImageValue support
697         (WebCore::StylePendingImage::cssCursorImageValue):
698         * testing/Internals.cpp:
699         (WebCore::Internals::getCurrentCursorInfo): Print non-identity scale factors for testing
700
701 2012-12-06  Hayato Ito  <hayato@chromium.org>
702
703         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
704         https://bugs.webkit.org/show_bug.cgi?id=102681
705
706         Reviewed by Dimitri Glazkov.
707
708         Make sure that event's relatedTarget re-targeting occurs for mouse
709         events created by event.initMouseEvent().  Since user-generated
710         mouse events can have a relatedTarget which is same to the target
711         node, the algorithm which calculates event's ancestors is also
712         updated so that ancestors are not shrunk wrongly.
713
714         Test: fast/events/dispatch-synthetic-mouseevent.html
715               fast/dom/shadow/shadow-dom-event-dispatching.html
716
717         * dom/EventDispatcher.cpp:
718         (WebCore::EventRelatedTargetAdjuster::adjust):
719         * dom/MouseEvent.cpp:
720         (WebCore::MouseEventDispatchMediator::create):
721         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
722         (WebCore::MouseEventDispatchMediator::dispatchEvent):
723         * dom/MouseEvent.h:
724         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
725         (MouseEventDispatchMediator):
726         * dom/Node.cpp:
727         (WebCore::Node::dispatchEvent):
728
729 2012-12-06  Kunihiko Sakamoto  <ksakamoto@chromium.org>
730
731         Disabled file input box stops a certain other div from being rendered
732         https://bugs.webkit.org/show_bug.cgi?id=104226
733
734         Reviewed by Dimitri Glazkov.
735
736         The bug was caused by setNeedsStyleRecalc() call during style recalculation,
737         which resulted in inconsistent ChildNeedsStyleRecalc flags in DOM tree.
738
739         When reattach of file input happens during style recalculation,
740         RenderFileUploadControl::updateFromElement() is called from attach().
741         It may change the disabled state of the upload button in its shadow tree,
742         but it triggers style recalculation.
743
744         This patch solves this issue by setting disabled state of the upload button in
745         FileInputType::disabledAttributeChanged instead of RenderFileUploadControl.
746
747         Test: fast/forms/file/sibling-of-disabled-file-input.html
748
749         * html/FileInputType.cpp:
750         (WebCore::FileInputType::disabledAttributeChanged): Added.
751         * html/FileInputType.h:
752         (FileInputType): Declare disabledAttributeChanged.
753         * rendering/RenderFileUploadControl.cpp:
754         (WebCore::RenderFileUploadControl::updateFromElement): Remove call to button->setDisabled().
755
756 2012-12-06  Dominic Cooney  <dominicc@chromium.org>
757
758         Element.pseudo property should be prefixed
759         https://bugs.webkit.org/show_bug.cgi?id=104060
760
761         Reviewed by Hajime Morita.
762
763         Other Shadow DOM properties are prefixed; pseudo should be too.
764
765         Covered by updated tests in fast/dom/shadow.
766
767         * dom/Element.idl:
768
769 2012-12-06  Andrei Bucur  <abucur@adobe.com>
770
771         [CSS Regions] Remove the sanitize mechanism from LineFragmentationData
772         https://bugs.webkit.org/show_bug.cgi?id=104234
773
774         Reviewed by David Hyatt.
775
776         Remove previous work that ensured an invalid region is never returned by the containingRegion getter. After r136793 the blocks always
777         relayout children if the region chain changes. This means the sanitize() method is only necessary when all the regions are removed.
778         This case is treated separately in layoutInlineChildren.
779
780         Tests: no new functionality, no bug fixed.
781
782         * rendering/RenderBlock.cpp:
783         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
784         * rendering/RenderBlockLineLayout.cpp:
785         (WebCore::RenderBlock::layoutInlineChildren):
786         * rendering/RootInlineBox.cpp:
787         (WebCore::RootInlineBox::containingRegion):
788         (WebCore):
789         (WebCore::RootInlineBox::setContainingRegion):
790         * rendering/RootInlineBox.h:
791         (RootInlineBox):
792         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
793         (LineFragmentationData):
794
795 2012-12-06  Kenneth Russell  <kbr@google.com>
796
797         Associate URLs with GraphicsContext3D instances created for WebGL
798         https://bugs.webkit.org/show_bug.cgi?id=103793
799
800         Reviewed by Adam Barth.
801
802         Pass down the URL of the topmost frame's document creating the
803         WebGL context to the platform layer through
804         GraphicsContext3D::Attributes.
805
806         Not feasible to write a layout test for this change; has no
807         user-visible effect. Tested manually with failure injection in
808         Chromium port.
809
810         * html/canvas/WebGLRenderingContext.cpp:
811         (WebCore):
812         (WebCore::WebGLRenderingContext::create):
813             Pass top document's URL in context creation attributes.
814         * platform/chromium/support/GraphicsContext3DChromium.cpp:
815         (WebCore::GraphicsContext3D::create):
816             Pass URL through WebKit API.
817         * platform/graphics/GraphicsContext3D.h:
818         (Attributes):
819             Add top document's URL to context creation attributes.
820
821 2012-12-06  Philip Rogers  <pdr@google.com>
822
823         Unify SVG's animation and target tracking systems.
824         https://bugs.webkit.org/show_bug.cgi?id=102655
825
826         Reviewed by Dirk Schulze.
827
828         This patch unifies our animation target tracking system and regular target tracking system.
829         This simplifies the code, fixes a bug, and cleans up a historically security-sensitive area.
830
831         Background: When <use>, <mpath>, <animate>, etc. reference another element using
832         xlink:href="#id", we need to track when #id changes to #otherId, when #id is removed, etc.
833         This bookkeeping of element -> target is done in SVGDocumentExtensions. Additionally, when
834         a target changes that causes layout (e.g., rect.x is changed), all dependent elements with
835         renderers are notified (<animate> has no renderer and will not use this).
836
837         Previously, xlink:href changes were lazily resolved when targetElement() was called, target
838         changes were tracked using the animation tracking framework, and pending targets did not
839         work (e.g., <animate xlink:href="#p"><!--animate is now pending #p --><rect id="p"/>).
840
841         After this patch, we no longer lazily resolve targetElement() but instead change it when
842         our xlink:href attribute changes. Instead of using the animation tracking framework in
843         SVGDocumentExtensions, we now use the regular target tracking framework. Lastly, by using
844         the regular target tracking framework we are able to hook into the pending resource handling
845         which fixes a bug (see the test).
846
847         A test has been added to test that the order of animation elements does not matter. A second
848         test has been added to show we do not regress a pending-while-pending case.
849
850         Tests: svg/animations/svg-animation-order.html
851                svg/custom/svg-pending-twice.html
852
853         * svg/SVGAnimateElement.cpp:
854         (WebCore::SVGAnimateElement::setTargetElement):
855
856             setTargetElement and setAttributeName now work similarly. When the corresponding attribute
857             changes, we update our internal state (target or attributeName) and save it instead of
858             looking these values up on each iteration.
859
860         (WebCore::SVGAnimateElement::setAttributeName):
861         (WebCore):
862         (WebCore::SVGAnimateElement::resetAnimatedPropertyType):
863         * svg/SVGAnimateElement.h:
864         (SVGAnimateElement):
865         * svg/SVGAnimationElement.cpp:
866         (WebCore::SVGAnimationElement::setAttributeType):
867         (WebCore::SVGAnimationElement::setTargetElement):
868         (WebCore::SVGAnimationElement::setAttributeName):
869         * svg/SVGAnimationElement.h:
870         (SVGAnimationElement):
871         * svg/SVGDocumentExtensions.cpp:
872         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
873         (WebCore):
874         * svg/SVGDocumentExtensions.h:
875         (SVGDocumentExtensions):
876         * svg/SVGElement.cpp:
877         (WebCore::SVGElement::~SVGElement):
878         (WebCore::SVGElement::removedFrom):
879         (WebCore::SVGElement::attributeChanged):
880         * svg/SVGElementInstance.cpp:
881         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
882
883             This can be removed after r131631 landed.
884
885         * svg/SVGMPathElement.cpp:
886         (WebCore::SVGMPathElement::buildPendingResource):
887         * svg/SVGTextPathElement.cpp:
888         (WebCore::SVGTextPathElement::buildPendingResource):
889
890             A bug was discovered in review with our resource tracking in a pending-while-pending
891             case. SVGMpathElement and SVGTextPathElement have been updated to fix this as well.
892
893         * svg/animation/SVGSMILElement.cpp:
894
895             The changes in SVGSMILElement should look very similar to SVGFEImageElement,
896             SVGMPathElement, etc. The idea is to build pending resources when added or
897             removed from the document, or when the href attribute changes.
898
899         (WebCore::SVGSMILElement::~SVGSMILElement):
900         (WebCore):
901         (WebCore::SVGSMILElement::clearResourceReferences):
902         (WebCore::SVGSMILElement::buildPendingResource):
903         (WebCore::SVGSMILElement::insertedInto):
904         (WebCore::SVGSMILElement::removedFrom):
905         (WebCore::SVGSMILElement::svgAttributeChanged):
906         (WebCore::SVGSMILElement::setAttributeName):
907         (WebCore::SVGSMILElement::setTargetElement):
908         * svg/animation/SVGSMILElement.h:
909         (WebCore):
910         (WebCore::SVGSMILElement::targetElement):
911         (SVGSMILElement):
912
913 2012-12-06  Jon Lee  <jonlee@apple.com>
914
915         Retry snapshots if they are too empty
916         https://bugs.webkit.org/show_bug.cgi?id=104174
917         <rdar://problem/12820146>
918
919         Reviewed by Simon Fraser.
920
921         * html/HTMLPlugInImageElement.cpp:
922         (WebCore::HTMLPlugInImageElement::updateSnapshot): Change the state machine check so that even
923         when the plug-in is displaying a snapshot, the snapshot can still be updated. This allows for the
924         retries to be drawn.
925
926 2012-12-06  Adam Klein  <adamk@chromium.org>
927
928         [HTMLTemplateElement] make content readonly and cloneNode(deep) clone content
929         https://bugs.webkit.org/show_bug.cgi?id=104181
930
931         Reviewed by Adam Barth.
932
933         Note that this patch also adds IDL attributes/custom code to tie the lifetime
934         of the content DocumentFragment wrapper to the lifetime of the template element wrapper
935         via a hidden JS property.
936
937         Based on a patch by Rafael Weinstein.
938
939         Test: fast/dom/HTMLTemplateElement/contentWrappers.html
940
941         * DerivedSources.cpp:
942         * Target.pri:
943         * UseJSC.cmake:
944         * WebCore.gypi:
945         * WebCore.xcodeproj/project.pbxproj:
946         * bindings/js/JSBindingsAllInOne.cpp:
947         * bindings/js/JSHTMLTemplateElementCustom.cpp: Copied from Source/WebCore/html/HTMLTemplateElement.idl.
948         (WebCore):
949         (WebCore::JSHTMLTemplateElement::content):
950         * bindings/scripts/CodeGeneratorV8.pm: Add support for new V8CacheAttributeForGC attribute.
951         * dom/Element.h:
952         (Element): Annotate cloneNode() with OVERRIDE
953         * html/HTMLTemplateElement.cpp:
954         (WebCore::HTMLTemplateElement::cloneNode):
955         * html/HTMLTemplateElement.h:
956         (HTMLTemplateElement): override cloneNode
957         * html/HTMLTemplateElement.idl: Make content readonly and add custom attributes.
958
959 2012-12-06  Brent Fulgham  <bfulgham@webkit.org>
960
961         [Windows, WinCairo] Unreviewed build correction.
962
963         Exclude 'DocumentSharedObjectPool.cpp' from build, since it is
964         built as part of DOMAllInOne.cpp.  The build (besides wasting
965         time) generates a bunch of build warnings for duplicate symbols.
966
967         * WebCore.vcproj/WebCore.vcproj: Mark DocumentSharedObjectPool.cpp
968         to not build independently of DOMAllInOne.cpp.
969
970 2012-12-06  David Grogan  <dgrogan@chromium.org>
971
972         IndexedDB: Abort transactions because of leveldb errors part 4
973         https://bugs.webkit.org/show_bug.cgi?id=103964
974
975         Reviewed by Tony Chang.
976
977         deleteDatabase, open, and deleteObjectStore will now fire more aborts
978         and errors in case of leveldb problems
979
980         * Modules/indexeddb/IDBBackingStore.cpp:
981         (WebCore::getVarInt): Make return value indicate leveldb error.
982         (WebCore::getString): ditto.
983         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
984         Change return value to indicate leveldb error.
985
986         (WebCore::IDBBackingStore::deleteDatabase):
987         Already had the desired return value semantics. As a consumer of
988         getIDBDatabaseMetadata, will return an error (causing an abort) more
989         often.
990
991         (WebCore::IDBBackingStore::deleteObjectStore):
992         Needed return value change. Will return error to DatabaseBackend to
993         indicate leveldb problems.
994
995         * Modules/indexeddb/IDBBackingStore.h:
996         (IDBBackingStore):
997         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
998         (WebCore::IDBDatabaseBackendImpl::openInternal):
999         Pass leveldb errors up to callers, who already handle internal errors.
1000
1001         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
1002         Abort transaction if there were leveldb problems deleting an object
1003         store.
1004
1005 2012-12-06  David Grogan  <dgrogan@chromium.org>
1006
1007         IndexedDB: Add webkitErrorMessage to IDBTransaction
1008         https://bugs.webkit.org/show_bug.cgi?id=104199
1009
1010         Reviewed by Tony Chang.
1011
1012         Don't drop error messages on the floor.
1013
1014         Expose an error message on IDBTransaction to give developers more
1015         information than the opaque error code currently available. This is
1016         exactly what is done in IDBRequest. 
1017
1018         Tests - transaction-error.html
1019
1020         * Modules/indexeddb/IDBDatabaseError.h:
1021         (WebCore::IDBDatabaseError::create):
1022         * Modules/indexeddb/IDBRequest.cpp:
1023         (WebCore::IDBRequest::dispatchEvent):
1024         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
1025         * Modules/indexeddb/IDBTransaction.cpp:
1026         (WebCore::IDBTransaction::setError):
1027         (WebCore):
1028         (WebCore::IDBTransaction::webkitErrorMessage):
1029         (WebCore::IDBTransaction::onAbort):
1030         * Modules/indexeddb/IDBTransaction.h:
1031         (IDBTransaction):
1032         * Modules/indexeddb/IDBTransaction.idl:
1033
1034 2012-12-06  Alexander Shalamov  <alexander.shalamov@intel.com>
1035
1036         XMLHttpRequest Content-Type should be taken from Blob type
1037         https://bugs.webkit.org/show_bug.cgi?id=99983
1038
1039         Reviewed by Alexey Proskuryakov.
1040
1041         Fix XMLHttpRequest::send(Blob*) method, so that the Content-Type is set according to W3C specification.
1042         http://www.w3.org/TR/XMLHttpRequest/#the-send-method
1043
1044         Added test that check if content type is set correctly when blob object is sent.
1045
1046         Test: http/tests/xmlhttprequest/post-blob-content-type.html
1047
1048         * xml/XMLHttpRequest.cpp:
1049         (WebCore::XMLHttpRequest::send):
1050             Set correct MIME type for Blob objects.
1051         * WebCore.vcproj/WebCore.vcproj:
1052             Added ParsedContentType to project file.
1053
1054 2012-12-06  Min Qin  <qinmin@chromium.org>
1055
1056         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
1057         https://bugs.webkit.org/show_bug.cgi?id=103555
1058
1059         Reviewed by Stephen White.
1060
1061         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
1062         No test added for now as impl side paiting is still WIP.
1063
1064         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1065         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1066         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
1067         (WebCore):
1068         (WebCore::LazyDecodingPixelRef::Decode):
1069         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1070         (LazyDecodingPixelRef):
1071
1072 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1073
1074         [V8] Make an Isolate mandatory in v8UnsignedInteger()
1075         https://bugs.webkit.org/show_bug.cgi?id=104235
1076
1077         Reviewed by Adam Barth.
1078
1079         No tests. No change in behavior.
1080
1081         * bindings/v8/ArrayValue.cpp:
1082         (WebCore::ArrayValue::get):
1083         * bindings/v8/V8Binding.h:
1084         (WebCore::v8UnsignedInteger):
1085         * bindings/v8/V8LazyEventListener.cpp:
1086         (WebCore::V8LazyEventListener::prepareListenerObject):
1087
1088 2012-12-06  David Hyatt  <hyatt@apple.com>
1089
1090         [New Multicolumn] Add requiresBalancing booleans to track which column sets need to rebalance.
1091         https://bugs.webkit.org/show_bug.cgi?id=104297
1092
1093         Reviewed by Simon Fraser.
1094
1095         Add requiresBalancing booleans to RenderMultiColumnBlock and RenderMultiColumnSet. For now the former is just propagated
1096         to the latter, but eventually RenderMultiColumnSets will have a notion of balancing that has to be independent of the
1097         owning block (e.g., maybe only the last set rebalances, or maybe only a set that contains the content between two forced
1098         breaks wants to rebalance, etc.).
1099
1100         * rendering/RenderMultiColumnBlock.cpp:
1101         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
1102         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1103         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
1104         * rendering/RenderMultiColumnBlock.h:
1105         (WebCore::RenderMultiColumnBlock::requiresBalancing):
1106         (RenderMultiColumnBlock):
1107         * rendering/RenderMultiColumnSet.cpp:
1108         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
1109         * rendering/RenderMultiColumnSet.h:
1110         (WebCore::RenderMultiColumnSet::requiresBalancing):
1111         (WebCore::RenderMultiColumnSet::setRequiresBalancing):
1112         (RenderMultiColumnSet):
1113         (WebCore::toRenderMultiColumnSet):
1114         (WebCore):
1115
1116 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1117
1118         Unreviewed, rolling out r136871.
1119         http://trac.webkit.org/changeset/136871
1120         https://bugs.webkit.org/show_bug.cgi?id=104293
1121
1122         crashes on bots and memory leaks (Requested by esprehn on
1123         #webkit).
1124
1125         * dom/Document.h:
1126         (WebCore::Node::treeScope):
1127         * dom/Element.cpp:
1128         (WebCore::Element::createRareData):
1129         * dom/ElementRareData.h:
1130         (ElementRareData):
1131         (WebCore::ElementRareData::ElementRareData):
1132         * dom/Node.cpp:
1133         (WebCore::Node::setTreeScope):
1134         (WebCore::Node::ensureRareData):
1135         (WebCore::Node::createRareData):
1136         (WebCore::Node::clearRareData):
1137         * dom/Node.h:
1138         (WebCore::NodeRareDataBase::~NodeRareDataBase):
1139         (WebCore::NodeRareDataBase::NodeRareDataBase):
1140         (NodeRareDataBase):
1141         (WebCore::Node::renderer):
1142         (WebCore::Node::setRenderer):
1143         (Node):
1144         (WebCore::Node::hasRareData):
1145         * dom/NodeRareData.h:
1146         (WebCore::NodeRareData::NodeRareData):
1147         (NodeRareData):
1148
1149 2012-12-06  Adam Klein  <adamk@chromium.org>
1150
1151         Remove non-v8 binding files from WebCore.gypi
1152         https://bugs.webkit.org/show_bug.cgi?id=104288
1153
1154         Reviewed by Adam Barth.
1155
1156         Since the gyp build is only used by the Chromium project,
1157         there's no need for cpp, gobject, objc, or jsc bindings
1158         in these build files.
1159
1160         * WebCore.gypi:
1161
1162 2012-12-06  Tony Chang  <tony@chromium.org>
1163
1164         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
1165         https://bugs.webkit.org/show_bug.cgi?id=104042
1166
1167         Reviewed by Antti Koivisto.
1168
1169         Add DocumentStyleSheetCollection::addAuthorSheet so embedders can allow scripts
1170         to insert author level styles. Expose the method to window.interals for testing.
1171
1172         Test: userscripts/insert-stylesheets.html
1173
1174         * WebCore.exp.in: Update exports for Internals.cpp.
1175         * WebCore.order: Update exports for Internals.cpp.
1176         * dom/DocumentStyleSheetCollection.cpp:
1177         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
1178         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Add the stylesheet and force a style recalc.
1179         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Include author level styles.
1180         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): Include author styles.
1181         * dom/DocumentStyleSheetCollection.h:
1182         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Accessor.
1183         (DocumentStyleSheetCollection): Keep track of author styles added by script.
1184         * testing/Internals.cpp:
1185         (WebCore::Internals::insertAuthorCSS): Testing addAuthorSheet.
1186         (WebCore::Internals::insertUserCSS): Testing addUserSheet.
1187         * testing/Internals.h:
1188         * testing/Internals.idl: Add addAuthorSheet and addUserSheet.
1189
1190 2012-12-06  Elliott Sprehn  <esprehn@gmail.com>
1191
1192         Create only NodeRareDataBase when setting TreeScope
1193         https://bugs.webkit.org/show_bug.cgi?id=104202
1194
1195         Reviewed by Dimitri Glazkov.
1196
1197         Move many fields from NodeRareData into NodeRareDataBase and rename it
1198         UncommonNodeData and add a flag to determine if a UncommonNodeData is
1199         actually a full NodeRareData instance. By moving fields up from NodeRareData
1200         we ensure that this new flag in the base class doesn't make NodeRareData
1201         grow in size.
1202
1203         We then make setting the tree scope only allocate the UncommonNodeData
1204         instead of creating the full NodeRareData or ElementRareData. This is
1205         important because when putting nodes into ShadowRoot or any descendant
1206         we must associate the node with a tree scope which adds rare data to the
1207         node making NodeRareData and ElementRareData not very rare.
1208
1209         On 64bit, this reduces the overhead per element from 136 bytes to
1210         32 bytes for a 76% savings, and on other nodes from 64 bytes to 32 bytes
1211         for a 50% savings.
1212
1213         No new tests, no change in behavior.
1214
1215         * dom/Document.h:
1216         (WebCore::Node::treeScope):
1217         * dom/Element.cpp:
1218         (WebCore::Element::createRareData):
1219         * dom/ElementRareData.h:
1220         (ElementRareData):
1221         (WebCore::ElementRareData::ElementRareData):
1222         * dom/Node.cpp:
1223         (WebCore::Node::setTreeScope):
1224         (WebCore::Node::ensureRareData):
1225         (WebCore::Node::createRareData):
1226         (WebCore::Node::clearRareData):
1227         * dom/Node.h:
1228         (WebCore::UncommonNodeData::create):
1229         (UncommonNodeData):
1230         (WebCore::UncommonNodeData::~UncommonNodeData):
1231         (WebCore::UncommonNodeData::isNodeRareData):
1232         (WebCore::UncommonNodeData::UncommonNodeData):
1233         (WebCore::Node::renderer):
1234         (WebCore::Node::setRenderer):
1235         (Node):
1236         (WebCore::Node::hasRareData):
1237         (WebCore::Node::hasUncommonNodeData):
1238         * dom/NodeRareData.h:
1239         (WebCore::NodeRareData::NodeRareData):
1240         (NodeRareData):
1241
1242 2012-12-06  Joshua Bell  <jsbell@chromium.org>
1243
1244         IndexedDB: Remove IDBDatabaseException.idl
1245         https://bugs.webkit.org/show_bug.cgi?id=102961
1246
1247         Reviewed by Adam Barth.
1248
1249         Delete the IDL and references to it. No longer needed as a enum member
1250         in the autogenerated ExceptionCodeDescription.h so removed from the ".in"
1251         file; only direct references are retained in the autogenerated cpp file.
1252
1253         Ideally the code generator would handle these new-style DOMExceptions,
1254         but we don't have any other examples yet to know what pattern to follow.
1255
1256         No new tests - just removing dead code.
1257
1258         * CMakeLists.txt:
1259         * DerivedSources.cpp:
1260         * DerivedSources.make:
1261         * DerivedSources.pri:
1262         * GNUmakefile.list.am:
1263         * Modules/indexeddb/IDBDatabaseException.idl: Removed.
1264         * WebCore.gypi:
1265         * WebCore.vcproj/WebCore.vcproj:
1266         * WebCore.xcodeproj/project.pbxproj:
1267         * dom/DOMExceptions.in:
1268         * dom/make_dom_exceptions.pl:
1269         (generateImplementation):
1270
1271 2012-12-06  Andreas Kling  <akling@apple.com>
1272
1273         [Mac] Drain the CSSValuePool on memory pressure.
1274         <http://webkit.org/b/104274>
1275
1276         Reviewed by Antti Koivisto.
1277
1278         Add a drain() mechanism to CSSValuePool and call it when we're under memory pressure.
1279
1280         * WebCore.xcodeproj/project.pbxproj:
1281         * css/CSSValuePool.cpp:
1282         (WebCore::CSSValuePool::drain):
1283         * css/CSSValuePool.h:
1284         * platform/mac/MemoryPressureHandlerMac.mm:
1285         (WebCore::MemoryPressureHandler::releaseMemory):
1286
1287 2012-12-05  Adam Klein  <adamk@chromium.org>
1288
1289         Remove gyp config for incomplete and unused Apple Mac gyp build
1290         https://bugs.webkit.org/show_bug.cgi?id=104068
1291
1292         Reviewed by Adam Barth.
1293
1294         As part of the removal, move some files to the proper sections
1295         of the gypi file.
1296
1297         * WebCore.gyp/WebCore.gyp:
1298         * WebCore.gypi:
1299
1300 2012-12-06  Hans Muller  <hmuller@adobe.com>
1301
1302         [CSS Exclusions] Add support for computing the first included interval position.
1303         https://bugs.webkit.org/show_bug.cgi?id=103327
1304
1305         Reviewed by Levi Weintraub.
1306
1307         If the first "word" in a line doesn't fit within the shape-inside when lineTop
1308         is the top of the shape's logical bounding box, adjust lineTop downwards to where
1309         the word fits.  Currently only rounded rectangle shapes are supported.
1310
1311         Added ExclusionShape::firstIncludedIntervalLogicalTop(). The new virtual method
1312         computes the topmost/leftmost location where a line segment with the specified
1313         minLogicalIntervalSize will fit within the exclusion shape and returns the
1314         corresponding logical Y coordinate.  The result is additionally constrained to
1315         be at or below minLogicalIntervalTop. If the segment will not fit anywhere within
1316         the shape, then false is returned.
1317
1318         During layout, minLogicalIntervalTop is the nominal top of the line being laid
1319         out within the exclusion shape.
1320
1321         RenderBlock::layoutRunsAndFloatsInRange() now calls a new ExclusionShapeInsideInfo
1322         method, adjustLogicalLineTop(), which uses firstIncludedIntervalLogicalTop() to
1323         decide if the logical top of the line has to be moved downwards, for the first
1324         word to fit within the exclusion shape.
1325
1326         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-001.html
1327                fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-002.html
1328
1329         * rendering/ExclusionPolygon.cpp:
1330         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This is a stub implementation.
1331         * rendering/ExclusionPolygon.h:
1332         * rendering/ExclusionRectangle.cpp:
1333         (WebCore::ellipseXIntercept): Added spaces to conform to webkit style and to be consistent with ellipseYIntercept()
1334         (WebCore::ellipseYIntercept): Compute an ellipse's Y intercept for an X coordinate.
1335         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): See the description above.
1336         * rendering/ExclusionRectangle.h:
1337         * rendering/ExclusionShape.h:
1338         (ExclusionShape):
1339         (WebCore::ExclusionShape::logicalTopForMinY): Internal to logical coordinate conversion.
1340         * rendering/ExclusionShapeInsideInfo.cpp:
1341         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): A new method that updates m_lineTop with firstIncludedIntervalPosition().
1342         * rendering/ExclusionShapeInsideInfo.h:
1343         (ExclusionShapeInsideInfo):
1344         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): This is just a cover for the private m_lineTop field.
1345         * rendering/RenderBlockLineLayout.cpp:
1346         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added code that restarts the layout loop if it's necessary to adjust the line's logicalTop.
1347         (WebCore::RenderBlock::restartLayoutRunsAndFloatsInRange): Factored newly common code into this helper function.
1348
1349 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1350
1351         Use ownerNode() instead of base() in HTMLCollection
1352         https://bugs.webkit.org/show_bug.cgi?id=104244
1353
1354         Reviewed by Adam Barth.
1355
1356         Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
1357         Notice that the definition of base(), which this patch removes, is "return ownerNode()".
1358
1359         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1360         (WebCore::getNamedItems):
1361         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1362         (WebCore::JSHTMLOptionsCollection::indexSetter):
1363         (WebCore::JSHTMLOptionsCollection::remove):
1364         * bindings/scripts/CodeGeneratorJS.pm:
1365         (GenerateImplementation):
1366         * bindings/scripts/CodeGeneratorV8.pm:
1367         (GenerateOpaqueRootForGC):
1368         * bindings/scripts/IDLAttributes.txt:
1369         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
1370         (WebCore::getNamedItems):
1371         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1372         (WebCore::V8HTMLOptionsCollection::removeCallback):
1373         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
1374         * dom/WebKitNamedFlow.cpp:
1375         (WebCore::WebKitNamedFlow::ownerNode):
1376         * dom/WebKitNamedFlow.h:
1377         (WebKitNamedFlow):
1378         * dom/WebKitNamedFlow.idl:
1379         * html/HTMLAllCollection.idl:
1380         * html/HTMLCollection.h:
1381         (HTMLCollection):
1382         * html/HTMLCollection.idl:
1383         * html/HTMLFormControlsCollection.cpp:
1384         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
1385         (WebCore::HTMLFormControlsCollection::create):
1386         (WebCore::HTMLFormControlsCollection::formControlElements):
1387         (WebCore::HTMLFormControlsCollection::formImageElements):
1388         (WebCore::HTMLFormControlsCollection::namedItem):
1389         (WebCore::HTMLFormControlsCollection::updateNameCache):
1390         * html/HTMLFormControlsCollection.idl:
1391         * html/HTMLNameCollection.cpp:
1392         (WebCore::HTMLNameCollection::~HTMLNameCollection):
1393         (WebCore::HTMLNameCollection::virtualItemAfter):
1394         * html/HTMLOptionsCollection.cpp:
1395         (WebCore::HTMLOptionsCollection::add):
1396         (WebCore::HTMLOptionsCollection::remove):
1397         (WebCore::HTMLOptionsCollection::selectedIndex):
1398         (WebCore::HTMLOptionsCollection::setSelectedIndex):
1399         (WebCore::HTMLOptionsCollection::setLength):
1400         * html/HTMLOptionsCollection.idl:
1401         * html/HTMLPropertiesCollection.cpp:
1402         (WebCore::HTMLPropertiesCollection::updateRefElements):
1403         (WebCore::HTMLPropertiesCollection::namedItem):
1404         * html/HTMLTableRowsCollection.cpp:
1405         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
1406
1407 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
1408
1409         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
1410         https://bugs.webkit.org/show_bug.cgi?id=104254
1411
1412         Reviewed by Adam Barth.
1413
1414         SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
1415         in the latest specification.
1416
1417         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error
1418
1419         Existing tests modified to cover this patch.
1420
1421         * Modules/speech/SpeechRecognitionError.cpp:
1422         (WebCore::ErrorCodeToString):
1423         (WebCore):
1424         (WebCore::SpeechRecognitionError::create):
1425         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
1426         * Modules/speech/SpeechRecognitionError.h:
1427         (SpeechRecognitionErrorInit):
1428         (WebCore::SpeechRecognitionError::error):
1429         (SpeechRecognitionError):
1430         * Modules/speech/SpeechRecognitionError.idl:
1431
1432 2012-12-06  Stephen Chenney  <schenney@chromium.org>
1433
1434         SVG <use> element inside an svg-as-image fails
1435         https://bugs.webkit.org/show_bug.cgi?id=104007
1436
1437         Reviewed by Eric Seidel.
1438
1439         Upon redraw, SVGImage calls layout on the document it is drawing into
1440         the image if the image, provided it believes the redraw does not need
1441         to be delayed. Unfortunately, when an SVG <use> element is modified
1442         (by animation, say) and regenerates its shadow tree, the destructors
1443         invoke redraw, causing the SVGImage to call layout on something that
1444         is in the process of being deleted. That's bad.
1445
1446         This change causes SVGImage to always delay the redraw. It is the most robust
1447         way to protect against this problem, as there may be any number of
1448         ways to cause this issue (a node being deleted in an svg-as-image
1449         target) and this protects against them all.
1450
1451         The test case crashes in Asan Chromium.
1452
1453         Test: svg/as-image/animated-use-as-image-crash.html
1454
1455         * svg/graphics/SVGImageCache.cpp:
1456         (WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.
1457
1458 2012-12-06  Antoine Quint  <graouts@apple.com>
1459
1460         TextTrack's .cues not ordered correctly when two cues have the same .startTime
1461         https://bugs.webkit.org/show_bug.cgi?id=103266
1462
1463         Reviewed by Eric Carlson.
1464
1465         Adding a new method TextTrackCueList::updateCueIndex() to update the list of
1466         cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
1467         add a new method to TextTrackCueList rather than calling remove() and then add()
1468         on the list from TextTrack::cueDidChange() so that the nature of the operation
1469         is abstracted and we can easily change the way we keep the cue list sorted at
1470         a later time should we choose to.
1471
1472         * html/track/TextTrack.cpp:
1473         (WebCore::TextTrack::cueDidChange):
1474         * html/track/TextTrackCueList.cpp:
1475         (WebCore::TextTrackCueList::updateCueIndex):
1476         (WebCore):
1477         * html/track/TextTrackCueList.h:
1478         (TextTrackCueList):
1479
1480 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
1481
1482         [Qt][Mac] Fix libxslt and libxml2 config tests
1483         https://bugs.webkit.org/show_bug.cgi?id=104164
1484
1485         Reviewed by Simon Hausmann.
1486
1487         Since libxml2 is a dependency for libxslt and is not used
1488         standalone the configurations for it should also depend on
1489         whether XSLT is enabled.
1490         Also avoid using pkg-config on Mac, instead use direct
1491         include paths and add needed libraries to the linker.
1492
1493         No new tests needed.
1494
1495         * WebCore.pri:
1496
1497 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
1498
1499         Internals.getElementByIdInShadowRoot is nonsense now.
1500         https://bugs.webkit.org/show_bug.cgi?id=104241
1501
1502         Reviewed by Kent Tamura.
1503
1504         Since we have ShadowRoot.getElementById() now, we don't need Internals.getElementByIdInShadowRoot, which is
1505         the same functionality of ShadowRoot.getElementById().
1506
1507         Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
1508
1509         * WebCore.exp.in:
1510         * testing/Internals.cpp:
1511         * testing/Internals.h:
1512         (Internals):
1513         * testing/Internals.idl:
1514
1515 2012-12-06  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1516
1517         [EFL] Active texture state gets corrupted after updating graphics surface contents.
1518         https://bugs.webkit.org/show_bug.cgi?id=104248.
1519
1520         Reviewed by Kenneth Rohde Christiansen.
1521
1522         GraphicsContext3DPrivate::copyToGraphicsSurface() doesn't restore the previously bound texture
1523         after copying texture contents. This corrupts the texture state.
1524
1525         Existing Tests should cover this.
1526
1527         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1528         (GraphicsContext3DPrivate::copyToGraphicsSurface):
1529         * platform/graphics/opengl/GLPlatformSurface.cpp:
1530         (WebCore::GLPlatformSurface::updateContents):
1531         * platform/graphics/opengl/GLPlatformSurface.h:
1532         (GLPlatformSurface):
1533
1534 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
1535
1536         Web Inspector: Goto panel shortcuts and description are reversed
1537         https://bugs.webkit.org/show_bug.cgi?id=103988
1538
1539         Reviewed by Pavel Feldman.
1540
1541         Swap the square brackets in the shortcuts.
1542
1543         * inspector/front-end/inspector.js:
1544         (WebInspector._registerShortcuts):
1545
1546 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1547
1548         Unreviewed, rolling out r136818.
1549         http://trac.webkit.org/changeset/136818
1550         https://bugs.webkit.org/show_bug.cgi?id=104249
1551
1552         simulatedClick does not work as per #chrmium irc. (Requested
1553         by hayato on #webkit).
1554
1555         * dom/EventDispatcher.cpp:
1556         (WebCore::EventRelatedTargetAdjuster::adjust):
1557         * dom/MouseEvent.cpp:
1558         (WebCore::MouseEventDispatchMediator::create):
1559         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
1560         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1561         * dom/MouseEvent.h:
1562         (MouseEventDispatchMediator):
1563         * dom/Node.cpp:
1564         (WebCore::Node::dispatchEvent):
1565
1566 2012-12-06  Ulan Degenbaev  <ulan@chromium.org>
1567
1568         [v8] Fix hidden property name of V8ArrayBufferView flag.
1569         https://bugs.webkit.org/show_bug.cgi?id=104099
1570
1571         Reviewed by Kentaro Hara.
1572
1573         Fix hidden property name of V8ArrayBufferView hidden copy method.
1574
1575         * bindings/v8/V8HiddenPropertyName.h:
1576         (WebCore):
1577         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
1578         (WebCore::getHiddenCopyMethod):
1579         (WebCore::installHiddenCopyMethod):
1580
1581 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1582
1583         Unreviewed. Fixed a wrong comment landed in r136822.
1584
1585         * bindings/v8/V8Binding.h:
1586         (WebCore):
1587
1588 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1589
1590         [V8] Implement deprecatedV8String()
1591         https://bugs.webkit.org/show_bug.cgi?id=104230
1592
1593         Reviewed by Adam Barth.
1594
1595         To make an Isolate mandatory in v8String(), we implement
1596         deprecatedV8String() for call sites that don't have
1597         an Isolate. Eventually we want to kill the method though.
1598
1599         No tests. No change in behavior.
1600
1601         * bindings/scripts/test/V8/V8TestCallback.cpp:
1602         (WebCore::V8TestCallback::callbackWithClass2Param):
1603         * bindings/v8/Dictionary.cpp:
1604         (WebCore::Dictionary::getKey):
1605         * bindings/v8/IDBBindingUtilities.cpp:
1606         (WebCore::get):
1607         (WebCore::set):
1608         * bindings/v8/JavaScriptCallFrame.cpp:
1609         (WebCore::JavaScriptCallFrame::evaluate):
1610         * bindings/v8/ScriptController.cpp:
1611         (WebCore::ScriptController::compileAndRunScript):
1612         (WebCore::ScriptController::bindToWindowObject):
1613         (WebCore::ScriptController::disableEval):
1614         * bindings/v8/ScriptDebugServer.cpp:
1615         (WebCore::ScriptDebugServer::setBreakpoint):
1616         (WebCore::ScriptDebugServer::removeBreakpoint):
1617         (WebCore::ScriptDebugServer::setScriptSource):
1618         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
1619         (WebCore::ScriptDebugServer::compileScript):
1620         * bindings/v8/ScriptFunctionCall.cpp:
1621         (WebCore::ScriptCallArgumentHandler::appendArgument):
1622         (WebCore::ScriptFunctionCall::call):
1623         (WebCore::ScriptFunctionCall::construct):
1624         * bindings/v8/ScriptProfiler.cpp:
1625         (WebCore::ScriptProfiler::start):
1626         (WebCore::ScriptProfiler::stop):
1627         (WebCore::ScriptProfiler::takeHeapSnapshot):
1628         * bindings/v8/ScriptSourceCode.cpp:
1629         (WebCore::ScriptSourceCode::compileScript):
1630         * bindings/v8/V8Binding.h:
1631         (WebCore):
1632         (WebCore::deprecatedV8String):
1633         * bindings/v8/V8DOMWindowShell.cpp:
1634         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1635         (WebCore::V8DOMWindowShell::namedItemAdded):
1636         (WebCore::V8DOMWindowShell::namedItemRemoved):
1637         * bindings/v8/V8LazyEventListener.cpp:
1638         (WebCore::V8LazyEventListener::prepareListenerObject):
1639         * bindings/v8/V8WindowErrorHandler.cpp:
1640         (WebCore::V8WindowErrorHandler::callListenerFunction):
1641         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1642         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1643         * bindings/v8/WorkerScriptController.cpp:
1644         (WebCore::WorkerScriptController::evaluate):
1645         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
1646         (WebCore::installHiddenCopyMethod):
1647         (WebCore::copyElements):
1648         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1649         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
1650         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1651         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
1652         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1653         (WebCore::InjectedScriptManager::createInjectedScript):
1654         * bindings/v8/custom/V8MessageEventCustom.cpp:
1655         (WebCore::V8MessageEvent::dataAccessorGetter):
1656         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1657         (WebCore::toV8Object):
1658         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
1659
1660 2012-12-06  Keishi Hattori  <keishi@webkit.org>
1661
1662         Page popup should align to the right when the anchor element is rtl
1663         https://bugs.webkit.org/show_bug.cgi?id=104219
1664
1665         Reviewed by Kent Tamura.
1666
1667         Page popup should align to the right edge of the anchor element when the anchor element is rtl.
1668
1669         No new tests. Mock page popup can't test popup window position.
1670
1671         * Resources/pagepopups/pickerCommon.js:
1672         (_adjustWindowRectHorizontally): Align to the right edge when anchor element is rtl. Removed some redundant lines.
1673         (setWindowRect): If the window is hidden we want to move first then resize so the popup doesn't flicker.
1674         (isWindowHidden): Returns true if the window is hidden using hideWindow().
1675
1676 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1677
1678         [V8] Make an Isolate mandatory for v8StringOrNull() and v8StringOrUndefined()
1679         https://bugs.webkit.org/show_bug.cgi?id=104213
1680
1681         Reviewed by Adam Barth.
1682
1683         All call sites of v8StringOrNull() and v8StringOrUndefined() have an Isolate.
1684
1685         No tests. No change in behavior.
1686
1687         * bindings/v8/V8Binding.h:
1688         (WebCore::v8StringOrNull):
1689         (WebCore::v8StringOrUndefined):
1690
1691 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1692
1693         [V8] Implement deprecatedV8Integer(int i)
1694         https://bugs.webkit.org/show_bug.cgi?id=104220
1695
1696         Reviewed by Adam Barth.
1697
1698         To make an Isolate mandatory in v8Integer(), we implement
1699         deprecatedV8Integer(int i) for call sites that don't have
1700         an Isolate. Eventually we want to kill deprecatedV8Integer(int i).
1701
1702         No new tests. No change in behavior.
1703
1704         * bindings/v8/Dictionary.cpp:
1705         (WebCore::Dictionary::get):
1706         * bindings/v8/NPV8Object.cpp:
1707         (_NPN_Enumerate):
1708         * bindings/v8/PageScriptDebugServer.cpp:
1709         (WebCore::PageScriptDebugServer::addListener):
1710         * bindings/v8/ScriptDebugServer.cpp:
1711         (WebCore::ScriptDebugServer::setBreakpoint):
1712         (WebCore::ScriptDebugServer::compileScript):
1713         * bindings/v8/ScriptSourceCode.cpp:
1714         (WebCore::ScriptSourceCode::compileScript):
1715         * bindings/v8/V8Binding.h:
1716         (WebCore):
1717         (WebCore::deprecatedV8Integer):
1718         * bindings/v8/V8DOMConfiguration.cpp:
1719         (WebCore::V8DOMConfiguration::batchConfigureConstants):
1720         * bindings/v8/V8NPUtils.cpp:
1721         (WebCore::convertNPVariantToV8Object):
1722         * bindings/v8/V8Utilities.cpp:
1723         (WebCore::createHiddenDependency):
1724         (WebCore::removeHiddenDependency):
1725         * bindings/v8/V8WindowErrorHandler.cpp:
1726         (WebCore::V8WindowErrorHandler::callListenerFunction):
1727         * bindings/v8/V8WorkerContextErrorHandler.cpp:
1728         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
1729         * bindings/v8/WorkerScriptDebugServer.cpp:
1730         (WebCore::WorkerScriptDebugServer::addListener):
1731         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1732         (WebCore::V8MutationCallback::handleEvent):
1733
1734 2012-12-06  Hayato Ito  <hayato@chromium.org>
1735
1736         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
1737         https://bugs.webkit.org/show_bug.cgi?id=102681
1738
1739         Reviewed by Dimitri Glazkov.
1740
1741         Make sure that event's relatedTarget re-targeting occurs for mouse
1742         events created by event.initMouseEvent().  Since user-generated
1743         mouse events can have a relatedTarget which is same to the target
1744         node, the algorithm which calculates event's ancestors is also
1745         updated so that ancestors are not shrunk wrongly.
1746
1747         Test: fast/events/dispatch-synthetic-mouseevent.html
1748               fast/dom/shadow/shadow-dom-event-dispatching.html
1749
1750         * dom/EventDispatcher.cpp:
1751         (WebCore::EventRelatedTargetAdjuster::adjust):
1752         * dom/MouseEvent.cpp:
1753         (WebCore::MouseEventDispatchMediator::create):
1754         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
1755         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1756         * dom/MouseEvent.h:
1757         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
1758         (MouseEventDispatchMediator):
1759         * dom/Node.cpp:
1760         (WebCore::Node::dispatchEvent):
1761
1762 2012-12-06  Michael Pruett  <michael@68k.org>
1763
1764         [JSC] Check whether property is an array before attempting conversion to array in JSDictionary
1765         https://bugs.webkit.org/show_bug.cgi?id=96614
1766
1767         Reviewed by Kentaro Hara.
1768
1769         JSDictionary should check whether the property being accessed in get()
1770         is an array before attempting to convert the value to an array.
1771
1772         Previously calling get() with a result type of Vector<String> when
1773         the named property could not be converted to an array would generate
1774         an exception.
1775
1776         Tests: storage/indexeddb/*
1777
1778         * bindings/js/JSDictionary.cpp:
1779         (WebCore::JSDictionary::convertValue):
1780         * bindings/js/JSDictionary.h:
1781         (WebCore::JSDictionary::tryGetPropertyAndResult):
1782
1783 2012-12-05  Kentaro Hara  <haraken@chromium.org>
1784
1785         [V8] Pass Isolate to toDOMStringList()
1786         https://bugs.webkit.org/show_bug.cgi?id=104224
1787
1788         Reviewed by Adam Barth.
1789
1790         No tests. No change in behavior.
1791
1792         * bindings/scripts/CodeGeneratorV8.pm:
1793         (JSValueToNative):
1794         * bindings/scripts/test/V8/V8TestObj.cpp:
1795         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
1796         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
1797         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
1798         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
1799         * bindings/v8/V8Binding.cpp:
1800         (WebCore::toDOMStringList):
1801         * bindings/v8/V8Binding.h:
1802         (WebCore):
1803
1804 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1805
1806         Remove JSDependentRetained.h and V8DependentRetained.h
1807         https://bugs.webkit.org/show_bug.cgi?id=104232
1808
1809         Reviewed by Adam Barth.
1810
1811         Although (JS|V8)DependentRetained.h were introduced for MutationObservers,
1812         they are not going to be used (See the discussion in bug 95519).
1813         We can remove them.
1814
1815         No tests. No change in behavior.
1816
1817         * GNUmakefile.list.am:
1818         * WebCore.gypi:
1819         * WebCore.vcproj/WebCore.vcproj:
1820         * WebCore.xcodeproj/project.pbxproj:
1821         * bindings/js/JSDependentRetained.h: Removed.
1822         * bindings/v8/V8DependentRetained.h: Removed.
1823         * bindings/v8/V8PerIsolateData.cpp:
1824         (WebCore::V8PerIsolateData::V8PerIsolateData):
1825         * bindings/v8/V8PerIsolateData.h:
1826         (V8PerIsolateData):
1827
1828 2012-12-06  Kentaro Hara  <haraken@chromium.org>
1829
1830         [V8] Replace v8String("symbol") with v8::String::NewSymbol("symbol")
1831         https://bugs.webkit.org/show_bug.cgi?id=104209
1832
1833         Reviewed by Adam Barth.
1834
1835         V8 can look up symbols faster than strings.
1836
1837         No tests. No change in behavior.
1838
1839         * bindings/v8/JavaScriptCallFrame.cpp:
1840         (WebCore::JavaScriptCallFrame::caller):
1841         (WebCore::JavaScriptCallFrame::sourceID):
1842         (WebCore::JavaScriptCallFrame::line):
1843         (WebCore::JavaScriptCallFrame::column):
1844         (WebCore::JavaScriptCallFrame::functionName):
1845         (WebCore::JavaScriptCallFrame::scopeChain):
1846         (WebCore::JavaScriptCallFrame::scopeType):
1847         (WebCore::JavaScriptCallFrame::thisObject):
1848         (WebCore::JavaScriptCallFrame::evaluate):
1849         (WebCore::JavaScriptCallFrame::restart):
1850         * bindings/v8/V8ThrowException.cpp:
1851         (WebCore::domExceptionStackGetter):
1852         (WebCore::domExceptionStackSetter):
1853         (WebCore::V8ThrowException::setDOMException):
1854         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1855         (WebCore::V8InspectorFrontendHost::platformCallback):
1856         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1857         (WebCore::V8JavaScriptCallFrame::typeAccessorGetter):
1858
1859 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1860
1861         Unreviewed, rolling out r136784 and r136802.
1862         http://trac.webkit.org/changeset/136784
1863         http://trac.webkit.org/changeset/136802
1864         https://bugs.webkit.org/show_bug.cgi?id=104231
1865
1866         breaks chromium canary (Requested by morrita on #webkit).
1867
1868         * WebCore.gyp/WebCore.gyp:
1869         * WebCore.gypi:
1870         * platform/chromium/PlatformThemeChromiumLinux.cpp: Added.
1871         (WebCore):
1872         (WebCore::PlatformThemeChromiumLinux::setScrollbarColors):
1873         (WebCore::clamp):
1874         (WebCore::PlatformThemeChromiumLinux::saturateAndBrighten):
1875         (WebCore::PlatformThemeChromiumLinux::outlineColor):
1876         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
1877         * platform/chromium/PlatformThemeChromiumLinux.h: Added.
1878         (WebCore):
1879         (PlatformThemeChromiumLinux):
1880         (WebCore::PlatformThemeChromiumLinux::thumbInactiveColor):
1881         (WebCore::PlatformThemeChromiumLinux::thumbActiveColor):
1882         (WebCore::PlatformThemeChromiumLinux::trackColor):
1883         (WebCore::PlatformThemeChromiumLinux::PlatformThemeChromiumLinux):
1884         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Added.
1885         (WebCore):
1886         (WebCore::ScrollbarTheme::nativeTheme):
1887         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1888         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1889         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1890         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1891         (WebCore::ScrollbarThemeChromiumLinux::shouldCenterOnThumb):
1892         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1893         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1894         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
1895         (ScrollbarThemeChromiumLinux):
1896         * rendering/RenderThemeChromiumAndroid.cpp:
1897         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet):
1898         * rendering/RenderThemeChromiumAndroid.h:
1899         * rendering/RenderThemeChromiumLinux.cpp: Added.
1900         (WebCore):
1901         (WebCore::getWebThemeState):
1902         (WebCore::RenderThemeChromiumLinux::create):
1903         (WebCore::RenderTheme::themeForPage):
1904         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
1905         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
1906         (WebCore::RenderThemeChromiumLinux::systemColor):
1907         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
1908         (WebCore::RenderThemeChromiumLinux::controlSupportsTints):
1909         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionBackgroundColor):
1910         (WebCore::RenderThemeChromiumLinux::activeListBoxSelectionForegroundColor):
1911         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionBackgroundColor):
1912         (WebCore::RenderThemeChromiumLinux::inactiveListBoxSelectionForegroundColor):
1913         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionBackgroundColor):
1914         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionBackgroundColor):
1915         (WebCore::RenderThemeChromiumLinux::platformActiveSelectionForegroundColor):
1916         (WebCore::RenderThemeChromiumLinux::platformInactiveSelectionForegroundColor):
1917         (WebCore::RenderThemeChromiumLinux::sliderTickSize):
1918         (WebCore::RenderThemeChromiumLinux::sliderTickOffsetFromTrackCenter):
1919         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
1920         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
1921         (WebCore::RenderThemeChromiumLinux::setCaretBlinkInterval):
1922         (WebCore::RenderThemeChromiumLinux::caretBlinkIntervalInternal):
1923         (WebCore::RenderThemeChromiumLinux::setSelectionColors):
1924         (WebCore::RenderThemeChromiumLinux::paintCheckbox):
1925         (WebCore::RenderThemeChromiumLinux::setCheckboxSize):
1926         (WebCore::RenderThemeChromiumLinux::paintRadio):
1927         (WebCore::RenderThemeChromiumLinux::setRadioSize):
1928         (WebCore::RenderThemeChromiumLinux::paintButton):
1929         (WebCore::RenderThemeChromiumLinux::paintTextField):
1930         (WebCore::RenderThemeChromiumLinux::paintMenuList):
1931         (WebCore::RenderThemeChromiumLinux::paintSliderTrack):
1932         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
1933         (WebCore::RenderThemeChromiumLinux::adjustInnerSpinButtonStyle):
1934         (WebCore::RenderThemeChromiumLinux::paintInnerSpinButton):
1935         (WebCore::RenderThemeChromiumLinux::paintProgressBar):
1936         (WebCore::RenderThemeChromiumLinux::shouldOpenPickerWithF4Key):
1937         * rendering/RenderThemeChromiumLinux.h: Added.
1938         (WebCore):
1939         (RenderThemeChromiumLinux):
1940
1941 2012-12-05  Sankeerth V S  <sankeerth.vs@samsung.com>
1942
1943         Web Inspector: Title of "Record Timeline" status button on "Timeline
1944         Panel" should reflect the recording state.
1945         https://bugs.webkit.org/show_bug.cgi?id=104108
1946
1947         Reviewed by Alexander Pavlov.
1948
1949         Title should be toggled between "Record"/"Stop" to reflect current
1950         state of the Status bar button.
1951
1952         No new tests as UI related change.
1953
1954         * inspector/front-end/TimelinePanel.js:
1955         (WebInspector.TimelinePanel.prototype.get _toggleTimelineButtonClicked):
1956
1957 2012-12-03  Kent Tamura  <tkent@chromium.org>
1958
1959         INPUT_MULTIPLE_FIELDS_UI doesn't show digits well in RTL locales
1960         https://bugs.webkit.org/show_bug.cgi?id=103869
1961
1962         Reviewed by Hajime Morita.
1963
1964         We need to use display:inline elements to wrap sub-fields and static
1965         text in DateTimeEditElement children to apply the Unicode Bidi
1966         Algorithm.
1967
1968         Because we can't use display:inline-block for them, we can't specify
1969         min-width CSS property for them. We stop using customStyleForRenderer of
1970         sub-fields to specify each of their widths, and use
1971         customStyleForRenderer of DateTimeEditElement to specify the total
1972         required width. A sub-field width shrink and grow so that the width fits
1973         to the field value, and a DateTimeEditElement doesn't.
1974
1975         No new tests. Coverred by existing tests, especially
1976         fast/forms/datetime/datetime-appearance-l10n.html shows "23:59"
1977         correctly.
1978
1979         * css/html.css:
1980         (input::-webkit-datetime-edit-year-field):
1981         - Make this display:inline to apply the Unicode Bidi Algorithm.
1982         - Use padding instead of margin because of ease of width computation.
1983           Also, the focus apparance gets better by padding.
1984         - Don't allow to specify font property here because of ease of width
1985           computation.
1986         - Remove text-align:center. It doesn't work for display:inline.
1987         (input::-webkit-datetime-edit-text):
1988         - Make this display:inline to apply the Unicode Bidi Algorithm.
1989         - Don't allow to specify font property here because of ease of width
1990           computation.
1991
1992         * html/shadow/DateTimeEditElement.h:
1993         (DateTimeEditElement): Declare customStyleForRenderer.
1994         * html/shadow/DateTimeEditElement.cpp:
1995         (WebCore::DateTimeEditElement::DateTimeEditElement):
1996         Enable customStyleForRenderer.
1997         (WebCore::DateTimeEditElement::customStyleForRenderer):
1998         Compute required width with a font for this element and child maximum
1999         widths, and set it to min-width style.
2000         The resultant width value can be inaccurate if a page author specifies
2001         padding, border, margin, etc. to ::-webkit-datetime-edit-*-field or
2002         ::-webkit-datetime-edit-text. In such case, the page author should specify
2003         wider width to <input>.
2004
2005         * dom/Element.h:
2006         (Element): Add isDateTimeFieldElement to do static_cast<DateTimeFieldElement> safely.
2007         * dom/Element.cpp:
2008         (WebCore::Element::isDateTimeFieldElement): Added.
2009
2010         * html/shadow/DateTimeFieldElement.h:
2011         (DateTimeFieldElement): Declare isDateTimeFieldElement and maximumWidth.
2012         * html/shadow/DateTimeFieldElement.cpp:
2013         (WebCore::DateTimeFieldElement::isDateTimeFieldElement):
2014         Added. Returns true.
2015         (WebCore::DateTimeFieldElement::maximumWidth):
2016         Added. Returns padding width.
2017
2018         * html/shadow/DateTimeSymbolicFieldElement.h:
2019         (DateTimeSymbolicFieldElement):
2020         Remove customStyleForRenderer, and declare maximumWidth.
2021         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2022         (WebCore::DateTimeSymbolicFieldElement::DateTimeSymbolicFieldElement):
2023         Disable customStyleForRenderer.
2024         (WebCore::DateTimeSymbolicFieldElement::maximumWidth):
2025         Added. Returns the expected maximum width with the specified font.
2026
2027         * html/shadow/DateTimeNumericFieldElement.h:
2028         (DateTimeNumericFieldElement):
2029         Remove customStyleForRenderer, declare maximumWidth, and make m_placeholder
2030         non-const because it is updated in the constructor.
2031         * html/shadow/DateTimeNumericFieldElement.cpp:
2032         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement):
2033         Disable customStyleForRenderer.
2034         If a numeric value for this field is LTR and the whole direction is RTL,
2035         wrap the placeholder string with left-to-right-mark and
2036         right-to-left-mark so that it is handled as LTR. Without this,
2037         sub-fields order would be changed when the content of a field is changed
2038         from a placeholder to a numeric value.
2039         (WebCore::DateTimeNumericFieldElement::maximumWidth):
2040         Added. Returns the expected maximum width with the specified font.
2041
2042 2012-12-05  Kent Tamura  <tkent@chromium.org>
2043
2044         INPUT_MULTIPLE_FIELDS_UI: The hour, am/pm, millisecond fields should support read-only state correctly
2045         https://bugs.webkit.org/show_bug.cgi?id=104210
2046
2047         Reviewed by Kentaro Hara.
2048
2049         1. The hour, am/pm, and millisecond fields should have CSS rules for
2050            [readonly]. They should be gray when they are read-only.
2051         2. The am/pm field should reject to set an empty value like other
2052            numeric fields do.
2053
2054         Tests: Add test cases to fast/forms/time/time-appearance-basic.html.
2055
2056         * css/html.css: merge existing readonly rules, and add ampm, hour, and
2057         millisecond pseudo classes.
2058         * html/shadow/DateTimeSymbolicFieldElement.cpp:
2059         (WebCore::DateTimeSymbolicFieldElement::setEmptyValue):
2060         Reject to set empty value if it is read-only.
2061
2062 2012-12-05  Dan Beam  <dbeam@chromium.org>
2063
2064         HTMLFormElement#requestAutocomplete() should require a user action
2065         https://bugs.webkit.org/show_bug.cgi?id=102320
2066
2067         Reviewed by Kent Tamura.
2068
2069         This patch dispatches an autocompleteerror when HTMLFormElement::requestAutocomplete() is called while not processing
2070         a user gesture.
2071
2072         * fast/forms/form-request-autocomplete.html is updated.
2073
2074         * html/HTMLFormElement.cpp:
2075         (WebCore::HTMLFormElement::requestAutocomplete):
2076
2077         Asynchronously dispatch an autocomplete error when not processing a user action when
2078         HTMLFormElement#requestAutocomplete() is invoked.
2079
2080 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2081
2082         [V8] Optimize v8StringOrNull() and v8StringOrUndefined()
2083         https://bugs.webkit.org/show_bug.cgi?id=104206
2084
2085         Reviewed by Adam Barth.
2086
2087         Currently v8StringOrNull() and v8StringOrUndefined() are checking
2088         a null string twice. It is redundant.
2089
2090         [div.localName]
2091         Before this patch: 20.03 ns
2092         After this patch:  19.34 ns
2093
2094         * bindings/v8/V8Binding.h:
2095         (WebCore::v8StringOrNull):
2096         (WebCore::v8StringOrUndefined):
2097
2098 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2099
2100         [V8] Optimize v8String() for uninitialized DOM attributes
2101         https://bugs.webkit.org/show_bug.cgi?id=104205
2102
2103         Reviewed by Adam Barth.
2104
2105         This patch makes uninitialized div.lang, div.title etc 6.3% faster.
2106
2107         [div.lang]
2108         Before this patch: 12.6 ns
2109         After this patch:  11.8 ns
2110
2111         * bindings/v8/V8Binding.h:
2112         (WebCore::v8String):
2113
2114 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2115
2116         [V8] Remove addImplicitReferencesForNodeWithEventListeners()
2117         https://bugs.webkit.org/show_bug.cgi?id=104203
2118
2119         Reviewed by Adam Barth.
2120
2121         We can use opaqueRootForGC() instead. By this change, we can remove
2122         all AddImplicitReferences() from V8 bindings.
2123
2124         Tests: fast/dom/gc-image-element.html
2125                fast/dom/gc-image-element-2.html
2126                fast/dom/inline-event-attributes-lookup-removed.html
2127
2128         * bindings/v8/V8GCController.cpp:
2129
2130 2012-12-05  Andrei Bucur  <abucur@adobe.com>
2131
2132         [CSS Regions] Blocks don't relayout children if the width of a region changes
2133         https://bugs.webkit.org/show_bug.cgi?id=103993
2134
2135         Reviewed by David Hyatt.
2136
2137         After r135750 lines are no longer invalidating when regions change width. This is happening because the detection for the width change was being done
2138         only at line layout time. This patch moves the line relayout decision to the containing block by setting the relayoutChildren flag if the block
2139         has no region chain attached.
2140
2141         Tests: fast/regions/region-width-change-relayout-1.html
2142                fast/regions/region-width-change-relayout-2.html
2143                fast/regions/region-width-change-relayout-3.html
2144
2145         * rendering/RenderFlowThread.cpp:
2146         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
2147
2148 2012-12-05  Kihong Kwon  <kihong.kwon@samsung.com>
2149
2150         Parameter event need to covert to RefPtr in the DeviceController::dispatchDeviceEvent
2151         https://bugs.webkit.org/show_bug.cgi?id=104201
2152
2153         Reviewed by Laszlo Gombos.
2154
2155         Parameter 'event' need to covert to RefPtr in the DeviceController::dispatchDeviceEvent.
2156         This can make crash sometimes.
2157
2158         No new tests. Covered by existing layout tests.
2159
2160         * page/DeviceController.cpp:
2161         (WebCore::DeviceController::dispatchDeviceEvent):
2162
2163 2012-12-05  Halton Huo  <halton.huo@intel.com>
2164
2165         [CMake] Unify coding style for CMake files
2166         https://bugs.webkit.org/show_bug.cgi?id=103605
2167
2168         Reviewed by Laszlo Gombos.
2169
2170         Update cmake files(.cmake, CMakeLists.txt) with following style rules:
2171         1. Indentation
2172         1.1 Use spaces, not tabs.
2173         1.2 Four spaces as indent.
2174         2. Spacing
2175         2.1 Place one space between control statements and their parentheses.
2176             For eg, if (), else (), elseif (), endif (), foreach (),
2177             endforeach (), while (), endwhile (), break ().
2178         2.2 Do not place spaces between function and macro statements and
2179             their parentheses. For eg, macro(), endmacro(), function(),
2180             endfunction().
2181         2.3 Do not place spaces between a command or function or macro and its
2182             parentheses, or between a parenthesis and its content. For eg,
2183             message("testing") not message( "testing") or message ("testing" )
2184         2.4 No space at line ending.
2185         3. Lowercase when call commands macros and functions. For eg,
2186            add_executable() not ADD_EXECUTABLE(), set() not SET().
2187
2188         * CMakeLists.txt:
2189         * PlatformBlackBerry.cmake:
2190         * PlatformEfl.cmake:
2191         * PlatformWinCE.cmake:
2192         * UseJSC.cmake:
2193         * UseV8.cmake:
2194
2195 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2196
2197         [V8] Remove unused property names from V8HiddenPropertyName
2198         https://bugs.webkit.org/show_bug.cgi?id=104194
2199
2200         Reviewed by Adam Barth.
2201
2202         We can remove unused property names from V8HiddenPropertyName.
2203
2204         No tests. No change in behavior.
2205
2206         * bindings/v8/V8HiddenPropertyName.h:
2207         (WebCore):
2208
2209 2012-12-05  Greg Billock  <gbillock@google.com>
2210
2211         Add runtime enable for web intents.
2212         https://bugs.webkit.org/show_bug.cgi?id=103669
2213
2214         Reviewed by Adam Barth.
2215
2216         Make web intents Javascript API enabled by a runtime setting.
2217
2218         * Modules/intents/DOMWindowIntents.idl:
2219         * Modules/intents/NavigatorIntents.idl:
2220         * bindings/generic/RuntimeEnabledFeatures.cpp:
2221         (WebCore):
2222         * bindings/generic/RuntimeEnabledFeatures.h:
2223         (RuntimeEnabledFeatures):
2224         (WebCore::RuntimeEnabledFeatures::webkitStartActivityEnabled):
2225         (WebCore::RuntimeEnabledFeatures::webkitIntentEnabled):
2226         (WebCore::RuntimeEnabledFeatures::webKitIntentEnabled):
2227         (WebCore::RuntimeEnabledFeatures::setWebIntentsEnabled):
2228
2229 2012-12-05  Scott Violet  <sky@chromium.org>
2230
2231         [chromium] Remove linux theme related files and switch to default
2232         https://bugs.webkit.org/show_bug.cgi?id=103897
2233
2234         Reviewed by Tony Chang.
2235
2236         Linux related theme files are now named Default.
2237
2238         No new tests, code cleanup.
2239
2240         * WebCore.gyp/WebCore.gyp: Update files
2241         * WebCore.gypi: Update files
2242         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
2243         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
2244         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
2245         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
2246         * rendering/RenderThemeChromiumAndroid.cpp:
2247         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
2248         * rendering/RenderThemeChromiumAndroid.h: Change superclass
2249         * rendering/RenderThemeChromiumLinux.cpp: Removed.
2250         * rendering/RenderThemeChromiumLinux.h: Removed.
2251
2252 2012-12-05  Joshua Bell  <jsbell@chromium.org>
2253
2254         IndexedDB: Allow multiple transactions to interleave request execution
2255         https://bugs.webkit.org/show_bug.cgi?id=97570
2256
2257         Reviewed by Tony Chang.
2258
2259         Implement spec logic for allowing read-only transactions, and read-write transactions
2260         with non-overlapping scopes, to run concurrently. Transactions all still run in the
2261         same thread with tasks triggered via timers, so tasks and the underlying database
2262         operations are interleaved rather than truly parallelized.
2263
2264         Within IDBTransactionCoordinator, rename started->queued, running->started to match
2265         spec terminology and clear up confusion.
2266
2267         Test: storage/indexeddb/transaction-coordination-across-databases.html
2268               storage/indexeddb/transaction-coordination-within-database.html
2269               storage/indexeddb/transaction-readwrite-exclusive.html
2270               storage/indexeddb/transaction-scope-sequencing.html
2271               storage/indexeddb/transaction-starvation.html
2272
2273         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Use IDBTransaction::Mode enum
2274         (WebCore::IDBDatabaseBackendImpl::createTransaction):
2275         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
2276         (IDBDatabaseBackendImpl):
2277         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
2278         (IDBDatabaseBackendInterface):
2279         * Modules/indexeddb/IDBTransactionBackendImpl.cpp: Convert scope as a HashSet for
2280         fast intersecting.
2281         (WebCore::IDBTransactionBackendImpl::create):
2282         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
2283         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2284         (IDBTransactionBackendImpl):
2285         (WebCore::IDBTransactionBackendImpl::mode):
2286         (WebCore::IDBTransactionBackendImpl::scope):
2287         * Modules/indexeddb/IDBTransactionCoordinator.cpp: Spec logic goes here.
2288         (WebCore::IDBTransactionCoordinator::processStartedTransactions): Extend this
2289         method to test all plausibly runnable transactions.
2290         (WebCore):
2291         (WebCore::IDBTransactionCoordinator::canRunTransaction): Test to see if one
2292         particular transaction can be run.
2293         (WebCore::IDBTransactionCoordinator::doScopesOverlap): Do a quick intersection
2294         test between transaction scopes.
2295         * Modules/indexeddb/IDBTransactionCoordinator.h:
2296         (IDBTransactionCoordinator):
2297
2298 2012-12-05  No'am Rosenthal  <noam@webkit.org>
2299
2300         Coordinated Graphics: Enable support for setContentsToBackgroundColor
2301         https://bugs.webkit.org/show_bug.cgi?id=104128
2302
2303         Reviewed by Kenneth Rohde Christiansen.
2304
2305         Enable background color in GraphicsLayerTextureMapper, and paint it using TextureMapper::drawSolidColor.
2306         Once https://bugs.webkit.org/show_bug.cgi?id=103786 is enabled, this would enable Qt/GTK/EFL to directly
2307         composite colors that only have a background color, without having to create a backing store for them.
2308         This would eliminate the memory usage for those layers, reduce the time needed for them to draw into the
2309         backing store and upload the texture, and in the future allow direct compositing of things other than
2310         background colors.
2311
2312         Compositing tests cover this, but are still skipped for ports using coordinated graphics. 
2313         See https://bugs.webkit.org/show_bug.cgi?id=104129.
2314
2315         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2316         (WebCore::GraphicsLayerTextureMapper::setContentsToBackgroundColor):
2317         (WebCore::GraphicsLayerTextureMapper::backgroundColor):
2318             Maintain a backgroundColor member variable in GraphicsLayerTextureMapper
2319
2320         * platform/graphics/texmap/TextureMapperGL.cpp:
2321         (WebCore::TextureMapperGL::drawSolidColor):
2322             TextureMapperGL::drawSolidColor should allow blending when the solid color has alpha.
2323
2324         * platform/graphics/texmap/TextureMapperLayer.cpp:
2325         (WebCore::TextureMapperLayer::paintSelf):
2326         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
2327         * platform/graphics/texmap/TextureMapperLayer.h:
2328         (State):
2329
2330 2012-12-05  Kentaro Hara  <haraken@chromium.org>
2331
2332         Unreviewed, rolling out r136481.
2333         http://trac.webkit.org/changeset/136481
2334         https://bugs.webkit.org/show_bug.cgi?id=103868
2335
2336         it might have regressed dom_perf/CloneNodes (See bug 104177)
2337
2338         * dom/ContainerNodeAlgorithms.h:
2339         (ChildNodeInsertionNotifier):
2340         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
2341         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
2342         (WebCore::ChildNodeInsertionNotifier::notify):
2343
2344 2012-12-05  David Grogan  <dgrogan@chromium.org>
2345
2346         IndexedDB: Abort transactions because of leveldb errors part 3
2347         https://bugs.webkit.org/show_bug.cgi?id=103960
2348
2349         Reviewed by Tony Chang.
2350
2351         Transactions are aborted when there are leveldb problems creating
2352         indexes on an object store with existing data or when adding data to an
2353         objectstore that has indexes.
2354
2355         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2356         (WebCore):
2357         (WebCore::makeIndexWriters):
2358         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
2359         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
2360
2361 2012-12-05  Simon Fraser  <simon.fraser@apple.com>
2362
2363         Fix some repaint/paintCounter confusion, and reset it when getting layers out of the layer pool
2364         https://bugs.webkit.org/show_bug.cgi?id=104180
2365
2366         Reviewed by Tim Horton.
2367
2368         Layers retrieved from the LayerPool by TileCache need to have their
2369         repaint counters reset, otherwise the scroll performance logging gets
2370         confused.
2371         
2372         Also, the counter counts paints, not repaints (invalidations), so
2373         rename it accordingly.
2374
2375         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2376         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea): Whitespace fix.
2377         * platform/graphics/GraphicsLayer.h:
2378         * platform/graphics/ca/mac/TileCache.mm:
2379         (WebCore::TileCache::blankPixelCountForTiles):
2380         (WebCore::TileCache::createTileLayer):
2381         (WebCore::TileCache::drawRepaintCounter):
2382         * platform/graphics/ca/mac/WebTileLayer.h:
2383         * platform/graphics/ca/mac/WebTileLayer.mm:
2384         (-[WebTileLayer resetPaintCount]):
2385         (-[WebTileLayer incrementPaintCount]):
2386         (-[WebTileLayer paintCount]):
2387         (-[WebTileLayer logFilledFreshTile]):
2388
2389 2012-12-05  Oliver Hunt  <oliver@apple.com>
2390
2391         Empty parse cache when receiving a low memory warning
2392         https://bugs.webkit.org/show_bug.cgi?id=104161
2393
2394         Reviewed by Filip Pizlo.
2395
2396         Use new discardAllCode() function on the global data, rather than
2397         directly interacting with the heap.
2398
2399         * bindings/js/GCController.cpp:
2400         (WebCore::GCController::discardAllCompiledCode):
2401
2402 2012-12-05  Dan Bernstein  <mitz@apple.com>
2403
2404         Text decorations are rotated when text-combine takes effect
2405         https://bugs.webkit.org/show_bug.cgi?id=104172
2406
2407         Reviewed by Dave Hyatt.
2408
2409         Test: fast/text/decorations-with-text-combine.html
2410
2411         * rendering/InlineTextBox.cpp:
2412         (WebCore::InlineTextBox::paint): Applied a rotation to the graphics context when painting
2413         the text decorations for combined text.
2414
2415 2012-12-05  Justin Novosad  <junov@google.com>
2416
2417         [skia] Improve performance of GraphicsContext::createCompatibleBuffer by using SkDevice:createCompatibleDevice
2418         https://bugs.webkit.org/show_bug.cgi?id=103896
2419
2420         Reviewed by Stephen White.
2421
2422         Refactored GraphicsContext::createCompatibleBuffer (platform common
2423         code) to use platform-specific implementations provided by ImageBuffer.
2424         There is no change in behavior for non-skia ports. The skia
2425         implementation uses skia'a own createCompatibleDevice implementation,
2426         which offers several performance benefits:
2427         1. For accelerated contexts, the backing store may be allocated from
2428         the scratch texture pool, which minimizes texture allocation and
2429         deallocation overhead.
2430         2. The backing store will not be initially cleared if it is known
2431         in advance that fully opaque contents will be drawn into the buffer.
2432         3. For non-accelerated contexts, if the backing store is flagged as
2433         opaque, faster blitter loop implementations will be used for drawing
2434         the buffer contents into other buffers. (e.g. generated opaque gradient
2435         fills)
2436
2437         No new tests: covered by existing layout tests 
2438
2439         * platform/graphics/Generator.h:
2440         (Generator):
2441         Added hasAlpha method so that it can be used by GeneratorGeneratedImage
2442         * platform/graphics/GeneratorGeneratedImage.cpp:
2443         (WebCore::GeneratorGeneratedImage::drawPattern):
2444         Passing m_generator->hasAlpha() to createCompatibleBuffer in order to
2445         take advantage of optimizations that apply to opaque buffers.
2446         * platform/graphics/Gradient.h:
2447         (Gradient):
2448         Made hasAlpha virtual so that it now overrides Generator::hasAlpha
2449         * platform/graphics/GraphicsContext.cpp:
2450         (WebCore::GraphicsContext::createCompatibleBuffer):
2451         Refactored to use platform-specific implementation
2452         * platform/graphics/GraphicsContext.h:
2453         * platform/graphics/ImageBuffer.cpp:
2454         (WebCore::createCompatibleBuffer):
2455         Non-skia implementation. Mimics old
2456         GraphicsContext::createCompatibleBuffer
2457         * platform/graphics/ImageBuffer.h:
2458         (ImageBuffer):
2459         New skia-specific constructor
2460         * platform/graphics/skia/ImageBufferSkia.cpp:
2461         (WebCore::ImageBuffer::createCompatibleBuffer):
2462         (WebCore::ImageBuffer::ImageBuffer):
2463         * platform/graphics/skia/PlatformContextSkia.cpp:
2464         (WebCore::PlatformContextSkia::createCompatibleDevice):
2465         (WebCore):
2466         * platform/graphics/skia/PlatformContextSkia.h:
2467         (PlatformContextSkia):
2468
2469 2012-12-05  Alexis Menard  <alexis@webkit.org>
2470
2471         REGRESSION (r136683): css3/calc/background-position-parsing.html failing on EFL Linux 64-bit Debug WK2
2472         https://bugs.webkit.org/show_bug.cgi?id=104131
2473
2474         Reviewed by Antti Koivisto.
2475
2476         css3/calc/background-position-parsing.html assert in debug because we
2477         call CSSParser::validUnit multiple times in a row. The problem was with
2478         validUnit which check calc() values and save the result inside
2479         m_parsedCalculation for later usage. validUnit expects you to
2480         use m_parsedCalculation therefore calling validUnit again with
2481         m_parsedCalculation being set asserts. As parseFillBackgroundPosition
2482         just want to check wether the current value is maybe valid for
2483         background-position we can just relax the check to allow either the
2484         valid keywords or any other units (we will anyway filter the incorrect
2485         values later in the parsing). The most important check at this point
2486         for the shorthand is the validity of the keyword.
2487
2488         No new tests : the assert was covered by css3/calc/background-position-parsing.html.
2489
2490         * css/CSSParser.cpp:
2491         (WebCore::CSSParser::isPotentialPositionValue):
2492         (WebCore::CSSParser::parseFillBackgroundPosition):
2493         * css/CSSParser.h:
2494
2495 2012-12-05  Stephen White  <senorblanco@chromium.org>
2496
2497         Unreviewed, rolling out r136735.
2498         http://trac.webkit.org/changeset/136735
2499         https://bugs.webkit.org/show_bug.cgi?id=102699
2500
2501         Broke Chrome/Win build.
2502
2503         * platform/chromium/PlatformSupport.h:
2504         (PlatformSupport):
2505         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2506         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2507         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2508         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
2509         * rendering/RenderThemeChromiumWin.cpp:
2510         (WebCore):
2511         (WebCore::RenderThemeChromiumWin::paintButton):
2512         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2513         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2514         (WebCore::RenderThemeChromiumWin::paintMenuList):
2515         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2516         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2517         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2518
2519 2012-12-05  Jun Jiang  <jun.a.jiang@intel.com>
2520
2521         WebGL: use pointer to the source data for Image directly in texImage2D and texSubImage2D to avoid memory copy if no conversion is needed
2522         https://bugs.webkit.org/show_bug.cgi?id=103885
2523
2524         Reviewed by Kenneth Russell.
2525
2526         In texImage2D() and texSubImage2D(), there is a redundant memory copy from Image data to the intermediate vector when no conversion is needed. If the Image resource can be locked properly, it is better to use the pointer to the image source directly and hence avoid the memory copy and improve the performance. 
2527
2528         Already covered by current tests.
2529
2530         * html/canvas/WebGLRenderingContext.cpp:
2531         (WebCore):
2532         (WebCore::WebGLRenderingContext::texImage2DBase):
2533         (WebCore::WebGLRenderingContext::texImage2DImpl):
2534         (WebCore::WebGLRenderingContext::texSubImage2DBase):
2535         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2536         * html/canvas/WebGLRenderingContext.h:
2537         (WebGLRenderingContext):
2538         * platform/graphics/GraphicsContext3D.h:
2539         (ImageExtractor):
2540
2541 2012-12-05  Elliott Sprehn  <esprehn@chromium.org>
2542
2543         Add infrastructure for :before and :after in DOM
2544         https://bugs.webkit.org/show_bug.cgi?id=103705
2545
2546         Reviewed by Eric Seidel.
2547
2548         Add all infrastructure for reimplementing generated content :before and
2549         :after as DOM Elements. Now ElementRareData has two pointers to PseudoElements
2550         for the generated content and Node has methods for traversing the tree
2551         including generated content.
2552
2553         This will allow the generated content to be treated as real nodes instead
2554         of anonymous and take part in the usual recalcStyle and attach flow which
2555         fixes many bugs and vastly simplifies the ifecycle of generated content.
2556
2557         Instead of attempting to land both the infrastructure and enable it at
2558         the same time which has proven problematic due to how drastic this change
2559         is, this patch contains only the support code so a much smaller future
2560         patch can be used to switch it on.
2561
2562         No new behavior, this is just the infrastructure.
2563
2564         * CMakeLists.txt:
2565         * GNUmakefile.list.am:
2566         * Target.pri:
2567         * WebCore.gypi:
2568         * WebCore.vcproj/WebCore.vcproj:
2569         * WebCore.xcodeproj/project.pbxproj:
2570         * dom/DOMAllInOne.cpp:
2571         * dom/Element.cpp:
2572         (WebCore::Element::~Element):
2573         (WebCore::Element::detach):
2574         (WebCore::Element::updatePseudoElement):
2575         (WebCore::Element::createPseudoElementIfNeeded):
2576         (WebCore::Element::beforePseudoElement):
2577         (WebCore::Element::afterPseudoElement):
2578         * dom/Element.h:
2579         (Element):
2580         * dom/ElementRareData.h:
2581         (ElementRareData):
2582         (WebCore::ElementRareData::ElementRareData):
2583         (WebCore::ElementRareData::~ElementRareData):
2584         (WebCore::ElementRareData::setPseudoElement):
2585         (WebCore::ElementRareData::pseudoElement):
2586         (WebCore::ElementRareData::releasePseudoElement):
2587         * dom/Node.cpp:
2588         (WebCore::Node::pseudoAwarePreviousSibling):
2589         (WebCore::Node::pseudoAwareNextSibling):
2590         (WebCore::Node::rendererIsEditable):
2591         (WebCore::checkAcceptChild):
2592         * dom/Node.h:
2593         (Node):
2594         (WebCore::Node::isPseudoElement):
2595         (WebCore::Node::isBeforePseudoElement):
2596         (WebCore::Node::isAfterPseudoElement):
2597         (WebCore::Node::pseudoId):
2598         (WebCore::Node::customPseudoId):
2599         * dom/NodeRenderingContext.cpp:
2600         (WebCore::NodeRenderingContext::nextRenderer):
2601         (WebCore::NodeRenderingContext::previousRenderer):
2602         * dom/Position.cpp:
2603         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
2604         * dom/PseudoElement.cpp: Added.
2605         (WebCore::pseudoElementTagName):
2606         (WebCore::PseudoElement::PseudoElement):
2607         (WebCore::PseudoElement::customStyleForRenderer):
2608         (WebCore::PseudoElement::attach):
2609         (WebCore::PseudoElement::rendererIsNeeded):
2610         (WebCore::PseudoElement::updateChildStyle):
2611         (WebCore::PseudoElement::didRecalcStyle):
2612         * dom/PseudoElement.h: Added.
2613         (PseudoElement):
2614         (WebCore::PseudoElement::create):
2615         (WebCore::pseudoElementIsNeeded):
2616         * editing/visible_units.cpp:
2617         (WebCore::logicallyPreviousBox):
2618         (WebCore::logicallyNextBox):
2619         (WebCore::startPositionForLine):
2620         (WebCore::endPositionForLine):
2621         * page/animation/AnimationController.cpp:
2622         (WebCore::AnimationController::updateAnimations):
2623         * rendering/HitTestResult.cpp:
2624         (WebCore::HitTestResult::setInnerNode):
2625         (WebCore::HitTestResult::setInnerNonSharedNode):
2626         * rendering/RenderBlock.cpp:
2627         (WebCore::RenderBlock::isSelectionRoot):
2628         (WebCore::RenderBlock::renderName):
2629         * rendering/RenderCounter.cpp:
2630         (WebCore::RenderCounter::originalText):
2631         * rendering/RenderDeprecatedFlexibleBox.cpp:
2632         (WebCore::RenderDeprecatedFlexibleBox::renderName):
2633         * rendering/RenderInline.cpp:
2634         (WebCore::RenderInline::renderName):
2635         * rendering/RenderMultiColumnBlock.cpp:
2636         (WebCore::RenderMultiColumnBlock::renderName):
2637         * rendering/RenderObject.cpp:
2638         (WebCore::RenderObject::createObject):
2639         (WebCore::RenderObject::setPseudoStyle):
2640         (WebCore::RenderObject::createVisiblePosition):
2641         * rendering/RenderObject.h:
2642         (WebCore::RenderObject::isPseudoElement):
2643         (RenderObject):
2644         (WebCore::RenderObject::generatingNode):
2645         * rendering/RenderTableCell.h:
2646         (WebCore::RenderTableCell::renderName):
2647         * rendering/RenderTableRow.h:
2648         (WebCore::RenderTableRow::renderName):
2649         * rendering/RenderTableSection.h:
2650         (WebCore::RenderTableSection::renderName):
2651         * rendering/RenderTreeAsText.cpp:
2652         (WebCore::RenderTreeAsText::writeRenderObject):
2653         * rendering/style/ContentData.cpp:
2654         (WebCore::ImageContentData::createRenderer):
2655         (WebCore::TextContentData::createRenderer):
2656         (WebCore::CounterContentData::createRenderer):
2657         (WebCore::QuoteContentData::createRenderer):
2658
2659 2012-12-05  Justin Novosad  <junov@google.com>
2660
2661         Use of uninitialized variable in WebCore::RenderBox::paintFillLayers
2662         https://bugs.webkit.org/show_bug.cgi?id=104154
2663
2664         Reviewed by Stephen White.
2665
2666         Method FillLayer::clipOccludesNextLayers performs an internal
2667         initialization when called on the first layer of a list of layers.
2668         Without this initialization, calls to clipOccludesNextLayers on
2669         subsequent layers will use uninitialized data.  In some cases, the
2670         call to clipOccludesNextLayers was being short-circuited in
2671         RenderBox::paintFillLayers. 
2672         Fix: Predicate was permuted to ensure that clipOccludesNextLayers
2673         is never short-circuited.
2674         
2675         Test: fast/backgrounds/size/contain-and-cover-zoomed.html
2676         Running with valgrind reveals the error.
2677
2678         * rendering/RenderBox.cpp:
2679         (WebCore::RenderBox::paintFillLayers):
2680
2681 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
2682
2683         Encapsulate ElementRareData for possible future sharing
2684         https://bugs.webkit.org/show_bug.cgi?id=103948
2685
2686         Reviewed by Eric Seidel.
2687
2688         Encapsulate ElementRareData and make all access go through getters and
2689         setters. This is already true for NodeRareData, but ElementRareData
2690         had many places where people directly access it.
2691
2692         This the first step in possible future sharing of ElementRareData
2693         instances across nodes. All nodes in a shadow tree have rare data to
2694         store the TreeScope, but in most cases all they have is the TreeScope!
2695         Instead of making every node in a shadow subtree have rare data
2696         and use lots of memory we could just share a single instance of rare data
2697         and only allocate a unique one on modification. Encapsulation lets us
2698         assert about mutations on shared instances.
2699
2700         * dom/Element.cpp:
2701         (WebCore::Element::~Element):
2702         (WebCore::Element::attributes):
2703         (WebCore::Element::shadow):
2704         (WebCore::Element::ensureShadow):
2705         (WebCore::Element::minimumSizeForResizing):
2706         (WebCore::Element::setMinimumSizeForResizing):
2707         (WebCore::Element::computedStyle):
2708         (WebCore::Element::classList):
2709         (WebCore::Element::optionalClassList):
2710         (WebCore::Element::dataset):
2711         (WebCore::Element::hasNamedNodeMap):
2712         (WebCore::Element::savedLayerScrollOffset):
2713         (WebCore::Element::setSavedLayerScrollOffset):
2714         * dom/ElementRareData.cpp:
2715         (WebCore::ElementRareData::reportMemoryUsage):
2716         * dom/ElementRareData.h:
2717         (WebCore::ElementRareData::needsFocusAppearanceUpdateSoonAfterAttach):
2718         (WebCore::ElementRareData::setNeedsFocusAppearanceUpdateSoonAfterAttach):
2719         (ElementRareData):
2720         (WebCore::ElementRareData::styleAffectedByEmpty):
2721         (WebCore::ElementRareData::setStyleAffectedByEmpty):
2722         (WebCore::ElementRareData::isInCanvasSubtree):
2723         (WebCore::ElementRareData::setIsInCanvasSubtree):
2724         (WebCore::ElementRareData::containsFullScreenElement):
2725         (WebCore::ElementRareData::setContainsFullScreenElement):
2726         (WebCore::ElementRareData::isInTopLayer):
2727         (WebCore::ElementRareData::setIsInTopLayer):
2728         (WebCore::ElementRareData::childrenAffectedByHover):
2729         (WebCore::ElementRareData::setChildrenAffectedByHover):
2730         (WebCore::ElementRareData::childrenAffectedByActive):
2731         (WebCore::ElementRareData::setChildrenAffectedByActive):
2732         (WebCore::ElementRareData::childrenAffectedByDrag):
2733         (WebCore::ElementRareData::setChildrenAffectedByDrag):
2734         (WebCore::ElementRareData::childrenAffectedByFirstChildRules):
2735         (WebCore::ElementRareData::setChildrenAffectedByFirstChildRules):
2736         (WebCore::ElementRareData::childrenAffectedByLastChildRules):
2737         (WebCore::ElementRareData::setChildrenAffectedByLastChildRules):
2738         (WebCore::ElementRareData::childrenAffectedByDirectAdjacentRules):
2739         (WebCore::ElementRareData::setChildrenAffectedByDirectAdjacentRules):
2740         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules):
2741         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules):
2742         (WebCore::ElementRareData::childrenAffectedByBackwardPositionalRules):
2743         (WebCore::ElementRareData::setChildrenAffectedByBackwardPositionalRules):
2744         (WebCore::ElementRareData::childIndex):
2745         (WebCore::ElementRareData::setChildIndex):
2746         (WebCore::ElementRareData::shadow):
2747         (WebCore::ElementRareData::setShadow):
2748         (WebCore::ElementRareData::attributeMap):
2749         (WebCore::ElementRareData::setAttributeMap):
2750         (WebCore::ElementRareData::computedStyle):
2751         (WebCore::ElementRareData::setComputedStyle):
2752         (WebCore::ElementRareData::classList):
2753         (WebCore::ElementRareData::setClassList):
2754         (WebCore::ElementRareData::dataset):
2755         (WebCore::ElementRareData::setDataset):
2756         (WebCore::ElementRareData::minimumSizeForResizing):
2757         (WebCore::ElementRareData::setMinimumSizeForResizing):
2758         (WebCore::ElementRareData::savedLayerScrollOffset):
2759         (WebCore::ElementRareData::setSavedLayerScrollOffset):
2760         (WebCore::ElementRareData::resetComputedStyle):
2761         * dom/NodeRareData.h:
2762         (NodeRareData):
2763
2764 2012-12-05  Mark Pilgrim  <pilgrim@chromium.org>
2765
2766         [Chromium][Win] Remove theme-related functions from PlatformSupport
2767         https://bugs.webkit.org/show_bug.cgi?id=102699
2768
2769         Reviewed by Adam Barth.
2770
2771         Call theme engine directly instead of going through
2772         PlatformSupport. Part of a refactoring series. See tracking bug 82948.
2773
2774         * platform/chromium/PlatformSupport.h:
2775         (PlatformSupport):
2776         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
2777         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
2778         (WebCore::ScrollbarThemeChromiumWin::paintButton):
2779         * rendering/RenderThemeChromiumWin.cpp:
2780         (WebCore):
2781         (WebCore::RenderThemeChromiumWin::paintButton):
2782         (WebCore::RenderThemeChromiumWin::paintSliderTrack):
2783         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2784         (WebCore::RenderThemeChromiumWin::paintMenuList):
2785         (WebCore::RenderThemeChromiumWin::paintTextFieldInternal):
2786         (WebCore::RenderThemeChromiumWin::paintInnerSpinButton):
2787         (WebCore::RenderThemeChromiumWin::paintProgressBar):
2788
2789 2012-12-05  Stephen White  <senorblanco@chromium.org>
2790
2791         Unreviewed, rolling out r136609.
2792         http://trac.webkit.org/changeset/136609
2793         https://bugs.webkit.org/show_bug.cgi?id=103793
2794
2795         Breaking Chrome/Mac Debug builds.
2796
2797         * html/canvas/WebGLRenderingContext.cpp:
2798         (WebCore):
2799         (WebCore::WebGLRenderingContext::create):
2800         * platform/chromium/support/GraphicsContext3DChromium.cpp:
2801         (WebCore::GraphicsContext3D::create):
2802         * platform/graphics/GraphicsContext3D.h:
2803         (Attributes):
2804
2805 2012-12-05  Bear Travis  <betravis@adobe.com>
2806
2807         [CSS Exclusions] Enable shape-inside for multiple-segment polygons
2808         https://bugs.webkit.org/show_bug.cgi?id=91878
2809
2810         Reviewed by David Hyatt.
2811
2812         Patch adding support for multiple-segment polygons for shape-insides from
2813         the CSS Exclusions specification. The layout code has been modified to first
2814         support dividing text into multiple segments per line, and then to lay out
2815         multiple segments per line box.
2816
2817         Tests:  fast/exclusions/shape-inside/shape-inside-multiple-segments-001.html
2818                 fast/exclusions/shape-inside/shape-inside-multiple-segments-002.html
2819                 fast/exclusions/shape-inside/shape-inside-multiple-segments-003.html
2820                 fast/exclusions/shape-inside/shape-inside-multiple-segments-004.html
2821
2822         * platform/text/BidiResolver.h:
2823         (WebCore::BidiCharacterRun::BidiCharacterRun):
2824         (BidiCharacterRun): Added a 'startsSegment' bitfield to track whether a
2825         run begins a new segment. The field is here, rather than in BidiRun, in
2826         order to save space. See Bug 100173.
2827         * rendering/BidiRun.h:
2828         (WebCore::BidiRun::BidiRun):
2829         (BidiRun): Set the initial value for 'startsSegment'.
2830         * rendering/ExclusionShapeInsideInfo.cpp:
2831         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Clear the
2832         segment ranges when computing segments for a new line.
2833         * rendering/ExclusionShapeInsideInfo.h:
2834         (LineSegmentRange): Added a new type to track segment offsets.
2835         (WebCore::ExclusionShapeInsideInfo::segmentRanges): Added a getter for
2836         the line segment ranges vector.
2837         * rendering/InlineFlowBox.cpp:
2838         (WebCore::InlineFlowBox::placeBoxesInInlineDirection): Modified to call
2839         a refactored box placement algorithm that takes a beginning and end position.
2840         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection): Similar to the
2841         placeBoxes method, but takes an end position that may occur before the end
2842         of the line.
2843         * rendering/RenderBlock.cpp:
2844         (WebCore::RenderBlock::exclusionShapeInsideInfo): Factored out calls
2845         to ExclusionShapeInsideInfo to the .cpp file, as ExclusionShapeInsideInfo
2846         requires InlineIterator.h, which would create a circular dependency in
2847         ExclusionShapeInsideInfo.h.
2848         * rendering/RenderBlock.h:
2849         (WebCore::RenderBlock::exclusionShapeInsideInfo): Modified to call
2850         exclusionShapeInsideInfo to be non-inline.
2851         * rendering/RenderBlockLineLayout.cpp:
2852         (WebCore::LineWidth::LineWidth): LineWidth now uses the number of computed
2853         segmentRanges to determine which LineSegment to use when calculating width.
2854         (WebCore::RenderBlock::createLineBoxes): Now takes a boolean to determine
2855         whether or not it can share the same parentBox as its siblings (segments
2856         must be able to position themselves separately in the RootInlineBox).
2857         (WebCore::RenderBlock::constructLine):
2858         (WebCore::computeExpansionForJustifiedText): Do include runs that start new
2859         segments when calculating justification for the current segment.
2860         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Modified to
2861         use the computeInlineDirectionPositionsForSegment, which can position
2862         multiple segments of text per line.
2863         (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment): Positions
2864         the given segment of text and calculates its layout offsets.
2865         (WebCore::constructBidiRuns): Modified some variables from 'endOfLine' to 'endOfSegment'.
2866         (WebCore::constructBidiRunsForLine): Construct the bidi runs for each segment in
2867         the given line.
2868         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Call constructBidiRunsForLine.
2869         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Moved the line breaking code
2870         to break segments, with nextLineBreak iterating over segment breaks for the entire line.
2871         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Calculates how much text a
2872         segment can hold. This code was originally in nextLineBreak.
2873
2874 2012-12-05  Stephen White  <senorblanco@chromium.org>
2875
2876         Unreviewed, rolling out r136630.
2877         http://trac.webkit.org/changeset/136630
2878         https://bugs.webkit.org/show_bug.cgi?id=103555
2879
2880         It's breaking Chrome/Win Debug builds.
2881
2882         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
2883         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
2884         * platform/graphics/chromium/LazyDecodingPixelRef.h:
2885         (LazyDecodingPixelRef):
2886
2887 2012-12-05  Andreas Kling  <akling@apple.com>
2888
2889         REGRESSION(r136615): Incorrect style sharing in view-source documents.
2890         <http://webkit.org/b/104089>
2891
2892         Reviewed by Antti Koivisto.
2893
2894         Make sure we collect feature data about the default view-source style sheet before evaluating
2895         style sharing candidates, otherwise it won't know which class selectors to care about.
2896
2897         * css/StyleResolver.cpp:
2898         (WebCore::StyleResolver::collectFeatures):
2899
2900 2012-12-05  Mike West  <mkwst@chromium.org>
2901
2902         Stop generating call stacks inside ContentSecurityPolicy
2903         https://bugs.webkit.org/show_bug.cgi?id=104126
2904
2905         Reviewed by Yury Semikhatsky.
2906
2907         Now that bug 100650 has made it possible for ConsoleMessage to generate
2908         call stacks, we can remove the stack being generated in
2909         ContentSecurityPolicy::logToConsole. We need the ScriptState*, however,
2910         so this patch makes it possible to pipe it through addConsoleMessage
2911         down into the guts of the inspector.
2912
2913         This patch also removes an unused addConsoleMessage variant from
2914         ScriptExecutionContext, which should have been removed from the patch to
2915         100650 before landing it. My bad.
2916
2917         * dom/Document.cpp:
2918         (WebCore::Document::addMessage):
2919         * dom/Document.h:
2920         (Document):
2921             Accept a ScriptState* parameter in Document::addMessage, and pass it
2922             through to Console::addMessage.
2923         * dom/ScriptExecutionContext.cpp:
2924         (WebCore::ScriptExecutionContext::addConsoleMessage):
2925         * dom/ScriptExecutionContext.h:
2926         (ScriptExecutionContext):
2927             Accept a ScriptState* parameter in Document::addMessage, and pass it
2928             through to ScriptExecutionContext::addMessage. Also, remove an unused
2929             variant of ScriptExecutionContext::addConsoleMessage that accepted
2930             only a call stack in addition to the basics.
2931         * inspector/ConsoleMessage.cpp:
2932         (WebCore::ConsoleMessage::ConsoleMessage):
2933         * inspector/ConsoleMessage.h:
2934         (ConsoleMessage):
2935             Accept a ScriptState* and pass it into autogenerateMetadata for
2936             call stack generational goodness.
2937         * inspector/InspectorConsoleAgent.cpp:
2938         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2939             Accept a ScriptState* and pass it into addConsoleMessage.
2940         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
2941         (WebCore::InspectorConsoleAgent::didReceiveResponse):
2942         (WebCore::InspectorConsoleAgent::didFailLoading):
2943             Add an empty ScriptState parameter to the addConsoleMessage call.
2944         * inspector/InspectorConsoleAgent.h:
2945         (InspectorConsoleAgent):
2946         * inspector/InspectorConsoleInstrumentation.h:
2947         (WebCore::InspectorInstrumentation::addMessageToConsole):
2948         * inspector/InspectorInstrumentation.cpp:
2949         (WebCore):
2950         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2951         * inspector/InspectorInstrumentation.h:
2952         (InspectorInstrumentation):
2953         * page/Console.cpp:
2954         (WebCore::Console::addMessage):
2955         * page/Console.h:
2956         (Console):
2957             Pipe ScriptState through the intermediate classes.
2958         * page/ContentSecurityPolicy.cpp:
2959         (WebCore::ContentSecurityPolicy::logToConsole):
2960             Drop call stack generation, and pass ScriptState* into addConsoleMessage.
2961         * workers/WorkerContext.cpp:
2962         (WebCore::WorkerContext::addConsoleMessage):
2963         (WebCore::WorkerContext::addMessage):
2964         (WebCore::WorkerContext::addMessageToWorkerConsole):
2965         * workers/WorkerContext.h:
2966         (WorkerContext):
2967             Accept ScriptState* and pass it into addMessageToConsole.
2968
2969 2012-12-05  Rafael Weinstein  <rafaelw@chromium.org>
2970
2971         DOMImplementation.createDocument should call appendChild rather than parserAppendChild to add docType and documentElement
2972         https://bugs.webkit.org/show_bug.cgi?id=104040
2973
2974         Reviewed by Ojan Vafai.
2975
2976         createDocument now calls appendChild.
2977
2978         No new tests (no observable changes).
2979
2980         * dom/ContainerNode.cpp:
2981         (WebCore::ContainerNode::parserAppendChild):
2982         * dom/DOMImplementation.cpp:
2983         (WebCore::DOMImplementation::createDocument):
2984
2985 2012-12-05  Alec Flett  <alecflett@chromium.org>
2986
2987         IndexedDB: Stub out transaction-backend methods
2988         https://bugs.webkit.org/show_bug.cgi?id=103921
2989
2990         Reviewed by Dimitri Glazkov.
2991
2992         In preparation for a refactoring. Legacy methods 
2993         will be removed in https://bugs.webkit.org/show_bug.cgi?id=103923.
2994
2995         No new tests, just adding unused methods for refactoring.
2996
2997         * Modules/indexeddb/IDBCallbacks.h:
2998         (WebCore::IDBCallbacks::onUpgradeNeeded):
2999         * Modules/indexeddb/IDBDatabase.cpp:
3000         (WebCore::IDBDatabase::onAbort):
3001         (WebCore):
3002         (WebCore::IDBDatabase::onComplete):
3003         * Modules/indexeddb/IDBDatabase.h:
3004         (IDBDatabase):
3005         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3006         (WebCore::IDBDatabaseBackendImpl::createTransaction):
3007         (WebCore):
3008         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
3009         (IDBDatabaseBackendImpl):
3010         (WebCore::IDBDatabaseBackendImpl::commit):
3011         (WebCore::IDBDatabaseBackendImpl::abort):
3012         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3013         (IDBDatabaseBackendInterface):
3014         * Modules/indexeddb/IDBDatabaseCallbacks.h:
3015         (IDBDatabaseCallbacks):
3016         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
3017         (WebCore::IDBDatabaseCallbacksImpl::onAbort):
3018         (WebCore):
3019         (WebCore::IDBDatabaseCallbacksImpl::onComplete):
3020         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
3021         (IDBDatabaseCallbacksImpl):
3022         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3023         (WebCore::IDBFactoryBackendImpl::open):
3024         * Modules/indexeddb/IDBFactoryBackendImpl.h:
3025         (WebCore::IDBFactoryBackendImpl::open):
3026         (IDBFactoryBackendImpl):
3027         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3028         (IDBFactoryBackendInterface):
3029         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3030         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
3031         (WebCore):
3032         * Modules/indexeddb/IDBOpenDBRequest.h:
3033         (IDBOpenDBRequest):
3034         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3035         (WebCore):
3036         * Modules/indexeddb/IDBTransactionCoordinator.h:
3037
3038 2012-11-27  Alec Flett  <alecflett@chromium.org>
3039
3040         IndexedDB: remove IDBDatabaseBackendInterface::transaction()
3041         https://bugs.webkit.org/show_bug.cgi?id=102733
3042
3043         Reviewed by Darin Fisher.
3044
3045         Part 3 of a refactor, remove the old transaction() method.
3046
3047         No new tests as this is just post-refactor cleanup.
3048
3049         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
3050         (IDBDatabaseBackendInterface):
3051
3052 2012-12-05  Robert Hogan  <robert@webkit.org>
3053
3054         REGRESSION(r126683): Table cell are getting borders when the style doesn't mention any
3055         https://bugs.webkit.org/show_bug.cgi?id=101677
3056
3057         Reviewed by Julien Chaffraix.
3058
3059         The bordercolor attribute on a cell or row has no effect on FF and Opera, even when the parent
3060         table has a border attribute. IE displays the bordercolor of the cell and row in all cases except when
3061         the parent has no border attribute. WebKit's old behaviour (before r126683) was to display the
3062         bordercolor of the row but not the cells (I don't think this behaviour was particularly deliberate). No
3063         browser displays the bordercolor for a col or tbody element.
3064
3065         Bring WebKit into line with Opera and FF by ignoring the bordercolor attribute on cells, rows, cols, rowgroups, and
3066         colgroups in all cases, regardless of whether the table has a border or not.
3067
3068         Test: fast/table/td-bordercolor-attribute.html
3069
3070         * html/HTMLTablePartElement.cpp:
3071         (WebCore::HTMLTablePartElement::isPresentationAttribute):
3072         (WebCore::HTMLTablePartElement::collectStyleForPresentationAttribute):
3073
3074 2012-12-05  Krzysztof Czech  <k.czech@samsung.com>
3075
3076         [EFL][WK2] Introduce WebKit-EFL to Assistive Technologies
3077         https://bugs.webkit.org/show_bug.cgi?id=104000
3078
3079         Reviewed by Chris Fleizach.
3080
3081         Introduce Webkit-EFL so that Assistive Technologies can distinguish it.
3082
3083         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3084         (webkitAccessibleGetAttributes):
3085
3086 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3087
3088         Remove unneeded WTF prefix from WTF types in RenderFlexibleBox
3089         https://bugs.webkit.org/show_bug.cgi?id=104109
3090
3091         Reviewed by Eric Seidel.
3092
3093         WTF prefix is not needed because WTF headers have a using
3094         statement at the end of the file.
3095
3096         * rendering/RenderFlexibleBox.cpp:
3097         (WebCore::RenderFlexibleBox::layoutBlock):
3098         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
3099         (WebCore::RenderFlexibleBox::layoutFlexItems):
3100         (WebCore::RenderFlexibleBox::freezeViolations):
3101         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3102         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3103         (WebCore::RenderFlexibleBox::alignFlexLines):
3104         (WebCore::RenderFlexibleBox::alignChildren):
3105         (WebCore::RenderFlexibleBox::flipForWrapReverse):
3106         * rendering/RenderFlexibleBox.h:
3107
3108 2012-12-05  Andras Becsi  <andras.becsi@digia.com>
3109
3110         Fix compilation for Qt5.0.0 stable branch.
3111         https://bugs.webkit.org/show_bug.cgi?id=103870
3112
3113         Reviewed by Simon Hausmann.
3114
3115         This is a squashed patch consisting of patches by multiple authors.
3116
3117         Fixed use of to-be-removed compatibility functions in QWindow
3118         Patch by Samuel Rødal <samuel.rodal@digia.com>
3119
3120         Build fix. No new tests needed.
3121
3122         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3123         (FullScreenVideoWindow::FullScreenVideoWindow):
3124         (PlatformVideoWindow::PlatformVideoWindow):
3125
3126 2012-12-05  John J. Barton  <johnjbarton@chromium.org>
3127
3128         Web Inspector: more robust treeoutline.findTreeElement
3129         https://bugs.webkit.org/show_bug.cgi?id=103911
3130
3131         Reviewed by Vsevolod Vlasov.
3132
3133         Non-recursive algorithm to populate the treeoutline given an DOMNode
3134         as representedObject. Walk up the parents from the desired object
3135         until we find one that is currently represented in the treeoutline 
3136         cache. Then walk down, putting children in the cache until we get 
3137         to the desired object again. 
3138         With Pavel Feldeman <pfeldman@chromium.org>
3139
3140         No new tests, refactoring, no new function
3141
3142        * inspector/front-end/treeoutline.js:
3143         (TreeOutline.prototype.findTreeElement):
3144
3145 2012-12-05  Alexander Shalamov  <alexander.shalamov@intel.com>
3146
3147         [EFL][GTK] List value response headers are not handled in RespourceResponse (libsoup specific)
3148         https://bugs.webkit.org/show_bug.cgi?id=95181
3149
3150         Reviewed by Martin Robinson.
3151
3152         When list-value response headers are received, they are handled as single
3153         value headers. This patch fixes incorrect behavior. New test was added to
3154         verify list-value header handling.
3155
3156         Test: http/tests/xmlhttprequest/xmlhttprequest-test-custom-headers.html
3157
3158         * platform/network/soup/ResourceResponseSoup.cpp:
3159         (WebCore::ResourceResponse::updateFromSoupMessage):
3160
3161 2012-12-05  Pavel Feldman  <pfeldman@chromium.org>
3162
3163         Web Inspector: Don't include error message text in the editor buffer.
3164         https://bugs.webkit.org/show_bug.cgi?id=103932
3165
3166         Reviewed by Alexander Pavlov.
3167
3168         Skip entire decoration content when collecting dirty regions.
3169         
3170         * inspector/front-end/DefaultTextEditor.js:
3171         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
3172
3173 2012-12-05  Joshua Bell  <jsbell@chromium.org>
3174
3175         IndexedDB: Replace use of ScriptExecutionContext::Task (Part 2)
3176         https://bugs.webkit.org/show_bug.cgi?id=103931
3177
3178         Reviewed by Tony Chang.
3179
3180         Actually drop use of ScriptExecutionContext::Task and remove incorrect usage of
3181         ThreadSafeRefCounted<>. Define a new IDBTransactionBackendImpl::Operation base class
3182         for operations; storage of per-operation data becomes explicit.
3183
3184         No new tests - just a refactor.
3185
3186         * Modules/indexeddb/IDBCallbacks.h: Remove bogus "ThreadSafe"
3187         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3188         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::create):
3189         (IDBCursorBackendImpl::CursorIterationOperation):
3190         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::CursorIterationOperation):
3191         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::create):
3192         (IDBCursorBackendImpl::CursorAdvanceOperation):
3193         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::CursorAdvanceOperation):
3194         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::create):
3195         (IDBCursorBackendImpl::CursorPrefetchIterationOperation):
3196         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
3197         (WebCore::IDBCursorBackendImpl::CursorAdvanceOperation::perform):
3198         (WebCore::IDBCursorBackendImpl::CursorIterationOperation::perform):
3199         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
3200         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove bogus "ThreadSafe"
3201         * Modules/indexeddb/IDBDatabase.cpp:
3202         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3203         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::create):
3204         (IDBDatabaseBackendImpl::CreateObjectStoreOperation):
3205         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::CreateObjectStoreOperation):
3206         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::create):
3207         (IDBDatabaseBackendImpl::DeleteObjectStoreOperation):
3208         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
3209         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
3210         (IDBDatabaseBackendImpl::VersionChangeOperation):
3211         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
3212         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::create):
3213         (IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation):
3214         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
3215         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::create):
3216         (IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation):
3217         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::DeleteObjectStoreAbortOperation):
3218         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::create):
3219         (IDBDatabaseBackendImpl::VersionChangeAbortOperation):
3220         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::VersionChangeAbortOperation):
3221         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
3222         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
3223         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
3224         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
3225         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
3226         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
3227         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreAbortOperation::perform):
3228         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreAbortOperation::perform):
3229         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
3230         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Remove bogus "ThreadSafe"
3231         * Modules/indexeddb/IDBDatabaseCallbacks.h: Remove bogus "ThreadSafe"
3232         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3233         * Modules/indexeddb/IDBFactoryBackendInterface.h: Remove bogus "ThreadSafe"
3234         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3235         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::create):
3236         (IDBIndexBackendImpl::OpenIndexCursorOperation):
3237         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::OpenIndexCursorOperation):
3238         (WebCore::IDBIndexBackendImpl::IndexCountOperation::create):
3239         (IDBIndexBackendImpl::IndexCountOperation):
3240         (WebCore::IDBIndexBackendImpl::IndexCountOperation::IndexCountOperation):
3241         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::create):
3242         (IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation):
3243         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::IndexReferencedValueRetrievalOperation):
3244         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::create):
3245         (IDBIndexBackendImpl::IndexValueRetrievalOperation):
3246         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::IndexValueRetrievalOperation):
3247         (WebCore::IDBIndexBackendImpl::OpenIndexCursorOperation::perform):
3248         (WebCore::IDBIndexBackendImpl::openCursor):
3249         (WebCore::IDBIndexBackendImpl::openKeyCursor):
3250         (WebCore::IDBIndexBackendImpl::IndexCountOperation::perform):
3251         (WebCore::IDBIndexBackendImpl::count):
3252         (WebCore::IDBIndexBackendImpl::IndexReferencedValueRetrievalOperation::perform):
3253         (WebCore::IDBIndexBackendImpl::IndexValueRetrievalOperation::perform):
3254         (WebCore::IDBIndexBackendImpl::get):
3255         (WebCore::IDBIndexBackendImpl::getKey):
3256         * Modules/indexeddb/IDBIndexBackendInterface.h: Remove bogus "ThreadSafe"
3257         * Modules/indexeddb/IDBKey.h: Remove bogus "ThreadSafe"
3258         (IDBKey):
3259         * Modules/indexeddb/IDBKeyRange.h: Remove bogus "ThreadSafe"
3260         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3261         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::create):
3262         (IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation):
3263         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::ObjectStoreRetrievalOperation):
3264         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::create):
3265         (IDBObjectStoreBackendImpl::ObjectStoreStorageOperation):
3266         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::ObjectStoreStorageOperation):
3267         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::create):
3268         (IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation):
3269         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::ObjectStoreIndexesReadyOperation):
3270         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::create):
3271         (IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation):
3272         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::ObjectStoreDeletionOperation):
3273         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::create):
3274         (IDBObjectStoreBackendImpl::ObjectStoreClearOperation):
3275         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::ObjectStoreClearOperation):
3276         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::create):
3277         (IDBObjectStoreBackendImpl::CreateIndexOperation):
3278         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::CreateIndexOperation):
3279         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::create):
3280         (IDBObjectStoreBackendImpl::DeleteIndexOperation):
3281         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::DeleteIndexOperation):
3282         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::create):
3283         (IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation):
3284         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::OpenObjectStoreCursorOperation):
3285         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::create):
3286         (IDBObjectStoreBackendImpl::ObjectStoreCountOperation):
3287         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::ObjectStoreCountOperation):
3288         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::create):
3289         (IDBObjectStoreBackendImpl::CreateIndexAbortOperation):
3290         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::CreateIndexAbortOperation):
3291         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::create):
3292         (IDBObjectStoreBackendImpl::DeleteIndexAbortOperation):
3293         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
3294         (WebCore::IDBObjectStoreBackendImpl::get):
3295         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreRetrievalOperation::perform):
3296         (WebCore::IDBObjectStoreBackendImpl::put):
3297         (WebCore):
3298         (WebCore::IDBObjectStoreBackendImpl::setIndexesReady):
3299         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreIndexesReadyOperation::perform):
3300         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3301         (WebCore::IDBObjectStoreBackendImpl::deleteFunction):
3302         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreDeletionOperation::perform):
3303         (WebCore::IDBObjectStoreBackendImpl::clear):
3304         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreClearOperation::perform):
3305         (WebCore::IDBObjectStoreBackendImpl::createIndex):
3306         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
3307         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
3308         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexOperation::perform):
3309         (WebCore::IDBObjectStoreBackendImpl::openCursor):
3310         (WebCore::IDBObjectStoreBackendImpl::OpenObjectStoreCursorOperation::perform):
3311         (WebCore::IDBObjectStoreBackendImpl::count):
3312         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreCountOperation::perform):
3313         (WebCore::IDBObjectStoreBackendImpl::CreateIndexAbortOperation::perform):
3314         (WebCore::IDBObjectStoreBackendImpl::DeleteIndexAbortOperation::perform):
3315         * Modules/indexeddb/IDBObjectStoreBackendInterface.h: Remove bogus "ThreadSafe"
3316         * Modules/indexeddb/IDBRequest.h: Remove bogus "ThreadSafe"
3317         (IDBRequest):
3318         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3319         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl): Appease RefPtr<> adoption strictness.
3320         (WebCore::IDBTransactionBackendImpl::scheduleTask):
3321         (WebCore::IDBTransactionBackendImpl::abort):
3322         (WebCore::IDBTransactionBackendImpl::taskTimerFired):
3323         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3324         (Operation):
3325         (WebCore::IDBTransactionBackendImpl::Operation::~Operation):
3326         (IDBTransactionBackendImpl):
3327         (WebCore::IDBTransactionBackendImpl::scheduleTask):
3328         * Modules/indexeddb/IDBTransactionBackendInterface.h: Remove bogus "ThreadSafe"
3329
3330 2012-12-05  Noel Gordon  <noel.gordon@gmail.com>
3331
3332         ENABLE(IMAGE_DECODER_DOWN_SAMPLING): Don't swizzle decode down sampled images
3333         https://bugs.webkit.org/show_bug.cgi?id=103856
3334
3335         Reviewed by Yong Li.
3336
3337         For ports using ENABLE(IMAGE_DECODER_DOWN_SAMPLING), turbo swizzle decodes provide
3338         no speed-up when the decoded image will be down sampled because the data must pass
3339         through the buffer.setRGBA() slow path. That is not the swizzled path. Instead use
3340         JCS_RGB decodes to clarify the output color space handling in outputScanlines().
3341
3342         No new tests. Covered by existing JPEG decoding tests.
3343
3344         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3345         (WebCore::JPEGImageReader::decode): libjpeg-turbo swizzle decodes provides no real
3346         speed-up if the image will be down sampled. Revert to using JCS_RGA in this case.
3347         (WebCore::setPixel): Remove the libjpeg-turbo JCS_EXT_BGRA and JCS_EXT_RGBA cases.
3348         (WebCore::JPEGImageDecoder::outputScanlines): ditto.
3349         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
3350         (WebCore::JPEGImageDecoder::willDownSample): Return true if image down sampling 
3351         will be applied to the decoded image (m_scaled). Note: the willDownSample() return
3352         value is valid only after setSize() has been called: add an ASSERT for that.
3353
3354 2012-12-05  Michael Pruett  <michael@68k.org>
3355
3356         IndexedDB: Implement IndexedDB bindings for JSC
3357         https://bugs.webkit.org/show_bug.cgi?id=103484
3358
3359         Reviewed by Kentaro Hara.
3360
3361         IndexedDB is currently implemented only for V8. This change adds
3362         the bindings necessary for IndexedDB to work with JSC. With this
3363         patch, IndexedDB for JSC passes 112 out of the 196 layout tests in
3364         storage/indexeddb. IndexedDB is still not enabled for any JSC port.
3365
3366         Tests: storage/indexeddb/*
3367
3368         * CMakeLists.txt:
3369         * GNUmakefile.list.am:
3370         * Modules/indexeddb/IDBOpenDBRequest.idl:
3371         * Modules/indexeddb/IDBVersionChangeRequest.idl:
3372         * UseJSC.cmake:
3373         * WebCore.xcodeproj/project.pbxproj:
3374         * bindings/js/DOMRequestState.h: Added to match bindings/v8/DOMRequestState.h.
3375         (WebCore):
3376         (DOMRequestState):
3377         (WebCore::DOMRequestState::DOMRequestState):
3378         (WebCore::DOMRequestState::clear):
3379         (Scope):
3380         (WebCore::DOMRequestState::Scope::Scope):
3381         (WebCore::DOMRequestState::exec):
3382         * bindings/js/IDBBindingUtilities.cpp: Add utility functions matching those in bindings/v8/IDBBindingUtilities.cpp.
3383         (WebCore::get):
3384         (WebCore):
3385         (WebCore::canSet):
3386         (WebCore::set):
3387         (WebCore::createIDBKeyFromValue):
3388         (WebCore::getNthValueOnKeyPath):
3389         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
3390         (WebCore::ensureNthValueOnKeyPath):
3391         (WebCore::canInjectNthValueOnKeyPath):
3392         (WebCore::injectIDBKeyIntoScriptValue):
3393         (WebCore::canInjectIDBKeyIntoScriptValue):
3394         (WebCore::deserializeIDBValue):
3395         (WebCore::idbKeyToScriptValue):
3396         * bindings/js/IDBBindingUtilities.h: Add utility functions matching those in bindings/v8/IDBBindingUtilities.h.
3397         (WebCore):
3398         * bindings/js/JSIDBAnyCustom.cpp:
3399         (WebCore::toJS):
3400         * bindings/js/JSIDBKeyCustom.cpp:
3401         (WebCore::toJS):
3402         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Removed.
3403
3404 2012-12-05  Antoine Quint  <graouts@apple.com>
3405
3406         TextTrackCue's .endTime property should fire a TypeError when NaN is assigned
3407         https://bugs.webkit.org/show_bug.cgi?id=103413
3408
3409         Reviewed by Eric Carlson.
3410
3411         Check whether the new time passed to setStartTime() and setEndTime() is none of NaN or Infinity,
3412         otherwise throwing a TypeError.
3413         
3414         Thanks to this fix, we're no longer skipping media/track/opera/interfaces/TextTrackCue/endTime.html and
3415         media/track/opera/interfaces/TextTrackCue/startTime.html.
3416
3417         * html/track/TextTrackCue.cpp:
3418         (WebCore::TextTrackCue::setStartTime):
3419         (WebCore::TextTrackCue::setEndTime):
3420         * html/track/TextTrackCue.h:
3421         (TextTrackCue):
3422         * html/track/TextTrackCue.idl:
3423
3424 2012-12-05  Alexis Menard  <alexis@webkit.org>
3425
3426         [CSS3 Backgrounds and Borders] Allow the CSS3 background position offset for background shorthand.
3427         https://bugs.webkit.org/show_bug.cgi?id=104014
3428
3429         Reviewed by Dirk Schulze.
3430
3431         Add the support of the new <position> type if set from within the
3432         background shorthand. The patch just modify the way we count the values
3433         of the current context by checking wether we encounter a comma (it is
3434         then the next background layer), or if we encounter a '/' (which is in the
3435         background shorthand context the background-size) or any value that is
3436         not a valid background-position keyword or length (which means we are
3437         already parsing the next property of the background shorthand).
3438
3439         Tests: LayoutTests/fast/backgrounds/background-position-parsing-2.html
3440         has been modified to cover this use case.
3441
3442         * css/CSSParser.cpp:
3443         (WebCore::CSSParser::isPositionValue):
3444         (WebCore):
3445         (WebCore::CSSParser::parseFillBackgroundPosition):
3446         (WebCore::CSSParser::parseFillProperty):
3447         * css/CSSParser.h:
3448
3449 2012-12-05  Elliott Sprehn  <esprehn@gmail.com>
3450
3451         ShadowRoot should recalcStyle for itself
3452         https://bugs.webkit.org/show_bug.cgi?id=103933
3453
3454         Reviewed by Hajime Morita.
3455
3456         ShadowRoot should support recalcStyle just like Element instead of
3457         having the code inside ElementShadow. This was once the case and
3458         the dead method prototype for recalcShadowTreeStyle is still in
3459         ShadowRoot.h.
3460
3461         No new tests, just refactoring.
3462
3463         * dom/ElementShadow.cpp:
3464         (WebCore::ElementShadow::recalcStyle):
3465         * dom/ShadowRoot.cpp:
3466         (WebCore::ShadowRoot::recalcStyle):
3467         * dom/ShadowRoot.h:
3468
3469 2012-12-05  Keishi Hattori  <keishi@webkit.org>
3470
3471         Fix text direction in datalist popup for time controls
3472         https://bugs.webkit.org/show_bug.cgi?id=103853
3473
3474         Reviewed by Kent Tamura.
3475
3476         The datalist entry value should be displayed with the same text direction as the date/time format.
3477
3478         Tests: platform/chromium/fast/forms/suggestion-picker/datetime-suggestion-picker-appearance-locale-hebrew.html
3479                platform/chromium/fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html
3480                platform/chromium/fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html
3481
3482         * Resources/pagepopups/calendarPicker.js: Renamed isCalendarRTL to isLocaleRTL.
3483         (CalendarPicker.prototype._layout):
3484         (CalendarPicker.prototype.fixWindowSize):
3485         (DaysTable.prototype._handleKey):
3486         (MonthPickerDaysTable.prototype._handleKey):
3487         (WeekPickerDaysTable.prototype._handleKey):
3488         * Resources/pagepopups/suggestionPicker.css:
3489         (.suggestion-list-entry .title): Title should have the same text direction as the locale.
3490         (.locale-rtl .suggestion-list-entry .title):
3491         * Resources/pagepopups/suggestionPicker.js:
3492         (SuggestionPicker.prototype._layout): Add locale-rtl class if the isLocaleRTL is true.
3493
3494 2012-12-05  Keishi Hattori  <keishi@webkit.org>
3495
3496         Fix flickering when hiding page popup
3497         https://bugs.webkit.org/show_bug.cgi?id=104100
3498
3499         Reviewed by Kent Tamura.
3500
3501         Moving the page popup while hiding was causing flickering in some environments.
3502
3503         No new tests. Can't reproduce in layout test.
3504
3505         * Resources/pagepopups/pickerCommon.js:
3506         (hideWindow): Don't move and just resize.
3507
3508 2012-12-05  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3509
3510         [Qt] Don't rely on QMimeDatabase for essential MIME types
3511         https://bugs.webkit.org/show_bug.cgi?id=103865
3512
3513         Based on patch by Pierre Rossi.
3514         Reviewed by Jocelyn Turcotte.
3515
3516         Extend the short static list to also include MIME types essential to WebKit,
3517         and detect these first before checking the system mimedatabase.
3518
3519         * platform/qt/MIMETypeRegistryQt.cpp:
3520         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
3521         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
3522
3523 2012-12-05  Zoltan Herczeg  <zherczeg@webkit.org>
3524
3525         Optimize ColorMatrix filter
3526         https://bugs.webkit.org/show_bug.cgi?id=103728
3527
3528         Reviewed by Dirk Schulze.
3529
3530         ColorMatrix filter recalculates several constants for
3531         every pixel. It is enough to do these calculations only
3532         once during the initialization. Style issues also fixed.
3533
3534         Existing tests cover this feature.
3535
3536         * platform/graphics/filters/FEColorMatrix.cpp:
3537         (WebCore::matrix):
3538         (WebCore::saturateAndHueRotate):
3539         (WebCore::effectType):
3540
3541 2012-12-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3542
3543         Flex item auto margins in the cross direction should safe center
3544         https://bugs.webkit.org/show_bug.cgi?id=103919
3545
3546         Reviewed by Ojan Vafai.
3547
3548         Do not apply auto margins for cross axis if there's no alignment
3549         space available.
3550
3551         Test: css3/flexbox/flex-flow-auto-margins-no-available-space.html
3552
3553         * rendering/RenderFlexibleBox.cpp:
3554         (WebCore::RenderFlexibleBox::alignChildren): Make sure we pass a
3555         positive value for availableAlignmentSpace to
3556         updateAutoMarginsInCrossAxis().
3557
3558 2012-12-05  Mike West  <mkwst@chromium.org>
3559
3560         Web Inspector: Autogenerate stack traces and line numbers when possible.
3561         https://bugs.webkit.org/show_bug.cgi?id=100650
3562
3563         Reviewed by Yury Semikhatsky.
3564
3565         Console messages generated in WebCore generally are asked to do a bit of
3566         work in order to provide a developer with a detailed report. We ask the
3567         caller to either generate stack traces, or pass in a url/line number
3568         pair, which can be a bit of work. Predictably, most callers don't pass
3569         in what we'd like to see.
3570
3571         This patch creates a new, simpler console message generation API that we
3572         expect most call sites to use. Source, type, level, and message are
3573         required, and an optional request ID can be passed in. Everything else
3574         will be autogenerated inside ConsoleMessage when appropriate.
3575
3576         In a subsequent patch, we expect to be able to trim down more of the
3577         external call sites (ContentSecurityPolicy springs to mind) in order to
3578         further consolidate the external interface. Simple is good.
3579
3580         * Modules/websockets/WebSocket.cpp:
3581         (WebCore::WebSocket::connect):
3582         * Modules/websockets/WebSocketChannel.cpp:
3583         (WebCore::WebSocketChannel::didFailSocketStream):
3584             Drop the now-redundant URL parameter from various WebSocket errors.
3585         * css/MediaList.cpp:
3586         (WebCore::addResolutionWarningMessageToConsole):
3587             Switch to Document::addConsoleMessage, which means that we can move
3588             line-number generation out of MediaList.
3589         * dom/Document.cpp:
3590         (WebCore::Document::logExceptionToConsole):
3591             Use the long-form 'addMessage()' rather than the public interface.
3592         (WebCore::Document::processHttpEquiv):
3593             Drop the URL parameter, as it's now autogenerated.
3594         (WebCore::Document::addConsoleMessage):
3595         (WebCore):
3596         * dom/Document.h:
3597         (Document):
3598             Override the pure virtual method on ScriptExecutionContext, and pass
3599             the call through to the new Console::addMessage, which accepts a
3600             pointer to the Document in order to do line-number generation.
3601         * dom/ScriptExecutionContext.h:
3602         (ScriptExecutionContext):
3603             Add a pure virtual variant of addConsoleMessage which accepts only
3604             bare minimum data, and expects autogeneration of the rest.
3605             Additionally, ensure that the other variants always have either a
3606             URL/line number, or a stack trace.
3607         * dom/ViewportArguments.cpp:
3608         (WebCore::reportViewportWarning):
3609             Drop line numbers and URLs from Viewport warnings. We can generate
3610             these now.
3611         * html/HTMLFormElement.cpp:
3612         (WebCore::HTMLFormElement::validateInteractively):
3613             Drop the URL from form autofocus warnings
3614         * html/HTMLIFrameElement.cpp:
3615         (WebCore::HTMLIFrameElement::parseAttribute):
3616             Drop the URL and line from sandbox attribute warnings.
3617         * html/canvas/WebGLRenderingContext.cpp:
3618         (WebCore):
3619         (WebCore::WebGLRenderingContext::printWarningToConsole):
3620             Drop the URL from WebGL warnings.
3621         * inspector/ConsoleMessage.cpp:
3622         (WebCore::ConsoleMessage::ConsoleMessage):
3623             Call 'autogenerateMetadata' to ensure that a stack trace is
3624             generated if one isn't provided. Create a new constructor that
3625             accepts a ScriptState/ScriptArguments pair, and use it for console
3626             API calls.
3627         (WebCore):
3628         (WebCore::ConsoleMessage::autogenerateMetadata):
3629             Generate a stack trace given whatever information we've got.
3630         * inspector/ConsoleMessage.h:
3631         (ConsoleMessage):
3632             Create a new constructor that accepts a ScriptState/ScriptArguments
3633             pair, and use it for console API calls.
3634         * inspector/InspectorConsoleAgent.cpp:
3635         (WebCore::InspectorConsoleAgent::enable):
3636             Use the short-form ConsoleMessage constructor.
3637         (WebCore::InspectorConsoleAgent::addMessageToConsole):
3638             Use the stack-only constructor, or the ScriptState
3639             constructor, as appropriate.
3640         (WebCore::InspectorConsoleAgent::count):
3641             We generated a stack, pass it in.
3642         * inspector/InspectorConsoleAgent.cpp:
3643         (WebCore::InspectorConsoleAgent::isWorkerAgent):
3644         * inspector/PageConsoleAgent.h:
3645         (WebCore::PageConsoleAgent::isWorkerAgent):
3646         * inspector/PageConsoleAgent.h:
3647         (WebCore::PageConsoleAgent::isWorkerAgent):
3648             We only want to generate call stacks for non-Workers (because
3649             createScriptCallStack explodes in JSC if we're not on the main
3650             thread). This method will allow us to distinguish between those
3651             messages generated from Workers, and those from Pages.
3652         * loader/FrameLoader.cpp:
3653         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
3654         * loader/MainResourceLoader.cpp:
3655         (WebCore::MainResourceLoader::didReceiveResponse):
3656             Drop the URL parameter from the console message for X-Frame-Options
3657             parsing errors.
3658         * page/Console.cpp:
3659         (WebCore::Console::addMessage):
3660             When given a Document*, generate a line number if: 1) the document
3661             is still being parsed, 2) the document is not in document.write(),
3662             3) the parser isn't waiting for script, and 4) the parser isn't
3663             executing script. Many callsites didn't check all of these, which
3664             is why the SVG rebaseline (for example) drops lots and lots of line
3665             numbers which point at a closing '</script>' tag.
3666         (WebCore):
3667         * page/Console.h:
3668         (WebCore):
3669         (Console):
3670             Update the public API to accept a Document* and little else.
3671         * page/DOMWindow.cpp:
3672         (WebCore::DOMWindow::printErrorMessage):
3673             Don't generate a stack here. We can do it later.
3674         * svg/SVGDocumentExtensions.cpp:
3675         (WebCore::reportMessage):
3676             Drop the URL and line number. We'll generate them. It'll be sweet.
3677         * workers/WorkerContext.cpp:
3678         (WebCore::WorkerContext::addConsoleMessage):
3679         (WebCore):
3680         * workers/WorkerContext.h:
3681         (WorkerContext):
3682             Implement the new addConsoleMessage variant.
3683
3684 2012-12-04  Carlos Garcia Campos  <cgarcia@igalia.com>
3685
3686         Reduce the children repaints when moved multiple times during the layout
3687         https://bugs.webkit.org/show_bug.cgi?id=103510
3688
3689         Reviewed by Darin Adler.
3690
3691         Cache the children positions before the layout and move to the
3692         final position after the layout.
3693
3694         Test: css3/flexbox/repaint-column-reverse.html
3695
3696         * rendering/RenderFlexibleBox.cpp:
3697         (WebCore::RenderFlexibleBox::OrderIterator::OrderIterator): Do not
3698         call first() on the consructor.
3699         (WebCore::RenderFlexibleBox::layoutBlock): Use a Vector with the
3700         children frame rects before the layout and call
3701         repaintChildrenDuringLayoutIfMoved() to repaint the children that
3702         have been moved.
3703         (WebCore::RenderFlexibleBox::appendChildrenFrameRects): Return a
3704         Vector with children frame rects.
3705         (WebCore::RenderFlexibleBox::repaintChildrenDuringLayoutIfMoved):
3706         Call repaintDuringLayoutIfMoved() for every children using the old
3707         frame rects.
3708         (WebCore::RenderFlexibleBox::setFlowAwareLocationForChild): Do not
3709         call repaintDuringLayoutIfMoved().
3710         (WebCore::RenderFlexibleBox::layoutFlexItems): Make sure the
3711         passed iterator points to the first child.
3712         * rendering/RenderFlexibleBox.h:
3713
3714 2012-12-05  Dan Carney  <dcarney@google.com>
3715
3716         [V8] toV8Fast for all classes with ScriptWrapper Holder objects
3717         https://bugs.webkit.org/show_bug.cgi?id=102686
3718
3719         Reviewed by Adam Barth.
3720
3721         This patch makes most generated bindings use toV8Fast
3722         by adding a fast path to the main world DOMDataStore.
3723         Additionally, toV8Fast is now being called on callbacks
3724         which use v8::Arguments.
3725
3726         No new tests. No change in functionality.
3727
3728         * bindings/scripts/CodeGeneratorV8.pm:
3729         (GenerateHeader):
3730         (GenerateNormalAttrGetter):
3731         (GenerateFunctionCallString):
3732         (NativeToJSValue):
3733         * bindings/v8/DOMDataStore.cpp:
3734         (WebCore::DOMDataStore::mainWorldStore):
3735         (WebCore::DOMDataStore::current):
3736         * bindings/v8/DOMDataStore.h:
3737
3738 2012-12-05  Andrey Adaikin  <aandrey@chromium.org>
3739
3740         Web Inspector: [Canvas] nit: add more typization for js compiler
3741         https://bugs.webkit.org/show_bug.cgi?id=103994
3742
3743         Reviewed by Pavel Feldman.
3744
3745         * inspector/InjectedScriptCanvasModuleSource.js:
3746         (.):
3747
3748 2012-12-05  Hans Muller  <hmuller@adobe.com>
3749
3750         [CSS Exclusions] ExclusionShape inlines should use isFlippedBlocksWritingMode()
3751         https://bugs.webkit.org/show_bug.cgi?id=103939
3752
3753         Reviewed by Dirk Schulze.
3754
3755         Just a minor cleanup: the protected ExclusionShape inlines, like minYForLogicalLine(),
3756         now use isFlippedBlocksWritingMode() instead of testing for RightToLeftWritingMode directly.
3757         This changeimproves consistency with the rest of WebKit and will work correctly
3758         if "horizontal-bt" writing-mode support is ever added.
3759
3760         No new tests were added since the existing tests cover these methods.
3761
3762         * rendering/ExclusionShape.h:
3763         (WebCore::ExclusionShape::minYForLogicalLine):
3764         (WebCore::ExclusionShape::maxYForLogicalLine):
3765         (WebCore::ExclusionShape::internalToLogicalBoundingBox):
3766
3767 2012-12-05  Bear Travis  <betravis@adobe.com>
3768
3769         Absolutely positioned non-replaced elements should resolve vertical margins against
3770         their containing block's logical width
3771         https://bugs.webkit.org/show_bug.cgi?id=103576
3772
3773         Reviewed by Emil A Eklund.
3774
3775         According to the CSS box model specification, all percentage margin & padding values,
3776         including top & bottom, should be resolved based on the containing block's width.
3777         http://www.w3.org/TR/CSS2/box.html#margin-properties
3778         The writing modes specification has refined this definition to use the containing
3779         block's logical width to resolve percentage margin & padding values.
3780         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
3781
3782         Previously, positioned elements measured their container in the element's block
3783         direction (containerLogicalHeight) to resolve margin-before/after, and in the inline
3784         direction (containerLogicalWidth) to resolve margin-start/end. This patch measures the
3785         container's logical width in its own inline direction (containerRelativeLogicalWidth)
3786         to resolve all margin percentage values.
3787
3788         Test: fast/writing-mode/percentage-margins-absolute.html
3789
3790         * rendering/RenderBox.cpp:
3791         (WebCore::RenderBox::computePositionedLogicalWidthUsing): Calculate the logical width
3792         of the container, and use it to calculate margins.
3793         (WebCore::RenderBox::computePositionedLogicalHeightUsing): Ditto.
3794
3795 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3796
3797         [V8] Replace String::New("symbol") with String::NewSymbol("symbol") (part 2)
3798         https://bugs.webkit.org/show_bug.cgi?id=104082
3799
3800         Reviewed by Adam Barth.
3801
3802         V8 can look up symbols faster than strings.
3803
3804         No tests. No change in behavior.
3805
3806         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
3807         (WebCore::getHiddenCopyMethod):
3808         (WebCore::installHiddenCopyMethod):
3809         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3810         (WebCore::constructWebGLArray):
3811         (WebCore::setWebGLArrayHelper):
3812         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3813         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3814         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3815         (WebCore::DialogHandler::dialogCreated):
3816         (WebCore::DialogHandler::returnValue):
3817         * bindings/v8/custom/V8GeolocationCustom.cpp:
3818         (WebCore::createPositionOptions):
3819         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
3820         (WebCore::V8HTMLDocument::wrapInShadowObject):
3821         (WebCore::V8HTMLDocument::openCallback):
3822         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3823         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
3824         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
3825         (WebCore::V8SQLTransaction::executeSqlCallback):
3826
3827 2012-12-04  Elliott Sprehn  <esprehn@chromium.org>
3828
3829         Clicking a scrollbar unfocuses the current activeElement
3830         https://bugs.webkit.org/show_bug.cgi?id=96335
3831
3832         Reviewed by Ojan Vafai.
3833
3834         Previously we only tested for clicks inside frame scrollbars before
3835         moving the focus, this patch expands the check to overflow scrollbars.
3836         Now clicking inside a scrollbar only moves the focus when the scrollbar
3837         has an ancestor that is mouse focusable.
3838
3839         This matches Gecko behavior, and was agreed to be the most sensible for now:
3840         http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-October/037759.html
3841
3842         Test: fast/overflow/scrollbar-click-retains-focus.html
3843
3844         * page/EventHandler.cpp:
3845         (WebCore::EventHandler::handleMousePressEvent):
3846           Never start selections inside scrollbars because it would cause asserts. 
3847           This wasn't a problem before because we always moved the focus when clicking a scrollbar.        
3848         (WebCore::EventHandler::dispatchMouseEvent): 
3849           Check that the click is not inside a scrollbar before moving the focus.
3850         (WebCore::EventHandler::isInsideScrollbar): Tests if a point is in a scrollbar.
3851         (WebCore):
3852         (WebCore::EventHandler::sendContextMenuEvent):
3853           Never start selections inside scrollbars because it would cause asserts.
3854         * page/EventHandler.h:
3855         (EventHandler):
3856         * rendering/RenderLayer.cpp:
3857         (WebCore::RenderLayer::hitTestOverflowControls):
3858
3859 2012-12-04  Kentaro Hara  <haraken@chromium.org>
3860
3861         [V8] Replace String::New("symbol") with String::NewSymbol("symbol")
3862         https://bugs.webkit.org/show_bug.cgi?id=104084
3863
3864         Reviewed by Adam Barth.
3865
3866         V8 can look up symbols faster than strings. This is a final patch for the replacement.
3867
3868         No tests. No change in behavior.
3869
3870         * bindings/v8/DateExtension.cpp:
3871         (WebCore::DateExtension::setAllowSleep):
3872         (WebCore::DateExtension::GetNativeFunction):
3873         * bindings/v8/NPV8Object.cpp:
3874         (WebCore::npIdentifierToV8Identifier):
3875         (_NPN_Invoke):
3876         * bindings/v8/PageScriptDebugServer.cpp:
3877         (WebCore::PageScriptDebugServer::addListener):
3878         * bindings/v8/ScriptController.cpp:
3879         (WebCore::ScriptController::setContextDebugId):
3880         * bindings/v8/ScriptDebugServer.cpp:
3881         (WebCore::ScriptDebugServer::callDebuggerMethod):
3882         (WebCore::ScriptDebugServer::setBreakpoint):
3883         (WebCore::ScriptDebugServer::removeBreakpoint):
3884         (WebCore::ScriptDebugServer::clearBreakpoints):
3885         (WebCore::ScriptDebugServer::setBreakpointsActivated):
3886         (WebCore::ScriptDebugServer::handleV8DebugEvent):
3887         (WebCore::ScriptDebugServer::dispatchDidParseSource):
3888         * bindings/v8/ScriptObject.cpp:
3889         (WebCore::ScriptGlobalObject::set):
3890         (WebCore::ScriptGlobalObject::get):
3891         (WebCore::ScriptGlobalObject::remove):
3892         * bindings/v8/V8Binding.h:
3893         (WebCore::toV8Sequence):
3894         * bindings/v8/V8DOMWindowShell.cpp:
3895         (WebCore::setInjectedScriptContextDebugId):
3896         (WebCore::V8DOMWindowShell::updateDocumentProperty):
3897         (WebCore::V8DOMWindowShell::clearDocumentProperty):
3898         * bindings/v8/V8NPObject.cpp:
3899         (WebCore::npObjectPropertyEnumerator):
3900         * bindings/v8/V8NodeFilterCondition.cpp:
3901         (WebCore::V8NodeFilterCondition::acceptNode):
3902         * bindings/v8/V8PerIsolateData.cpp:
3903         (WebCore::V8PerIsolateData::constructorOfToString):
3904         * bindings/v8/WorkerScriptController.cpp:
3905         (WebCore::WorkerScriptController::initializeContextIfNeeded):
3906         * bindings/v8/WorkerScriptDebugServer.cpp:
3907         (WebCore::WorkerScriptDebugServer::addListener):
3908
3909 2012-12-04  Dan Bernstein  <mitz@apple.com>
3910
3911         Support text-orientation: sideways-right (and sideways when it maps to sideways-right)
3912         https://bugs.webkit.org/show_bug.cgi?id=104035
3913
3914         Reviewed by Anders Carlsson.
3915
3916         Test: fast/text/orientation-sideways.html
3917
3918         * GNUmakefile.list.am: Updated for rename of TextOrientation.h.
3919
3920         * WebCore.gypi: Ditto.
3921
3922         * WebCore.xcodeproj/project.pbxproj: Ditto.
3923
3924         * css/CSSComputedStyleDeclaration.cpp:
3925         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed to retrieve
3926         text-orientation from RenderStyle rather than from the font description.
3927
3928         * css/CSSParser.cpp:
3929         (WebCore::CSSParser::parseValue): Added sideways and sideways-right as acceptable
3930         text-orientation values.
3931
3932         * css/CSSPrimitiveValueMappings.h:
3933         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mappings for sideways and
3934         sideways-right.
3935         (WebCore::CSSPrimitiveValue::operator TextOrientation): Ditto.
3936
3937         * css/CSSValueKeywords.in: Added sideways and sideways-right.
3938
3939         * css/StyleBuilder.cpp:
3940         (WebCore::StyleBuilder::StyleBuilder): Removed text-orientation property handler, as it is
3941         now handled in CSSStyleResolver.
3942
3943         * css/StyleResolver.cpp:
3944         (WebCore::getFontAndGlyphOrientation): Added this helper function that determines the font
3945         orientation and non-CJK glyph orientation based on writing-mode and text-orientation.
3946         (WebCore::StyleResolver::styleForDocument): Added code to set the font orientation and
3947         non-CJK glyph orientation in the document style.
3948         (WebCore::checkForOrientationChange): Added. Sets the font orientation and non-CJK glyph
3949         orientation in the child style if the difference between the parent and child styles requires
3950         doing so.
3951         (WebCore::StyleResolver::updateFont): Added call to checkForOrientationChange().
3952         (WebCore::StyleResolver::applyProperty): Changed the writing-mode case to call the new
3953         setWritingMode helper, which dirties the font as needed, rather than changing the font
3954         here. Moved handling of text-orientation here, by calling setTextOrientation, which also
3955         dirties the font as needed.
3956
3957         * css/StyleResolver.h:
3958         (WebCore::StyleResolver::setWritingMode): Added. Dirties the font if the writing mode changes.
3959         (WebCore::StyleResolver::setTextOrientation): Ditto for text orientation.
3960
3961         * platform/graphics/FontDescription.h:
3962         (WebCore::FontDescription::FontDescription): Updated initializer for rename.
3963         (WebCore::FontDescription::nonCJKGlyphOrientation): Renamed textOrientation to this.
3964         (WebCore::FontDescription::setNonCJKGlyphOrientation): Renamed setTextOrientation to this.
3965         (FontDescription): Renamed member variable m_textOrientation to m_nonCJKGlyphOrientation.
3966         (WebCore::FontDescription::operator==): Updated for rename.
3967
3968         * platform/graphics/FontFastPath.cpp:
3969         (WebCore::glyphDataAndPageForNonCJKCharacterWithGlyphOrientation): Renamed
3970         glyphDataAndPageForCharacterWithTextOrientation to this and changed the parameter type from
3971         TextOrientation to NonCJKGlyphOrientation.
3972         (WebCore::Font::glyphDataAndPageForCharacter): Updated for above rename.
3973
3974         * platform/graphics/mac/FontComplexTextMac.cpp:
3975         (WebCore::Font::fontDataForCombiningCharacterSequence): Updated for rename of
3976         FontDescription::textOrientation().
3977
3978         * platform/text/NonCJKGlyphOrientation.h: Renamed TextOrientation.h to this, and renamed
3979         the enum and its values to better reflect that they describe how glyphs for non-CJK
3980         characters are to be rendered in vertical text.
3981
3982         * rendering/InlineFlowBox.cpp:
3983         (WebCore::InlineFlowBox::requiresIdeographicBaseline): Updated for rename of
3984         FontDescription::textOrientation().
3985
3986         * rendering/style/RenderStyle.cpp:
3987         (WebCore::RenderStyle::diff): Made text-orientation change a layout change.
3988
3989         * rendering/style/RenderStyle.h:
3990         (WebCore::RenderStyle::setTextOrientation): Added.
3991
3992         * rendering/style/RenderStyleConstants.h: Added a new TextOrientation enum here.
3993
3994         * rendering/style/StyleRareInheritedData.cpp:
3995         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialization and copying
3996         of m_textOrientation member variable.
3997         (WebCore::StyleRareInheritedData::operator==): Added comparing of m_textOrientation.
3998
3999         * rendering/style/StyleRareInheritedData.h:
4000         (StyleRareInheritedData): Added m_textOrientation member variable.
4001
4002 2012-12-04  Kentaro Hara  <haraken@chromium.org>
4003
4004         [V8] Use ScopedPersistent for IntegerCache::smallIntegers
4005         https://bugs.webkit.org/show_bug.cgi?id=104066
4006
4007         Reviewed by Adam Barth.
4008
4009         We can use ScopedPersistent for IntegerCache::smallIntegers
4010         instead of manual Persistent::New().
4011
4012         I confirmed no performance regression in Bindings/scroll-top.html
4013
4014         No tests. No change in behavior.