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