31f97e831072bb84e8616c0b6f768be51567c48b
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
2
3         [Chromium] Don't create SolidColorLayer for full transparent background
4         https://bugs.webkit.org/show_bug.cgi?id=113524
5
6         Reviewed by James Robinson.
7
8         Test: GraphicsLayerChromiumTest.setContentsToSolidColor
9
10         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
11         (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
12
13 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
14
15         use XMLHttpRequestResponseType enumeration in XMLHttpRequest.idl
16         https://bugs.webkit.org/show_bug.cgi?id=113518
17
18         Reviewed by Kentaro Hara.
19
20         Use enum XMLHttpRequestResponseType type instead of DOMString for
21         XMLHttpRequest responseType.
22
23         Argument validation now happens in the bindings. 
24         XMLHttpRequest::setResponseType should then never receive invalid
25         arguments. So, replace console message with ASSERT_NOT_REACHED();
26
27         Test: fast/xmlhttprequest/xmlhttprequest-set-responsetype.html
28
29         * xml/XMLHttpRequest.cpp:
30         (WebCore::XMLHttpRequest::setResponseType):
31         * xml/XMLHttpRequest.idl:
32
33 2013-03-28  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
34
35         [css3-text] Add platform support for "wavy" text decoration style
36         https://bugs.webkit.org/show_bug.cgi?id=92868
37
38         Reviewed by Benjamin Poulain.
39
40         This patch uses GraphicsContext::strokePath() to implement
41         wavy decoration for the CSS3 property "text-decoration-style".
42
43         No new tests as this is covered with existing tests.
44
45         * rendering/InlineTextBox.cpp:
46         (WebCore::textDecorationStyleToStrokeStyle): Remove obsolete comment.
47         (WebCore::adjustStepToDecorationLength): Add function to adjust
48         variables used to calculate the lenght of Bezier curves.
49         (WebCore::strokeWavyTextDecoration): Add function to stroke wavy
50         decoration based on cubic Bezier curve.
51         (WebCore::InlineTextBox::paintDecoration): Call
52         strokeWavyTextDecoration when necessary.
53
54 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
55
56         REGRESSION(r147149): breaks binding test on Mac. (Requested by mlam_ on #webkit).
57         https://bugs.webkit.org/show_bug.cgi?id=113538
58
59         Reviewed by Simon Fraser.
60
61         Run run-bindings-tests --reset-results to fix broken tests after
62         r147149.
63
64         * bindings/scripts/test/V8/V8TestInterface.cpp:
65         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetter):
66         * bindings/scripts/test/V8/V8TestObj.cpp:
67         (WebCore::TestObjV8Internal::shortAttrAttrSetter):
68         (WebCore::TestObjV8Internal::unsignedShortAttrAttrSetter):
69         (WebCore::TestObjV8Internal::longAttrAttrSetter):
70         (WebCore::TestObjV8Internal::longLongAttrAttrSetter):
71         (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetter):
72         (WebCore::TestObjV8Internal::testObjAttrAttrSetter):
73         (WebCore::TestObjV8Internal::XMLObjAttrAttrSetter):
74         (WebCore::TestObjV8Internal::createAttrSetter):
75         (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrSetter):
76         (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter):
77         (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrSetter):
78         (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter):
79         (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter):
80         (WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):
81         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetter):
82         (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetter):
83         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetter):
84         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
85         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
86         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
87         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
88         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
89         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
90         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
91         (WebCore::TestObjV8Internal::conditionalAttr1AttrSetter):
92         (WebCore::TestObjV8Internal::conditionalAttr2AttrSetter):
93         (WebCore::TestObjV8Internal::conditionalAttr3AttrSetter):
94         (WebCore::TestObjV8Internal::anyAttributeAttrSetter):
95         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter):
96         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter):
97         (WebCore::TestObjV8Internal::enabledPerContextAttr1AttrSetter):
98         (WebCore::TestObjV8Internal::enabledPerContextAttr2AttrSetter):
99         (WebCore::TestObjV8Internal::floatArrayAttrSetter):
100         (WebCore::TestObjV8Internal::doubleArrayAttrSetter):
101         (WebCore::TestObjV8Internal::mutablePointAttrSetter):
102         (WebCore::TestObjV8Internal::immutablePointAttrSetter):
103         (WebCore::TestObjV8Internal::strawberryAttrSetter):
104         (WebCore::TestObjV8Internal::strictFloatAttrSetter):
105         (WebCore::TestObjV8Internal::idAttrSetter):
106         (WebCore::TestObjV8Internal::nullableLongSettableAttributeAttrSetter):
107         (WebCore::TestObjV8Internal::nullableStringValueAttrSetter):
108         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetter):
109         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld):
110         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
111         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrSetter):
112         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetter):
113         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
114         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
115         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
116         (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrSetter):
117         (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrSetter):
118
119 2013-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
120
121         Unreviewed, rolling out r147130.
122         http://trac.webkit.org/changeset/147130
123         https://bugs.webkit.org/show_bug.cgi?id=113539
124
125         Not needed now that we do not sleep in preprocessor.pm
126         (Requested by jamesr on #webkit).
127
128         * WebCore.gyp/WebCore.gyp:
129         * bindings/scripts/CodeGenerator.pm:
130         (ParseInterface):
131         * bindings/scripts/IDLParser.pm:
132         (Parse):
133         * bindings/scripts/generate-bindings.pl:
134         * bindings/scripts/generate-preprocessed-idls.pl: Removed.
135         * bindings/scripts/preprocessor.pm:
136         (applyPreprocessor):
137
138 2013-03-28  Nate Chapin  <japhet@chromium.org>
139
140         Don't grant local content permissions for appcache loads.
141         https://bugs.webkit.org/show_bug.cgi?id=112542
142
143         Reviewed by Antti Koivisto.
144
145         No new tests, fixing http/tests/appcache/local-content.html
146
147         * loader/DocumentLoader.cpp:
148         (WebCore::DocumentLoader::DocumentLoader):
149         (WebCore::DocumentLoader::commitData): Don't grant local load permissions
150             to all SubstituteData loads, only give them to loads that were SubstituteData
151             loads at the time of DocumentLoader construction. This constitutes all
152             SubstituteData loads except those triggered by appcache.
153         * loader/DocumentLoader.h:
154         * loader/FrameLoader.cpp:
155         (WebCore::FrameLoader::didBeginDocument): Move granting local load
156             permissions for SubstituteData loads to DocumentLoader::commitData().
157
158 2013-03-28  Mike West  <mkwst@chromium.org>
159
160         X-Frame-Options: Blocked resources should fire load events.
161         https://bugs.webkit.org/show_bug.cgi?id=113192
162
163         Reviewed by Nate Chapin.
164
165         * loader/DocumentLoader.cpp:
166         (WebCore::DocumentLoader::responseReceived):
167             Fire a load event on the frame's owner element when denying access
168             due to X-Frame-Options header content. This brings us in-line with
169             Gecko and IE, which both trigger load events currently.
170
171 2013-03-28  Tien-Ren Chen  <trchen@chromium.org>
172
173         Support bottom-right anchored fixed-position elements during a pinch gesture
174         https://bugs.webkit.org/show_bug.cgi?id=111670
175
176         Reviewed by James Robinson.
177
178         This patch adds support to bottom-right fixed-position elements by
179         introducing WebLayerPositionConstraint to WebLayer.
180
181         No new tests. Can't test until chromium patch landed.
182
183         * page/scrolling/ScrollingCoordinator.h:
184         (WebCore::ScrollingCoordinator::updateLayerPositionConstraint):
185         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
186         (WebCore::clearPositionConstraintExceptForLayer):
187         (WebCore):
188         (WebCore::computePositionConstraint):
189         (WebCore::ScrollingCoordinatorChromium::updateLayerPositionConstraint):
190         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
191         (ScrollingCoordinatorChromium):
192         * rendering/RenderLayerBacking.cpp:
193         (WebCore::RenderLayerBacking::registerScrollingLayers):
194         * rendering/RenderLayerBacking.h:
195         (WebCore::RenderLayerBacking::contentsContainmentLayer):
196         (RenderLayerBacking):
197         * rendering/RenderLayerCompositor.cpp:
198         * rendering/RenderLayerCompositor.h:
199
200 2013-03-28  James Robinson  <jamesr@chromium.org>
201
202         Remove unnecessary 1 second sleep on windows from preprocessor.pm
203         https://bugs.webkit.org/show_bug.cgi?id=113536
204
205         Unreviewed, partial rollout of r146661.
206
207         This rolls out one line of 146661 that slows down the windows build significantly.
208
209         * bindings/scripts/preprocessor.pm:
210         (applyPreprocessor):
211
212 2013-03-28  Levi Weintraub  <leviw@chromium.org>
213
214         Enable font measurement optimization for Chromium-mac when there are no font-feature-settings.
215
216         Enable measure-once optimization on Chromium-Mac
217         https://bugs.webkit.org/show_bug.cgi?id=113243
218
219         Reviewed by Eric Seidel.
220
221         Bugs in Chromium-mac's -webkit-font-feature-settings support prevented us from enabling the
222         optimization when it was enabled for all other platforms. This was believed to be related to
223         kerning, but the bug shows up when there are any font-feature-settings specified. For now,
224         optimizing the common case and only turning off the optimization when there are font-feature-
225         settings in play.
226
227         Updated test fast/text/shaping/shaping-selection-rect.html to avoid breaking due to
228         https://bugs.webkit.org/show_bug.cgi?id=113418
229
230         * rendering/RenderBlockLineLayout.cpp:
231         (WebCore::setLogicalWidthForTextRun):
232
233 2013-03-28  Zoltan Horvath  <zoltan@webkit.org>
234
235         [CSS Exclusions][CSS Regions] Block children do not layout inline content correctly in a region with shape-inside set
236         https://bugs.webkit.org/show_bug.cgi?id=112177
237
238         Reviewed by David Hyatt.
239
240         When we had two multiple regions and a shape-inside was applied on the second region, but not on the first region and the content contained
241         paragraphs, the content was pushed down almost to the bottom in the second region. In a flow thread this behavior caused by the lack of the 
242         proper updating of absoluteLogicalTop in RenderBlock::layoutRunsAndFloatsInRange function.
243
244         Tests: fast/regions/shape-inside/shape-inside-on-additional-regions.html
245                fast/regions/shape-inside/shape-inside-on-regions.html
246
247         * rendering/RenderBlockLineLayout.cpp:
248         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the value of absoluteLogicalTop in every run when we are in a flow thread.
249
250 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
251
252         exceptions are not checked after toInt32 calls in bindings.
253         https://bugs.webkit.org/show_bug.cgi?id=113218
254
255         Reviewed by Kentaro Hara.
256
257         In attribute setter, wrap JSValue to native value conversion in a try
258         catch block.
259
260         Define a new macro binding: V8TRYCATCH_VOID
261
262         No new tests: covered by fast/dom/exception-in-binding.html
263
264         * bindings/scripts/CodeGeneratorV8.pm:
265         (GenerateNormalAttrSetter):
266         * bindings/v8/V8BindingMacros.h:
267         (WebCore):
268
269 2013-03-28  ChangSeok Oh  <changseok.oh@collabora.com>
270
271         [GTK][AC] Use transform property of ClutterActor
272         https://bugs.webkit.org/show_bug.cgi?id=113317
273
274         Reviewed by Gustavo Noronha Silva.
275
276         ClutterActor has a transform property to set transformation matrix directly
277         since version 1.12. So we don't need to keep and use the matrix property of GraphicsLayerActor.
278
279         No new tests because of no functionality change.
280
281         * platform/graphics/clutter/GraphicsLayerActor.cpp:
282         (_GraphicsLayerActorPrivate):
283         (graphicsLayerActorDispose):
284         (graphicsLayerActorApplyTransform):
285         * platform/graphics/clutter/GraphicsLayerActor.h:
286         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
287         (WebCore::GraphicsLayerClutter::updateTransform):
288         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
289         (WebCore::PlatformClutterAnimation::addTransformTransition):
290
291 2013-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
292
293         Unreviewed, rolling out r143834.
294         http://trac.webkit.org/changeset/143834
295         https://bugs.webkit.org/show_bug.cgi?id=113530
296
297         Multiple use-after-free regressions on ClusterFuzz (Requested
298         by inferno-sec on #webkit).
299
300         * dom/Attr.cpp:
301         (WebCore::Attr::Attr):
302         (WebCore::Attr::setValue):
303         (WebCore::Attr::childrenChanged):
304         * dom/Attr.h:
305         (Attr):
306         * dom/Element.cpp:
307         (WebCore::Element::setAttributeInternal):
308         * dom/Element.h:
309         (Element):
310
311 2013-03-28  Julien Chaffraix  <jchaffraix@webkit.org>
312
313         [CSS Grid Layout] Before / start paddings and borders are not accounted for when placing the grid items
314         https://bugs.webkit.org/show_bug.cgi?id=113351
315
316         Reviewed by Tony Chang.
317
318         Tests: fast/css-grid-layout/grid-element-border-grid-item.html
319                fast/css-grid-layout/grid-element-border-padding-grid-item.html
320                fast/css-grid-layout/grid-element-padding-grid-item.html
321
322         * rendering/RenderBoxModelObject.h:
323         (WebCore::RenderBoxModelObject::borderAndPaddingBefore):
324         Added this helper function (we do have borderAndPaddingStart but didn't have this
325         one for some reason).
326
327         * rendering/RenderGrid.cpp:
328         (WebCore::RenderGrid::findChildLogicalPosition):
329         Shifted |offset| by the paddings and borders before / start.
330
331 2013-03-28  Zan Dobersek  <zdobersek@igalia.com>
332
333         [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
334         https://bugs.webkit.org/show_bug.cgi?id=112546
335
336         Reviewed by Martin Robinson.
337
338         No new tests - no new functionality.
339
340         * GNUmakefile.am: Passing the DATA_DIR value through the cppflags is not required anymore as the affected source is now
341         built into libPlatformGtk.la.
342         * GNUmakefile.list.am: Build the GTK-specific source files that are already independent of WebCore into the
343         libPlatformGtk.la by assigning the build targets listing to the platformgtk_sources variable.
344         * platform/gtk/GtkVersioning.c: Renamed from Source/Platform/gtk/GtkVersioning.c.
345         * platform/gtk/GtkVersioning.h: Renamed from Source/Platform/gtk/GtkVersioning.h.
346
347 2013-03-28  Matt Falkenhagen  <falken@chromium.org>
348
349         Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormControl
350         https://bugs.webkit.org/show_bug.cgi?id=113273
351
352         Reviewed by Kent Tamura.
353
354         Element::disabled is about form controls and Element::isEnabledFormControl
355         is redundant with it, so replace them with a single function
356         Element::isDisabledFormControl.
357
358         No new tests, there should be no behavior change.
359
360         * accessibility/AccessibilityListBox.cpp:
361         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
362         * accessibility/AccessibilityListBoxOption.cpp:
363         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
364         * accessibility/AccessibilityMenuList.cpp:
365         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
366         * accessibility/AccessibilityMenuListOption.cpp:
367         (WebCore::AccessibilityMenuListOption::isEnabled):
368         * accessibility/AccessibilityNodeObject.cpp:
369         (WebCore::AccessibilityNodeObject::isEnabled):
370         (WebCore::AccessibilityNodeObject::actionElement):
371         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
372         * css/SelectorChecker.cpp:
373         (WebCore::SelectorChecker::checkOne):
374         * css/StyleResolver.cpp:
375         (WebCore::StyleResolver::canShareStyleWithControl):
376         * dom/Element.cpp:
377         (WebCore::Element::isDisabledFormControl):
378         * dom/Element.h:
379         (Element):
380         (WebCore::isDisabledFormControl): Add helper function for convenience.
381         (WebCore):
382         * dom/EventDispatcher.cpp:
383         (WebCore::EventDispatcher::dispatchSimulatedClick):
384         * dom/GestureEvent.cpp:
385         (WebCore::GestureEventDispatchMediator::dispatchEvent):
386         * dom/MouseEvent.cpp:
387         (WebCore::MouseEventDispatchMediator::dispatchEvent):
388         * dom/Node.cpp:
389         (WebCore::Node::handleLocalEvents):
390         (WebCore::Node::willRespondToMouseMoveEvents):
391         (WebCore::Node::willRespondToMouseClickEvents):
392         (WebCore::Node::willRespondToTouchEvents):
393         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
394         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
395         * html/DOMFormData.cpp:
396         (WebCore::DOMFormData::DOMFormData):
397         * html/FileInputType.cpp:
398         (WebCore::FileInputType::handleDOMActivateEvent):
399         (WebCore::FileInputType::disabledAttributeChanged):
400         * html/HTMLButtonElement.cpp:
401         (WebCore::HTMLButtonElement::defaultEventHandler):
402         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
403         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton):
404         * html/HTMLCollection.cpp:
405         (WebCore::isMatchingElement):
406         * html/HTMLFormControlElement.cpp:
407         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
408         (WebCore::HTMLFormControlElement::isDisabledFormControl):
409         (WebCore::HTMLFormControlElement::supportsFocus):
410         * html/HTMLFormControlElement.h:
411         (HTMLFormControlElement):
412         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
413         * html/HTMLInputElement.cpp:
414         (WebCore::HTMLInputElement::isSuccessfulSubmitButton):
415         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
416         * html/HTMLOptGroupElement.cpp:
417         (WebCore::HTMLOptGroupElement::isDisabledFormControl):
418         * html/HTMLOptGroupElement.h:
419         (HTMLOptGroupElement):
420         * html/HTMLOptionElement.cpp:
421         (WebCore::HTMLOptionElement::isDisabledFormControl):
422         * html/HTMLOptionElement.h:
423         (HTMLOptionElement):
424         * html/HTMLPlugInElement.cpp:
425         (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
426         * html/HTMLSelectElement.cpp:
427         (WebCore::HTMLSelectElement::nextValidIndex):
428         (WebCore::HTMLSelectElement::updateListBoxSelection):
429         (WebCore::HTMLSelectElement::recalcListItems):
430         (WebCore::HTMLSelectElement::appendFormData):
431         (WebCore::HTMLSelectElement::updateSelectedState):
432         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
433         (WebCore::HTMLSelectElement::defaultEventHandler):
434         (WebCore::HTMLSelectElement::optionAtIndex):
435         * html/ImageInputType.cpp:
436         (WebCore::ImageInputType::handleDOMActivateEvent):
437         * html/ResetInputType.cpp:
438         (WebCore::ResetInputType::handleDOMActivateEvent):
439         * html/SubmitInputType.cpp:
440         (WebCore::SubmitInputType::handleDOMActivateEvent):
441         * html/shadow/SliderThumbElement.cpp:
442         (WebCore::SliderThumbElement::isDisabledFormControl):
443         (WebCore::SliderThumbElement::defaultEventHandler):
444         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
445         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
446         * html/shadow/SliderThumbElement.h:
447         (SliderThumbElement):
448         * html/shadow/SpinButtonElement.h:
449         * html/shadow/TextFieldDecorationElement.cpp:
450         (WebCore::TextFieldDecorationElement::updateImage):
451         * loader/FormSubmission.cpp:
452         (WebCore::FormSubmission::create):
453         * page/DragController.cpp:
454         (WebCore::DragController::tryDocumentDrag):
455         (WebCore::DragController::concludeEditDrag):
456         * rendering/RenderListBox.cpp:
457         (WebCore::RenderListBox::addFocusRingRects):
458         (WebCore::RenderListBox::paintItemForeground):
459         * rendering/RenderMenuList.cpp:
460         (WebCore::RenderMenuList::itemIsEnabled):
461         * rendering/RenderTextControl.cpp:
462         (WebCore::updateUserModifyProperty):
463         * rendering/RenderTheme.cpp:
464         (WebCore::RenderTheme::isEnabled):
465         * rendering/RenderThemeMac.mm:
466         (WebCore::getMediaUIPartStateFlags):
467         * rendering/RenderThemeMacShared.mm:
468         (WebCore::RenderThemeMacShared::adjustMenuListStyle):
469         (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
470         * rendering/RenderThemeSafari.cpp:
471         (WebCore::RenderThemeSafari::adjustMenuListStyle):
472
473 2013-03-28  Brady Eidson  <beidson@apple.com>
474
475         Remove workaround for <rdar://problem/5321972>.
476         <rdar://problem/12022862> and https://bugs.webkit.org/show_bug.cgi?id=113516
477
478         Reviewed by Sam Weinig.
479
480         No new tests (No point in testing the removal of bizarre behavior).
481
482         * platform/network/mac/WebCoreURLResponse.mm:
483         (WebCore::adjustMIMETypeIfNecessary): This workaround isn't needed on Lion+
484
485 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
486
487         use CanvasWindingRule enumeration in CanvasRenderingContext2D.idl
488         https://bugs.webkit.org/show_bug.cgi?id=113456
489
490         Reviewed by Kentaro Hara.
491
492         Use enum CanvasWindingRule type instead of DOMString for winding
493         arguments when needed. Changed methods are: fill, stroke and isPointInPath.
494
495         Test: fast/canvas/winding-enumeration.html
496
497         * html/canvas/CanvasRenderingContext2D.idl:
498
499 2013-03-28  Scott Graham  <scottmg@chromium.org>
500
501         Move preprocessing of idl to pre-pass for gyp
502         https://bugs.webkit.org/show_bug.cgi?id=113448
503
504         Reviewed by Tony Chang.
505
506         Moves the preprocessor invocations when parsing IDL files to a
507         pre-pass to avoid reinvocations when IDLs are referenced from others.
508         This reduces the number of invocations of the preprocessor from 20071
509         to 633, which reduces the runtime from 12m30 to 1m (on a Windows box).
510
511         No new tests, this is a build time improvement, and shouldn't have any
512         visible effect.
513
514         * WebCore.gyp/WebCore.gyp:
515         * bindings/scripts/CodeGenerator.pm:
516         (ParseInterface):
517         * bindings/scripts/IDLParser.pm:
518         (Parse):
519         * bindings/scripts/generate-bindings.pl:
520         * bindings/scripts/generate-preprocessed-idls.pl: Added.
521         * bindings/scripts/preprocessor.pm:
522         (applyPreprocessor):
523
524 2013-03-28  Alok Priyadarshi  <alokp@chromium.org>
525
526         RenderBox::backgroundIsKnownToBeOpaqueInRect may be wrong for theme-painted elements
527         https://bugs.webkit.org/show_bug.cgi?id=113419
528
529         Reviewed by Simon Fraser.
530
531         Do not consider control elements as opaque. They are typically theme painted, and we cannot assume opaqueness on the behalf of theme. It can be improved by asking the theme if it paints opaque.
532
533         Test: compositing/contents-opaque/control-layer.html
534
535         * rendering/RenderBox.cpp:
536         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
537
538 2013-03-28  ChangSeok Oh  <changseok.oh@collabora.com>
539
540         [GTK][AC] Animating layer disappears while running with clutter backend
541         https://bugs.webkit.org/show_bug.cgi?id=110470
542
543         Reviewed by Gustavo Noronha Silva.
544
545         The reason of this issue is that clutter_actor_remove_child leads to stopping animations
546         of child actor. ClutterActor's animation could be defined only when it has a parent actor.
547         So we should avoid the case calling the api as much as we can. At least we don't
548         need to reset a actor's parent at all if the current parent is same with new one.
549         If we can't avoid invoking clutter_actor_remove_child for an animating actor, we may apply
550         a more complicated way to keep the animation. But I haven't faced such a case yet.
551
552         Covered by existing animation tests.
553
554         * platform/graphics/clutter/GraphicsLayerActor.cpp:
555         (graphicsLayerActorSetSublayers):
556         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
557         (WebCore::GraphicsLayerClutter::recursiveCommitChanges):
558         (WebCore::GraphicsLayerClutter::updateSublayerList):
559
560 2013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
561
562         Non-painting fixed elements should not cause repaints on scroll
563         https://bugs.webkit.org/show_bug.cgi?id=110430
564
565         Reviewed by Simon Fraser.
566
567         Test: compositing/repaint/scroll-fixed-layer-no-content.html
568         Test: compositing/repaint/scroll-fixed-layer-out-of-view.html
569
570         * page/FrameView.cpp:
571         (WebCore::FrameView::scrollContentsFastPath): Check for no-content and out-of-view flag set by RLC.
572         * rendering/RenderLayerCompositor.cpp:
573         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Moved the check for no-content above out-of-view because it's faster.
574
575 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
576
577         Unreviewed, revert accidentally added line committed in r147117.
578
579         * inspector/front-end/ElementsTreeOutline.js:
580
581 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
582
583         Web Inspector: [Elements] Syntax-highlight the "Edit as HTML" editor
584         https://bugs.webkit.org/show_bug.cgi?id=113306
585
586         Reviewed by Vsevolod Vlasov.
587
588         Use CodeMirror as the raw HTML editor for the "Edit as HTML" menu item
589         (and all multiline editors for WebInspector.startEditing()).
590         Drive-by fix for handling the editing when the editor has been invoked on the closing tag.
591
592         * inspector/front-end/ElementsTreeOutline.js:
593         (WebInspector.ElementsTreeElement.prototype.commit):
594         (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
595         * inspector/front-end/UIUtils.js:
596         (WebInspector.EditingConfig.prototype.setMultiline):
597         (WebInspector.startEditing):
598         (WebInspector.CodeMirrorCSSLoadView): A bogus view to load-unload CodeMirror-related CSS on demand.
599         * inspector/front-end/elementsPanel.css:
600         (#elements-content .CodeMirror):
601         (#elements-content .CodeMirror pre):
602         (#elements-content .CodeMirror-lines):
603         * inspector/front-end/elementsPanel.css: CodeMirror styles for the "Edit as HTML" editor.
604         * inspector/front-end/externs.js: Declare CodeMirror type with some members, as it is third-party code.
605         * inspector/front-end/inspector.html: Fix script order (UIUtils.js requires View.js).
606
607 2013-03-28  Hajime Morrita  <morrita@google.com>
608
609         Custom Elements: should support non-HTML namespaces.
610         https://bugs.webkit.org/show_bug.cgi?id=111693
611
612         Reviewed by Dimitri Glazkov.
613
614         Some existing code assumes that the element extends HTMLElements.
615         This change allow it to extend from Element. Note that the
616         namespace URI of a custom element is determined by given element
617         prototype: An element will have XHTML namespace if its prototype
618         chain includes HTMLElements, SVGElement leads SVG namespace and
619         null otherwise, respectively.
620
621         Test: fast/dom/custom/document-register-namespace.html
622
623         * bindings/v8/CustomElementHelpers.cpp:
624         (WebCore::hasValidPrototypeChainFor): Factored out from isValidPrototypeParameter()
625         (WebCore::CustomElementHelpers::isValidPrototypeParameter): Extend to support non HTMLElement prototype
626         (WebCore::CustomElementHelpers::findLocalName): Support non-HTML element names.
627         * bindings/v8/CustomElementHelpers.h:
628         (CustomElementHelpers):
629         * dom/CustomElementConstructor.cpp:
630         (WebCore::CustomElementConstructor::createElementInternal):
631         * dom/CustomElementRegistry.cpp:
632         (WebCore::CustomElementRegistry::registerElement): No longer hard-codes namespace and picks one based on the prototype value.
633         * dom/CustomElementRegistry.h:
634         (CustomElementRegistry):
635
636 2013-03-28  Hans Muller  <hmuller@adobe.com>
637
638         [CSS Exclusions] Add support for the simple case of padding a polygonal shape-inside
639         https://bugs.webkit.org/show_bug.cgi?id=112592
640
641         Reviewed by Dirk Schulze.
642
643         First pass at computing the padded or inset boundary of a polygon.  This version does not handle
644         self-intersecting polygons, or values of shape-padding large enough to change the shape of the
645         original polygon. The implementation computes an offset edge for each polgon edge, where the offset
646         edge is parallel to the original edge and separated by shape-padding. The padded polygon's vertices
647         are the intersections of each pair of adjacent offset edges. When adjacent offset edges do not intersect,
648         because they share a reflex vertex in the original polygon, an approximation to a circular arc
649         connects the offset edges.
650
651         Tests: fast/exclusions/shape-inside/shape-inside-polygon-padding-001.html
652                fast/exclusions/shape-inside/shape-inside-polygon-padding-002.html
653                fast/exclusions/shape-inside/shape-inside-polygon-padding-003.html
654
655         * rendering/ExclusionPolygon.cpp:
656         (WebCore::isReflexVertex): Just moved this function earlier in the file.
657         (WebCore::inwardEdgeNormal): Unit vector that's perpindicular to the edge and that points inwards.
658         (WebCore::outwardEdgeNormal): Unit vector that's perpindicular to the edge and that points outwards.
659         (WebCore::appendArc): Append a linear approximation to a circular arc to a vector of vertices.
660         (WebCore::computeShapePaddingBounds): Return a polygon whose edges are all inset by shape-padding from m_polygon.
661         (WebCore::computeShapeMarginBounds): Just a stub, see bug 112917.
662         (WebCore::ExclusionPolygon::shapePaddingBounds): Lazily use computeShapePaddingBounds() to initialize m_paddingBounds.
663         (WebCore::ExclusionPolygon::shapeMarginBounds): Lazily use computeShapeMarginBounds() to initialize m_marginBounds.
664         (WebCore::ExclusionPolygon::getIncludedIntervals): Now based on the value of shapePaddingBounds().
665         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Now based on the value of shapePaddingBounds().
666         * rendering/ExclusionPolygon.h:
667         (WebCore::ExclusionPolygon::ExclusionPolygon):
668
669 2013-03-28  Chris Hutten-Czapski  <chutten@blackberry.com>
670
671         [BlackBerry] Handle EXIF orientation for ImageDocuments
672         https://bugs.webkit.org/show_bug.cgi?id=113423
673
674         Internal Bug: PR 293648
675         Informally Reviewed by Jeff Rogers
676         Reviewed by Rob Buis.
677
678         Support image orientation in our image draw calls, and advertise
679         the capability to the calling code. This allows us to respect EXIF
680         orientation data.
681
682         * platform/graphics/BitmapImage.h:
683         * platform/graphics/blackberry/ImageBlackBerry.cpp:
684         (WebCore::BitmapImage::draw):
685         (WebCore):
686         * rendering/RenderObject.cpp:
687         (WebCore::RenderObject::shouldRespectImageOrientation):
688
689 2013-03-28  Andrey Kosyakov  <caseq@chromium.org>
690
691         Web Inspector: name timeline overview controls consistently
692         https://bugs.webkit.org/show_bug.cgi?id=113503
693
694         Reviewed by Yury Semikhatsky.
695
696         Refactoring, covered by existing tests.
697
698         - rename HeapGraph to TimelineMemoryOverview;
699         - rename TimelineCategoryStrips to TimelineEventOvrview.
700
701         * inspector/front-end/TimelineOverviewPane.js:
702         (WebInspector.TimelineOverviewPane):
703         (WebInspector.TimelineOverviewPane.prototype.setMode):
704         (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
705         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
706         (WebInspector.TimelineOverviewPane.prototype._update):
707         (WebInspector.TimelineOverviewPane.prototype.setMinimumRecordDuration):
708         (WebInspector.TimelineMemoryOverview):
709         (WebInspector.TimelineEventOverview):
710         (WebInspector.TimelineEventOverview.prototype._renderBar):
711
712 2013-03-28  Eli Fidler  <efidler@blackberry.com>
713
714         [BlackBerry] Correct glyph contour winding direction when fake-bolding
715         https://bugs.webkit.org/show_bug.cgi?id=113411
716
717         Reviewed by Rob Buis.
718
719         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
720         (WebCore::FontPlatformData::applyState):
721
722 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
723
724         Web Inspector: Make JavaScriptSourceFrame work correctly with breakpoints when uiSourceCode does not have a scriptFile.
725         https://bugs.webkit.org/show_bug.cgi?id=113500
726
727         Reviewed by Pavel Feldman.
728
729         JavaScriptSourceFrame now listens for uiSourceCode working copy related events and supports muting breakpoints without script file.
730
731         * inspector/front-end/JavaScriptSourceFrame.js:
732         (WebInspector.JavaScriptSourceFrame):
733         (WebInspector.JavaScriptSourceFrame.prototype._workingCopyChanged):
734         (WebInspector.JavaScriptSourceFrame.prototype._workingCopyCommitted):
735         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
736         (WebInspector.JavaScriptSourceFrame.prototype.dispose):
737
738 2013-03-22  Andrey Kosyakov  <caseq@chromium.org>
739
740         Web Inspector: factor out node search controller from inspector.js
741         https://bugs.webkit.org/show_bug.cgi?id=112689
742
743         Reviewed by Pavel Feldman.
744
745         This just extracts the existing logic of toggling node search
746         from inspector.js into a class of its own, InspectElementModeController.
747         Drive-by: add CtrlOrMeta+Shift+C to help screen.
748
749         * English.lproj/localizedStrings.js:
750         * WebCore.gypi:
751         * WebCore.vcproj/WebCore.vcproj:
752         * WebCore.vcxproj/WebCore.vcxproj:
753         * WebCore.vcxproj/WebCore.vcxproj.filters:
754         * inspector/compile-front-end.py:
755         * inspector/front-end/InspectElementModeController.js: Added.
756         (WebInspector.InspectElementModeController):
757         (WebInspector.InspectElementModeController.createShortcut):
758         (WebInspector.InspectElementModeController.prototype.enabled):
759         (WebInspector.InspectElementModeController.prototype.disable):
760         (WebInspector.InspectElementModeController.prototype.toggleSearch.callback):
761         (WebInspector.InspectElementModeController.prototype.toggleSearch):
762         (WebInspector.InspectElementModeController.prototype.handleShortcut):
763         * inspector/front-end/InspectorFrontendAPI.js:
764         (InspectorFrontendAPI.enterInspectElementMode):
765         * inspector/front-end/WebKit.qrc:
766         * inspector/front-end/inspector.html:
767         * inspector/front-end/inspector.js:
768         (WebInspector._createGlobalStatusBarItems):
769         (WebInspector._registerShortcuts):
770         (WebInspector.documentKeyDown):
771         (WebInspector._updateFocusedNode):
772
773 2013-03-28  Eugene Klyuchnikov  <eustas@chromium.org>
774
775         Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
776         https://bugs.webkit.org/show_bug.cgi?id=113375
777
778         Reviewed by Pavel Feldman.
779
780         Serialized "previouslyViewedFiles" may make local storage overflow.
781         Two fixed applied:
782         - limit number of history log items
783         - limit length of URIs that get serialized;
784           this would affect only data-url URIs.
785
786         * inspector/front-end/TabbedEditorContainer.js:
787         (WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject):
788         Added length check.
789         (WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject):
790         Added output array length limit.
791
792 2013-03-28  Alexei Filippov  <alph@chromium.org>
793
794         Web Inspector: Heap snapshots retained size falls out of the grid if column is too narrow
795         https://bugs.webkit.org/show_bug.cgi?id=113497
796
797         Reviewed by Pavel Feldman.
798
799         * inspector/front-end/HeapSnapshotGridNodes.js:
800         (WebInspector.HeapSnapshotGridNode.prototype._createValueCell):
801         * inspector/front-end/heapProfiler.css:
802         (.heap-snapshot-view .data-grid div.heap-snapshot-multiple-values):
803
804 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
805
806         Web Inspector: ResourceScriptFile should check if resource content really matches VM script when determining hasDiverged state.
807         https://bugs.webkit.org/show_bug.cgi?id=113488
808
809         Reviewed by Pavel Feldman.
810
811         Enabled support for checking that file content matches VM script in ResourceScriptFile (For script resources only).
812         This check is never done before content is loaded in corresponding editor to avoid regressing performance.
813         File - script content matching is done bearing in mind sourceURLs. 
814         Live edit keeps sourceURL in script content now even if it is not present in file's content.
815
816         * inspector/front-end/JavaScriptSourceFrame.js:
817         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
818         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
819         * inspector/front-end/LiveEditSupport.js:
820         (WebInspector.LiveEditScriptFile.prototype.checkMapping):
821         * inspector/front-end/ResourceScriptMapping.js:
822         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
823         (WebInspector.ScriptFile.prototype.checkMapping):
824         (WebInspector.ResourceScriptFile):
825         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
826         (WebInspector.ResourceScriptFile.prototype._isDiverged):
827         (WebInspector.ResourceScriptFile.prototype._sourceMatchesScriptSource):
828         (WebInspector.ResourceScriptFile.prototype._sourceEndsWithSourceURL):
829         (WebInspector.ResourceScriptFile.prototype.checkMapping.callback):
830         (WebInspector.ResourceScriptFile.prototype.checkMapping):
831         * inspector/front-end/ScriptSnippetModel.js:
832         (WebInspector.SnippetScriptFile.prototype.checkMapping):
833
834 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
835
836         Web Inspector: Simplify ResourceScriptFile so that it stores hasDiverged state in it.
837         https://bugs.webkit.org/show_bug.cgi?id=113489
838
839         Reviewed by Pavel Feldman.
840
841         ResourceScriptFile._hasDiverged is the one flag that shows whether we have diverged from VM.
842         It's values is based both on dirty flag on uiSourceCode and information about live edit failures stored in _lastLiveEditFailed field.
843         Removed willMerge/Diverge events from ScriptFile.
844         JavaScriptSourceFrame now uses isMergingToVM/DivergingFromVM methods on ScriptFile.
845         to determine whether breakpointAdded/Removed events should be ignored.
846         Introduced muted state on JavaScriptSourceFrame to determine whether it should ignore user attempts to set/remove breakpoints.
847
848         * inspector/front-end/JavaScriptSourceFrame.js:
849         (WebInspector.JavaScriptSourceFrame):
850         (WebInspector.JavaScriptSourceFrame.prototype._didMergeToVM):
851         (WebInspector.JavaScriptSourceFrame.prototype._didDivergeFromVM):
852         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
853         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
854         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
855         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration):
856         (WebInspector.JavaScriptSourceFrame.prototype._shouldIgnoreExternalBreakpointEvents):
857         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
858         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
859         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
860         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
861         * inspector/front-end/LiveEditSupport.js:
862         (WebInspector.LiveEditScriptFile.prototype.isMergingToVM):
863         * inspector/front-end/ResourceScriptMapping.js:
864         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
865         (WebInspector.ScriptFile.prototype.isMergingToVM):
866         (WebInspector.ResourceScriptFile):
867         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
868         (WebInspector.ResourceScriptFile.prototype._isDiverged):
869         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
870         (WebInspector.ResourceScriptFile.prototype._update):
871         (WebInspector.ResourceScriptFile.prototype._divergeFromVM):
872         (WebInspector.ResourceScriptFile.prototype._mergeToVM):
873         (WebInspector.ResourceScriptFile.prototype.hasDivergedFromVM):
874         (WebInspector.ResourceScriptFile.prototype.isMergingToVM):
875         * inspector/front-end/ScriptSnippetModel.js:
876         (WebInspector.SnippetScriptFile.prototype.isMergingToVM):
877
878 2013-03-25  Andrey Kosyakov  <caseq@chromium.org>
879
880         Web Inspector: DOMContentLoaded event divider is not shown on Timeline's main view
881         https://bugs.webkit.org/show_bug.cgi?id=113196
882
883         Reviewed by Pavel Feldman.
884
885         - keep event divider records in TimelinePresentationModel, not in TimelinePanel;
886         - process event divider records on every level, not just on top.
887
888         * inspector/front-end/TimelinePanel.js:
889         (WebInspector.TimelinePanel.prototype._updateEventDividers):
890         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.checkVisible):
891         (WebInspector.TimelinePanel.prototype._resetPanel):
892         * inspector/front-end/TimelinePresentationModel.js:
893         (WebInspector.TimelinePresentationModel.prototype.reset):
894         (WebInspector.TimelinePresentationModel.prototype._innerAddRecord):
895         (WebInspector.TimelinePresentationModel.prototype.eventDividerRecords):
896
897 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
898
899         Unreviewed inspector front-end closure compilation fix.
900
901         * inspector/front-end/CookiesTable.js:
902
903 2013-03-28  Andrey Lushnikov  <lushnikov@chromium.org>
904
905         Web Inspector: [DTE] Paint overlay highlight over line background color
906         https://bugs.webkit.org/show_bug.cgi?id=113346
907
908         Reviewed by Pavel Feldman.
909
910         No new tests: no change in behaviour.
911
912         - Append spans instead of text nodes to lineRows.
913         - Set positioning of all spans inside of webkit-line-content as
914         relative
915         - Set z-index property so that overlay highlight is above line
916         background but under text.
917
918         * inspector/front-end/DefaultTextEditor.js:
919         (WebInspector.TextEditorMainPanel.prototype._measureHighlightDescriptor):
920         (WebInspector.TextEditorMainPanel.prototype._measureSpans):
921         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
922         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
923         * inspector/front-end/textEditor.css:
924         (.webkit-line-content > .text-editor-overlay-highlight):
925         (.webkit-line-content > *):
926
927 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
928
929         Web Inspector: [REGRESSION] [Styles] Pasting a property in the "name" field is broken
930         https://bugs.webkit.org/show_bug.cgi?id=113491
931
932         Reviewed by Pavel Feldman.
933
934         Update the CSSProperty name and value upon pasting properties into the Styles pane.
935         Drive-by: start editing the next/new property name after pasting.
936
937         Test: inspector/styles/paste-property.html
938
939         * inspector/front-end/StylesSidebarPane.js:
940         (.selectElement):
941         (.moveDirection.alreadyNew):
942
943 2013-03-28  Alexei Filippov  <alph@chromium.org>
944
945         Web Inspector: Auto expand retaining path until there are more than one retainer.
946         https://bugs.webkit.org/show_bug.cgi?id=112596
947
948         Reviewed by Yury Semikhatsky.
949
950         When retainers view gets opened automatically expand retaining path
951         for objects having just a single retainer.
952
953         Test: inspector/profiler/heap-snapshot-summary-retainers.html
954
955         * inspector/front-end/HeapSnapshotDataGrids.js:
956         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.populateComplete):
957         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.setDataSource):
958         * inspector/front-end/HeapSnapshotGridNodes.js:
959         (WebInspector.HeapSnapshotGridNode.prototype.childrenRetrieved):
960         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren):
961
962 2013-03-28  Vladislav Kaznacheev  <kaznacheev@chromium.org>
963
964         Web Inspector: Fixed property text indentation in Styles sidebar.
965         https://bugs.webkit.org/show_bug.cgi?id=113409
966
967         Reviewed by Alexander Pavlov.
968
969         When the sidebar is too narrow and the property text wraps around it breaks the indentation.
970         This was introduced in r143207 which spuriously modified DOM elements order.
971
972         * inspector/front-end/StylesSidebarPane.js:
973
974 2013-03-28  Arpita Bahuguna  <a.bah@samsung.com>
975
976         Regression: Crash when selecting Hebrew and numbers in a list
977         https://bugs.webkit.org/show_bug.cgi?id=111894
978
979         Reviewed by Ryosuke Niwa.
980
981         There is a crash when trying to click/select an anonymous
982         renderer.
983
984         This is a regression due to r143313 which tries to add border/padding
985         to the computed caret rect in RenderBox::localCaretRect().
986         The patch calls on the node() method for the corresponding
987         renderer. For an anonymous renderer though, node() returns
988         null. Since no check had been added for this, a crash occurs when
989         caret rect for an anonymous renderer is being computed.
990
991         Test: editing/selection/click-on-anonymous-content-crash.html
992
993         * rendering/RenderBox.cpp:
994         (WebCore::RenderBox::localCaretRect):
995         Added a check for validating the return from the node() call.
996
997 2013-03-28  Mike West  <mkwst@chromium.org>
998
999         X-Frame-Options: Multiple headers are ignored completely.
1000         https://bugs.webkit.org/show_bug.cgi?id=113387
1001
1002         Reviewed by Nate Chapin.
1003
1004         If a server sends multiple 'X-Frame-Options' headers, we end up with a
1005         value like 'SAMEORIGIN, SAMEORIGIN'. Currently, we're treating that as
1006         invalid, and ignoring the header. It would be safer to follow Gecko's
1007         lead[1] by:
1008
1009         - Folding duplicated entries into their common value (that is:
1010           'sameorigin, sameorigin' -> 'sameorigin').
1011
1012         - Failing closed in the case of conflicts (that is:
1013           'sameorigin, allowall' -> 'deny').
1014
1015         [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=761655
1016
1017         Tests: http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict.html
1018                http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow.html
1019                http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html
1020
1021         * loader/FrameLoader.cpp:
1022         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1023             Call out to parseXFrameOptionsHeader to get the header's disposition
1024             and deal with each case in a switch statement for clarity. Add a new
1025             console warning for the conflict case described above.
1026         * platform/network/HTTPParsers.cpp:
1027         (WebCore::parseXFrameOptionsHeader):
1028         * platform/network/HTTPParsers.h:
1029             Move X-Frame-Options parsing out into HTTPParsers, as it's getting
1030             more and more complicated. To do this, the patch defines a new enum
1031             to pass around the header's disposition.
1032
1033 2013-03-28  Mihnea Ovidenie  <mihnea@adobe.com>
1034
1035         [CSSRegions] Consolidate use of RenderRegion::isValid
1036         https://bugs.webkit.org/show_bug.cgi?id=113154
1037
1038         Reviewed by David Hyatt.
1039
1040         After https://bugs.webkit.org/show_bug.cgi?id=98752, the list of invalid regions is kept separately than the list of valid regions.
1041         A valid region has always a valid flow thread attached. We can use isValid() throughout the RenderRegion code
1042         instead of testing for both isValid() and m_flowThread.
1043
1044         No new tests since there is no change is functionality, just code refactoring.
1045
1046         * rendering/RenderNamedFlowThread.cpp:
1047         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread): Added a new function to keep the code
1048         used in addRegionToThread and checkInvalidRegions.
1049         (WebCore::RenderNamedFlowThread::addRegionToThread):
1050         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
1051         * rendering/RenderNamedFlowThread.h:
1052         * rendering/RenderRegion.cpp:
1053         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1054         (WebCore::RenderRegion::isFirstRegion):
1055         (WebCore::RenderRegion::isLastRegion):
1056         (WebCore::RenderRegion::paintObject):
1057         (WebCore::RenderRegion::nodeAtPoint):
1058         (WebCore::RenderRegion::incrementAutoLogicalHeightCount):
1059         (WebCore::RenderRegion::decrementAutoLogicalHeightCount):
1060         (WebCore::RenderRegion::layoutBlock):
1061         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
1062         (WebCore::RenderRegion::attachRegion):
1063         (WebCore::RenderRegion::renderBoxRegionInfo):
1064         (WebCore::RenderRegion::setRenderBoxRegionInfo):
1065         (WebCore::RenderRegion::logicalTopOfFlowThreadContentRect):
1066         (WebCore::RenderRegion::logicalBottomOfFlowThreadContentRect):
1067         (WebCore::RenderRegion::computePreferredLogicalWidths):
1068
1069 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
1070
1071         Web Inspector: Timeline. Refresh is slow when user drags the overview window.
1072         https://bugs.webkit.org/show_bug.cgi?id=113371
1073
1074         Reviewed by Pavel Feldman.
1075
1076         The root of problem is the 300ms delay in scheduleRefresh method.
1077         It was introduced for the case when we add a huge number of records per second.
1078         The scheduleRefresh was written such a way that refresh happened immediately
1079         only for the scrolling operations. Actually we would like to see fast
1080         refresh every time when it is forced by an user action.
1081
1082         In this patch additional flag newRecordWasAdded was added to the
1083         _invalidateAndScheduleRefresh. I made it mandatory because the function
1084         is also used as a callback for an event and it is easy to make a mistake and
1085         interpret the event as the flag.
1086
1087         * inspector/front-end/TimelinePanel.js:
1088         (WebInspector.TimelinePanel.prototype._onCategoryCheckboxClicked):
1089         (WebInspector.TimelinePanel.prototype._durationFilterChanged):
1090         (WebInspector.TimelinePanel.prototype._repopulateRecords):
1091         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
1092         (WebInspector.TimelinePanel.prototype._onRecordsCleared):
1093         (WebInspector.TimelinePanel.prototype._invalidateAndScheduleRefresh):
1094         (WebInspector.TimelinePanel.prototype._scheduleRefresh):
1095         (WebInspector.TimelinePanel.prototype._revealRecord):
1096         (WebInspector.TimelinePanel.prototype._refreshRecords):
1097         (WebInspector.TimelinePanel.prototype.performFilter):
1098
1099 2013-03-27  Keishi Hattori  <keishi@webkit.org>
1100
1101         Dragging to edge should always snap to min/max.
1102         https://bugs.webkit.org/show_bug.cgi?id=113477
1103
1104         Reviewed by Kent Tamura.
1105
1106         Dragging to the edge of a slider should always snap to the min/max.
1107
1108         Test: fast/forms/range/range-slow-drag-to-edge.html
1109
1110         * html/shadow/SliderThumbElement.cpp:
1111         (WebCore::SliderThumbElement::setPositionFromPoint):
1112
1113 2013-03-27  Simon Fraser  <simon.fraser@apple.com>
1114
1115         Add a way to update GraphicsLayerCA visibleRects without having to do a flush
1116         https://bugs.webkit.org/show_bug.cgi?id=113459
1117
1118         Reviewed by Tim Horton.
1119         
1120         Some platforms need to update TiledBacking visible rects from
1121         outside of WebKit, for example if they use delegated scrolling.
1122         They want to avoid forcing layout to be up-to-date when doing this.
1123         
1124         Currently, updating the visibleRect happens when the GraphicsLayerCA
1125         layer are being flushed, but that makes some assumptions about
1126         layout being up-to-date.
1127         
1128         To fix this, add a light-weight pass over the layer tree that
1129         uses TransformState to compute the visibleRect for each
1130         layer, and only if the visibleRect would cause a change in the
1131         tiles in a TiledBacking trigger a layer flush.
1132
1133         * platform/graphics/GraphicsLayer.h:
1134         (WebCore::GraphicsLayer::recomputeVisibleRects):
1135         * platform/graphics/TiledBacking.h:
1136         * platform/graphics/ca/GraphicsLayerCA.cpp:
1137         (WebCore::GraphicsLayerCA::recursiveComputeVisibleRect):
1138         (WebCore::GraphicsLayerCA::recomputeVisibleRects):
1139         (WebCore::GraphicsLayerCA::computeVisibleRect):
1140         * platform/graphics/ca/GraphicsLayerCA.h:
1141         * platform/graphics/ca/mac/TileController.h:
1142         * platform/graphics/ca/mac/TileController.mm:
1143         (WebCore::TileController::tilesWouldChangeForVisibleRect):
1144         (WebCore::TileController::computeTileCoverageRect):
1145         (WebCore::TileController::revalidateTiles):
1146
1147 2013-03-27  Philip Rogers  <pdr@google.com>
1148
1149         Rename toScriptElement -> toScriptElementIfPossible
1150         https://bugs.webkit.org/show_bug.cgi?id=113473
1151
1152         Reviewed by Ryosuke Niwa.
1153
1154         Rename ScriptElement::toScriptElement to ScriptElement::toScriptElementIfPossible to
1155         differentiate this function from other to*Element functions, and to better describe the
1156         function's behavior. Other to*Element functions do not return null if the cast fails,
1157         whereas toScriptElementIfPossible does.
1158
1159         No new tests as this is just a refactoring.
1160
1161         * dom/ScriptElement.cpp:
1162         (WebCore::toScriptElementIfPossible):
1163         * dom/ScriptElement.h:
1164         (WebCore):
1165         * dom/ScriptRunner.cpp:
1166         (WebCore::ScriptRunner::timerFired):
1167
1168             This is the only unchecked return value but there isn't a security issue here.
1169
1170         * html/HTMLOptionElement.cpp:
1171         (WebCore::HTMLOptionElement::collectOptionInnerText):
1172         * html/parser/HTMLConstructionSite.cpp:
1173         (WebCore::HTMLConstructionSite::attachLater):
1174         (WebCore::HTMLConstructionSite::insertForeignElement):
1175         * html/parser/HTMLScriptRunner.cpp:
1176         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1177         (WebCore::HTMLScriptRunner::requestPendingScript):
1178         (WebCore::HTMLScriptRunner::runScript):
1179         * xml/parser/XMLDocumentParser.cpp:
1180         (WebCore::XMLDocumentParser::notifyFinished):
1181         * xml/parser/XMLDocumentParserLibxml2.cpp:
1182         (WebCore::XMLDocumentParser::startElementNs):
1183         (WebCore::XMLDocumentParser::endElementNs):
1184         * xml/parser/XMLDocumentParserQt.cpp:
1185         (WebCore::XMLDocumentParser::parseStartElement):
1186         (WebCore::XMLDocumentParser::parseEndElement):
1187
1188 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1189
1190         Debug test fix after r147018.
1191
1192         toElement() asserts. What we want here is isElementNode().
1193
1194         * html/parser/HTMLConstructionSite.cpp:
1195         (WebCore::HTMLConstructionSite::attachLater):
1196
1197 2013-03-27  Noel Gordon  <noel.gordon@gmail.com>
1198
1199         Add webp image color profile support
1200         https://bugs.webkit.org/show_bug.cgi?id=113184
1201
1202         Reviewed by Eric Seidel.
1203
1204         Requires libwebp version 0.3.0 (decoder ABI version 0x201). For images
1205         with an ICC color profile chunk, poll the incremental decoder for the
1206         current decoded height with the WebPIDecGetRGB() API and color correct
1207         any newly decoded rows in-situ in the frame buffer.
1208
1209         Note: the ICC chunk appears before the encoded image frame in the webp
1210         encoding (RIFF container) format. When the incremental decoder outputs
1211         decoded pixels, enough encoded data has arrived to read the entire ICC
1212         color profile data chunk.
1213
1214         Tests: fast/images/webp-color-profile-lossless.html
1215                fast/images/webp-color-profile-lossy-alpha.html
1216                fast/images/webp-color-profile-lossy.html
1217
1218         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
1219         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
1220         (WebCore::WEBPImageDecoder::~WEBPImageDecoder): Call clear().
1221         (WebCore):
1222         (WebCore::WEBPImageDecoder::clear):
1223         Added. Helper to clean up the webp decoder and color transform members.
1224         (WebCore::WEBPImageDecoder::createColorTransform):
1225         Create m_transform using the supplied profile memory data. Note that
1226         the |deviceProfile| is not owned, but the |inputProfile| temporary is
1227         so release it here with qcms_release_profile().
1228         (WebCore::WEBPImageDecoder::readColorProfile):
1229         Called once only when the decoder begins to output decoded rows of an
1230         image containing an ICC chunk, to read the ICC color profile data from
1231         the encoded data stream, verify it, and use it to create m_transform.
1232         (WebCore::WEBPImageDecoder::applyColorProfile):
1233         Since there is no row callback in libwebp, poll for the decoded height
1234         of the image so far. If new rows are decoded, color correct the pixels
1235         of those new rows and re-write them back into the frame buffer using
1236         buffer.setRGBA() to 1) alpha pre-multiply the pixels if needed, and 2)
1237         shuffle the pixel bytes into the platform's RGBA pixel endian-ness.
1238         (WebCore::WEBPImageDecoder::decode):
1239         If the container format indicates the image has an ICC color profile,
1240         decode the image to RGBA format for subsequent input to the QCMS color
1241         correction library in applyColorProfile().
1242         * platform/image-decoders/webp/WEBPImageDecoder.h:
1243         (WEBPImageDecoder):
1244         (WebCore::WEBPImageDecoder::colorTransform): m_transform getter.
1245
1246 2013-03-27  Jun Jiang  <jun.a.jiang@intel.com>
1247
1248         Refactor validation checks for texture uploads
1249         https://bugs.webkit.org/show_bug.cgi?id=111012
1250
1251         Reviewed by Kenneth Russell.
1252
1253         Move the validation checks to the entry level of tex{Sub}Image2D, return early for invalid parameters and avoid duplicated checks.
1254         Moreover, turn all the validation checks at the bottom level - tex{Sub}Image2DBase into assertions.
1255
1256         Already covered by current tests.
1257
1258         * html/canvas/WebGLRenderingContext.cpp:
1259         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
1260         (WebCore::WebGLRenderingContext::texImage2DBase):
1261         (WebCore::WebGLRenderingContext::texImage2DImpl):
1262         (WebCore::WebGLRenderingContext::validateTexFunc): A helper function for tex{Sub}Image2D to check input parameters.
1263         (WebCore::WebGLRenderingContext::texImage2D):
1264         (WebCore::WebGLRenderingContext::texSubImage2DBase):
1265         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
1266         (WebCore::WebGLRenderingContext::texSubImage2D):
1267         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
1268         (WebCore::WebGLRenderingContext::validateHTMLCanvasElement):
1269         (WebCore::WebGLRenderingContext::validateHTMLVideoElement):
1270         * html/canvas/WebGLRenderingContext.h:
1271
1272 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1273
1274         remove parentsOnly variable in codeGenerator.pm
1275         https://bugs.webkit.org/show_bug.cgi?id=113457
1276
1277         Reviewed by Kentaro Hara.
1278
1279         Remove unused variable parentsOnly.
1280
1281         No new tests: no change in behaviour.
1282
1283         * bindings/scripts/CodeGenerator.pm:
1284         (ForAllParents):
1285         (AddMethodsConstantsAndAttributesFromParentInterfaces):
1286         (ParseInterface):
1287         (InheritsInterface):
1288         (InheritsExtendedAttribute):
1289         * bindings/scripts/CodeGeneratorV8.pm:
1290         (BaseInterfaceName):
1291
1292 2013-03-27  Beth Dakin  <bdakin@apple.com>
1293
1294         Need WK2 API to give a WebView a header and footer
1295         https://bugs.webkit.org/show_bug.cgi?id=113352
1296         -and corresponding-
1297         <rdar://problem/13383835>
1298
1299         Reviewed by Simon Fraser.
1300
1301         This API will require RenderLayerCompositor to keep layers for the header and 
1302         footer when the exist. It also requires the scrolling machinery to know that the 
1303         size of the scrollable area will differ from the contentsSize when there is a 
1304         header or footer.
1305
1306         setWantsLayerForHeader() and setWantsLayerForFooter() return GraphicsLayers to 
1307         WK2. setHeaderHeight() and setFooterHeight() set the header and footer heights
1308         respectively.
1309         * WebCore.exp.in:
1310         * page/FrameView.h:
1311         (FrameView):
1312         * page/FrameView.cpp:
1313         (WebCore::FrameView::FrameView):
1314         (WebCore::FrameView::setWantsLayerForHeader):
1315         (WebCore::FrameView::setWantsLayerForFooter):
1316         (WebCore::FrameView::setHeaderHeight):
1317         (WebCore::FrameView::setFooterHeight):
1318
1319         Should use totalContentsSize() instead of contentsSize().
1320         (WebCore::FrameView::windowClipRect):
1321         (WebCore::FrameView::isScrollable):
1322         * page/SpatialNavigation.cpp:
1323         (WebCore::canScrollInDirection):
1324
1325         This should also use totalContentsSize() instead of contentsSize(), and while 
1326         we're at it, re-name the variable and function names in the scrolling tree code 
1327         from contentsSize to totalContentsSize.
1328         * page/scrolling/ScrollingStateScrollingNode.cpp:
1329         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
1330         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
1331         (WebCore::ScrollingStateScrollingNode::dumpProperties):
1332         * page/scrolling/ScrollingStateScrollingNode.h:
1333         (WebCore::ScrollingStateScrollingNode::totalContentsSize):
1334         (ScrollingStateScrollingNode):
1335         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1336         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
1337         * page/scrolling/ScrollingTreeScrollingNode.h:
1338         (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
1339         (ScrollingTreeScrollingNode):
1340         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1341         (ScrollParameters):
1342         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1343         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
1344         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
1345         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1346         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
1347         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
1348         (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
1349
1350         Use totalContentsSize() instead of contentsSize().
1351         * platform/ScrollView.cpp:
1352         (WebCore::ScrollView::maximumScrollPosition):
1353         (WebCore::ScrollView::setScrollOffset):
1354         (WebCore::ScrollView::overhangAmount):
1355         (WebCore::ScrollView::updateScrollbars):
1356         (WebCore::ScrollView::calculateOverhangAreasForPainting):
1357
1358         scrollOffset() represents the offset within the totalContentsSize, but that is 
1359         not what we need here. So subtract out the headerHeight() for the appropriate 
1360         value.
1361         (WebCore::ScrollView::windowToContents):
1362         (WebCore::ScrollView::contentsToWindow):
1363
1364         Use totalContentsSize() instead of contentsSize().
1365         * platform/ScrollableArea.cpp:
1366         (WebCore::ScrollableArea::maximumScrollPosition):
1367         (WebCore):
1368         (WebCore::ScrollableArea::totalContentsSize):
1369         * platform/ScrollableArea.h:
1370         (WebCore::ScrollableArea::headerHeight):
1371         (WebCore::ScrollableArea::footerHeight):
1372         (ScrollableArea):
1373         * platform/mac/ScrollAnimatorMac.mm:
1374         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
1375         (WebCore::ScrollAnimatorMac::pinnedInDirection):
1376         * platform/mac/ThemeMac.mm:
1377         (WebCore::ThemeMac::ensuredView):
1378
1379         The rootContentLayer needs to be offset by the headerHeight().
1380         * rendering/RenderLayerCompositor.cpp:
1381         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
1382
1383         New member variables m_layerForHeader and m_layerForFooter. This code properly 
1384         creates and manages them.
1385         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
1386         (WebCore::RenderLayerCompositor::updateLayerForHeader):
1387         (WebCore):
1388         (WebCore::RenderLayerCompositor::updateLayerForFooter):
1389         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
1390         (WebCore::RenderLayerCompositor::reportMemoryUsage):
1391         * rendering/RenderLayerCompositor.h:
1392         (RenderLayerCompositor):
1393
1394         Test infrastructure. 
1395         * testing/Internals.cpp:
1396         (WebCore::Internals::resetToConsistentState):
1397         (WebCore::Internals::setHeaderHeight):
1398         (WebCore):
1399         (WebCore::Internals::setFooterHeight):
1400         * testing/Internals.h:
1401         * testing/Internals.idl:
1402
1403 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1404
1405         javascriptcore bindings do not check exception after calling valueToStringWithNullCheck
1406         https://bugs.webkit.org/show_bug.cgi?id=113219
1407
1408         Reviewed by Kentaro Hara.
1409
1410         When converting JSValue to native value in attribute setter, store the
1411         native value in a temporary variable. After this variable assignment,
1412         always check if an exception has been raised.
1413
1414         Update binding tests.
1415
1416         Test: fast/dom/exception-in-binding.html
1417
1418         * bindings/scripts/CodeGeneratorJS.pm:
1419         (GenerateImplementation):
1420         (GetNativeType):
1421         (JSValueToNative):
1422         * bindings/scripts/test/JS/JSTestInterface.cpp:
1423         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
1424         (WebCore::setJSTestInterfaceSupplementalStr2):
1425         (WebCore::setJSTestInterfaceSupplementalNode):
1426         * bindings/scripts/test/JS/JSTestObj.cpp:
1427         (WebCore::setJSTestObjConstructorStaticStringAttr):
1428         (WebCore::setJSTestObjEnumAttr):
1429         (WebCore::setJSTestObjShortAttr):
1430         (WebCore::setJSTestObjUnsignedShortAttr):
1431         (WebCore::setJSTestObjLongAttr):
1432         (WebCore::setJSTestObjLongLongAttr):
1433         (WebCore::setJSTestObjUnsignedLongLongAttr):
1434         (WebCore::setJSTestObjStringAttr):
1435         (WebCore::setJSTestObjTestObjAttr):
1436         (WebCore::setJSTestObjXMLObjAttr):
1437         (WebCore::setJSTestObjCreate):
1438         (WebCore::setJSTestObjReflectedStringAttr):
1439         (WebCore::setJSTestObjReflectedIntegralAttr):
1440         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
1441         (WebCore::setJSTestObjReflectedBooleanAttr):
1442         (WebCore::setJSTestObjReflectedURLAttr):
1443         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
1444         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
1445         (WebCore::setJSTestObjReflectedCustomURLAttr):
1446         (WebCore::setJSTestObjTypedArrayAttr):
1447         (WebCore::setJSTestObjAttrWithGetterException):
1448         (WebCore::setJSTestObjAttrWithSetterException):
1449         (WebCore::setJSTestObjStringAttrWithGetterException):
1450         (WebCore::setJSTestObjStringAttrWithSetterException):
1451         (WebCore::setJSTestObjWithScriptStateAttribute):
1452         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
1453         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
1454         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
1455         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
1456         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
1457         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
1458         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
1459         (WebCore::setJSTestObjConditionalAttr1):
1460         (WebCore::setJSTestObjConditionalAttr2):
1461         (WebCore::setJSTestObjConditionalAttr3):
1462         (WebCore::setJSTestObjAnyAttribute):
1463         (WebCore::setJSTestObjMutablePoint):
1464         (WebCore::setJSTestObjImmutablePoint):
1465         (WebCore::setJSTestObjStrawberry):
1466         (WebCore::setJSTestObjStrictFloat):
1467         (WebCore::setJSTestObjId):
1468         (WebCore::setJSTestObjNullableLongSettableAttribute):
1469         (WebCore::setJSTestObjNullableStringValue):
1470         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1471         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
1472         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
1473         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1474         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
1475         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
1476         (WebCore::setJSTestTypedefsAttrWithGetterException):
1477         (WebCore::setJSTestTypedefsAttrWithSetterException):
1478         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
1479         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
1480
1481 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
1482
1483         cache parsed interfaces in CodeGenerator.pm
1484         https://bugs.webkit.org/show_bug.cgi?id=113446
1485
1486         Reviewed by Kentaro Hara.
1487
1488         When generating binding for an interface, informations about parent
1489         interfaces are sometimes needed several times. This patch caches
1490         those the parsed interface. When generating all WebCore bindings, this
1491         results in a speedup of about 40% for JavaScriptCore and about 80% for
1492         V8.
1493
1494         No new tests: no change in behaviour.
1495
1496         * bindings/scripts/CodeGenerator.pm:
1497         (ParseInterface):
1498
1499 2013-03-27  KyungTae Kim <ktf.kim@samsung.com> and Yongjun Zhang  <yongjun_zhang@apple.com>
1500
1501         Add a settings to disallow initializing background-size if background shorthand doesn't include it.
1502         https://bugs.webkit.org/show_bug.cgi?id=113363
1503
1504         Reviewed by David Kilzer.
1505
1506         This is based on KyungTae Kim's patch in https://bugs.webkit.org/show_bug.cgi?id=97761.  Many legacy sites set
1507         background-size first and then set background for setting background-image.  For backward-compatibility
1508         in some WebKit based clients, if 'background' shorthand have no 'background-size' attribute, we could add
1509         a settings to let the css parser not initialize 'background-size'.
1510
1511         Test: fast/backgrounds/background-shorthand-after-set-backgroundSize.html
1512
1513         * css/CSSParser.cpp:
1514         (WebCore::CSSParserContext::CSSParserContext): initialize useLegacyBackgroundSizeShorthandBehavior.
1515         (WebCore::operator==):
1516         (WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): add a method to return if we want background-size
1517             to be initialized by background shorthand.
1518         (WebCore):
1519         (WebCore::CSSParser::parseFillShorthand): don't initialize background-size in background shorthand if we have
1520             useLegacyBackgroundSizeShorthandBehavior set to true.
1521         * css/CSSParser.h:
1522         (CSSParser):
1523         * css/CSSParserMode.h: add member useLegacyBackgroundSizeShorthandBehavior to CSSParserContext.
1524         (CSSParserContext):
1525         * page/Settings.in: initialize useLegacyBackgroundSizeShorthandBehavior to false.
1526         * testing/InternalSettings.cpp:
1527         (WebCore::InternalSettings::Backup::Backup): add the new settings useLegacyBackgroundSizeShorthandBehavior to Backup.
1528         (WebCore::InternalSettings::Backup::restoreTo): restore useLegacyBackgroundSizeShorthandBehavior from Backup.
1529         (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior):
1530         (WebCore):
1531         * testing/InternalSettings.h:
1532         (Backup):
1533         (InternalSettings):
1534         * testing/InternalSettings.idl: add a JS testing API setUseLegacyBackgroundSizeShorthandBehavior to turn on/off
1535             the new settings.
1536
1537 2013-03-27  Florin Malita  <fmalita@chromium.org>
1538
1539         Remove unused RenderLayer::renderBox{X,Y} methods
1540         https://bugs.webkit.org/show_bug.cgi?id=113408
1541
1542         Reviewed by Simon Fraser.
1543
1544         Minor cleanup - renderBoxX() and renderBox() are no longer used.
1545
1546         No new tests: no functional changes.
1547
1548         * rendering/RenderLayer.h:
1549
1550 2013-03-27  PhistucK  <phistuck@chromium.org>
1551
1552         Web Inspector: Plumb and expose cookie clearing options throughout the Resources Cookies tree and views
1553         https://bugs.webkit.org/show_bug.cgi?id=87140
1554
1555         Reviewed by Vsevolod Vlasov.
1556
1557         Added cookie clearing buttons and context menu options
1558         throughout the tree and views.
1559         Drive by -
1560         - Made sure the delete button is only visible
1561         when a cookie is selected.
1562         - Fixed a wrong JSDoc comment.
1563
1564         * inspector/front-end/CookieItemsView.js:
1565         (WebInspector.CookieItemsView):
1566         (WebInspector.CookieItemsView.prototype.statusBarItems):
1567         (WebInspector.CookieItemsView.prototype._updateWithCookies):
1568         (WebInspector.CookieItemsView.prototype.clear):
1569         Added. Clears the entire cookie view.
1570         (WebInspector.CookieItemsView.prototype._clearButtonClicked):
1571         Added. Ditto (when clicking on the button).
1572         (WebInspector.CookieItemsView.prototype._showDeleteButton):
1573         Added. Shows the delete button when selecting a cookie row.
1574         * inspector/CookiesTable.js:
1575         (WebInspector.CookiesTable):
1576         (WebInspector.CookiesTable.prototype._clearAndRefresh):
1577         Added. Clears the cookies of the current table and updates it.
1578         (WebInspector.CookiesTable.prototype._handleContextMenuEvent):
1579         Added. Manages the context menu within the table.
1580         (WebInspector.CookiesTable.prototype.clear):
1581         Added. Clears the cookies of the current table.
1582         (WebInspector.CookiesTable.prototype.setCookies):
1583          Fixed a wrong JSDoc comment structure.
1584         * inspector/front-end/ResourcesPanel.js:
1585         (WebInspector.ResourcesPanel.prototype.clearCookies):
1586         Added. Clears the cookies of the given domain view.
1587         (WebInspector.CookieTreeElement.prototype.onattach):
1588         Added. Adds a contextmenu handler.
1589         (WebInspector.CookieTreeElement.prototype._handleContextMenuEvent):
1590         Added. Manages the context menu within cookie tree.
1591         (WebInspector.CookieTreeElement.prototype._clearCookies):
1592         Added. Clears the cookies of the view of the tree item.
1593         * inspector/front-end/treeoutline.js:
1594         (TreeOutline): Fixed a wrong JSDoc comment.
1595
1596         * English.lproj/localizedStrings.js:
1597         Added strings for the context menu options.
1598
1599 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1600
1601         Web Inspector: [DTE] implement "tokenAtTextPosition" method
1602         https://bugs.webkit.org/show_bug.cgi?id=113390
1603
1604         Reviewed by Pavel Feldman.
1605
1606         Test: inspector/editor/text-editor-token-at-position.html
1607
1608         - Add TextEditor.tokenAtTextPosition method
1609         - Implement tokenAtTextPosition method in DefaultTextEditor
1610
1611         * inspector/front-end/DefaultTextEditor.js:
1612         (WebInspector.DefaultTextEditor.prototype.tokenAtTextPosition):
1613         (WebInspector.TextEditorMainPanel.prototype.compare):
1614         (WebInspector.TextEditorMainPanel.prototype.tokenAtTextPosition):
1615         (WebInspector.TextEditorMainPanel.prototype._tokenAtUnhighlightedLine):
1616         (WebInspector.TextEditorMainPanel.prototype.set mimeType):
1617         (WebInspector.TextEditorMainPanel.prototype.get mimeType):
1618         * inspector/front-end/TextEditor.js:
1619         (WebInspector.TextEditor.prototype.tokenAtTextPosition):
1620         * inspector/front-end/TextEditorHighlighter.js:
1621         (WebInspector.TextEditorHighlighter):
1622         (WebInspector.TextEditorHighlighter.prototype.get mimeType):
1623         (WebInspector.TextEditorHighlighter.prototype.set mimeType):
1624
1625 2013-03-27  Charles Wei  <charles.wei@torchmobile.com.cn>
1626
1627         Remove build warning for unused function parameters in indexeddb.
1628         https://bugs.webkit.org/show_bug.cgi?id=113043
1629
1630         Reviewed by Tony Chang.
1631
1632         No new tests, just remove build warning.
1633
1634         * Modules/indexeddb/IDBCallbacks.h:
1635         (WebCore::IDBCallbacks::onBlocked):
1636         (WebCore::IDBCallbacks::onUpgradeNeeded):
1637         * Modules/indexeddb/IDBCursor.cpp:
1638         (WebCore::IDBCursor::stringToDirection):
1639         * Modules/indexeddb/IDBCursor.h:
1640         (IDBCursor):
1641         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1642         (WebCore::IDBCursorBackendImpl::prefetchReset):
1643         * Modules/indexeddb/IDBDatabase.cpp:
1644         (WebCore::IDBDatabase::transaction):
1645         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1646         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
1647         * Modules/indexeddb/IDBIndex.cpp:
1648         (WebCore::IDBIndex::openCursor):
1649         (WebCore::IDBIndex::openKeyCursor):
1650         * Modules/indexeddb/IDBLevelDBCoding.cpp:
1651         (IDBLevelDBCoding):
1652         * Modules/indexeddb/IDBObjectStore.cpp:
1653         (WebCore):
1654         (WebCore::IDBObjectStore::openCursor):
1655         * Modules/indexeddb/IDBTransaction.cpp:
1656         (WebCore::IDBTransaction::stringToMode):
1657         * Modules/indexeddb/IDBTransaction.h:
1658         (IDBTransaction):
1659         * inspector/InspectorIndexedDBAgent.cpp:
1660         (WebCore):
1661
1662 2013-03-27  Sergey Ryazanov  <serya@chromium.org>
1663
1664         REGRESSION (r146588): Cannot correctly display Chinese SNS Renren
1665         https://bugs.webkit.org/show_bug.cgi?id=113142
1666
1667         Reviewed by Pavel Feldman.
1668
1669         Changed CSS grammar to be equivalent to pre-r146588.
1670         CSS error reporting disabled to prevent message overflow.
1671
1672         * css/CSSGrammar.y.in:
1673         * css/CSSParser.cpp:
1674         (WebCore::CSSParser::isLoggingErrors):
1675
1676 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1677
1678         Web Inspector: enhance Popover.js to rely on hover element coordinates
1679         https://bugs.webkit.org/show_bug.cgi?id=113340
1680
1681         Reviewed by Pavel Feldman.
1682
1683         No new tests: no change in behaviour.
1684
1685         Introduce a coordinates-based method that checks if mouse is inside hover
1686         element and use it in PopoverHelper instead of DOM hierarchy.
1687
1688         * inspector/front-end/Popover.js:
1689         (WebInspector.PopoverHelper.prototype._eventInHoverElement): Added.
1690         (WebInspector.PopoverHelper.prototype._mouseDown):
1691         (WebInspector.PopoverHelper.prototype._mouseMove):
1692         (WebInspector.PopoverHelper.prototype._mouseOut):
1693
1694 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1695
1696         Web Inspector: [CodeMirror] fix webinspector-css theme for CodeMirror
1697         https://bugs.webkit.org/show_bug.cgi?id=113399
1698
1699         Reviewed by Alexander Pavlov.
1700
1701         Add style rule to highlight css properties for CodeMirror
1702         webinspector-css theme.
1703
1704         No new tests: no change in behaviour.
1705
1706         * inspector/front-end/cm/cmdevtools.css:
1707         (.cm-s-web-inspector-css span.cm-property):
1708
1709 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1710
1711         Web Inspector: [DTE] paint overlay highlight for unhighlighted lines
1712         https://bugs.webkit.org/show_bug.cgi?id=113344
1713
1714         Reviewed by Pavel Feldman.
1715
1716         No new tests.
1717
1718         Remove fast-return condition from paintLine method that checked for
1719         highlight existence.
1720
1721         * inspector/front-end/DefaultTextEditor.js:
1722         (WebInspector.TextEditorMainPanel.prototype._paintLine):
1723
1724 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1725
1726         Shift clicking on an element with -webkit-user-select: all doesn't extend selection
1727         https://bugs.webkit.org/show_bug.cgi?id=113270
1728
1729         Reviewed by Enrica Casucci.
1730
1731         The bug was caused by updateSelectionForMouseDownDispatchingSelectStart always replacing selection whenever
1732         the target node was inside an element with -webkit-suer-select even when we were attemping to extend selection
1733         in handleMousePressEventSingleClick.
1734
1735         Fixed the bug by extracting this logic as a separate function (expandSelectionToRespectUserSelectAll) and deploying
1736         it in handleMousePressEventSingleClick to extend selection as needed.
1737
1738         Test: editing/selection/user-select-all-with-shift.html
1739
1740         * page/EventHandler.cpp:
1741         (WebCore::expandSelectionToRespectUserSelectAll): Extracted from updateSelectionForMouseDownDispatchingSelectStart.
1742         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
1743         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
1744         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
1745         (WebCore::EventHandler::handleMousePressEventTripleClick):
1746         (WebCore::EventHandler::handleMousePressEventSingleClick): Adjust "pos" as needed when extending selection.
1747         Also use shouldConsiderSelectionAsDirectional() instead of manually peeking editingBehaviorType while we're at it.
1748
1749 2013-03-27  Zalan Bujtas  <zalan@apple.com>
1750
1751         REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
1752         https://bugs.webkit.org/show_bug.cgi?id=113077
1753
1754         Reviewed by Antti Koivisto.
1755         
1756         http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level
1757         "Anonymous block boxes are ignored when resolving percentage values that would refer to it:
1758         the closest non-anonymous ancestor box is used instead."
1759         When figuring out whether auto height needs to be applied on the current box, ignore anonymous
1760         ancestors until the first non-anonymous containing block is found. This matches both
1761         Firefox and Opera behaviour.
1762         
1763         Test: fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html
1764
1765         * rendering/RenderBoxModelObject.cpp:
1766         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): Switch from
1767         isAnonymousBlock() to isAnonymous() to make sure all anonymous boxes are ignored.
1768         Remove isTableCell() check which is a noop as table cell isn't an anonymous block.
1769         
1770 2013-03-27  Pierre Rossi  <pierre.rossi@gmail.com>
1771
1772         [Qt] Add WOFF support when using zlib
1773         https://bugs.webkit.org/show_bug.cgi?id=112805
1774
1775         Reviewed by Allan Sandfeld Jensen.
1776
1777         Covered by existing test:
1778         fast/css/font-face-woff.html
1779
1780         * Target.pri: Conditional inclusion of WOFFFileFormat
1781         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
1782         (WebCore::createFontCustomPlatformData): Try to unpack WOFF data, otherwise spit out a warning and bail.
1783         (WebCore::FontCustomPlatformData::supportsFormat): accept WOFF webfonts if USE(ZLIB).
1784
1785 2013-03-27  Robert Hogan  <robert@webkit.org>
1786
1787         Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
1788         https://bugs.webkit.org/show_bug.cgi?id=111977
1789
1790         Reviewed by David Hyatt.
1791
1792         During simplified layout tables still need to know about overflow from positioned objects in any of
1793         their cells.
1794
1795         Test: fast/table/cell-overflow-simplified-layout.html
1796
1797         * rendering/RenderBlock.h:
1798         (RenderBlock):
1799         * rendering/RenderTable.cpp:
1800         (WebCore::RenderTable::simplifiedNormalFlowLayout):
1801         (WebCore):
1802         * rendering/RenderTable.h:
1803         * rendering/RenderTableSection.cpp:
1804         (WebCore::RenderTableSection::layoutRows):
1805         (WebCore):
1806         (WebCore::RenderTableSection::computeOverflowFromCells):
1807         * rendering/RenderTableSection.h:
1808         (RenderTableSection):
1809
1810 2013-03-22  Geoffrey Garen  <ggaren@apple.com>
1811
1812         Honor the setting for whether JavaScript markup is enabled
1813         https://bugs.webkit.org/show_bug.cgi?id=113122
1814
1815         Reviewed by Ryosuke Niwa.
1816
1817         * dom/ScriptableDocumentParser.cpp:
1818         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Applied the
1819         setting here, so all document parsing would be covered. This is similar
1820         to what we do for plug-in stripping.
1821
1822         * html/parser/HTMLConstructionSite.cpp:
1823         (WebCore::HTMLConstructionSite::insertForeignElement): Fixed a bug where
1824         we would insert an SVG script element into the document even in script
1825         markup disabled mode.
1826
1827         (This bug has existed for copy/paste for a long time, but other bugs and
1828         quirks in SVG copy/paste papered over it. It's a serious issue now
1829         that non-paste clients will rely on this mode.)
1830
1831         * html/parser/HTMLTreeBuilder.cpp:
1832         (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Fixed the same
1833         bug -- this time in the part of the parser that executes scripts as they
1834         parse.
1835
1836         I adopted the toScriptElement() convention for testing for a script
1837         element to match the XML parser.
1838
1839 2013-03-27  Dean Jackson  <dino@apple.com>
1840
1841         Chromium Mac fails to build after r146995 because the new NSFont category
1842         may conflict with the system. Add the WebCoreTheme category to the whitelist.
1843
1844         Unreviewed.
1845
1846         * WebCore.gyp/WebCore.gyp:
1847
1848 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
1849
1850         Selection code spends a lot of time in InlineTextBox::localSelectionRect
1851         https://bugs.webkit.org/show_bug.cgi?id=113364
1852
1853         Reviewed by Enrica Casucci.
1854
1855         Avoid computing the font width when we're selecting the entire line box.
1856
1857         This appears to be 25-26% improvement on Interactive/SelectAll:Time.
1858
1859         * rendering/InlineTextBox.cpp:
1860         (WebCore::InlineTextBox::localSelectionRect):
1861
1862 2013-03-26  Timothy Hatcher  <timothy@apple.com>
1863
1864         Add support for dock-to-right of the Web Inspector in the Mac port.
1865
1866         Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
1867
1868         https://webkit.org/b/113341
1869         rdar://problem/10368152
1870
1871         Reviewed by Joseph Pecoraro.
1872
1873         * WebCore.exp.in:
1874         * inspector/InspectorFrontendClient.h:
1875         (InspectorFrontendClient):
1876         * inspector/InspectorFrontendClientLocal.cpp:
1877         (WebCore):
1878         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
1879         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
1880         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
1881         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
1882         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
1883         (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
1884         * inspector/InspectorFrontendClientLocal.h:
1885         (InspectorFrontendClientLocal):
1886         * inspector/InspectorFrontendHost.cpp:
1887         (WebCore::InspectorFrontendHost::setAttachedWindowWidth):
1888         (WebCore):
1889         * inspector/InspectorFrontendHost.h:
1890         (InspectorFrontendHost):
1891         * inspector/InspectorFrontendHost.idl:
1892         * inspector/front-end/InspectorFrontendHostStub.js:
1893         (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
1894         * inspector/front-end/externs.js:
1895         (InspectorFrontendHostAPI.prototype.setAttachedWindowWidth):
1896         * testing/Internals.cpp:
1897
1898 2013-03-27  Eric Carlson  <eric.carlson@apple.com>
1899
1900         [Mac] webkitClosedCaptionsVisible doesn't work
1901         https://bugs.webkit.org/show_bug.cgi?id=113417
1902
1903         Reviewed by Jer Noble.
1904
1905         Test: media/track/track-in-band-legacy-api.html
1906
1907         * html/HTMLMediaElement.cpp:
1908         (WebCore::HTMLMediaElement::HTMLMediaElement): Delete m_disableCaptions, it is no longer used.
1909         (WebCore::HTMLMediaElement::configureTextTrackGroup): Pass this to textTrackSelectionScore.
1910         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Delete m_disableCaptions, it is no longer used.
1911         * html/HTMLMediaElement.h: Ditto.
1912
1913         * page/CaptionUserPreferences.cpp:
1914         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Add an HTMLMediaElement parameter.
1915         * page/CaptionUserPreferences.h:
1916
1917         * page/CaptionUserPreferencesMac.h:
1918         * page/CaptionUserPreferencesMac.mm:
1919         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Return a score if the media element
1920             is showing captions, even if the preference says captions are disabled.
1921
1922 2013-03-27  Eric Carlson  <eric.carlson@apple.com>
1923
1924         [Mac] Text track menu items sometimes labeled incorrectly
1925         https://bugs.webkit.org/show_bug.cgi?id=113406
1926
1927         Reviewed by Jer Noble.
1928
1929         media/video-controls-captions-trackmenu-localized.html was updated to test this.
1930
1931         * page/CaptionUserPreferencesMac.mm:
1932         (WebCore::trackDisplayName): Use the 'label' attribute for the menu text when necessary.
1933
1934 2013-03-27  Sergio Villar Senin  <svillar@igalia.com>
1935
1936         Inserting a blank (" ") at the end of a line does not insert anything in Overtype mode
1937         https://bugs.webkit.org/show_bug.cgi?id=113413
1938
1939         Reviewed by Ryosuke Niwa.
1940
1941         Perform a "normal" insert instead of a replace when there is
1942         nothing to replace (like at the end of a line) as this case is not
1943         supported by the replacing code path. This will allow us to
1944         properly rebalance whitespaces in those cases.
1945
1946         Updated the editing/execCommand/overtype.html test to check also
1947         this use case.
1948
1949         * editing/InsertTextCommand.cpp:
1950         (WebCore::InsertTextCommand::setEndingSelectionWithoutValidation):
1951         (WebCore::InsertTextCommand::performTrivialReplace):
1952         (WebCore::InsertTextCommand::performOverwrite):
1953         (WebCore::InsertTextCommand::doApply): use the recently added
1954         setEndingSelectionWithoutValidation() to avoid code duplication.
1955         * editing/InsertTextCommand.h:
1956         (InsertTextCommand):
1957
1958 2013-03-27  Dean Jackson  <dino@apple.com>
1959
1960         [Mac] Use fontName rather than familyName for internal fonts
1961         https://bugs.webkit.org/show_bug.cgi?id=113392
1962         <rdar://problem/13474743>
1963
1964         Reviewed by Enrica Casucci.
1965
1966         Some internal fonts on OS X have a family name that
1967         isn't listed in availableFontFamilies. In this case
1968         we should use the font name rather than the family
1969         name when looking for a match.
1970
1971         * platform/mac/ThemeMac.h: NSFont category to provide a web-friendly family name.
1972         * platform/mac/ThemeMac.mm:
1973         (-[NSFont webCoreFamilyName]): Returns the font name for internal fonts, otherwise the family name.
1974         (WebCore::ThemeMac::controlFont):
1975         * rendering/RenderThemeMacShared.mm: Use the webCoreFamilyName.
1976         (WebCore::RenderThemeMacShared::systemFont): Ditto.
1977         (WebCore::RenderThemeMacShared::setFontFromControlSize): Ditto.
1978
1979 2013-03-26  Jer Noble  <jer.noble@apple.com>
1980
1981         Mac: Media Controls always hide time display elements
1982         https://bugs.webkit.org/show_bug.cgi?id=113355
1983
1984         Reviewed by Eric Carlson.
1985
1986         No new tests; rebaselined existing tests against correct behavior.
1987
1988         A prior commit set the "min-width:0" property on the time display elements, which, combined
1989         with the "-webkit-flex-box:0 0" setting, caused the flex-box container to collapse the width
1990         of the elements to zero. To achieve the desired effect of hiding the time display elements,
1991         first set the elements' min-width to the desired width, as the new flex-box spec treats the
1992         default value of "min-width:auto" as the intrinsic width, and will collapse the text display
1993         elements to the intrinsic width of its contained text node.
1994
1995         The above allows the timeline container to collapse beyond the sum of its childrens'
1996         intrinsic width. Create a custom renderer that detects when this happens, and hide the time
1997         display controls.
1998
1999         * css/mediaControls.css:
2000         * css/mediaControlsQuickTime.css:
2001         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2002             Set the "min-width:" property to equal the "width:" property.
2003         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2004             Ditto.
2005         * css/mediaControlsChromium.css:
2006         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2007             Chromium assumes the time display controls are flex-boxes, so make that explicit.
2008         * html/shadow/MediaControlElementTypes.cpp: Removed MediaControlTimeDisplayElement::createRenderer().
2009         * html/shadow/MediaControlElementTypes.h:
2010         (MediaControlTimeDisplayElement): Ditto.
2011         * html/shadow/MediaControlElements.cpp:
2012         (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden): Added, walks through the 
2013             container's children and shows or hides time display elements.
2014         (WebCore::MediaControlTimelineContainerElement::createRenderer): Added, creates a RenderMediaControlTimelineContainer.
2015         (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
2016             query against children's shadowPseudoId().
2017         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Moved contents to getMediaControlTimeRemainingDisplayElementShadowPseudoId.
2018         (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
2019             query against children's shadowPseudoId().
2020         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Moved contents to getMediaControlCurrentTimeDisplayElementShadowPseudoId.
2021         * html/shadow/MediaControlElements.h:
2022         (MediaControlTimelineContainerElement):
2023         * rendering/RenderMediaControlElements.cpp:
2024         (WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer): Added, simple constructor.
2025         (WebCore::RenderMediaControlTimelineContainer::layout): Detect when the controller's width is greater than
2026             a certain value, and show or hide the time display elements in response.
2027         * rendering/RenderMediaControlElements.h:
2028         (RenderMediaControlTimelineContainer):
2029
2030 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
2031
2032         Web Inspector: CPU profiler. Swap FlameChart with Data Grid.
2033         https://bugs.webkit.org/show_bug.cgi?id=113395
2034
2035         Reviewed by Pavel Feldman.
2036
2037         Looks like FlameChart is more powerful and flexible instrument
2038         than plain old ProfileTree in DataGrid. The same action like
2039         'look for the most expensive function in a frame' could be easily
2040         done with FlameChart and need number of clicks in DataGrid.
2041         So in an offline discussion we decided to place FlameChart on top of DataGrid.
2042
2043         * inspector/front-end/CPUProfileView.js:
2044
2045 2013-03-27  Chris Fleizach  <cfleizach@apple.com>
2046
2047         Regression in tests due to https://bugs.webkit.org/show_bug.cgi?id=113339
2048         https://bugs.webkit.org/show_bug.cgi?id=113361
2049
2050         Fix the red bots. No review.
2051
2052         Ensure only pop-up buttons get the AXRequired attribute instead of all buttons.        
2053
2054         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2055         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2056         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2057
2058 2013-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
2059
2060         Web Inspector: Breakpoint manager should restore breakpoints when uiSourceCode is added.
2061         https://bugs.webkit.org/show_bug.cgi?id=113381
2062
2063         Reviewed by Pavel Feldman.
2064
2065         Breakpoint manager now restores breakpoints on UISourceCodeAdded event.
2066         Breakpoint manager now only resets breakpoints in debugger when source mapping is changed to/from non identity one.
2067
2068         * inspector/front-end/BreakpointManager.js:
2069         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
2070         (WebInspector.BreakpointManager.prototype._resetBreakpoints):
2071         (WebInspector.BreakpointManager.prototype._uiSourceCodeMappingChanged):
2072         * inspector/front-end/CompilerScriptMapping.js:
2073         (WebInspector.CompilerScriptMapping.prototype.get isIdentity):
2074         * inspector/front-end/DefaultScriptMapping.js:
2075         (WebInspector.DefaultScriptMapping.prototype.isIdentity):
2076         * inspector/front-end/ResourceScriptMapping.js:
2077         (WebInspector.ResourceScriptMapping.prototype.isIdentity):
2078         * inspector/front-end/SASSSourceMapping.js:
2079         (WebInspector.SASSSourceMapping.prototype.isIdentity):
2080         * inspector/front-end/ScriptSnippetModel.js:
2081         (WebInspector.SnippetScriptMapping.prototype.isIdentity):
2082         * inspector/front-end/SourceMapping.js:
2083         (WebInspector.SourceMapping.prototype.isIdentity):
2084         * inspector/front-end/StylesSourceMapping.js:
2085         (WebInspector.StylesSourceMapping.prototype.isIdentity):
2086         * inspector/front-end/UISourceCode.js:
2087         (WebInspector.UISourceCode.prototype.setSourceMapping):
2088
2089 2013-03-27  Yury Semikhatsky  <yurys@chromium.org>
2090
2091         Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
2092         https://bugs.webkit.org/show_bug.cgi?id=113376
2093
2094         Reviewed by Vsevolod Vlasov.
2095
2096         Fixed assertion failure in debug mode after r146975.
2097
2098         * inspector/InspectorTimelineAgent.cpp:
2099         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2100
2101 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
2102
2103         Web Inspector: FlameChart. Provide 15px padding left for the chart so developers will see the first divider with '0' title.
2104         https://bugs.webkit.org/show_bug.cgi?id=113404
2105
2106         Reviewed by Pavel Feldman.
2107
2108         15px paddingLeft was added to the code for the chart.
2109
2110         * inspector/front-end/FlameChart.js:
2111         (WebInspector.FlameChart):
2112         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
2113         (WebInspector.FlameChart.Calculator.prototype.computePosition):
2114         (WebInspector.FlameChart.prototype.draw):
2115
2116 2013-03-27  Kent Tamura  <tkent@chromium.org>
2117
2118         Rename HTMLFormControlElement::readOnly to isReadOnly
2119         https://bugs.webkit.org/show_bug.cgi?id=113297
2120
2121         Reviewed by Alexey Proskuryakov.
2122
2123         HTMLFormControlElement::readOnly is not an implementation of
2124         'readOnly' IDL attribute. It's confusing and we don't need to
2125         violate our naming convention.
2126
2127         No new tests. Just a refactoring.
2128
2129         * accessibility/AccessibilityNodeObject.cpp:
2130         (WebCore::AccessibilityNodeObject::isReadOnly):
2131         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2132         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
2133         * html/HTMLFormControlElement.cpp:
2134         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2135         (WebCore::HTMLFormControlElement::parseAttribute):
2136         * html/HTMLFormControlElement.h:
2137         (WebCore::HTMLFormControlElement::isReadOnly):
2138         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
2139         * html/HTMLInputElement.cpp:
2140         (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass):
2141         (WebCore::HTMLInputElement::matchesReadWritePseudoClass):
2142         * html/HTMLTextAreaElement.cpp:
2143         (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass):
2144         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
2145         * html/shadow/SliderThumbElement.cpp:
2146         (WebCore::SliderThumbElement::defaultEventHandler):
2147         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
2148         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
2149         * html/shadow/TextControlInnerElements.cpp:
2150         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
2151         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
2152         * html/shadow/TextFieldDecorationElement.cpp:
2153         (WebCore::TextFieldDecorationElement::updateImage):
2154         * rendering/RenderTextControl.cpp:
2155         (WebCore::updateUserModifyProperty):
2156         * rendering/RenderThemeMacShared.mm:
2157         (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
2158
2159 2013-03-27  Yury Semikhatsky  <yurys@chromium.org>
2160
2161         Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
2162         https://bugs.webkit.org/show_bug.cgi?id=113376
2163
2164         Reviewed by Vsevolod Vlasov.
2165
2166         Added missing fields to Timeline.TimelineEvent type definition in Inspector.json
2167
2168         * inspector/Inspector.json:
2169         * inspector/InspectorTimelineAgent.cpp:
2170         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2171         (WebCore::InspectorTimelineAgent::setDOMCounters):
2172         Switched InspectorTimelineAgent to the new typed event builders.
2173         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
2174         * inspector/InspectorTimelineAgent.h:
2175         (InspectorTimelineAgent):
2176
2177 2013-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
2178
2179         Web Inspector: Follow-up to r146898: test that uiSourceCodes are not leaking in breakpoint manager.
2180         https://bugs.webkit.org/show_bug.cgi?id=113368
2181
2182         Reviewed by Pavel Feldman.
2183
2184         Added a missed line and a test.
2185
2186         * inspector/front-end/BreakpointManager.js:
2187         (WebInspector.BreakpointManager.prototype._projectWillReset):
2188
2189 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
2190
2191         Web Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs
2192         https://bugs.webkit.org/show_bug.cgi?id=113348
2193
2194         Reviewed by Vsevolod Vlasov.
2195
2196         No new tests.
2197
2198         - Append additional "<class>-start" class to the first highlighted span
2199         and "<class>-end" class to the last highlighted span to provide a way
2200         to set up a css classes with borders.
2201         - Increment end column of the markup range to simulate inclusive range.
2202
2203         * inspector/front-end/CodeMirrorTextEditor.js:
2204         (WebInspector.CodeMirrorTextEditor.prototype.highlightRange):
2205
2206 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
2207
2208         Web Inspector: Add isClean/markClean method pair to textEditor.js
2209         https://bugs.webkit.org/show_bug.cgi?id=112815
2210
2211         Reviewed by Vsevolod Vlasov.
2212
2213         No new tests: no change in behaviour.
2214
2215         - Add TextEditor.isClean and TextEditor.markClean methods
2216         - Implement these methods in DefaultTextEditor
2217         - Implement these methods in CodeMirrorTextEditor
2218
2219         * inspector/front-end/CodeMirrorTextEditor.js:
2220         (WebInspector.CodeMirrorTextEditor.prototype.isClean):
2221         (WebInspector.CodeMirrorTextEditor.prototype.markClean):
2222         * inspector/front-end/DefaultTextEditor.js:
2223         (WebInspector.DefaultTextEditor.prototype.isClean):
2224         (WebInspector.DefaultTextEditor.prototype.markClean):
2225         * inspector/front-end/TextEditor.js:
2226         (WebInspector.TextEditor.prototype.isClean):
2227         (WebInspector.TextEditor.prototype.markClean):
2228         * inspector/front-end/TextEditorModel.js:
2229         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2230
2231 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
2232
2233         Unreviewed. Web Inspector. rename method Timeline.Calculator.grandMinimumBoundary to Timeline.Calculator.zeroTime
2234
2235         No changes in behaviour.
2236
2237         * inspector/front-end/FlameChart.js:
2238         (WebInspector.FlameChart.Calculator.prototype.zeroTime):
2239         (WebInspector.FlameChart.OverviewCalculator.prototype.zeroTime):
2240         * inspector/front-end/NetworkPanel.js:
2241         (WebInspector.NetworkBaseCalculator.prototype.zeroTime):
2242         * inspector/front-end/TimelineGrid.js:
2243         (WebInspector.TimelineGrid.prototype.updateDividers):
2244         (WebInspector.TimelineGrid.Calculator.prototype.zeroTime):
2245         * inspector/front-end/TimelineOverviewPane.js:
2246         (WebInspector.TimelineOverviewCalculator.prototype.zeroTime):
2247         * inspector/front-end/TimelinePanel.js:
2248         (WebInspector.TimelineCalculator.prototype.zeroTime):
2249
2250 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
2251
2252         Web Inspector: Timeline. Scroll dividers with the underlying events.
2253         https://bugs.webkit.org/show_bug.cgi?id=113315
2254
2255         Reviewed by Pavel Feldman.
2256
2257         Now when TimelineGrid is able to draw dividers with any offset
2258         we could cut away paddingLeft member of Timeline.Calculator
2259         and clear the code of TimelineGrid.
2260
2261         * inspector/front-end/TimelineGrid.js:
2262         (WebInspector.TimelineGrid.prototype.updateDividers):
2263         * inspector/front-end/TimelinePanel.js:
2264         (WebInspector.TimelinePanel.prototype._refresh):
2265         (WebInspector.TimelineCalculator.prototype.computePosition):
2266         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
2267         (WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
2268         * inspector/front-end/inspectorCommon.css:
2269         (.resources-dividers-label-bar):
2270
2271 2013-03-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2272
2273         [CoordGfx] Support to share GraphicsSurface flags with client.
2274         https://bugs.webkit.org/show_bug.cgi?id=112982
2275
2276         Reviewed by Noam Rosenthal.
2277
2278         Covered by existing WebGL tests.
2279
2280         This patch adds support to pass GraphicsSurface flags during it's client creation.
2281         This would be helpful to determine cases when blending can be disabled on client
2282         side i.e When AlphaSupport is disabled during Graphics Surface creation.
2283         With GLX, we rely on Window to provide us with necessary information on client side.
2284         This might not be the case on other platforms or when not using Window on X.
2285         This patch doesn't change original behaviour of creating GraphicsSurface client
2286         with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing.
2287
2288         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
2289         (WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags):
2290         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2291         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
2292         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2293         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
2294         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2295         (CoordinatedGraphicsLayerState):
2296         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2297         (WebCore):
2298         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
2299         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2300         (GraphicsContext3DPrivate):
2301         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
2302         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2303         (WebCore::GraphicsSurfacePrivate::initializeClient):
2304
2305 2013-03-26  Takashi Sakamoto  <tasak@google.com>
2306
2307         [shadow] styleForText should consider the case where parent node has no style
2308         https://bugs.webkit.org/show_bug.cgi?id=113275
2309
2310         If a text node is distributed, its parent node for rendering and
2311         styling might have no style. In the case, styleForText should return
2312         default style.
2313
2314         Reviewed by Hajime Morrita.
2315
2316         Test: fast/dom/shadow/text-node-distributed-crash.html
2317
2318         * css/StyleResolver.cpp:
2319         (WebCore::StyleResolver::styleForText):
2320         Check whether a parent node has any style or not. If not, return
2321         default style. This is the same behavior as styleForElement.
2322
2323 2013-03-26  Takeshi Yoshino  <tyoshino@chromium.org>
2324
2325         Make SocketStreamHandle (Chromium port) fully use IPC window in send()
2326         https://bugs.webkit.org/show_bug.cgi?id=113304
2327
2328         Reviewed by Kent Tamura.
2329
2330         socket_stream of Chromium buffers send data up to 32KiB (exact) bytes.
2331
2332         However, SocketStreamHandleInternal::send() method now keeps in-flight
2333         send data not greater than m_maxPendingSendAllowed - 1 that is
2334         32KiB - 1. This means that SocketStreamHandleInternal consumes the
2335         buffered data in SocketStreamHandleBase by 32KiB - 1. It makes memory
2336         copy operations unaligned unnecessarily. It should just use the
2337         allowed size fully.
2338
2339         * platform/network/chromium/SocketStreamHandle.cpp:
2340         (WebCore::SocketStreamHandleInternal::send):
2341         (WebCore):
2342
2343 2013-03-26  Hayato Ito  <hayato@chromium.org>
2344
2345         Allow ShadowContents in HitTests by default.
2346         https://bugs.webkit.org/show_bug.cgi?id=113171
2347
2348         Reviewed by Dimitri Glazkov.
2349
2350         HitTestRequest is widely used in WebCore, but AllowShadowContents
2351         flag is not turned on by default.  In most places, we can set the
2352         flag on.
2353
2354         This change makes HitTests allow shadow contents by default.
2355
2356         To track all existing HitTests which do not allow shadow contents,
2357         and discourage such a HitTest in the future, I've introduced
2358         disallowShadowContenet flag so that callers must turn on this flag
2359         explicitly if they want to disallow shadow contents in their HitTests.
2360
2361         This change should be refactoring and should not include any
2362         behavior changes.  After this change, we'll investigate each place
2363         where disallowShadowContents is used step by step and get rid of
2364         the flag if it is okay to remove.
2365
2366         No new tests, no behavior change.
2367
2368         * dom/Document.h:
2369         (Document):
2370         * dom/TreeScope.cpp:
2371         (WebCore::nodeFromPoint):
2372         * editing/FrameSelection.cpp:
2373         (WebCore::FrameSelection::contains):
2374         * page/DragController.cpp:
2375         (WebCore::elementUnderMouse):
2376         (WebCore::DragController::canProcessDrag):
2377         (WebCore::DragController::startDrag):
2378         * page/EventHandler.cpp:
2379         (WebCore::EventHandler::handleMouseDraggedEvent):
2380         (WebCore::EventHandler::eventMayStartDrag):
2381         (WebCore::EventHandler::updateSelectionForMouseDrag):
2382         (WebCore::EventHandler::hitTestResultAtPoint):
2383         (WebCore::EventHandler::handleMousePressEvent):
2384         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2385         (WebCore::EventHandler::handleMouseMoveEvent):
2386         (WebCore::EventHandler::handleMouseReleaseEvent):
2387         (WebCore::EventHandler::updateDragAndDrop):
2388         (WebCore::EventHandler::isInsideScrollbar):
2389         (WebCore::EventHandler::handleWheelEvent):
2390         (WebCore::EventHandler::handleGestureEvent):
2391         (WebCore::EventHandler::handleGestureLongPress):
2392         (WebCore::EventHandler::handleGestureScrollBegin):
2393         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
2394         (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
2395         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
2396         (WebCore::EventHandler::sendContextMenuEvent):
2397         (WebCore::EventHandler::sendContextMenuEventForKey):
2398         (WebCore::EventHandler::hoverTimerFired):
2399         (WebCore::EventHandler::dragSourceEndedAt):
2400         (WebCore::EventHandler::handleDrag):
2401         (WebCore::EventHandler::handleTouchEvent):
2402         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
2403         * page/EventHandler.h:
2404         (EventHandler):
2405         * page/FocusController.cpp:
2406         (WebCore::updateFocusCandidateIfNeeded):
2407         * page/Frame.cpp:
2408         (WebCore::Frame::visiblePositionForPoint):
2409         * page/TouchDisambiguation.cpp:
2410         (WebCore::findGoodTouchTargets):
2411         * rendering/HitTestRequest.h:
2412         (WebCore::HitTestRequest::disallowsShadowContent):
2413         * rendering/HitTestResult.cpp:
2414         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2415         * rendering/RenderFlowThread.cpp:
2416         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
2417         * rendering/svg/RenderSVGResourceClipper.cpp:
2418         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2419         * testing/Internals.cpp:
2420         (WebCore::Internals::nodesFromRect):
2421
2422 2013-03-26  Tim Horton  <timothy_horton@apple.com>
2423
2424         [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
2425         https://bugs.webkit.org/show_bug.cgi?id=107539
2426         <rdar://problem/13032692>
2427
2428         Reviewed by Simon Fraser.
2429
2430         Update WebCoreSystemInterface.
2431
2432         * platform/mac/WebCoreSystemInterface.h:
2433         * platform/mac/WebCoreSystemInterface.mm:
2434
2435 2013-03-26  Antti Koivisto  <antti@apple.com>
2436
2437         Test if non-immediate descendants obscure background
2438         https://bugs.webkit.org/show_bug.cgi?id=113137
2439
2440         Reviewed by Simon Fraser.
2441
2442         The current obscuration test only covers immediate children. We can find more cases by looking deeper into descendants.
2443         
2444         The patch makes the test sufficiently smart to stop a heavy fully obscured gif animation on micrsoft.com.
2445
2446         * loader/cache/CachedImage.cpp:
2447         (WebCore::CachedImage::animationAdvanced):
2448         * rendering/RenderBox.cpp:
2449         (WebCore::RenderBox::styleDidChange):
2450         
2451             Invalidate parents to max test depth.
2452
2453         (WebCore::RenderBox::backgroundPaintedExtent):
2454         
2455             Background painting is pixel snapped.
2456
2457         (WebCore::isCandidateForOpaquenessTest):
2458         (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect):
2459         
2460             Separate foreground testing and make it recursive.
2461             Add fast bailout for common static positioned case.
2462             Remove maximum child count, the fast bailouts should prevent long tests.
2463             Add maximum depth so we know how deep we need to invalidate in styleDidChange.
2464
2465         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
2466         (WebCore):
2467         * rendering/RenderBox.h:
2468         (RenderBox):
2469         * rendering/RenderImage.cpp:
2470         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
2471         (WebCore):
2472         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):
2473         
2474         * rendering/RenderImage.h:
2475         (RenderImage):
2476
2477 2013-03-26  Benjamin Poulain  <bpoulain@apple.com>
2478
2479         Regression (r145601): out-of-bounds read in line breaking / new width cache
2480         https://bugs.webkit.org/show_bug.cgi?id=113347
2481
2482         Reviewed by Geoffrey Garen.
2483
2484         The values zero and 0xffff have special values with the default HashTraits. Those values
2485         are also valid values for UChar.
2486
2487         To avoid any table inconsitency, switch from UChar to uint32_t as the key type for
2488         the WidthCache's single char map. The traits is also changed to allow zero as a normal
2489         value.
2490
2491         This makes no space or time change over the previous code because:
2492         -The struct KeyValuePair was already 64bits due to the ABI alignment restrictions on floats.
2493         -The two hashes take the same number of instructions.
2494
2495         * platform/graphics/WidthCache.h:
2496         (WidthCache):
2497
2498 2013-03-26  Kent Tamura  <tkent@chromium.org>
2499
2500         Make HTMLProgressElement::isDeterminate private
2501         https://bugs.webkit.org/show_bug.cgi?id=113299
2502
2503         Reviewed by Kentaro Hara.
2504
2505         The only callsite of isDeterminate outside of HTMLProgressElement
2506         is in StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes,
2507         and we can replace it with Element::shouldAppearIndeterminate.
2508
2509         No new tests. Just a refactoring.
2510
2511         * css/StyleResolver.cpp:
2512         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2513         Use Element::shouldAppearIndeterminate.
2514         * html/HTMLProgressElement.h:
2515         (HTMLProgressElement): Make isDeterminate private.
2516
2517 2013-03-26  David Grogan  <dgrogan@chromium.org>
2518
2519         IndexedDB: Histogram cause of LevelDB write errors
2520         https://bugs.webkit.org/show_bug.cgi?id=113350
2521
2522         Reviewed by Tony Chang.
2523
2524         Add histogram for source of LevelDB errors on Write in addition to
2525         Open.
2526
2527         No new tests - no good way to test histogram code.
2528
2529         * platform/leveldb/LevelDBDatabase.cpp:
2530         (WebCore::histogramLevelDBError):
2531         (WebCore):
2532         (WebCore::LevelDBDatabase::open):
2533         (WebCore::LevelDBDatabase::write):
2534
2535 2013-03-26  Chris Fleizach  <cfleizach@apple.com>
2536
2537         WebKit does not expose @required or @aria-required as AXRequired on select elements
2538         https://bugs.webkit.org/show_bug.cgi?id=113339
2539
2540         Reviewed by Tim Horton.
2541
2542         Make sure button types can return the AXRequired attribute.
2543
2544         Tests: platform/mac/accessibility/aria-required-popup-button.html
2545
2546         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2547         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2548
2549 2013-03-26  Dean Jackson  <dino@apple.com>
2550
2551         When a primary plugin is restarted, also start similar plugins
2552         https://bugs.webkit.org/show_bug.cgi?id=113265
2553
2554         Reviewed by Tim Horton.
2555
2556         If we detect a primary plugin that is snapshotted, we immediately restart it.
2557         When this happens, we should also restart any other plugins that
2558         match the same origin and type. This allows sites with a lot of
2559         (geometrically) nearby plugins to behave as if they are a single big plugin.
2560
2561         Tests: plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html
2562                plugins/snapshotting/autoplay-similar-to-dominant.html
2563
2564         * WebCore.exp.in: Export mimeTypeFromURL.
2565         * html/HTMLPlugInImageElement.cpp:
2566         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Use loadedMimeType helper.
2567         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): New method, which copied the
2568             existing code from userDidClickSnapshot.
2569         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Move the similar plugin detection
2570             out into another function and call it.
2571         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Call restartSimilarPlugIns.
2572         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use loadedMimeType helper.
2573         * html/HTMLPlugInImageElement.h: Declaration of restartSimilarPlugIns.
2574         (WebCore::HTMLPlugInImageElement::loadedMimeType): New helper method since this
2575             code was being often duplicated.
2576
2577 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
2578
2579         [Windows, WinCairo] Scroll offset being applied to plugins during print operations.
2580         https://bugs.webkit.org/show_bug.cgi?id=39889
2581
2582         Reviewed by Anders Carlsson.
2583
2584         This must be tested manually. See the issue for details.
2585
2586         * plugins/win/PluginViewWin.cpp:
2587         (WebCore::PluginView::paintWindowedPluginIntoContext):
2588         Revise the Windows implementation of the PluginView class
2589         paintWindowedPluginIntoContext to use the containing window
2590         position when computing the plugin's position for printing.
2591
2592 2013-03-26  Xianzhu Wang  <wangxianzhu@chromium.org>
2593
2594         Non-paintsContent fixed position layer should not cause slow scrolling
2595         https://bugs.webkit.org/show_bug.cgi?id=113238
2596
2597         Reviewed by James Robinson.
2598
2599         Added NotCompositedForNoVisibleContent in ViewportConstrainedNotCompositedReason and set it in RLC.
2600
2601         Test: compositing/layer-creation/fixed-position-no-content-scroll-reason.html
2602
2603         * rendering/RenderLayer.h: Add NotCompositedForNoVisibleContent.
2604         * rendering/RenderLayerCompositor.cpp:
2605         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Set NotCompositedForNoVisibleContent reason when the fixed position layer has no visible content.
2606
2607 2013-03-26  Zoltan Horvath  <zoltan@webkit.org>
2608
2609         [CSS Exclusions] The radius of a circle should be computed based on the shorter available dimension
2610         https://bugs.webkit.org/show_bug.cgi?id=113255
2611
2612         Reviewed by Julien Chaffraix.
2613
2614         When we decide what should be the radius of a circle, we should choose the smallest available space. For instance when the
2615         width or height is not resolvable for the circle we should not have a radius for it. This change modifies the behavior to
2616         use the smaller available space, so we won't render unnecessary circle shapes.
2617
2618         Test: fast/exclusions/shape-inside/shape-inside-on-nested-container-with-unresolved-height.html
2619
2620         * rendering/ExclusionShape.cpp:
2621         (WebCore::ExclusionShape::createExclusionShape):
2622
2623 2013-03-26  Timothy Hatcher  <timothy@apple.com>
2624
2625         Make the Web Inspector console work in strict mode with JavaScriptCore.
2626
2627         https://webkit.org/b/65829
2628         rdar://problem/11271238
2629
2630         Reviewed by Joseph Pecoraro.
2631
2632         * inspector/InjectedScriptSource.js:
2633         (InjectedScript.prototype._evaluateOn): Don't use 'eval' parameter (it isn't
2634         allowed in strict mode). Swap window.eval with our known eval instead.
2635
2636 2013-03-26  Ryosuke Niwa  <rniwa@webkit.org>
2637
2638         Heap-use-after-free regression
2639         https://bugs.webkit.org/show_bug.cgi?id=113337
2640
2641         Reviewed by Abhishek Arya and Alexey Proskuryakov.
2642
2643         Use RefPtr instead of raw pointer in m_associatedFormControls.
2644
2645         * dom/Document.cpp:
2646         (WebCore::Document::didAssociateFormControlsTimerFired):
2647         * dom/Document.h:
2648         (Document):
2649         * loader/EmptyClients.h:
2650         (WebCore::EmptyChromeClient::didAssociateFormControls):
2651         * page/ChromeClient.h:
2652         (WebCore::ChromeClient::didAssociateFormControls):
2653
2654 2013-03-26  Alexey Proskuryakov  <ap@apple.com>
2655
2656         <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
2657         https://bugs.webkit.org/show_bug.cgi?id=113256
2658
2659         Reviewed by Brady Eidson.
2660
2661         Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
2662         blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
2663         version to forward calls to main thread.
2664
2665         * WebCore.exp.in: Export new methods.
2666         * WebCore.xcodeproj/project.pbxproj: Added WebCoreResourceHandleAsOperationQueueDelegate.
2667
2668         * platform/network/CredentialStorage.cpp: Assert that unprotected global map operations
2669         happen on main thread.
2670
2671         * platform/network/ResourceHandle.cpp: Added default implementations of functions
2672         that handle async responses.
2673
2674         * platform/network/chromium/ResourceHandle.cpp: Ditto.
2675
2676         * platform/network/ResourceHandle.h: Added functions that are called in response
2677         to new async functions in ResourceHandleClient. Changed Mac delegate type to id,
2678         ast can now be either WebCoreResourceHandleAsDelegate or WebCoreResourceHandleAsOperationQueueDelegate.
2679
2680         * platform/network/ResourceHandleClient.cpp:
2681         (WebCore::ResourceHandleClient::willSendRequestAsync):
2682         (WebCore::ResourceHandleClient::shouldUseCredentialStorageAsync):
2683         (WebCore::ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync):
2684         (WebCore::ResourceHandleClient::willCacheResponseAsync):
2685         Default implementations of async client functions. These match default behavior of
2686         sync versions.
2687
2688         * platform/network/ResourceHandleClient.h: Added async functions. A ResourceHandle
2689         should use these when the client returns true from usesAsyncCallbacks().
2690
2691         * platform/network/ResourceHandleInternal.h: Changed to use id for delegate type
2692         here, too.
2693
2694         * platform/network/mac/ResourceHandleMac.mm:
2695         (WebCore::ResourceHandle::delegate): Create an appropriate delegate for the client.
2696         (WebCore::ResourceHandle::willSendRequest): Since this function has a lot of common
2697         behavior in sync and async cases, implement the new code path as a branch inside
2698         it, not as a new function.
2699         (WebCore::ResourceHandle::continueWillSendRequest): Unblock the connection when
2700         response is known.
2701         (WebCore::ResourceHandle::shouldUseCredentialStorage): Branched here too, for consistency.
2702         Perhaps we'll want to break this into separate functions though.
2703         (WebCore::ResourceHandle::continueShouldUseCredentialStorage): Unblock the connection.
2704         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): Same change as above.
2705         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): Ditto.
2706         (WebCore::ResourceHandle::continueWillCacheResponse): Ditto. Currently, delegate
2707         calls the client directly, so we only have a "continue" function, and no "willCacheResponse".
2708
2709         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2710         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Removed some
2711         nonsense code.
2712
2713         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: Copied from Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h.
2714         This delegate is responsible for forwarding calls to main thread. Unfortunately,
2715         this adds some code duplication, which I tried to rectify somewhat in previous patches
2716         by moving more logic to ResourceHandle.
2717
2718         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: Copied from Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm.
2719         (-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]): Unblock waiting
2720         threads if we don't expect a response any more.
2721         (-[WebCoreResourceHandleAsOperationQueueDelegate dealloc]): Release the semaphore.
2722         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillSendRequest:]): Unblock
2723         a waiting thread with a response.
2724         (-[WebCoreResourceHandleAsOperationQueueDelegate continueShouldUseCredentialStorage:]): Ditto.
2725         (-[WebCoreResourceHandleAsOperationQueueDelegate continueCanAuthenticateAgainstProtectionSpace:]): Ditto.
2726         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillCacheResponse:]): Ditto.
2727         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
2728         Run code that uses WebCore objects on main thread.
2729         (-[WebCoreResourceHandleAsOperationQueueDelegate connectionShouldUseCredentialStorage:]): Ditto.
2730         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]): Ditto.
2731         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didCancelAuthenticationChallenge:]): Ditto.
2732         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): Ditto.
2733         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): Ditto.
2734         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]): Ditto.
2735         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): Ditto.
2736         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willStopBufferingData:]): Ditto.
2737         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]): Ditto.
2738         (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): Ditto.
2739         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didFailWithError:]): Ditto.
2740         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): Ditto.
2741
2742 2013-03-26  Tony Chang  <tony@chromium.org>
2743
2744         Autogenerate the scrollAnimatorEnabled setting in Settings.in
2745         https://bugs.webkit.org/show_bug.cgi?id=113253
2746
2747         Reviewed by James Robinson.
2748
2749         Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
2750         the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
2751         updating the callers. I didn't change any WebKit API methods.
2752
2753         Also remove the code in InternalSettings since it's never used and will now be
2754         autogenerated with proper resetting code.
2755
2756         No new tests, this is a refactor and should compile.
2757
2758         * page/Settings.cpp:
2759         (WebCore::Settings::Settings): Remove code that is now autogenerated.
2760         * page/Settings.h:
2761         (Settings): Remove code that is now autogenerated.
2762         * page/Settings.in: Add entry for scrollAnimatorEnabled.
2763         * testing/InternalSettings.cpp: Remove unused code.
2764         * testing/InternalSettings.h: Remove unused code.
2765         * testing/InternalSettings.idl: Remove unused code.
2766
2767 2013-03-26  Joe Mason  <jmason@blackberry.com>
2768
2769         [BlackBerry] In RSSFilterStream, don't swallow headers when there's no body
2770         https://bugs.webkit.org/show_bug.cgi?id=113334
2771
2772         Reviewed by Rob Buis.
2773
2774         RIM PR 316345
2775
2776         When receiving an HTTP response that has a Content-Type header such as text/xml, but no
2777         body, RSSFilterStream::notifyHeadersReceived reads the Content-Type as "potential RSS", and
2778         calls saveHeaders. It expects to sniff the body in notifyDataReceived to see if it's RSS,
2779         and then call sendSavedHeaders to pass on the headers. But since there is no body,
2780         notifyDataReceived is never called. So call sendSavedHeaders in notifyClose too (it will not
2781         send them again if they were already sent.)
2782
2783         * platform/network/blackberry/rss/RSSFilterStream.cpp:
2784         (WebCore::RSSFilterStream::notifyClose):
2785
2786 2013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
2787
2788         Web Inspector: Faster drawer animation.
2789         https://bugs.webkit.org/show_bug.cgi?id=113330
2790
2791         250ms -> 100ms
2792
2793         Reviewed by Pavel Feldman.
2794
2795         * inspector/front-end/inspector.css:
2796         (.animate #main):
2797         (.animate #floating-status-bar-container):
2798         (.animate #drawer):
2799         (.animate #bottom-status-bar-container > *):
2800
2801 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
2802
2803         [WinCairo] Unreviewed Build fix.
2804
2805         * platform/graphics/win/FontCustomPlatformDataCairo.h:
2806         (FontCustomPlatformData): Correct signature in header to match
2807         required implementation.
2808
2809 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
2810
2811         [BlackBerry] Scrolling up and down can cause the screen to flash black
2812         https://bugs.webkit.org/show_bug.cgi?id=113269
2813
2814         Reviewed by Rob Buis.
2815
2816         PR 296106
2817
2818         The LayerRenderer should never clear before drawing the layers, from
2819         now on that's the responsibility of the caller.
2820
2821         Only manually testable.
2822
2823         * platform/graphics/blackberry/LayerRenderer.cpp:
2824         (WebCore::LayerRenderer::setViewport):
2825         * platform/graphics/blackberry/LayerRendererClient.h:
2826         (LayerRendererClient):
2827
2828 2013-03-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2829
2830         [Qt] editing/pasteboard/can-read-in-dragstart-event.html and /can-read-in-copy-and-cut-events.html are crashing
2831         https://bugs.webkit.org/show_bug.cgi?id=113126
2832
2833         Reviewed by Jocelyn Turcotte.
2834
2835         Make it possible to read from a writable Clipboard.
2836
2837         Test: editing/pasteboard/can-read-in-copy-and-cut-events.html
2838
2839         * platform/qt/ClipboardQt.cpp:
2840         (WebCore::ClipboardQt::getData):
2841         (WebCore::ClipboardQt::types):
2842         (WebCore::ClipboardQt::files):
2843         (WebCore::ClipboardQt::readClipboardData):
2844         (WebCore::ClipboardQt::hasData):
2845         (WebCore::ClipboardQt::items):
2846         * platform/qt/ClipboardQt.h:
2847         (ClipboardQt):
2848
2849 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
2850
2851         [WinCairo] Unreviewed build correction.
2852
2853         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2854         (WebCore::FontCustomPlatformData::fontPlatformData): Update
2855         method signature to match CG variant.
2856
2857 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2858
2859         Code duplication between HTTPParsers and HTTPValidation
2860         https://bugs.webkit.org/show_bug.cgi?id=113283
2861
2862         Reviewed by Alexey Proskuryakov.
2863
2864         Merged isValidHTTPToken() from HTTPValidation.h and isRFC2616Token() from
2865         HTTPParsers.h. They were doing exactly the same thing and their
2866         implementation was almost the same.
2867
2868         Removed HTTPValidation.* and moved remaining code to HTTPParsers.* as this
2869         seems like the proper place and it seems odd to keep HTTPValidation for
2870         just one function.
2871
2872         No new tests, no behavior change for layout tests.
2873
2874         * CMakeLists.txt:
2875         * GNUmakefile.list.am:
2876         * Target.pri:
2877         * WebCore.gypi:
2878         * WebCore.vcproj/WebCore.vcproj:
2879         * WebCore.vcxproj/WebCore.vcxproj:
2880         * WebCore.vcxproj/WebCore.vcxproj.filters:
2881         * WebCore.xcodeproj/project.pbxproj:
2882         * platform/network/HTTPParsers.cpp:
2883         (WebCore::isValidHTTPHeaderValue):
2884         (WebCore):
2885         (WebCore::isValidHTTPToken): Implementation is slightly simplified based on
2886         isValidHTTPToken() from HTTPValidation.cpp. (c >= 0x80 || c == 0x7F) is
2887         replaced by (c >= 0x7F). (c <= 0x1F ||  c == ' ' || c == '\t') is replaced
2888         by (c <= 0x20). Those expressions are shorter but equivalent.
2889         (WebCore::contentDispositionType):
2890         * platform/network/HTTPParsers.h:
2891         * platform/network/HTTPValidation.cpp: Removed.
2892         * platform/network/HTTPValidation.h: Removed.
2893         * xml/XMLHttpRequest.cpp: Stop including HTTPValidation.h.
2894
2895 2013-03-26  Sergio Villar Senin  <svillar@igalia.com>
2896
2897         Implement overtype mode for editable content
2898         https://bugs.webkit.org/show_bug.cgi?id=112126
2899
2900         Reviewed by Ryosuke Niwa.
2901
2902         Tests: editing/execCommand/overtype-support.html
2903                editing/execCommand/overtype.html
2904
2905         Add a new Overwrite command to the editor. This command will
2906         perform overtype operations when enabled instead of "normal" text
2907         insertions. As IE does, we maintain a single toggle state in the
2908         editor (enabled/disabled) for all the editable content in the
2909         page.
2910
2911         This new command will be only available for richly editable
2912         content via keybindings or the context menu. For testing purposes
2913         it is also accessible via internals.
2914
2915         * editing/CompositeEditCommand.cpp:
2916         (WebCore::CompositeEditCommand::replaceTextInNode): Use RefPtr for
2917         local variables.
2918         * editing/Editor.cpp:
2919         (WebCore::Editor::Editor):
2920         * editing/Editor.h:
2921         (WebCore::Editor::isOverwriteModeEnabled):
2922         (WebCore::Editor::toggleOverwriteModeEnabled):
2923         (Editor): Added two new functions and a new attribute.
2924         * editing/EditorCommand.cpp:
2925         (WebCore::executeToggleOverwrite): Enables/disables overwrite mode.
2926         (WebCore):
2927         (WebCore::createCommandMap): New OverWrite command.
2928         * editing/InsertTextCommand.cpp:
2929         (WebCore::InsertTextCommand::setEndingSelectionWithoutValidation):
2930         Refactored from performTrivialReplace(), shared by
2931         performOverwrite().
2932         (WebCore):
2933         (WebCore::InsertTextCommand::performTrivialReplace):
2934         (WebCore::InsertTextCommand::performOverwrite):
2935         (WebCore::InsertTextCommand::doApply): Perform overwrite if enabled.
2936         * editing/InsertTextCommand.h:
2937         (InsertTextCommand):
2938         * testing/Internals.cpp:
2939         (WebCore::Internals::resetToConsistentState): Reset OverWrite mode
2940         to false.
2941         (WebCore::Internals::isOverwriteModeEnabled):
2942         (WebCore):
2943         (WebCore::Internals::toggleOverwriteModeEnabled): Provide access
2944         to overwrite functionality in Editor for testing purposes.
2945         * testing/Internals.h:
2946         (Internals):
2947         * testing/Internals.idl:
2948
2949 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
2950
2951         [BlackBerry] WebOverlay::pixelViewportRect() should return pixel viewport coordinates
2952         https://bugs.webkit.org/show_bug.cgi?id=113263
2953
2954         Reviewed by Rob Buis.
2955
2956         PR 312404
2957
2958         Fix WebOverlay::pixelViewportRect() to return the pixel viewport rect
2959         instead of the window rect. These are different if the web page is
2960         rendered starting at a window coordinate other than 0,0. The clip rect
2961         encodes the position we're rendered at, and can be used to translate
2962         the rect expressed in window coordinates to the pixel viewport
2963         coordinate system.
2964
2965         Also perform some cleanup of related code.
2966
2967         Only manually testable.
2968
2969         * platform/graphics/blackberry/LayerCompositingThread.cpp:
2970         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
2971         (WebCore::LayerCompositingThread::drawTextures):
2972         * platform/graphics/blackberry/LayerRenderer.cpp:
2973         (WebCore::toPixelCoordinates):
2974         (WebCore):
2975         (WebCore::LayerRenderer::toWindowCoordinates):
2976         (WebCore::LayerRenderer::toPixelViewportCoordinates):
2977         (WebCore::LayerRenderer::toDocumentViewportCoordinates):
2978         (WebCore::LayerRenderer::updateLayersRecursive):
2979         * platform/graphics/blackberry/LayerRenderer.h:
2980         (LayerRenderer):
2981
2982 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2983
2984         Unreviewed, rolling out r146901.
2985         http://trac.webkit.org/changeset/146901
2986         https://bugs.webkit.org/show_bug.cgi?id=113321
2987
2988         Was landed to soon (Requested by pfeldman on #webkit).
2989
2990         * inspector/front-end/ConsoleView.js:
2991         (WebInspector.ConsoleView.prototype.):
2992         (WebInspector.ConsoleView.prototype.filter):
2993         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
2994         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
2995         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
2996         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
2997         (WebInspector.ConsoleView.prototype._consoleCleared):
2998         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction):
2999         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.get preserveLogItemAction):
3000         (WebInspector.ConsoleView.prototype._shouldBeVisible):
3001         (WebInspector.ConsoleView.prototype._updateMessageList):
3002         (WebInspector.ConsoleView.prototype._promptKeyDown):
3003         (WebInspector.ConsoleView.prototype._printResult):
3004         (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
3005         * inspector/front-end/inspector.css:
3006         (.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
3007         (.filter-all .console-debug-level, .filter-debug .console-debug-level):
3008         (.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
3009
3010 2013-03-26  Rafael Weinstein  <rafaelw@chromium.org>
3011
3012         HTMLStackItem should include <template> as a special tag
3013         https://bugs.webkit.org/show_bug.cgi?id=113016
3014
3015         Reviewed by Eric Seidel.
3016
3017         New test added to html5lib suite.
3018
3019         * html/parser/HTMLStackItem.h:
3020         (WebCore::HTMLStackItem::isSpecialNode):
3021
3022 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
3023
3024         Web Inspector: Distinguish breakpoints and breakpoint locations in BreakpointManager API
3025         https://bugs.webkit.org/show_bug.cgi?id=113311
3026
3027         Reviewed by Pavel Feldman.
3028
3029         Made independent handling of breakpoints and breakpoint location in breakpoint manager consistent.
3030         JavaScriptSourceFrame now removes breakpoints originally set in it based on primary UI location.
3031
3032         * inspector/front-end/BreakpointManager.js:
3033         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
3034         (WebInspector.BreakpointManager.prototype.allBreakpoints):
3035         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
3036         (WebInspector.BreakpointManager.prototype.allBreakpointLocations):
3037         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
3038         (WebInspector.BreakpointManager.prototype._projectWillReset):
3039         * inspector/front-end/JavaScriptSourceFrame.js:
3040         (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
3041         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
3042         (WebInspector.JavaScriptSourceFrame.prototype._removeAllBreakpoints):
3043
3044 2013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
3045
3046         Web Inspector: Remove remainings of CSS-based console message filtering.
3047         https://bugs.webkit.org/show_bug.cgi?id=112710
3048
3049         Reviewed by Pavel Feldman.
3050
3051         * inspector/front-end/ConsoleView.js:
3052         (WebInspector.ConsoleView.get this):
3053         (WebInspector.ConsoleView.prototype.):
3054         (WebInspector.ConsoleView.prototype.filter):
3055         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
3056         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
3057         (WebInspector.ConsoleView.prototype._consoleCleared):
3058         (WebInspector.ConsoleView.prototype._shouldBeVisible):
3059         (WebInspector.ConsoleView.prototype._updateMessageList):
3060         (WebInspector.ConsoleView.prototype._promptKeyDown):
3061         (WebInspector.ConsoleView.prototype._printResult):
3062         (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
3063         * inspector/front-end/inspector.css:
3064         (.console-debug-level.repeated-message):
3065
3066 2013-03-26  Peter Rybin  <prybin@chromium.org>
3067
3068         Web Inspector: refactor code duplication: WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements
3069         https://bugs.webkit.org/show_bug.cgi?id=113211
3070
3071         Reviewed by Yury Semikhatsky.
3072
3073         A new method WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements is added and used
3074         from 2 sites.
3075
3076         * inspector/front-end/ObjectPropertiesSection.js:
3077         (WebInspector.ObjectPropertiesSection.prototype.update.callback):
3078         (WebInspector.ObjectPropertiesSection.prototype.update):
3079         (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
3080         (.callback):
3081         (WebInspector.ObjectPropertyTreeElement.populate):
3082         (WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements):
3083         * inspector/front-end/WatchExpressionsSidebarPane.js:
3084         (WebInspector.WatchExpressionsSection.prototype.update.appendResult):
3085         (WebInspector.WatchExpressionsSection.prototype.update):
3086
3087 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3088
3089         HTTPHeaderMap::copyData() could call uncheckedAppend()
3090         https://bugs.webkit.org/show_bug.cgi?id=113279
3091
3092         Reviewed by Alexey Proskuryakov.
3093
3094         HTTPHeaderMap::copyData() calls reserveInitialCapacity() on the Vector
3095         but then appends items using append() function. Since we already know
3096         the capacity is sufficient, it is more efficient to call uncheckedAppend()
3097         instead to bypass capacity checks.
3098
3099         No new tests, no behavior change for layout tests.
3100
3101         * platform/network/HTTPHeaderMap.cpp:
3102         (WebCore::HTTPHeaderMap::copyData):
3103
3104 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
3105
3106         Web Inspector: UISourceCodes are leaking on reload sometimes.
3107         https://bugs.webkit.org/show_bug.cgi?id=113310
3108
3109         Reviewed by Pavel Feldman.
3110
3111         * inspector/front-end/BreakpointManager.js:
3112         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
3113         (WebInspector.BreakpointManager.prototype._projectWillReset):
3114         * inspector/front-end/ConsoleModel.js:
3115         (WebInspector.ConsoleModel.prototype.clearMessages):
3116
3117 2013-03-26  Alexander Pavlov  <apavlov@chromium.org>
3118
3119         Web Inspector: [Elements] Unable to "Edit as HTML" XHTML/SVG documents.
3120         https://bugs.webkit.org/show_bug.cgi?id=113290
3121
3122         Reviewed by Pavel Feldman.
3123
3124         DOMPatchSupport has been slightly augmented to handle XML (XHTML and SVG) documents.
3125
3126         Test: inspector/elements/set-outer-html-for-xhtml.xhtml
3127
3128         * inspector/DOMPatchSupport.cpp:
3129         (WebCore::DOMPatchSupport::patchDocument):
3130         (WebCore::DOMPatchSupport::patchNode):
3131         * inspector/InspectorDOMAgent.cpp:
3132         (WebCore::InspectorDOMAgent::setOuterHTML): Let HTML, XHTML, and SVG documents through.
3133
3134 2013-03-26  Hajime Morrita  <morrita@google.com>
3135
3136         https://bugs.webkit.org/show_bug.cgi?id=113164
3137         Custom Elements: readyCallback should be called for outerHTML and insertAdjecentHTML
3138
3139         These APIs also create new elements thus should have V8DeliverCustomElementCallbacks attribute.
3140
3141         Reviewed by Dimitri Glazkov.
3142
3143         Test: Updated lifecycle-ready-creation-api.html.
3144
3145         * html/HTMLElement.idl:
3146
3147 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
3148
3149         Unreviewed. WebInspector: remove unnecessary method.
3150
3151         * inspector/front-end/OverviewGrid.js:
3152         (WebInspector.OverviewGrid.Window):
3153
3154 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
3155
3156         Web Inspector: Flame Chart. Scroll dividers together with underlying chart.
3157         http://bugs.webkit.org/show_bug.cgi?id=113080
3158
3159         Reviewed by Pavel Feldman.
3160
3161         * inspector/front-end/FlameChart.js:
3162         (WebInspector.FlameChart.Calculator.prototype.grandMinimumBoundary):
3163         (WebInspector.FlameChart.prototype._canvasDragging):
3164         * inspector/front-end/TimelineGrid.js:
3165         (WebInspector.TimelineGrid.prototype.updateDividers):
3166
3167 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
3168
3169         Web Inspector: Flame Chart. Scroll dividers together with underlying chart.
3170         http://bugs.webkit.org/show_bug.cgi?id=113080
3171
3172         Reviewed by Pavel Feldman.
3173
3174         The only thing we need to do for this feature is to automatically adjust
3175         the initial offset for the dividers. I measured the speed of scrolling and found
3176         no difference. The speed is about 16ms so we have 60fps on dragging.
3177
3178         * inspector/front-end/FlameChart.js:
3179         (WebInspector.FlameChart.Calculator.prototype.grandMinimumBoundary):
3180         (WebInspector.FlameChart.OverviewCalculator.prototype.grandMinimumBoundary):
3181         (WebInspector.FlameChart.prototype._canvasDragging):
3182         * inspector/front-end/NetworkPanel.js:
3183         (WebInspector.NetworkBaseCalculator.prototype.grandMinimumBoundary):
3184         * inspector/front-end/TimelineGrid.js:
3185         (WebInspector.TimelineGrid.prototype.updateDividers):
3186         (WebInspector.TimelineGrid.Calculator.prototype.grandMinimumBoundary):
3187         * inspector/front-end/TimelineOverviewPane.js:
3188         (WebInspector.TimelineOverviewCalculator.prototype.grandMinimumBoundary):
3189         * inspector/front-end/TimelinePanel.js:
3190         (WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
3191
3192 2013-03-26  Mike West  <mkwst@chromium.org>
3193
3194         CSP 1.1: Experiment with 'base-uri' directive.
3195         https://bugs.webkit.org/show_bug.cgi?id=113307
3196
3197         Reviewed by Jochen Eisinger.
3198
3199         The 'base-uri' directive was introduced[1] as an experimental directive
3200         in CSP 1.1 after a bit of discussion[2][3]. The exact semantics will
3201         likely change, but it would be good for us to get some implementation
3202         experience with the API as currently specified, and to allow folks to
3203         play with the implementation to determine whether it meets the
3204         requirements the way we think it might.
3205
3206         This patch is a first pass at that implementation: it will have no
3207         effect on ports that haven't enabled the CSP_NEXT flag.
3208
3209         [1]: https://dvcs.w3.org/hg/content-security-policy/rev/4b89c246ea16
3210         [2]: http://lists.w3.org/Archives/Public/public-webappsec/2012Oct/0022.html
3211         [3]: http://lists.w3.org/Archives/Public/public-webappsec/2013Feb/0074.html
3212
3213         Tests: http/tests/security/contentSecurityPolicy/1.1/base-uri-allow.html
3214                http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html
3215
3216         * dom/Document.cpp:
3217         (WebCore::Document::processBaseElement):
3218             Check that the new base URI is allowed by CSP before using it as
3219             the document's base URI.
3220         * page/ContentSecurityPolicy.cpp:
3221             Add a constant for the new directive name (and, as a drive-by, split
3222             the list into CSP 1.0 and CSP 1.1 for clarity).
3223         (CSPDirectiveList):
3224             Add a property to hold the base URI policy directive value.
3225         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
3226             Customize the error message iff we're dealing with 'base-uri'.
3227         (WebCore::CSPDirectiveList::allowBaseURI):
3228             Check the given URI against the 'base-uri' directive's value,
3229             exactly as we do for every other source-list type of directive.
3230         (WebCore::CSPDirectiveList::addDirective):
3231             Accept 'base-uri' as a valid directive iff CSP_NEXT is set, and
3232             the embedder has opted-in via the runtime flag.
3233         (WebCore::ContentSecurityPolicy::allowBaseURI):
3234             Expose an API method on ContentSecurityPolicy to check URIs against
3235             the 'base-uri' directive's value.
3236
3237 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
3238
3239         [BlackBerry] Main frame fixed divs not positioned correctly
3240         https://bugs.webkit.org/show_bug.cgi?id=112889
3241
3242         Reviewed by Carlos Garcia Campos.
3243
3244         PR 283363
3245
3246         This was a regression from bug #112806. It caused main frame fixed
3247         handling to enter the iframe/scrollable div code path in LayerRenderer.
3248
3249         Fixed by not setting the container for fixed flag on the main frame,
3250         the LayerRenderer expects this flag to be set only on non-mainframe
3251         containers.
3252
3253         Only manually testable.
3254
3255         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:
3256         (WebCore::scrollLayerForFrame):
3257         (WebCore):
3258         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers):
3259         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer):
3260
3261 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3262
3263         FormData::deepCopy() could use Vector::uncheckedAppend()
3264         https://bugs.webkit.org/show_bug.cgi?id=113309
3265
3266         Reviewed by Kenneth Rohde Christiansen.
3267
3268         FormData::deepCopy() calls reserveInitialCapacity() on the Vector but then uses the
3269         regular append() method. This patch switches to using uncheckedAppend() method
3270         instead to bypass capacity checks as we already know it is sufficient.
3271
3272         No new tests, no behavior change.
3273
3274         * platform/network/FormData.cpp:
3275         (WebCore::FormData::deepCopy):
3276
3277 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3278
3279         Unreviewed, rolling out r146879.
3280         http://trac.webkit.org/changeset/146879
3281         https://bugs.webkit.org/show_bug.cgi?id=113312
3282
3283         Multiple layout test crashes in
3284         WebCore::RenderListItem::updateListMarkerNumbers (Requested by
3285         yurys on #webkit).
3286
3287         * dom/Node.cpp:
3288         * dom/Node.h:
3289         (Node):
3290         * dom/NodeTraversal.cpp:
3291         * dom/NodeTraversal.h:
3292         (ElementTraversal):
3293         (NodeTraversal):
3294         * html/HTMLLIElement.cpp:
3295         (WebCore::HTMLLIElement::attach):
3296         * html/HTMLOListElement.cpp:
3297         (WebCore::HTMLOListElement::updateItemValues):
3298         (WebCore::HTMLOListElement::recalculateItemCount):
3299         * rendering/RenderCounter.cpp:
3300         (WebCore::previousInPreOrder):
3301         (WebCore::previousSiblingOrParent):
3302         (WebCore::parentElement):
3303         (WebCore::nextInPreOrder):
3304         * rendering/RenderListItem.cpp:
3305         (WebCore::enclosingList):
3306         (WebCore::RenderListItem::nextListItem):
3307         (WebCore::previousListItem):
3308         (WebCore::RenderListItem::calcValue):
3309         (WebCore::RenderListItem::explicitValueChanged):
3310         (WebCore::previousOrNextItem):
3311         (WebCore::RenderListItem::updateListMarkerNumbers):
3312         * rendering/RenderListItem.h:
3313         (RenderListItem):
3314
3315 2013-03-26  Hajime Morrita  <morrita@google.com>
3316
3317         remoeveAllEventListeners() should be called to shadow trees
3318         https://bugs.webkit.org/show_bug.cgi?id=113037
3319
3320         Reviewed by Dimitri Glazkov.
3321
3322         Document::removeAllEventListeners() doesn't traverse shadow tree, but we should.
3323         This change override Element::removeAllEventListeners() so that it cleans its shadow trees up.
3324
3325         Test: fast/dom/shadow/shadow-tree-listener-clearance.html
3326
3327         * dom/Element.cpp:
3328         (WebCore::Element::removeAllEventListeners):
3329         (WebCore):
3330         * dom/Element.h:
3331         (Element):
3332         * dom/ElementShadow.cpp:
3333         (WebCore::ElementShadow::removeAllEventListeners): Added.
3334         (WebCore):
3335         * dom/ElementShadow.h:
3336         (ElementShadow):
3337
3338 2013-03-26  Andrei Bucur  <abucur@adobe.com>
3339
3340         Use DOM ordering for list counts
3341         https://bugs.webkit.org/show_bug.cgi?id=110352
3342
3343         Reviewed by Elliott Sprehn.
3344
3345         Currently the list items ordering is made by traversing the render tree. This gives bad results for:
3346         - list items flown inside regions because they are not rendered as descendants of their DOM list ancestors.
3347         - list items matched to insertion points inside a shadow tree. The insertion point may be a child of a
3348         list so the numbering gets broken.
3349
3350         To implement correct DOM ordering I've taken into account the fact that pseudo-elements can have display: list-item
3351         so they should be included when traversing the DOM tree. I've added helper methods on the NodeTraversal
3352         namespace that should allow easily traversing the tree including the pseudo-elements (e.g. firstChildWithPseudo
3353         for an element with pseudo-before will return the before PseudoElement). Using these helper methods I've implemented
3354         pre-order traversal methods aware of the pseudo-elements.
3355         An effect of this change is how the list items inside shadow tree update their counting. With the patch, if there's
3356         no <ol> or <ul> element on the ancestor chain of a <li> element to the shadow root, the list node will be considered the
3357         first parent of the <li> or the shadow root if there is no ancestor.
3358         The RenderListItem class now makes use of this new method of traversal, replacing the one based on the render tree.
3359         To simplify the CSS counters implementation, I've changed the traversal functions inside RenderCounter to also make use
3360         of this method. The CSS counters and the list items now have the same traversal algorithm.
3361
3362         In later patches I'll add tests that should cover the regions and shadow DOM use cases.
3363         Tests bug for shadow DOM: https://bugs.webkit.org/show_bug.cgi?id=113193
3364         Tests bug for regions: https://bugs.webkit.org/show_bug.cgi?id=103975
3365
3366         Tests: no new tests is this patch; added the correct expectations for fast/lists/positioned-count-crash.html
3367         and fast/dom/shadow/shadow-and-list-elements.html
3368
3369         * dom/Node.cpp:
3370         (WebCore::Node::pseudoAwarePreviousSibling):
3371         (WebCore):
3372         (WebCore::Node::pseudoAwareNextSibling):
3373         (WebCore::Node::pseudoAwareFirstChild):
3374         (WebCore::Node::pseudoAwareLastChild):
3375         * dom/Node.h:
3376         (Node):
3377         * dom/NodeTraversal.cpp:
3378         (WebCore):
3379         (WebCore::NodeTraversal::previousIncludingPseudo):
3380         (NodeTraversal):
3381         (WebCore::NodeTraversal::nextIncludingPseudo):
3382         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
3383         * dom/NodeTraversal.h:
3384         (ElementTraversal):
3385         (NodeTraversal):
3386         (WebCore::ElementTraversal::previousIncludingPseudo):
3387         (WebCore::ElementTraversal::nextIncludingPseudo):
3388         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
3389         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
3390         * html/HTMLLIElement.cpp:
3391         (WebCore::HTMLLIElement::attach):
3392         * html/HTMLOListElement.cpp:
3393         (WebCore::HTMLOListElement::updateItemValues):
3394         (WebCore::HTMLOListElement::recalculateItemCount):
3395         * rendering/RenderCounter.cpp:
3396         (WebCore::previousInPreOrder):
3397         (WebCore::previousSiblingOrParent):
3398         (WebCore::parentElement):
3399         (WebCore::nextInPreOrder):
3400         * rendering/RenderListItem.cpp:
3401         (WebCore):
3402         (WebCore::enclosingList):
3403         (WebCore::RenderListItem::nextListItem):
3404         (WebCore::previousListItem):
3405         (WebCore::RenderListItem::calcValue):
3406         (WebCore::RenderListItem::explicitValueChanged):
3407         (WebCore::previousOrNextItem):
3408         (WebCore::RenderListItem::updateListMarkerNumbers):
3409         * rendering/RenderListItem.h:
3410         (RenderListItem):
3411
3412 2013-03-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3413
3414         [Qt] Poor rounding in GraphicsContext::drawLineForText
3415         https://bugs.webkit.org/show_bug.cgi?id=113301
3416
3417         Reviewed by Jocelyn Turcotte.
3418
3419         Round the position of the line decoration, so lines on subpixel
3420         coordinates are not always rounded up.
3421
3422         * platform/graphics/qt/GraphicsContextQt.cpp:
3423         (WebCore::GraphicsContext::drawLineForText):
3424
3425 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
3426
3427         Web Inspector: Decorations in several consecutive lines are not moved correctly in DTE.
3428         https://bugs.webkit.org/show_bug.cgi?id=113296
3429
3430         Reviewed by Pavel Feldman.
3431
3432         Separated removing and adding decorations so that moved decorations are not removed when next line is processed.
3433
3434         * inspector/front-end/DefaultTextEditor.js:
3435         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
3436
3437 2013-03-26  Yury Semikhatsky  <yurys@chromium.org>
3438
3439         Remove references to non-chromium entries from WebCore.gypi (part 2)
3440         https://bugs.webkit.org/show_bug.cgi?id=103124
3441
3442         Reviewed by Pavel Feldman.
3443
3444         * WebCore.gypi: removed unused references to gtk, cf, win and mac
3445
3446 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3447
3448         Unreviewed, rolling out r146767.
3449         http://trac.webkit.org/changeset/146767
3450         https://bugs.webkit.org/show_bug.cgi?id=113295
3451
3452         Rolling out until nicer fonts / sizes are chosen (Requested by
3453         pfeldman on #webkit).
3454
3455         * inspector/front-end/dataGrid.css:
3456         (.data-grid table):
3457         (.data-grid td):
3458         * inspector/front-end/inspector.css:
3459         (.toolbar-label):
3460         (body.show-toolbar-icons .toolbar-label):
3461         (.console-message .bubble):
3462         (li .status .bubble):
3463         (.source-frame-breakpoint-message):
3464         (.soft-context-menu):
3465         (.drawer-header-close-button):
3466         * inspector/front-end/inspectorCommon.css:
3467         (body):
3468         * inspector/front-end/networkLogView.css:
3469         (.network-log-grid.data-grid td):
3470         (.network-log-grid.data-grid.small td):
3471         * inspector/front-end/tabbedPane.css:
3472         (.tabbed-pane-header-tab):
3473         (.tabbed-pane-header-tab-close-button):
3474         * inspector/front-end/timelinePanel.css:
3475         (.timeline-tree-item .count):
3476         (.timeline-records-stats, .storage-application-cache-status, .storage-application-cache-connectivity):
3477         (.memory-counter-sidebar-info):
3478         (.memory-counter-value):
3479
3480 2013-03-26  Arpita Bahuguna  <a.bah@samsung.com>
3481
3482         Unable to insert a paragraph in between some text whose previous sibling is a non-editable block.
3483         https://bugs.webkit.org/show_bug.cgi?id=113007
3484
3485         Reviewed by Ryosuke Niwa.
3486
3487         Unable to insert a line break in between a text that follows a
3488         non-editable block but is itself contained within an editable
3489         block.
3490
3491         While comparing the positions from the start block till the
3492         insertion position, we should ignore the nodes that do not
3493         generate a visiblePosition for the position before the node.
3494         This ultimately results in an assert within comparePositions().
3495
3496         For this case, the firstChild of the start block is a text
3497         node with no renderer which would thus not generate a candidate
3498         position for itself.
3499         There is also no candidate previous to it, and since
3500         the position after it lies within a different editable element (root),
3501         no candidate after it as well.
3502         Such a point will thus return a null visiblePosition.
3503
3504         Test: editing/inserting/insert-paragraph-between-text.html
3505
3506         * editing/InsertParagraphSeparatorCommand.cpp:
3507         (WebCore::InsertParagraphSeparatorCommand::doApply):
3508         Added a check to verify the generated visiblePosition (for the
3509         position before the node) prior to carrying out a comparison with
3510         the insertion point.
3511
3512 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
3513
3514         Web Inspector: OverviewGrid. Dragged window may change its width due to accumulating rounding error.
3515         https://bugs.webkit.org/show_bug.cgi?id=113138
3516
3517         Reviewed by Pavel Feldman.
3518
3519         The old version had problem with rounding because it recalculates the window size on each event.
3520         The new version just calculates the dragging delta and moves the window
3521         to the new position based on the initial values and the delta.
3522
3523         * inspector/front-end/OverviewGrid.js:
3524         (WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
3525         (WebInspector.OverviewGrid.Window.prototype._windowDragging):
3526         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
3527
3528 2013-03-26  Kent Tamura  <tkent@chromium.org>
3529
3530         Rename HTMLInputElement::isIndeterminate to Element::shouldAppearIndeterminate
3531         https://bugs.webkit.org/show_bug.cgi?id=113264
3532
3533         Reviewed by Kentaro Hara.
3534
3535         HTMLInputElement had indeterminate() and isIndeterminate(). It's very
3536         confusing.
3537
3538         Because indeterminate is a public DOM function and isIndeterminate is
3539         for CSS and rendering, we rename isIndetermiante to
3540         shouldAppearIndeterminate. Also, HTMLProgressElement, which support
3541         :indeterminate pseudo class, should follow it. We add
3542         shouldAppearIndeterminate to Element.
3543
3544         No new tests. Just a refactoring.
3545
3546         * dom/Element.cpp:
3547         (WebCore::Element::shouldAppearIndeterminate): Added. Returns false.
3548         * dom/Element.h:
3549         (Element): Declare shouldAppearIndeterminate.
3550         * html/HTMLInputElement.cpp:
3551         (WebCore::HTMLInputElement::shouldAppearIndeterminate):
3552         Renamed from isIndeterminate.
3553         * html/HTMLInputElement.h:
3554         (HTMLInputElement): Rename isIndeterminate to shouldAppearIndeterminate,
3555         and overrides Element::shouldAppearIndeterminate.
3556         * html/HTMLProgressElement.cpp:
3557         (WebCore::HTMLProgressElement::shouldAppearIndeterminate): Added.
3558         * html/HTMLProgressElement.h: Add shouldAppearIndeterminate.
3559
3560         * accessibility/AccessibilityNodeObject.cpp:
3561         (WebCore::AccessibilityNodeObject::isIndeterminate):
3562         Use shouldAppearIndeterminate.
3563         * css/SelectorChecker.cpp:
3564         (WebCore::SelectorChecker::checkOne): Ditto.
3565         * css/StyleResolver.cpp:
3566         (WebCore::StyleResolver::canShareStyleWithControl): Ditto.
3567         * rendering/RenderTheme.cpp:
3568         (WebCore::RenderTheme::isIndeterminate): Ditto.
3569
3570 2013-03-26  Pan Deng  <pan.deng@intel.com>
3571
3572         Web Inspector: [FlameChart] Make function bar highlighted consistent with cursor.
3573         https://bugs.webkit.org/show_bug.cgi?id=113266.
3574
3575         Reviewed by Vsevolod Vlasov.
3576
3577         In Flamechart, the highlighted function bar is not consistent with cursor sometimes, 
3578         reason is that time range that converted from cursor position is truncated by floor. 
3579         Actually float value is expected to compare with function startTime and duration.
3580
3581         No new tests.
3582
3583         * inspector/front-end/FlameChart.js:
3584         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): Remove floor
3585
3586 2013-03-26  Mihnea Ovidenie  <mihnea@adobe.com>
3587
3588         [CSSRegions]: Crash accessing offsetParent for contentNodes inside a flow thread
3589         https://bugs.webkit.org/show_bug.cgi?id=112730
3590
3591         Reviewed by Levi Weintraub.
3592
3593         When computing the offsetParent for an element inside a flow thread, do not
3594         let the algorithm process past the flow thread boundaries, until we figure out
3595         the proper behavior. When reaching the flow thread, offsetParent will return 0,
3596         thus preventing the assert while calling toElement inside Element::offsetParent.
3597
3598         The attached test sets the ground work and will be changed to match the right behavior.
3599         For now, it makes sure we do not crash or return HTMLDocument as offsetParent for
3600         elements inside the flow thread.
3601
3602         Test: fast/regions/offsetParent-in-flow-thread.html
3603
3604         * rendering/RenderObject.cpp:
3605         (WebCore::RenderObject::offsetParent):
3606
3607 2013-03-26  Dominik Röttsches  <dominik.rottsches@intel.com>
3608
3609         Remove HarfBuzzShaperBase
3610         https://bugs.webkit.org/show_bug.cgi?id=112087
3611
3612         Reviewed by Martin Robinson.
3613
3614         Folding HarfBuzzShaperBase into HarfBuzzShaper since
3615         there is no harfbuzz-old vs. harfbuzz-ng distinction anymore.
3616
3617         No new tests, no change in behavior.
3618
3619         * GNUmakefile.list.am: Removing HarfBuzzShaperBase.*
3620         * PlatformEfl.cmake: Removing HarfBuzzShaperBase.*
3621         * WebCore.gypi: Removing HarfBuzzShaperBase.*
3622         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Folding base class members and methods into HarfBuzzShaper.
3623         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
3624         (WebCore::normalizeSpacesAndMirrorChars):
3625         (WebCore):
3626         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
3627         (WebCore::HarfBuzzShaper::isWordEnd):
3628         (WebCore::HarfBuzzShaper::determineWordBreakSpacing):
3629         (WebCore::HarfBuzzShaper::setPadding):
3630         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Folding base class members and methods into HarfBuzzShaper.
3631         (HarfBuzzShaper):
3632         (WebCore::HarfBuzzShaper::isCodepointSpace):
3633         * platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp: Removed.
3634         * platform/graphics/harfbuzz/HarfBuzzShaperBase.h: Removed.
3635
3636 2013-03-22  Hajime Morrita  <morrita@google.com>
3637
3638         Listening touch events on ShadowRoot can crash.
3639         https://bugs.webkit.org/show_bug.cgi?id=113035
3640
3641         Reviewed by Kentaro Hara.
3642
3643         TreeScope destructor clears a document reference on ShadowRoot but
3644         destructors of ContainerNode and Node assumed it being available
3645         and tried to access it for some cleanup purposes.
3646
3647         This change extracts such cleanup to Node::willBeDeletedFrom() and
3648         calls it from ShadowRoot dtor before the document reference gets cleared.
3649
3650         Test: fast/dom/shadow/shadow-root-touch-listener-crash.html
3651
3652         * dom/ContainerNode.cpp:
3653         (WebCore::ContainerNode::~ContainerNode): Adopted willBeDeletedFrom()
3654         * dom/Node.cpp:
3655         (WebCore::Node::~Node): Adopted willBeDeletedFrom()
3656         (WebCore::Node::willBeDeletedFrom): Extracted from Node and ContainerNode
3657         (WebCore):
3658         * dom/Node.h:
3659         * dom/ShadowRoot.cpp:
3660         (WebCore::ShadowRoot::~ShadowRoot): Adopted willBeDeletedFrom()
3661
3662 2013-03-25  Hajime Morrita  <morrita@google.com>
3663
3664         Custom Elements Refactoring: The name V8CustomElement is confusing.
3665         https://bugs.webkit.org/show_bug.cgi?id=113165
3666
3667         Reviewed by Kent Tamura.
3668
3669         This change moves functions from V8CustomElement to CustomElementHelpers and
3670         removes V8CustomElement. V8CustomElement is just a heritage of old design
3671         and no longer makes sense.
3672
3673         No new tests. No behavior change.
3674
3675         * WebCore.gypi:
3676         * bindings/v8/CustomElementHelpers.cpp:
3677         (WebCore::CustomElementHelpers::createWrapper):
3678         (WebCore):
3679         * bindings/v8/CustomElementHelpers.h:
3680         (CustomElementHelpers):
3681         (WebCore::CustomElementHelpers::wrap):
3682         (WebCore):
3683         (WebCore::CustomElementHelpers::constructorOf):
3684         * bindings/v8/V8CustomElement.cpp: Removed.
3685         * bindings/v8/V8CustomElement.h: Removed.
3686         * bindings/v8/custom/V8CustomElementConstructorCustom.cpp:
3687         (WebCore::V8CustomElementConstructor::callAsFunctionCallback):
3688         * dom/make_names.pl:
3689         (printWrapperFactoryCppFile):
3690
3691 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
3692
3693         Web Inspector: [Timeline] Records sidebar is clipped.
3694         https://bugs.webkit.org/show_bug.cgi?id=113177
3695
3696         Reviewed by Pavel Feldman.
3697
3698         Analysis: depending on CSS injection order sidebar rule that overwrites
3699         "bottom" property may win.
3700
3701         Fix: make timeline-specific rule "important".
3702
3703         * inspector/front-end/timelinePanel.css:
3704         (.timeline .sidebar): Make "bottom" value "important".
3705
3706 2013-03-25  Kent Tamura  <tkent@chromium.org>
3707
3708         Rename ENABLE_INPUT_TYPE_DATETIME
3709         https://bugs.webkit.org/show_bug.cgi?id=113254
3710
3711         Reviewed by Kentaro Hara.
3712
3713         Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
3714         Actually I'd like to remove the code, but we shouldn't remove it yet
3715         because we shipped products with it on some platforms.
3716
3717         * Configurations/FeatureDefines.xcconfig:
3718         * bindings/generic/RuntimeEnabledFeatures.cpp:
3719         (WebCore):
3720         * bindings/generic/RuntimeEnabledFeatures.h:
3721         (RuntimeEnabledFeatures):
3722         * css/html.css:
3723         * html/DateTimeInputType.cpp:
3724         * html/DateTimeInputType.h:
3725         * html/InputType.cpp:
3726         (WebCore::createInputTypeFactoryMap):
3727
3728 2013-03-25  Timothy Hatcher  <timothy@apple.com>
3729
3730         Make the Web Inspector console work in strict mode with JavaScriptCore.
3731
3732         https://webkit.org/b/65829
3733         rdar://problem/11271238
3734
3735         Reviewed by Oliver Hunt.
3736
3737         * bindings/js/JSInjectedScriptHostCustom.cpp:
3738         (WebCore::JSInjectedScriptHost::evaluate):
3739         Return the evalFunction directly.
3740
3741         * inspector/InjectedScriptHost.h:
3742         (WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
3743         Added. Return true on JSC and false on V8.
3744
3745         * inspector/InjectedScriptHost.idl:
3746         Added evaluateReturnsEvalFunction and change evaluate to an attribute on JSC.
3747
3748         * inspector/InjectedScriptSource.js:
3749         (InjectedScript.prototype._evaluateOn): Change from using 'with' statements to creating
3750         a closure that evaluates the expression. The command line APIs are passed as parameters
3751         to the closure so they are in scope but not injected. This allows the code evaluated in
3752         the console to stay in strict mode (if is was already set), or to get strict mode by
3753         prefixing expressions with 'use strict';.
3754
3755 2013-03-25  Tony Chang  <tony@chromium.org>
3756
3757         Image alt text not included in plain-text version when copying
3758         https://bugs.webkit.org/show_bug.cgi?id=11200
3759
3760         Reviewed by Ryosuke Niwa.
3761
3762         Add a setting to enable copying image alt text to the clipboard and drag and drop pasteboard.
3763         This setting is disabled by default, so each port can enable if they want to match IE10 and
3764         Firefox's behavior.
3765
3766         Test: editing/pasteboard/copy-image-with-alt-text.html
3767
3768         * editing/Editor.cpp:
3769         (WebCore::Editor::cut): Explicitly ask that the selection on the pasteboard as being for the clipboard.
3770         (WebCore::Editor::copy): Explicitly ask that the selection on the pasteboard as being for the clipboard.
3771         (WebCore::Editor::selectedText): Add a private version of selectedText() that can choose between having image alt text or not.
3772         (WebCore::Editor::selectedTextForClipboard): Ask for image alt text if the setting is enabled.
3773         * editing/Editor.h:
3774         * editing/TextIterator.cpp:
3775         (WebCore::TextIterator::TextIterator): Add a bool to keep track of whether or not to emit image alt text.
3776         (WebCore::TextIterator::handleReplacedElement): If there's alt text, point the iterator to it.
3777         * editing/TextIterator.h:
3778         (TextIterator):
3779         * editing/mac/EditorMac.mm:
3780         (WebCore::Editor::takeFindStringFromSelection): Use the same text as on the clipboard.
3781         (WebCore::Editor::writeSelectionToPasteboard): Don't include image alt text since this is
3782         used by Services.
3783         (WebCore::Editor::stringSelectionForPasteboard): Don't include image alt text since this is
3784         used by Services.
3785         * page/DragController.cpp:
3786         (WebCore::DragController::startDrag): Use image alt text (matches Firefox).
3787         * page/Settings.in: Add a setting that disables image alt text by default.
3788         * platform/Pasteboard.h:
3789         * platform/blackberry/PasteboardBlackBerry.cpp:
3790         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3791         * platform/chromium/ClipboardChromium.cpp:
3792         (WebCore::ClipboardChromium::writeRange): Use clipboard text when writing ranges (used by d&d).
3793         * platform/chromium/PasteboardChromium.cpp:
3794         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3795         * platform/efl/PasteboardEfl.cpp:
3796         (WebCore::Pasteboard::writeSelection): Update function param.
3797         * platform/gtk/ClipboardGtk.cpp:
3798         (WebCore::ClipboardGtk::writeRange): Use clipboard text when writing ranges (used by d&d).
3799         * platform/gtk/PasteboardGtk.cpp:
3800         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3801         * platform/mac/ClipboardMac.mm:
3802         (WebCore::ClipboardMac::writeRange): Use clipboard text when writing ranges (used by d&d).
3803         * platform/mac/PasteboardMac.mm:
3804         (WebCore::Pasteboard::getStringSelection): Use ShouldSerializeSelectedTextForClipboard to determine whether the selected
3805         text is for the clipboard or not.
3806         (WebCore::Pasteboard::writeSelectionForTypes): Pass ShouldSerializeSelectedTextForClipboard through.
3807         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3808         * platform/qt/ClipboardQt.cpp:
3809         (WebCore::ClipboardQt::writeRange): Use clipboard text when writing ranges (used by d&d).
3810         * platform/qt/PasteboardQt.cpp:
3811         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3812         * platform/win/ClipboardWin.cpp:
3813         (WebCore::ClipboardWin::writeRange): Use clipboard text when writing ranges (used by d&d).
3814         * platform/win/PasteboardWin.cpp:
3815         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3816         * platform/wince/PasteboardWinCE.cpp:
3817         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3818         * platform/wx/PasteboardWx.cpp:
3819         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
3820         * rendering/RenderImage.h:
3821         (WebCore::RenderImage::altText): Add a getter for the alt text.
3822
3823 2013-03-25  Dean Jackson  <dino@apple.com>
3824
3825         Remove autostart hashing code from WebCore
3826         https://bugs.webkit.org/show_bug.cgi?id=113242
3827
3828         Reviewed by Tim Horton.
3829
3830         Remove PlugInOriginHash and all the related build entries.
3831
3832         * CMakeLists.txt:
3833         * GNUmakefile.list.am:
3834         * Target.pri:
3835         * WebCore.gypi:
3836         * WebCore.vcproj/WebCore.vcproj:
3837         * WebCore.vcxproj/WebCore.vcxproj:
3838         * WebCore.vcxproj/WebCore.vcxproj.filters:
3839         * WebCore.xcodeproj/project.pbxproj:
3840         * html/HTMLPlugInImageElement.cpp:
3841         * plugins/PlugInOriginHash.cpp: Removed.
3842         * plugins/PlugInOriginHash.h: Removed.
3843
3844 2013-03-25  Roger Fong  <roger_fong@apple.com>
3845
3846         Unreviewed. Wrong place to enable RuntimeEnabledFeature for Windows.
3847
3848         * bindings/generic/RuntimeEnabledFeatures.cpp:
3849         (WebCore):
3850
3851 2013-03-25  James Robinson  <jamesr@chromium.org>
3852
3853         [chromium] Support GraphicsLayer::setContentsToSolidColor
3854         https://bugs.webkit.org/show_bug.cgi?id=104396
3855
3856         Reviewed by Adrienne Walker.
3857
3858         This enables and implements the GraphicsLayer::setContentsToSolidColor
3859         path for Chromium.
3860
3861         Tested by reftests in compositing/background-color/ and several other
3862         compositing/ tests.
3863
3864         * platform/graphics/GraphicsLayer.h:
3865         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
3866         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3867         (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
3868         (WebCore):
3869         * platform/graphics/chromium/GraphicsLayerChromium.h:
3870         (WebKit):
3871         (GraphicsLayerChromium):
3872
3873 2013-03-25  Victor Carbune  <vcarbune@chromium.org>
3874
3875         TextTrack Extension for WebVTT Regions
3876         https://bugs.webkit.org/show_bug.cgi?id=109820
3877
3878         Reviewed by Eric Carlson.
3879
3880         Implemented the TextTrackRegionList and extended TextTrack with
3881         methods required for proper interaction with TextTrackRegion objects.
3882
3883         Test: media/track/regions-webvtt/text-track-region-list.html
3884
3885         * WebCore.gypi: Added files for proper building of TextTrackRegionList.
3886         * html/track/TextTrack.cpp:
3887         (WebCore::TextTrack::TextTrack):
3888         (WebCore):
3889         (WebCore::TextTrack::ensureTextTrackRegionList): Method for creating a
3890         TextTrackRegionList associated with the current track, if it does exist
3891         already.
3892         (WebCore::TextTrack::regions): Getter for the regions object.
3893         (WebCore::TextTrack::addRegion): Method for adding a region.
3894         (WebCore::TextTrack::removeRegion): Method for removing a region.
3895         * html/track/TextTrack.h:
3896         (WebCore):
3897         (TextTrack):
3898         * html/track/TextTrack.idl: Added methods specific for region handling.
3899         * html/track/TextTrackRegion.cpp:
3900         (WebCore::TextTrackRegion::TextTrackRegion): Initialized the track member variable.
3901         (WebCore::TextTrackRegion::setTrack): Added internal setter for the track attribute.
3902         (WebCore):
3903         (WebCore::TextTrackRegion::updateParametersFromRegion): Method to copy the parameters
3904         from a different region object.
3905         * html/track/TextTrackRegion.h: Added track member variable and copy method.
3906         (WebCore::TextTrackRegion::track): Getter retrieves now the member variable.
3907         (TextTrackRegion):
3908         * html/track/TextTrackRegionList.cpp: Implemented methods required by the IDL.
3909         (WebCore):
3910         (WebCore::TextTrackRegionList::TextTrackRegionList):
3911         (WebCore::TextTrackRegionList::length):
3912         (WebCore::TextTrackRegionList::item):
3913         (WebCore::TextTrackRegionList::getRegionById):
3914         (WebCore::TextTrackRegionList::add):
3915         (WebCore::TextTrackRegionList::remove):
3916         (WebCore::TextTrackRegionList::clear):
3917         * html/track/TextTrackRegionList.h:
3918         (WebCore):
3919         (TextTrackRegionList):
3920         (WebCore::TextTrackRegionList::create):
3921         (WebCore::TextTrackRegionList::~TextTrackRegionList):
3922         * html/track/TextTrackRegionList.idl: IDL defined by the specification.
3923
3924 2013-03-25  Dean Jackson  <dino@apple.com>
3925
3926         Cleanup plugin snapshotting autostart decision making
3927         https://bugs.webkit.org/show_bug.cgi?id=113231
3928
3929         Reviewed by Tim Horton.
3930
3931         Move the code that creates a hash of plugin origin info
3932         out of WebCore. All WebCore needs to do now is simply ask its
3933         host layer whether or not a tuple of (pluginOrigin, pageOrigin, mimeType)
3934         should autostart or not.
3935
3936         As a drive-by, the code in subframeLoaderWillCreatePlugIn was not quite
3937         restarting properly when the displayState was Restarting or
3938         RestartingWithPendingMouseClick. It still worked most of the time, but usually
3939         because the code ran soon after a mouse click. Now it should be explicit and
3940         also allowed us to be more clear about snapshotting at the end of the method.
3941
3942         * html/HTMLPlugInElement.h: No more pluginOriginHash().
3943         * html/HTMLPlugInImageElement.cpp:
3944         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Change signature to accept the tuple
3945             described above, and compare strings rather than hashes.
3946         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Tell host layer the origin
3947             info rather than hash info.
3948         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Remember the url that
3949             the plugin was loaded from. Make some of the logging messages more clear. Test for
3950             plugin and page origin rather than hash.
3951         * html/HTMLPlugInImageElement.h:
3952         (WebCore::HTMLPlugInImageElement::loadedUrl): New loadedURL member function.
3953         * page/PlugInClient.h:
3954         (PlugInClient): Change signature of virtual class to accept origin and mimeType info
3955             rather than hash.
3956
3957 2013-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3958
3959         Unreviewed, rolling out r146793.
3960         http://trac.webkit.org/changeset/146793
3961         https://bugs.webkit.org/show_bug.cgi?id=113248
3962
3963         Fix did not work (Requested by rfong on #webkit).
3964
3965         * bindings/scripts/preprocessor.pm:
3966         (applyPreprocessor):
3967
3968 2013-03-25  Brandon Jones  <bajones@google.com>
3969
3970         WEBGL_compressed_texture_pvrtc needs implementation
3971         https://bugs.webkit.org/show_bug.cgi?id=110497
3972
3973         Reviewed by Kenneth Russell.
3974
3975         Test: webgl/conformance/extensions/webgl-compressed-texture-pvrtc.html
3976
3977         Exposes the WEBGL_compressed_texture_pvrtc extension, but is unverified since no desktop hardware supports
3978         the format that I am aware of. Should enable mobile ports to expose the format, however.
3979
3980         * CMakeLists.txt:
3981         * DerivedSources.make:
3982         * DerivedSources.pri:
3983         * GNUmakefile.list.am:
3984         * Target.pri:
3985         * WebCore.gypi:
3986         * WebCore.xcodeproj/project.pbxproj:
3987         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3988         (WebCore::toJS):
3989         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3990         (WebCore::toV8Object):
3991         * html/canvas/WebGLCompressedTexturePVRTC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3992         (WebCore):
3993         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
3994         (WebCore::WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC):
3995         (WebCore::WebGLCompressedTexturePVRTC::getName):
3996         (WebCore::WebGLCompressedTexturePVRTC::create):
3997         (WebCore::WebGLCompressedTexturePVRTC::supported):
3998         * html/canvas/WebGLCompressedTexturePVRTC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3999         (WebCore):
4000         (WebGLCompressedTexturePVRTC):
4001         * html/canvas/WebGLCompressedTexturePVRTC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
4002         * html/canvas/WebGLExtension.h:
4003         * html/canvas/WebGLRenderingContext.cpp:
4004         (WebCore):
4005         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
4006         (WebCore::WebGLRenderingContext::getExtension):
4007         (WebCore::WebGLRenderingContext::getSupportedExtensions):
4008         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
4009         * html/canvas/WebGLRenderingContext.h:
4010         (WebCore):
4011         (WebGLRenderingContext):
4012
4013 2013-03-25  Roger Fong  <roger_fong@apple.com>
4014
4015         Enable CSS_REGIONS and CSS_EXCLUSIONS.
4016         https://bugs.webkit.org/show_bug.cgi?id=87519
4017
4018         Reviewed by Timothy Horton.
4019
4020         * bindings/generic/RuntimeEnabledFeatures.cpp: