2011-01-30 Simon Fraser <simon.fraser@apple.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Enhance ShadowBlur to render inset box shadows
6         https://bugs.webkit.org/show_bug.cgi?id=51567
7         
8         Use ShadowBlur for inset box-shadows with CG. It 
9         currently lacks a tiled version, but is still much
10         faster than CG shadows.
11
12         Test: fast/box-shadow/inset-box-shadow-radius.html
13
14         * platform/graphics/ShadowBlur.cpp:
15         * platform/graphics/ShadowBlur.h: New method for inset
16         shadows.
17         (WebCore::ShadowBlur::drawInsetShadow): 
18
19         * platform/graphics/GraphicsContext.cpp: #ifdef out
20         fillRectWithRoundedHole() for CG.
21
22         * platform/graphics/cg/GraphicsContextCG.cpp:
23         (WebCore::GraphicsContext::fillRectWithRoundedHole): If there's
24         a shadow with a radius > 0, use ShadowBlur.
25
26 2011-01-28  Kenneth Russell  <kbr@google.com>
27
28         Reviewed by Chris Marrin.
29
30         WebGL shows PNG Textures with indexed colors too dark
31         https://bugs.webkit.org/show_bug.cgi?id=47477
32
33         Properly handle indexed PNG images by re-rendering them as RGBA
34         images before upload. Verified with this layout test and the test
35         cases from bugs 47477 and 53269.
36
37         * platform/graphics/cg/GraphicsContext3DCG.cpp:
38         (WebCore::GraphicsContext3D::getImageData):
39
40 2011-01-27  MORITA Hajime  <morrita@google.com>
41
42         Reviewed by Dimitri Glazkov.
43         
44         Convert <progress> shadow DOM to a DOM-based shadow.
45         https://bugs.webkit.org/show_bug.cgi?id=50660
46
47         * Removed RenderProgress::m_valuePart, moved the shadow node
48           to the shadow root of HTMLProgressElement.
49         * Removed hard-coded pseudo ID for -webkit-progress-bar-value.
50           ProgressBarValueElement is defined only for overriding
51           shadowPseudoId().
52         
53         No new tests. No behavioral change.
54
55         * css/CSSSelector.cpp:
56         (WebCore::CSSSelector::pseudoId):
57         (WebCore::nameToPseudoTypeMap):
58         (WebCore::CSSSelector::extractPseudoType):
59         * css/CSSSelector.h:
60         * html/HTMLProgressElement.cpp:
61         (WebCore::ProgressBarValueElement::ProgressBarValueElement):
62         (WebCore::ProgressBarValueElement::shadowPseudoId):
63         (WebCore::ProgressBarValueElement::create):
64         (WebCore::HTMLProgressElement::parseMappedAttribute):
65         (WebCore::HTMLProgressElement::attach):
66         (WebCore::HTMLProgressElement::valuePart):
67         (WebCore::HTMLProgressElement::didElementStateChange):
68         (WebCore::HTMLProgressElement::createShadowSubtreeIfNeeded):
69         * html/HTMLProgressElement.h:
70         * rendering/RenderProgress.cpp:
71         (WebCore::RenderProgress::~RenderProgress):
72         (WebCore::RenderProgress::updateFromElement):
73         (WebCore::RenderProgress::layoutParts):
74         (WebCore::RenderProgress::shouldHaveParts):
75         (WebCore::RenderProgress::valuePart):
76         * rendering/RenderProgress.h:
77         * rendering/style/RenderStyleConstants.h:
78
79 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
80
81         Reviewed by Ariya Hidayat.
82
83         Enhance ShadowBlur to render inset box shadows; Part 1.
84         https://bugs.webkit.org/show_bug.cgi?id=51567
85         
86         Add a new method to GraphicsContext to render a rect with a rounded hole,
87         for use by inset box-shadow code. Knowledge that we're rendering a rounded
88         hole will enable ShadowBlur to be used here in future.
89
90         * platform/graphics/GraphicsContext.cpp:
91         (WebCore::GraphicsContext::fillRectWithRoundedHole):
92         * platform/graphics/GraphicsContext.h:
93         * rendering/RenderBoxModelObject.cpp:
94         (WebCore::RenderBoxModelObject::paintBoxShadow):
95
96 2011-01-23  MORITA Hajime  <morrita@google.com>
97
98         Reviewed by Eric Seidel.
99
100         REGRESSION: Inset shadow with too large border radius misses rounded corner.
101         https://bugs.webkit.org/show_bug.cgi?id=52800
102
103         The refactoring on r76083 broke the invariant between border
104         IntRect and its radii because RoundedIntRect::setRect() is called
105         after getRoundedInnerBorderWithBorderWidths(), which enforces the
106         invariant. Th rounded-rect clipping code verifies the invariant,
107         and discard the invalid radii, that results broken paintings.
108         
109         This change moved setRect() before
110         getRoundedInnerBorderWithBorderWidths() not to modify the valid
111         RoundedIntRect value.
112         
113         Test: fast/box-shadow/inset-with-extraordinary-radii-and-border.html
114
115         * rendering/RenderBoxModelObject.cpp:
116         (WebCore::RenderBoxModelObject::paintBoxShadow):
117
118 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
119
120         Attempt to fix Windows build by adding ShadowBlur.cpp/h to the
121         vcproj.
122
123         * WebCore.vcproj/WebCore.vcproj:
124
125 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
126
127         Reviewed by Dan Bernstein.
128
129         -webkit-box-shadow causes awful scroll/resize/redraw performance
130         https://bugs.webkit.org/show_bug.cgi?id=22102
131         
132         Use ShadowBlur for CG, whe rendering shadows on rects and
133         rounded rects outside of canvas.
134         
135         CG shadows with a radius of more than 8px do not render
136         correctly. We preserve this incorrect rendering by compensating
137         for it when rending -webkit-box-shadow. Calls that should use
138         this deprecated radius behavior now use setLegacyShadow().
139
140         Test: fast/box-shadow/box-shadow-transformed.html
141         
142         * html/canvas/CanvasRenderingContext2D.cpp: Use setLegacyShadow()
143         for canvas, to indicate that it should use the deprecated radius
144         behavior.
145         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault): Ditto.
146         (WebCore::CanvasRenderingContext2D::setShadow): Ditto.
147         (WebCore::CanvasRenderingContext2D::applyShadow): Ditto.
148         
149         * platform/graphics/GraphicsContext.cpp:
150         (WebCore::GraphicsContext::setLegacyShadow): Set the m_state.shadowsUseLegacyRadius bit.
151         
152         * platform/graphics/GraphicsContext.h:
153         (WebCore::GraphicsContextState::GraphicsContextState): Add a 
154         shadowsUseLegacyRadius bit to the state.
155         
156         * platform/graphics/cg/GraphicsContextCG.cpp:
157         (WebCore::radiusToLegacyRadius): Map from the actual radius to one
158         that approximates CG behavior.
159         (WebCore::hasBlurredShadow): Helper that returns true if we have a shadow
160         with a non-zero blur radius.
161         (WebCore::GraphicsContext::fillRect): Use ShadowBlur if not canvas.
162         (WebCore::GraphicsContext::fillRoundedRect): Ditto.
163         (WebCore::GraphicsContext::setPlatformShadow): Comment.
164
165         * rendering/RenderBoxModelObject.cpp:
166         (WebCore::RenderBoxModelObject::paintBoxShadow): Call setLegacyShadow()
167         for -webkit-box-shadow.
168
169         * platform/graphics/ShadowBlur.cpp: 
170         (WebCore::ShadowBlur::calculateLayerBoundingRect): Fix some pixel crack issues
171         by rounding up the blur radius.
172         (WebCore::ShadowBlur::drawRectShadow): Ditto
173         (WebCore::ShadowBlur::drawRectShadowWithTiling): Ditto.
174
175 2011-01-30  Oliver Hunt  <oliver@apple.com>
176
177         Try to fix Qt build (again).
178
179         * bridge/qt/qt_runtime.cpp:
180         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
181         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
182
183 2011-01-30  Oliver Hunt  <oliver@apple.com>
184
185         Try to fix Qt build.
186
187         * bridge/qt/qt_instance.cpp:
188         (JSC::Bindings::QtInstance::QtInstance):
189         (JSC::Bindings::QtInstance::removeCachedMethod):
190         (JSC::Bindings::QtInstance::markAggregate):
191         * bridge/qt/qt_instance.h:
192
193 2011-01-30  Oliver Hunt  <oliver@apple.com>
194
195         Convert markstack to a slot visitor API
196         https://bugs.webkit.org/show_bug.cgi?id=53219
197
198         rolling r77006 and r77020 back in.
199
200         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
201         * WebCore.exp.in:
202         * bindings/js/DOMWrapperWorld.h:
203         (WebCore::DOMWrapperWorld::globalData):
204         * bindings/js/JSAudioConstructor.cpp:
205         (WebCore::JSAudioConstructor::JSAudioConstructor):
206         * bindings/js/JSDOMBinding.cpp:
207         (WebCore::markDOMNodesForDocument):
208         (WebCore::markDOMObjectWrapper):
209         (WebCore::markDOMNodeWrapper):
210         * bindings/js/JSDOMGlobalObject.cpp:
211         (WebCore::JSDOMGlobalObject::markChildren):
212         (WebCore::JSDOMGlobalObject::setInjectedScript):
213         (WebCore::JSDOMGlobalObject::injectedScript):
214         * bindings/js/JSDOMGlobalObject.h:
215         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
216         (WebCore::getDOMConstructor):
217         * bindings/js/JSDOMWindowCustom.cpp:
218         (WebCore::JSDOMWindow::setLocation):
219         (WebCore::DialogHandler::dialogCreated):
220         * bindings/js/JSDOMWindowShell.cpp:
221         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
222         (WebCore::JSDOMWindowShell::setWindow):
223         (WebCore::JSDOMWindowShell::markChildren):
224         (WebCore::JSDOMWindowShell::unwrappedObject):
225         * bindings/js/JSDOMWindowShell.h:
226         (WebCore::JSDOMWindowShell::window):
227         (WebCore::JSDOMWindowShell::setWindow):
228         * bindings/js/JSDeviceMotionEventCustom.cpp:
229         (WebCore::createAccelerationObject):
230         (WebCore::createRotationRateObject):
231         * bindings/js/JSEventListener.cpp:
232         (WebCore::JSEventListener::JSEventListener):
233         (WebCore::JSEventListener::markJSFunction):
234         * bindings/js/JSEventListener.h:
235         (WebCore::JSEventListener::jsFunction):
236         * bindings/js/JSHTMLDocumentCustom.cpp:
237         (WebCore::JSHTMLDocument::setAll):
238         * bindings/js/JSImageConstructor.cpp:
239         (WebCore::JSImageConstructor::JSImageConstructor):
240         * bindings/js/JSImageDataCustom.cpp:
241         (WebCore::toJS):
242         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
243         (WebCore::JSJavaScriptCallFrame::scopeChain):
244         (WebCore::JSJavaScriptCallFrame::scopeType):
245         * bindings/js/JSNodeFilterCondition.cpp:
246         (WebCore::JSNodeFilterCondition::markAggregate):
247         (WebCore::JSNodeFilterCondition::acceptNode):
248         * bindings/js/JSNodeFilterCondition.h:
249         * bindings/js/JSNodeFilterCustom.cpp:
250         * bindings/js/JSOptionConstructor.cpp:
251         (WebCore::JSOptionConstructor::JSOptionConstructor):
252         * bindings/js/JSSQLResultSetRowListCustom.cpp:
253         (WebCore::JSSQLResultSetRowList::item):
254         * bindings/js/ScriptCachedFrameData.cpp:
255         (WebCore::ScriptCachedFrameData::restore):
256         * bindings/js/ScriptObject.cpp:
257         (WebCore::ScriptGlobalObject::set):
258         * bindings/js/SerializedScriptValue.cpp:
259         (WebCore::CloneDeserializer::putProperty):
260         * bindings/scripts/CodeGeneratorJS.pm:
261         * bridge/qt/qt_runtime.cpp:
262         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
263         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
264         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
265         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
266         * bridge/qt/qt_runtime.h:
267         * bridge/runtime_root.cpp:
268         (JSC::Bindings::RootObject::invalidate):
269         * bridge/runtime_root.h:
270         * dom/Document.h:
271
272 2011-01-30  Simon Fraser  <simon.fraser@apple.com>
273
274         Reviewed by Sam Weinig.
275
276         Make ContextShadow code cross-platform
277         https://bugs.webkit.org/show_bug.cgi?id=51312
278
279         Add a new class, ShadowBlur, that contains most of the
280         code from ContextShadow, but is fully cross-platform.
281         It depends on one new method, GraphicsContext::clipBounds(),
282         which platforms will have to implement.
283         
284         Add ShadowBlur to the Mac Xcode project, but don't use it
285         anywhere yet.
286
287         * WebCore.xcodeproj/project.pbxproj:
288         * platform/graphics/GraphicsContext.cpp:
289         (WebCore::GraphicsContext::clipBounds):
290         * platform/graphics/GraphicsContext.h:
291         * platform/graphics/ShadowBlur.cpp: Added.
292         (WebCore::roundUpToMultipleOf32):
293         (WebCore::ScratchBuffer::ScratchBuffer):
294         (WebCore::ScratchBuffer::getScratchBuffer):
295         (WebCore::ScratchBuffer::scheduleScratchBufferPurge):
296         (WebCore::ScratchBuffer::timerFired):
297         (WebCore::ScratchBuffer::clearScratchBuffer):
298         (WebCore::ScratchBuffer::shared):
299         (WebCore::ShadowBlur::ShadowBlur):
300         (WebCore::ShadowBlur::blurLayerImage):
301         (WebCore::ShadowBlur::adjustBlurDistance):
302         (WebCore::ShadowBlur::calculateLayerBoundingRect):
303         (WebCore::ShadowBlur::beginShadowLayer):
304         (WebCore::ShadowBlur::endShadowLayer):
305         (WebCore::ShadowBlur::drawRectShadow):
306         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
307         (WebCore::ShadowBlur::drawRectShadowWithTiling):
308         (WebCore::ShadowBlur::clipBounds):
309         * platform/graphics/ShadowBlur.h: Added.
310         (WebCore::ShadowBlur::setShadowsIgnoreTransforms):
311         (WebCore::ShadowBlur::shadowsIgnoreTransforms):
312         * platform/graphics/cg/GraphicsContextCG.cpp:
313         (WebCore::GraphicsContext::clipBounds):
314
315 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
316
317         Reviewed by Dan Bernstein.
318
319         CSS3 gradients with em-based stops fail to repaint when font size changes
320         https://bugs.webkit.org/show_bug.cgi?id=51845
321         
322         Mark as uncacheable gradidients whose color stops depend on font size,
323         and don't attempt to put these into CSSImageGeneratorValue's image cache.
324         This means we return a new gradient each time, which is fairly cheap, and
325         fixes repaint issues under changing font size.
326
327         Test: fast/repaint/gradients-em-stops-repaint.html
328
329         * css/CSSGradientValue.cpp:
330         (WebCore::CSSGradientValue::image):
331         (WebCore::CSSGradientValue::isCacheable):
332         * css/CSSGradientValue.h:
333
334 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
335
336         Undo try to fix the Qt build.
337         
338         My guess didn't work.
339
340         * WebCore.pro:
341
342 2011-01-29  Geoffrey Garen  <ggaren@apple.com>
343
344         Try to fix the Qt build.
345
346         * WebCore.pro: Added platform/text/CharacterNames.h.
347
348 2011-01-28  Geoffrey Garen  <ggaren@apple.com>
349
350         Reviewed by Maciej Stachowiak.
351
352         Some more Heap cleanup.
353         https://bugs.webkit.org/show_bug.cgi?id=53357
354         
355         Updated for JavaScriptCore changes.
356
357         * bindings/js/ScriptGCEvent.cpp:
358         (WebCore::ScriptGCEvent::getHeapSize):
359
360 2011-01-29  Adam Barth  <abarth@webkit.org>
361
362         Reviewed by Daniel Bates.
363
364         Fix XSSFilter crash when extracting the source for a token twice
365         https://bugs.webkit.org/show_bug.cgi?id=53368
366
367         Previously, it was unsafe to extract the source for the same token
368         twice because the HTMLSourceTracker would advance its internal
369         representation of the SegmentedString.  This patch introduces a cache
370         to make calling HTMLSourceTracker::sourceForToken multiple times safe.
371
372         * html/parser/HTMLSourceTracker.cpp:
373         (WebCore::HTMLSourceTracker::end):
374         (WebCore::HTMLSourceTracker::sourceForToken):
375         * html/parser/HTMLSourceTracker.h:
376
377 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
378
379         Reviewed by Dan Bernstein.
380
381         Fix fat build for both 32-bit and 64-bit under llvm-gcc 4.2
382         https://bugs.webkit.org/show_bug.cgi?id=53386
383
384         * platform/mac/ScrollAnimatorMac.mm:
385         (WebCore::elasticDeltaForReboundDelta):
386         (WebCore::scrollWheelMultiplier):
387         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
388         (WebCore::ScrollAnimatorMac::beginScrollGesture):
389         (WebCore::roundTowardZero):
390         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
391
392 2011-01-29  Daniel Bates  <dbates@rim.com>
393
394         Reviewed by Maciej Stachowiak.
395
396         Remove reference to ${CMAKE_SOURCE_DIR}/Source in CMake files
397         https://bugs.webkit.org/show_bug.cgi?id=53382
398
399         Our file system hierarchy ensures that CMAKE_SOURCE_DIR is defined to be /Source.
400         So, ${CMAKE_SOURCE_DIR}/Source evaluates to the non-existent directory /Source/Source.
401         Therefore, we should remove such references.
402
403         * CMakeLists.txt:
404
405 2011-01-29  Sam Weinig  <sam@webkit.org>
406
407         Reviewed by Jon Honeycutt.
408
409         Fix 32-bit build on the Mac.
410
411         * platform/mac/ScrollAnimatorMac.mm:
412         (WebCore::roundTowardZero):
413         (WebCore::roundToDevicePixelTowardZero):
414         Use floats instead of doubles to avoid double-to-float conversion
415         issues.
416
417 2011-01-29  Simon Fraser  <simon.fraser@apple.com>
418
419         Reviewed by Adam Barth.
420
421         Use clampToInteger() functions in a few places
422         https://bugs.webkit.org/show_bug.cgi?id=53363
423         
424         * css/CSSStyleSelector.cpp:
425         (WebCore::CSSStyleSelector::applyProperty): Use clampToInteger() for z-index.
426         (WebCore::CSSStyleSelector::createTransformOperations): Use clampToPositiveInteger().
427         * platform/graphics/transforms/PerspectiveTransformOperation.cpp: Ditto.
428         (WebCore::PerspectiveTransformOperation::blend): Ditto.
429
430 2011-01-29  Patrick Gansterer  <paroga@webkit.org>
431
432         Reviewed by David Kilzer.
433
434         Move CharacterNames.h into WTF directory
435         https://bugs.webkit.org/show_bug.cgi?id=49618
436
437         * ForwardingHeaders/wtf/unicode/CharacterNames.h: Added.
438         * GNUmakefile.am:
439         * WebCore.gypi:
440         * WebCore.vcproj/WebCore.vcproj:
441         * WebCore.xcodeproj/project.pbxproj:
442         * accessibility/AccessibilityObject.cpp:
443         * accessibility/AccessibilityRenderObject.cpp:
444         * bindings/cpp/WebDOMHTMLDocumentCustom.cpp:
445         * bindings/js/JSHTMLDocumentCustom.cpp:
446         * dom/Position.cpp:
447         * dom/SelectElement.cpp:
448         * editing/CompositeEditCommand.cpp:
449         * editing/Editor.cpp:
450         * editing/HTMLInterchange.cpp:
451         * editing/InsertTextCommand.cpp:
452         * editing/MarkupAccumulator.cpp:
453         * editing/TextIterator.cpp:
454         * editing/VisibleSelection.cpp:
455         * editing/htmlediting.cpp:
456         * editing/htmlediting.h:
457         * editing/markup.cpp:
458         * html/FTPDirectoryDocument.cpp:
459         * html/HTMLFormControlElement.cpp:
460         * html/parser/HTMLTreeBuilder.cpp:
461         * loader/appcache/ManifestParser.cpp:
462         * platform/chromium/PopupMenuChromium.cpp:
463         * platform/graphics/Font.h:
464         * platform/graphics/FontFastPath.cpp:
465         * platform/graphics/GlyphPageTreeNode.cpp:
466         * platform/graphics/StringTruncator.cpp:
467         * platform/graphics/mac/ComplexTextController.cpp:
468         * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
469         * platform/graphics/wince/GraphicsContextWinCE.cpp:
470         * platform/mac/PasteboardMac.mm:
471         * platform/text/TextCodecICU.cpp:
472         * platform/text/mac/TextCodecMac.cpp:
473         * platform/text/transcoder/FontTranscoder.cpp:
474         * rendering/RenderBlockLineLayout.cpp:
475         * rendering/RenderFlexibleBox.cpp:
476         * rendering/RenderListMarker.cpp:
477         * rendering/RenderText.cpp:
478         * rendering/RenderTextControl.cpp:
479         * rendering/RenderTreeAsText.cpp:
480         * rendering/break_lines.cpp:
481         * rendering/mathml/RenderMathMLOperator.h:
482         * websockets/WebSocketHandshake.cpp:
483         * wml/WMLTableElement.cpp:
484
485 2011-01-29  Dan Winship  <danw@gnome.org>
486
487         Reviewed by Xan Lopez.
488
489         [GTK] Remove HAVE_LIBSOUP_2_29_90 conditionals; we depend on
490         libsoup 2.33.1 now.
491         https://bugs.webkit.org/show_bug.cgi?id=50675
492
493         * platform/network/soup/CookieJarSoup.cpp:
494         (WebCore::defaultCookieJar):
495         (WebCore::setCookies):
496         * platform/network/soup/ResourceHandleSoup.cpp:
497         (WebCore::ResourceHandle::prepareForURL):
498         (WebCore::restartedCallback):
499         (WebCore::startHttp):
500         * platform/network/soup/ResourceRequestSoup.cpp:
501         (WebCore::ResourceRequest::updateSoupMessage):
502         (WebCore::ResourceRequest::toSoupMessage):
503         (WebCore::ResourceRequest::updateFromSoupMessage):
504
505 2011-01-29  Adam Barth  <abarth@webkit.org>
506
507         Reviewed by Daniel Bates.
508
509         XSSFilter should replace URLs with about:blank instead of the empty string
510         https://bugs.webkit.org/show_bug.cgi?id=53370
511
512         Using the empty string will make the URL complete to the current
513         document's URL, which isn't really what we want.  Instead, we want to
514         use about:blank, which is safe.
515
516         * html/parser/XSSFilter.cpp:
517         (WebCore::XSSFilter::filterObjectToken):
518         (WebCore::XSSFilter::filterEmbedToken):
519
520 2011-01-29  Adam Barth  <abarth@webkit.org>
521
522         Reviewed by Daniel Bates.
523
524         XSSFilter should pass xssAuditor/script-tag-addslashes*
525         https://bugs.webkit.org/show_bug.cgi?id=53365
526
527         We need to canonicalize strings to avoid being tricked by addslashes.
528
529         * html/parser/XSSFilter.cpp:
530         (WebCore::HTMLNames::isNonCanonicalCharacter):
531             - This function is copied from the XSSAuditor (with some tweaks).
532               We'll eventually remove the XSSAuditor once we've got XSSFilter
533               working properly.
534         (WebCore::HTMLNames::canonicalize):
535         (WebCore::HTMLNames::decodeURL):
536         (WebCore::XSSFilter::isContainedInRequest):
537
538 2011-01-29  Adam Barth  <abarth@webkit.org>
539
540         Reviewed by Daniel Bates.
541
542         XSSFilter should pass xssAuditor/script-tag-with-source-same-host.html
543         and xssAuditor/script-tag-post-*
544         https://bugs.webkit.org/show_bug.cgi?id=53364
545
546         We're supposed to allow loading same-origin resources even if they
547         appear as part of the request.
548
549         Also, we're supposed to look at the POST data too.  :)
550
551         * html/parser/XSSFilter.cpp:
552         (WebCore::XSSFilter::eraseAttributeIfInjected):
553         (WebCore::XSSFilter::isSameOriginResource):
554             - Copy/paste from XSSAuditor::isSameOriginResource.  We'll
555               eventually remove the XSSAuditor version when XSSFilter is done.
556         * html/parser/XSSFilter.h:
557
558 2011-01-29  Adam Barth  <abarth@webkit.org>
559
560         Reviewed by Daniel Bates.
561
562         XSSFilter should pass 16 of the xssAuditor/script-tag* tests
563         https://bugs.webkit.org/show_bug.cgi?id=53362
564
565         Turns out we need to replace the src attribute of script tags with
566         about:blank to avoid loading the main document URL as a script.  Also,
567         move misplaced return statement that was triggering the console message
568         too often.
569
570         * html/parser/HTMLToken.h:
571         (WebCore::HTMLToken::appendToAttributeValue):
572         * html/parser/XSSFilter.cpp:
573         (WebCore::XSSFilter::filterScriptToken):
574         (WebCore::XSSFilter::eraseAttributeIfInjected):
575         * html/parser/XSSFilter.h:
576
577 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
578
579         Downloads in WK2 on Windows should write resume data to bundle
580         https://bugs.webkit.org/show_bug.cgi?id=53282
581         <rdar://problem/8753077>
582
583         Reviewed by Alice Liu.
584
585         * WebCore.vcproj/WebCore.vcproj:
586         Added new files to project.
587
588         * platform/network/cf/DownloadBundle.h: Added.
589         * platform/network/win/DownloadBundleWin.cpp: Added.
590         (WebCore::DownloadBundle::magicNumber):
591         Moved from WebKit's WebDownload so that WebKit and WebKit2 can share
592         it.
593         (WebCore::DownloadBundle::fileExtension):
594         Ditto.
595         (WebCore::DownloadBundle::appendResumeData):
596         Ditto - but modified to return bool rather than HRESULT and to clean up
597         whitespace.
598         (WebCore::DownloadBundle::extractResumeData):
599         Ditto - modified to clean up whitespace.
600
601 2011-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
602
603         Unreviewed, rolling out r77050.
604         http://trac.webkit.org/changeset/77050
605         https://bugs.webkit.org/show_bug.cgi?id=53371
606
607         Caused a crash in Chromium's test_shell_tests (Requested by
608         rniwa on #webkit).
609
610         * html/parser/HTMLTreeBuilder.cpp:
611         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
612         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
613         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
614         * html/parser/HTMLTreeBuilder.h:
615
616 2011-01-28  Eric Seidel  <eric@webkit.org>
617
618         Reviewed by Darin Adler.
619
620         HTML5 TreeBuilder regressed a Peacekeeper DOM test by 40%
621         https://bugs.webkit.org/show_bug.cgi?id=48719
622
623         It's unclear exactly what the Peacekeeper benchmark is testing,
624         because I haven't found a way to run it myself.
625
626         However, I constructed a benchmark which shows at least one possible slow point.
627         The HTML5 spec talks about creating a new document for every time we use
628         the fragment parsing algorithm.  Document() it turns out, it a huge bloated
629         mess, and the constructor and destructor do a huge amount of work.
630         To avoid constructing (or destructing) documents for each innerHTML call,
631         this patch adds a shared dummy document used by all innerHTML calls.
632
633         This patch brings us from 7x slower than Safari 5 on tiny-innerHTML
634         to only 1.5x slower than Safari 5.  I'm sure there is more work to do here.
635
636         Saving a shared Document like this is error prone.  Currently
637         DummyDocumentFactory::releaseDocument() calls removeAllChildren()
638         in an attempt to clear the Document's state. However it's possible
639         that that call is not sufficient and we'll have future bugs here.
640
641         * html/parser/HTMLTreeBuilder.cpp:
642         (WebCore::DummyDocumentFactory::createDummyDocument):
643         (WebCore::DummyDocumentFactory::releaseDocument):
644         (WebCore::HTMLTreeBuilder::FragmentParsingContext::FragmentParsingContext):
645         (WebCore::HTMLTreeBuilder::FragmentParsingContext::document):
646         (WebCore::HTMLTreeBuilder::FragmentParsingContext::finished):
647         * html/parser/HTMLTreeBuilder.h:
648
649 2011-01-28  Johnny Ding  <jnd@chromium.org>
650
651         Reviewed by Adam Barth.
652
653         Gesture API: Don't use current gesture status to set "forceUserGesture" parameter when calling ScriptController::executeScript.
654         The "forceUserGesture" parameter should be only set when you are definitely sure that the running script is from a hyper-link.
655         https://bugs.webkit.org/show_bug.cgi?id=53244
656
657         Test: fast/events/popup-blocked-from-iframe-src.html
658
659         * bindings/ScriptControllerBase.cpp:
660         (WebCore::ScriptController::executeIfJavaScriptURL):
661
662 2011-01-28  Simon Fraser  <simon.fraser@apple.com>
663
664         Reviewed by Gavin Barraclough.
665
666         Add various clampToInt() methods to MathExtras.h
667         https://bugs.webkit.org/show_bug.cgi?id=52910
668
669         Use clampToInteger() from MathExtras.h
670
671         * css/CSSParser.cpp:
672         (WebCore::CSSParser::parseCounter):
673
674 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
675
676         Unreviewed, rolling out r77006 and r77020.
677         http://trac.webkit.org/changeset/77006
678         http://trac.webkit.org/changeset/77020
679         https://bugs.webkit.org/show_bug.cgi?id=53360
680
681         "Broke Windows tests" (Requested by rniwa on #webkit).
682
683         * ForwardingHeaders/runtime/WriteBarrier.h: Removed.
684         * WebCore.exp.in:
685         * bindings/js/DOMWrapperWorld.h:
686         * bindings/js/JSAudioConstructor.cpp:
687         (WebCore::JSAudioConstructor::JSAudioConstructor):
688         * bindings/js/JSDOMBinding.cpp:
689         (WebCore::markDOMNodesForDocument):
690         (WebCore::markDOMObjectWrapper):
691         (WebCore::markDOMNodeWrapper):
692         * bindings/js/JSDOMGlobalObject.cpp:
693         (WebCore::JSDOMGlobalObject::markChildren):
694         (WebCore::JSDOMGlobalObject::setInjectedScript):
695         (WebCore::JSDOMGlobalObject::injectedScript):
696         * bindings/js/JSDOMGlobalObject.h:
697         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
698         (WebCore::getDOMConstructor):
699         * bindings/js/JSDOMWindowCustom.cpp:
700         (WebCore::JSDOMWindow::setLocation):
701         (WebCore::DialogHandler::dialogCreated):
702         * bindings/js/JSDOMWindowShell.cpp:
703         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
704         (WebCore::JSDOMWindowShell::setWindow):
705         (WebCore::JSDOMWindowShell::markChildren):
706         (WebCore::JSDOMWindowShell::unwrappedObject):
707         * bindings/js/JSDOMWindowShell.h:
708         (WebCore::JSDOMWindowShell::window):
709         (WebCore::JSDOMWindowShell::setWindow):
710         * bindings/js/JSDeviceMotionEventCustom.cpp:
711         (WebCore::createAccelerationObject):
712         (WebCore::createRotationRateObject):
713         * bindings/js/JSEventListener.cpp:
714         (WebCore::JSEventListener::JSEventListener):
715         (WebCore::JSEventListener::markJSFunction):
716         * bindings/js/JSEventListener.h:
717         (WebCore::JSEventListener::jsFunction):
718         * bindings/js/JSHTMLDocumentCustom.cpp:
719         (WebCore::JSHTMLDocument::setAll):
720         * bindings/js/JSImageConstructor.cpp:
721         (WebCore::JSImageConstructor::JSImageConstructor):
722         * bindings/js/JSImageDataCustom.cpp:
723         (WebCore::toJS):
724         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
725         (WebCore::JSJavaScriptCallFrame::scopeChain):
726         (WebCore::JSJavaScriptCallFrame::scopeType):
727         * bindings/js/JSNodeFilterCondition.cpp:
728         (WebCore::JSNodeFilterCondition::markAggregate):
729         (WebCore::JSNodeFilterCondition::acceptNode):
730         * bindings/js/JSNodeFilterCondition.h:
731         * bindings/js/JSNodeFilterCustom.cpp:
732         * bindings/js/JSOptionConstructor.cpp:
733         (WebCore::JSOptionConstructor::JSOptionConstructor):
734         * bindings/js/JSSQLResultSetRowListCustom.cpp:
735         (WebCore::JSSQLResultSetRowList::item):
736         * bindings/js/ScriptCachedFrameData.cpp:
737         (WebCore::ScriptCachedFrameData::restore):
738         * bindings/js/ScriptObject.cpp:
739         (WebCore::ScriptGlobalObject::set):
740         * bindings/js/SerializedScriptValue.cpp:
741         (WebCore::CloneDeserializer::putProperty):
742         * bindings/scripts/CodeGeneratorJS.pm:
743         * bridge/qt/qt_runtime.cpp:
744         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
745         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
746         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
747         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
748         * bridge/qt/qt_runtime.h:
749         * bridge/runtime_root.cpp:
750         (JSC::Bindings::RootObject::invalidate):
751         * bridge/runtime_root.h:
752         * dom/Document.h:
753
754 2011-01-28  Adam Barth  <abarth@webkit.org>
755
756         Reviewed by Eric Seidel.
757
758         XSSFilter should log to the console when it blocks something
759         https://bugs.webkit.org/show_bug.cgi?id=53354
760
761         This patch refactors a bunch of methods in XSSFilter to return a bool
762         indicating whether they blocked anything.  Using this bool, we decide
763         whether to log to the console.  We're using the same log message as the
764         XSSAuditor, but it seems likely we can improve this message in the
765         future (especially by piping in the correct line number, which is now
766         accessible via the parser).
767
768         * html/parser/XSSFilter.cpp:
769         (WebCore::HTMLNames::isNameOfInlineEventHandler):
770         (WebCore::XSSFilter::filterToken):
771         (WebCore::XSSFilter::filterTokenInitial):
772         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
773         (WebCore::XSSFilter::filterScriptToken):
774         (WebCore::XSSFilter::filterObjectToken):
775         (WebCore::XSSFilter::filterEmbedToken):
776         (WebCore::XSSFilter::filterAppletToken):
777         (WebCore::XSSFilter::filterMetaToken):
778         (WebCore::XSSFilter::filterBaseToken):
779         (WebCore::XSSFilter::eraseInlineEventHandlersIfInjected):
780         * html/parser/XSSFilter.h:
781
782 2011-01-28  Adam Barth  <abarth@webkit.org>
783
784         Reviewed by Daniel Bates.
785
786         Wire up settings->xssAuditorEnabled to XSSFilter
787         https://bugs.webkit.org/show_bug.cgi?id=53345
788
789         * html/parser/XSSFilter.cpp:
790         (WebCore::XSSFilter::XSSFilter):
791         (WebCore::XSSFilter::filterToken):
792         * html/parser/XSSFilter.h:
793
794 2011-01-28  Adam Barth  <abarth@webkit.org>
795
796         Reviewed by Daniel Bates.
797
798         Teach XSSFilter about <meta> and <base> tags
799         https://bugs.webkit.org/show_bug.cgi?id=53339
800
801         I'm not 100% sure we need to block <meta http-equiv>, but it seems
802         prudent given how powerful that attribute is.  We definitely need to
803         block injection of <base href> because that can redirect script tags
804         that use relative URLs.
805
806         * html/parser/XSSFilter.cpp:
807         (WebCore::XSSFilter::filterToken):
808         (WebCore::XSSFilter::filterMetaToken):
809         (WebCore::XSSFilter::filterBaseToken):
810         * html/parser/XSSFilter.h:
811
812 2011-01-28  Adam Barth  <abarth@webkit.org>
813
814         Reviewed by Daniel Bates.
815
816         Teach XSSFilter about <applet>
817         https://bugs.webkit.org/show_bug.cgi?id=53338
818
819         HTML5 is pretty light on information about how the <applet> tag works.
820         According to this site:
821
822         http://download.oracle.com/javase/1.4.2/docs/guide/misc/applet.html
823
824         The "code" and "object" attributes are the essential attributes for
825         determining which piece of Java to run.  We might need to expand to the
826         codebase and archive attributes at some point, but hopefully code and
827         object will be sufficient.
828
829         * html/parser/XSSFilter.cpp:
830         (WebCore::XSSFilter::filterToken):
831         (WebCore::XSSFilter::filterAppletToken):
832         * html/parser/XSSFilter.h:
833
834 2011-01-28  Adam Barth  <abarth@webkit.org>
835
836         Reviewed by Daniel Bates.
837
838         Teach the XSSFilter about object and embed tags
839         https://bugs.webkit.org/show_bug.cgi?id=53336
840
841         For <object> and <embed>, we filter out attribute values that either
842         indicate which piece of media to load or which plugin to load.  In a
843         perfect world, we'd only need to filter out the URLs of the media, but
844         some plug-ins (like Flash) have lots of fun places you can hide the
845         URL (e.g., the "movie" <param>).
846
847         * html/parser/XSSFilter.cpp:
848         (WebCore::XSSFilter::filterToken):
849         (WebCore::XSSFilter::filterScriptToken):
850         (WebCore::XSSFilter::filterObjectToken):
851         (WebCore::XSSFilter::filterEmbedToken):
852         (WebCore::XSSFilter::eraseAttributeIfInjected):
853         * html/parser/XSSFilter.h:
854
855 2011-01-28  Oliver Hunt  <oliver@apple.com>
856
857         Fix Qt build.
858
859         * bridge/qt/qt_runtime.cpp:
860         (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
861         (JSC::Bindings::QtRuntimeMetaMethod::markChildren):
862         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
863         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
864         * bridge/qt/qt_runtime.h:
865
866 2011-01-28  Antti Koivisto  <antti@apple.com>
867
868         Reviewed by Simon Fraser.
869
870         CSS styles are shared based on uninitialized property values
871         https://bugs.webkit.org/show_bug.cgi?id=53285
872         
873         Null test.
874
875         * dom/NamedNodeMap.cpp:
876         (WebCore::NamedNodeMap::mappedMapsEquivalent):
877
878 2011-01-27  Oliver Hunt  <oliver@apple.com>
879
880         Reviewed by Geoffrey Garen.
881
882         Convert markstack to a slot visitor API
883         https://bugs.webkit.org/show_bug.cgi?id=53219
884
885         Update WebCore to the new marking apis, correct bindings
886         codegen. 
887
888         * ForwardingHeaders/runtime/WriteBarrier.h: Added.
889         * WebCore.exp.in:
890         * bindings/js/DOMWrapperWorld.h:
891         (WebCore::DOMWrapperWorld::globalData):
892         * bindings/js/JSAudioConstructor.cpp:
893         (WebCore::JSAudioConstructor::JSAudioConstructor):
894         * bindings/js/JSDOMBinding.cpp:
895         (WebCore::markDOMNodesForDocument):
896         (WebCore::markDOMObjectWrapper):
897         (WebCore::markDOMNodeWrapper):
898         * bindings/js/JSDOMGlobalObject.cpp:
899         (WebCore::JSDOMGlobalObject::markChildren):
900         (WebCore::JSDOMGlobalObject::setInjectedScript):
901         (WebCore::JSDOMGlobalObject::injectedScript):
902         * bindings/js/JSDOMGlobalObject.h:
903         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
904         (WebCore::getDOMConstructor):
905         * bindings/js/JSDOMWindowCustom.cpp:
906         (WebCore::JSDOMWindow::setLocation):
907         (WebCore::DialogHandler::dialogCreated):
908         * bindings/js/JSDOMWindowShell.cpp:
909         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
910         (WebCore::JSDOMWindowShell::setWindow):
911         (WebCore::JSDOMWindowShell::markChildren):
912         (WebCore::JSDOMWindowShell::unwrappedObject):
913         * bindings/js/JSDOMWindowShell.h:
914         (WebCore::JSDOMWindowShell::window):
915         (WebCore::JSDOMWindowShell::setWindow):
916         * bindings/js/JSEventListener.cpp:
917         (WebCore::JSEventListener::JSEventListener):
918         (WebCore::JSEventListener::markJSFunction):
919         * bindings/js/JSEventListener.h:
920         (WebCore::JSEventListener::jsFunction):
921         * bindings/js/JSHTMLDocumentCustom.cpp:
922         (WebCore::JSHTMLDocument::setAll):
923         * bindings/js/JSImageConstructor.cpp:
924         (WebCore::JSImageConstructor::JSImageConstructor):
925         * bindings/js/JSImageDataCustom.cpp:
926         (WebCore::toJS):
927         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
928         (WebCore::JSJavaScriptCallFrame::scopeChain):
929         (WebCore::JSJavaScriptCallFrame::scopeType):
930         * bindings/js/JSNodeFilterCondition.cpp:
931         (WebCore::JSNodeFilterCondition::markAggregate):
932         (WebCore::JSNodeFilterCondition::acceptNode):
933         * bindings/js/JSNodeFilterCondition.h:
934         * bindings/js/JSNodeFilterCustom.cpp:
935         * bindings/js/JSOptionConstructor.cpp:
936         (WebCore::JSOptionConstructor::JSOptionConstructor):
937         * bindings/js/JSSQLResultSetRowListCustom.cpp:
938         (WebCore::JSSQLResultSetRowList::item):
939         * bindings/js/ScriptCachedFrameData.cpp:
940         (WebCore::ScriptCachedFrameData::restore):
941         * bindings/js/ScriptObject.cpp:
942         (WebCore::ScriptGlobalObject::set):
943         * bindings/js/SerializedScriptValue.cpp:
944         (WebCore::CloneDeserializer::putProperty):
945         * bindings/scripts/CodeGeneratorJS.pm:
946         * dom/Document.h:
947
948 2011-01-28  Sam Weinig  <sam@webkit.org>
949
950         Reviewed by Anders Carlsson.
951
952         Keyboard scrolling doesn’t work in WebKit2
953         <rdar://problem/8909672>
954
955         * platform/mac/ScrollAnimatorMac.mm:
956         (-[ScrollAnimationHelperDelegate convertSizeToBacking:]):
957         (-[ScrollAnimationHelperDelegate convertSizeFromBacking:]):
958         Add additional necessary delegate methods.
959
960 2011-01-29  Darin Adler  <darin@apple.com>
961
962         Reviewed by Dan Bernstein.
963
964         Re-land this patch with the missing null check that caused crashes in layout tests.
965
966         Changing cursor style has no effect until the mouse moves
967         https://bugs.webkit.org/show_bug.cgi?id=14344
968         rdar://problem/7563712
969
970         No tests added because we don't have infrastructure for testing actual cursor
971         changes (as opposed to cursor style computation) at this time. We might add it later.
972
973         * page/EventHandler.cpp:
974         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
975         * page/EventHandler.h: Ditto.
976
977         * rendering/RenderObject.cpp:
978         (WebCore::areNonIdenticalCursorListsEqual): Added.
979         (WebCore::areCursorsEqual): Added.
980         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
981         cursor styles changed.
982
983 2011-01-28  Justin Schuh  <jschuh@chromium.org>
984
985         Reviewed by Eric Seidel.
986
987         We should hold RefPtrs to SVG font faces
988         https://bugs.webkit.org/show_bug.cgi?id=53270
989
990         Test: svg/custom/use-multiple-on-nested-disallowed-font.html
991
992         * css/CSSFontFaceSource.cpp:
993         (WebCore::CSSFontFaceSource::getFontData):
994         * css/CSSFontFaceSource.h:
995         * svg/SVGFontFaceElement.cpp:
996         (WebCore::SVGFontFaceElement::associatedFontElement):
997         * svg/SVGFontFaceElement.h:
998
999 2011-01-28  Zhenyao Mo  <zmo@google.com>
1000
1001         Reviewed by Kenneth Russell.
1002
1003         uniformN*v should generate INVALID_VALUE of the array size is not a multiple of N
1004         https://bugs.webkit.org/show_bug.cgi?id=53306
1005
1006         * html/canvas/WebGLRenderingContext.cpp:
1007         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
1008
1009 2011-01-28  Tom Sepez  <tsepez@chromium.org>
1010
1011         Reviewed by Eric Seidel.
1012
1013         NULL pointer crash in TextIterator::handleTextBox()
1014         https://bugs.webkit.org/show_bug.cgi?id=53267
1015
1016         Test: fast/css/rtl-nth-child-first-letter-crash.html
1017
1018         * editing/TextIterator.cpp:
1019         (WebCore::TextIterator::handleTextBox):
1020
1021 2011-01-28  Adrienne Walker  <enne@google.com>
1022
1023         Reviewed by Kenneth Russell.
1024
1025         [chromium] Remove a spurious diagnostic CRASH check.
1026         https://bugs.webkit.org/show_bug.cgi?id=52379
1027
1028         * platform/graphics/chromium/LayerTilerChromium.cpp:
1029         (WebCore::LayerTilerChromium::invalidateRect):
1030
1031 2011-01-28  Dan Bernstein  <mitz@apple.com>
1032
1033         Reviewed by Sam Weinig.
1034
1035         <rdar://problem/4761512> <select> can't display right-to-left (rtl) languages
1036         https://bugs.webkit.org/show_bug.cgi?id=19785
1037
1038         Changed <select> pop-up menus on Mac OS X Snow Leopard and later to have their items aligned in the
1039         direction corresponding to the writing direction of the <select> element, with the checkmarks
1040         on the "start" side, and use the <option>'s writing direction rather than "natural". Made the
1041         pop-up button match the menu by adding a Chrome boolean function, selectItemAlignmentFollowsMenuWritingDirection(),
1042         which returns true for this pop-up behavior.
1043
1044         * loader/EmptyClients.h:
1045         (WebCore::EmptyChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
1046         * manual-tests/pop-up-alignment-and-direction.html: Added.
1047         * page/Chrome.cpp:
1048         (WebCore::Chrome::selectItemAlignmentFollowsMenuWritingDirection): Added. Calls through to the
1049         client.
1050         * page/Chrome.h:
1051         * page/ChromeClient.h:
1052         * platform/PopupMenuStyle.h:
1053         (WebCore::PopupMenuStyle::PopupMenuStyle): Added hasTextDirectionOverride parameter and member
1054         variable initialization.
1055         (WebCore::PopupMenuStyle::hasTextDirectionOverride): Added this accessor.
1056         * platform/mac/PopupMenuMac.mm:
1057         (WebCore::PopupMenuMac::populate): Set the pop-up's layout direction and items' text alignment
1058         to match the menu's writing direction. Set items' writing direction and direction override
1059         according to their styles.
1060         * rendering/RenderMenuList.cpp:
1061         (WebCore::RenderMenuList::RenderMenuList): Removed unncesaary initialization of a smart pointer.
1062         (WebCore::RenderMenuList::adjustInnerStyle): If the alignment of items in the menu follows the
1063         menu's writing direction, use that alignment for the button as well. Also in this mode, use the
1064         item's writing direction and override setting.
1065         (WebCore::RenderMenuList::setTextFromOption): Store the option element's style.
1066         (WebCore::RenderMenuList::itemStyle): Pass the text direction override value.
1067         (WebCore::RenderMenuList::menuStyle): Ditto. Also use the button's direction, not the inner text's.
1068         * rendering/RenderMenuList.h:
1069         * rendering/RenderTextControlSingleLine.cpp:
1070         (WebCore::RenderTextControlSingleLine::menuStyle): Pass the text direction override value.
1071
1072 2011-01-28  Adam Barth  <abarth@webkit.org>
1073
1074         Reviewed by Daniel Bates.
1075
1076         Teach XSSFilter how to filter <script> elements
1077         https://bugs.webkit.org/show_bug.cgi?id=53279
1078
1079         This patch adds the ability for the XSSFilter to block injected
1080         <script> elements.  Handling script elements is slightly subtle because
1081         these elements act very differently depending on whether they have a
1082         src attribute.
1083         
1084         In the "src case", which check whether the src attribute was present in
1085         the request.  In the "non-src case", we check whether the start tag and
1086         the body of the script element was included in the request.  Checking
1087         for the whole start tag means we miss out on some attribute splitting
1088         attacks inside of script tags, but that doesn't seem like that big a
1089         deal.
1090
1091         This patch also introduces some amount of state into the XSSFilter
1092         because inline script elements span multiple tokens.  There's a lot of
1093         tuning and optimization left in these cases, some of which I've noted
1094         with FIXMEs.
1095
1096         To test this patch, I played around with some of the existing
1097         XSSAuditor tests.  Hopefully I'll be able to run the test suite more
1098         systematically in the future.
1099
1100         * html/parser/HTMLToken.h:
1101         (WebCore::HTMLToken::eraseCharacters):
1102         (WebCore::HTMLToken::eraseValueOfAttribute):
1103         * html/parser/XSSFilter.cpp:
1104         (WebCore::HTMLNames::hasName):
1105         (WebCore::HTMLNames::findAttributeWithName):
1106         (WebCore::HTMLNames::isNameOfScriptCarryingAttribute):
1107         (WebCore::XSSFilter::XSSFilter):
1108         (WebCore::XSSFilter::filterToken):
1109         (WebCore::XSSFilter::filterTokenAfterScriptStartTag):
1110         (WebCore::XSSFilter::filterScriptToken):
1111         (WebCore::XSSFilter::snippetForRange):
1112         (WebCore::XSSFilter::snippetForAttribute):
1113         * html/parser/XSSFilter.h:
1114
1115 2011-01-28  Adam Barth  <abarth@webkit.org>
1116
1117         Reviewed by Daniel Bates.
1118
1119         Sketch out new XSS filter design (disabled by default)
1120         https://bugs.webkit.org/show_bug.cgi?id=53205
1121
1122         This patch adds a basic sketch of the new XSS filter design.  Rather
1123         than watching scripts as they execute, in this design, we watch tokens
1124         emitted by the tokenizer.  We then map the tokens directly back into
1125         input characters, which lets us skip all the complicated logic related
1126         to HTML entities and double-decoding of JavaScript URLs.
1127
1128         This patch contains only the bare essentially machinery.  I'll add more
1129         in future patches and eventually remove the previous code once this
1130         code is up and running correctly.
1131
1132         * Android.mk:
1133         * CMakeLists.txt:
1134         * GNUmakefile.am:
1135         * WebCore.gypi:
1136         * WebCore.pro:
1137         * WebCore.vcproj/WebCore.vcproj:
1138         * WebCore.xcodeproj/project.pbxproj:
1139         * html/parser/HTMLDocumentParser.cpp:
1140         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1141         (WebCore::HTMLDocumentParser::pumpTokenizer):
1142         (WebCore::HTMLDocumentParser::sourceForToken):
1143         * html/parser/HTMLDocumentParser.h:
1144         * html/parser/XSSFilter.cpp: Added.
1145         * html/parser/XSSFilter.h: Added.
1146
1147 2011-01-28  Michael Saboff  <msaboff@apple.com>
1148
1149         Reviewed by Geoffrey Garen.
1150
1151         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1152         https://bugs.webkit.org/show_bug.cgi?id=53271
1153
1154         Reapplying this patch with the change that the second ASSERT in 
1155         RootObject::removeRuntimeObject was changed to use
1156         .uncheckedGet() instead of the failing .get().  The object in question
1157         could be in the process of being GC'ed.  The get() call will not return
1158         such an object while the uncheckedGet() call will return the (unsafe) 
1159         object.  This is the behavior we want.
1160
1161         Precautionary change.
1162         Changed RootObject to use WeakGCMap instead of HashSet.
1163         Found will looking for another issue, but can't produce a test case
1164         that is problematic.  THerefore there aren't any new tests.
1165
1166         * bridge/runtime_root.cpp:
1167         (JSC::Bindings::RootObject::invalidate):
1168         (JSC::Bindings::RootObject::addRuntimeObject):
1169         (JSC::Bindings::RootObject::removeRuntimeObject):
1170         * bridge/runtime_root.h:
1171
1172 2011-01-28  Adam Roben  <aroben@apple.com>
1173
1174         Notify CACFLayerTreeHost when the context is flushed
1175
1176         LegacyCACFLayerTreeHost was keeping this a secret, which meant that WebCore's animation
1177         timers were never starting.
1178
1179         Fixes <http://webkit.org/b/53302> [Windows 7 Release Tests] changesets 76853, 76856, and
1180         76858 broke ~36 animations, compositing, and transitions tests
1181
1182         Reviewed by Sam Weinig.
1183
1184         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
1185         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): Call up to the base class after we
1186         start our render timer.
1187
1188 2011-01-28  Antti Koivisto  <antti@apple.com>
1189
1190         Reviewed by Dan Bernstein.
1191
1192         Remove dead code that tried to map from CSS values to parser values
1193         https://bugs.webkit.org/show_bug.cgi?id=53318
1194
1195         * css/CSSFunctionValue.cpp:
1196         * css/CSSFunctionValue.h:
1197         * css/CSSPrimitiveValue.cpp:
1198         * css/CSSPrimitiveValue.h:
1199         * css/CSSValue.h:
1200         * css/CSSValueList.cpp:
1201         * css/CSSValueList.h:
1202
1203 2011-01-28  Enrica Casucci  <enrica@apple.com>
1204
1205         Reviewed by Adam Roben.
1206
1207         Some drag and drop tests fail since r76824
1208         https://bugs.webkit.org/show_bug.cgi?id=53304
1209
1210         There were '||' instead of '&&' in the checks for valid
1211         clipboard content.
1212         
1213         * platform/win/ClipboardWin.cpp:
1214         (WebCore::ClipboardWin::getData):
1215         (WebCore::ClipboardWin::types):
1216         (WebCore::ClipboardWin::files):
1217
1218 2011-01-28  Martin Robinson  <mrobinson@igalia.com>
1219
1220         [GTK] AudioProcessingEvent.h and JSJavaScriptAudioNode.h: No such file or directory
1221         https://bugs.webkit.org/show_bug.cgi?id=52889
1222
1223         Build fix for WebAudio. Include WebAudio source files on the source
1224         list when WebAudio is enabled.
1225
1226         * GNUmakefile.am: Include missing source files.
1227
1228 2011-01-28  Sam Weinig  <sam@webkit.org>
1229
1230         Reviewed by Maciej Stachowiak.
1231
1232         Add basic rubber banding support
1233         <rdar://problem/8219429>
1234         https://bugs.webkit.org/show_bug.cgi?id=53277
1235
1236         * page/EventHandler.cpp:
1237         (WebCore::EventHandler::handleGestureEvent):
1238         Pass gesture events to the FrameView.
1239
1240         * platform/ScrollAnimator.cpp:
1241         (WebCore::ScrollAnimator::handleGestureEvent):
1242         * platform/ScrollAnimator.h:
1243         Add stubbed out implementation.
1244
1245         * platform/ScrollView.cpp:
1246         (WebCore::ScrollView::ScrollView):
1247         (WebCore::ScrollView::overhangAmount):
1248         (WebCore::ScrollView::wheelEvent):
1249         * platform/ScrollView.h:
1250         * platform/ScrollableArea.cpp:
1251         (WebCore::ScrollableArea::ScrollableArea):
1252         (WebCore::ScrollableArea::handleGestureEvent):
1253         * platform/ScrollableArea.h:
1254         (WebCore::ScrollableArea::constrainsScrollingToContentEdge):
1255         (WebCore::ScrollableArea::setConstrainsScrollingToContentEdge):
1256         Move constrains scrolling bit to ScrollableArea from ScrollView.
1257
1258         (WebCore::ScrollableArea::contentsSize):
1259         (WebCore::ScrollableArea::overhangAmount):
1260         Add additional virtual functions for information needed by the animator.
1261
1262         * platform/mac/ScrollAnimatorMac.h:
1263         * platform/mac/ScrollAnimatorMac.mm:
1264         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1265         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
1266         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
1267         (WebCore::elasticDeltaForTimeDelta):
1268         (WebCore::elasticDeltaForReboundDelta):
1269         (WebCore::reboundDeltaForElasticDelta):
1270         (WebCore::scrollWheelMultiplier):
1271         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1272         (WebCore::ScrollAnimatorMac::handleGestureEvent):
1273         (WebCore::ScrollAnimatorMac::pinnedInDirection):
1274         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
1275         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
1276         (WebCore::ScrollAnimatorMac::smoothScrollWithEvent):
1277         (WebCore::ScrollAnimatorMac::beginScrollGesture):
1278         (WebCore::ScrollAnimatorMac::endScrollGesture):
1279         (WebCore::ScrollAnimatorMac::snapRubberBand):
1280         (WebCore::roundTowardZero):
1281         (WebCore::roundToDevicePixelTowardZero):
1282         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
1283         Implement basic rubber banding.
1284
1285 2011-01-28  Dan Bernstein  <mitz@apple.com>
1286
1287         Reviewed by Anders Carlsson.
1288
1289         Changing unicode-bidi doesn’t force layout
1290         https://bugs.webkit.org/show_bug.cgi?id=53311
1291
1292         Test: fast/dynamic/unicode-bidi.html
1293
1294         * rendering/style/RenderStyle.cpp:
1295         (WebCore::RenderStyle::diff): Return a layout difference if unicode-bidi values differ.
1296
1297 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
1298
1299         Reviewed by Kent Tamura.
1300
1301         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
1302         https://bugs.webkit.org/show_bug.cgi?id=53122
1303
1304         This is the first step in converting HTMLMediaElement to the new shadow DOM.
1305
1306         Should not regress any existing tests. No observable change in behavior.
1307
1308         * css/CSSSelector.cpp:
1309         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
1310         (WebCore::nameToPseudoTypeMap): Ditto.
1311         (WebCore::CSSSelector::extractPseudoType): Ditto.
1312         * css/CSSSelector.h: Ditto.
1313         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
1314         * rendering/MediaControlElements.cpp:
1315         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
1316             which is now replaced with virtual shadowPseudoId on each corresponding class.
1317         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
1318         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
1319             display type in constructor.
1320         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
1321             constructor argument.
1322         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
1323         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
1324             to disambiguate from the MediaControlMuteButtonElement.
1325         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
1326         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
1327         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
1328             constructor argument.
1329         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
1330         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
1331             constructor argument.
1332         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
1333         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
1334         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
1335         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
1336         (WebCore::MediaControlSeekBackButtonElement::create): Added.
1337         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
1338         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
1339         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
1340         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
1341             constructor argument.
1342         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
1343         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
1344             constructor argument.
1345         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
1346         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
1347             constructor argument.
1348         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
1349         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
1350             constructor argument.
1351         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
1352         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
1353             constructor argument.
1354         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
1355         * rendering/MediaControlElements.h:
1356         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
1357         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.
1358         * rendering/RenderMedia.cpp:
1359         (WebCore::RenderMedia::createMuteButton): Changed to use new constructor.
1360         (WebCore::RenderMedia::createSeekBackButton): Ditto.
1361         (WebCore::RenderMedia::createSeekForwardButton): Ditto.
1362         (WebCore::RenderMedia::createVolumeSliderMuteButton): Ditto.
1363         * rendering/style/RenderStyleConstants.h: Removed constants that are no longer used.
1364
1365 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
1366
1367         Reviewed by Eric Carlson.
1368
1369         Split MediaControls out of RenderMedia.
1370         https://bugs.webkit.org/show_bug.cgi?id=53252
1371
1372         Near-mechanical moving of stuff, no change in behavior, thus no new tests.
1373
1374         * Android.mk: Added MediaControls to build system.
1375         * CMakeLists.txt: Ditto.
1376         * GNUmakefile.am: Ditto.
1377         * WebCore.gypi: Ditto.
1378         * WebCore.pro: Ditto.
1379         * WebCore.vcproj/WebCore.vcproj: Ditto.
1380         * WebCore.xcodeproj/project.pbxproj: Ditto.
1381         * html/HTMLMediaElement.cpp:
1382         (WebCore::HTMLMediaElement::defaultEventHandler): Changed to forward events to MediaControls.
1383         * html/shadow/MediaControls.cpp: Copied all controls-related methods from
1384             Source/WebCore/rendering/RenderMedia.cpp, pulled them into their own class called MediaControls. 
1385         * html/shadow/MediaControls.h: Ditto from Source/WebCore/rendering/RenderMedia.h.
1386         * rendering/MediaControlElements.cpp:
1387         (WebCore::MediaControlTimelineElement::defaultEventHandler): Changed to use MediaControls.
1388         * rendering/RenderMedia.cpp:
1389         (WebCore::RenderMedia::RenderMedia): Moved relevant constructor initializers out to MediaControls.
1390         (WebCore::RenderMedia::destroy): Changed to use MediaControls.
1391         (WebCore::RenderMedia::styleDidChange): Ditto.
1392         (WebCore::RenderMedia::layout): Ditto.
1393         (WebCore::RenderMedia::updateFromElement): Ditto.
1394         * rendering/RenderMedia.h: Updated defs accordingly and removed player() accessor, which
1395             is only used by sub-class RenderVideo.
1396         (WebCore::RenderMedia::controls): Added.
1397         * rendering/RenderVideo.cpp:
1398         (WebCore::RenderVideo::~RenderVideo): Changed to access MediaPlayer* directly from mediaElement().
1399         (WebCore::RenderVideo::calculateIntrinsicSize): Ditto.
1400         (WebCore::RenderVideo::paintReplaced): Ditto.
1401         (WebCore::RenderVideo::updatePlayer): Ditto.
1402         (WebCore::RenderVideo::supportsAcceleratedRendering): Ditto.
1403         (WebCore::RenderVideo::acceleratedRenderingStateChanged): Ditto.
1404
1405 2011-01-28  Pavel Feldman  <pfeldman@chromium.org>
1406
1407         Reviewed by Yury Semikhatsky.
1408
1409         Web Inspector: allow remote debugging with front-end
1410         served from the cloud.
1411         https://bugs.webkit.org/show_bug.cgi?id=53303
1412
1413         * inspector/front-end/inspector.js:
1414
1415 2011-01-28  Aparna Nandyal  <aparna.nand@wipro.com>
1416
1417         Reviewed by Andreas Kling.
1418
1419         Setting value of m_PressedPos to make scrolling smooth
1420
1421         Page scroll popup menu "Scroll here" option not working when cliking above scroll slider/handler.
1422         https://bugs.webkit.org/show_bug.cgi?id=51349
1423
1424         The value of m_PressedPos was getting set before moveThumb() call
1425         in all other scenarios except when "Scroll Here" option is used.
1426         Hence scrolling with this option was not as expected even in cases
1427         where scrolling was happening. The thumb would move in unexpected
1428         direction. m_PressedPos is now set to pressed position so delta is
1429         calculated.
1430         Unable to write a test case as the test needs to click on "Scroll
1431         Here" option of context sensitive menu and QTest is unable to do it.
1432         Besides no new functionality introduced.
1433
1434         * platform/qt/ScrollbarQt.cpp:
1435         (WebCore::Scrollbar::contextMenu):
1436
1437 2011-01-28  Andrey Kosyakov  <caseq@chromium.org>
1438
1439         Reviewed by Pavel Feldman.
1440
1441         Web Inspector: [Extensions API] add JSON schema for extensions API
1442         https://bugs.webkit.org/show_bug.cgi?id=53236
1443
1444         * inspector/front-end/ExtensionAPISchema.json: Added.
1445
1446 2011-01-27  Zhenyao Mo  <zmo@google.com>
1447
1448         Reviewed by Kenneth Russell.
1449
1450         Remove _LENGTH enumerants
1451         https://bugs.webkit.org/show_bug.cgi?id=53259
1452
1453         * html/canvas/WebGLRenderingContext.cpp: Remove queries for *LENGTH.
1454         (WebCore::WebGLRenderingContext::getProgramParameter):
1455         (WebCore::WebGLRenderingContext::getShaderParameter):
1456         * html/canvas/WebGLRenderingContext.idl: Remove *LENGTH.
1457
1458 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
1459
1460         Reviewed by Yury Semikhatsky.
1461
1462         Web Inspector: syntax highlight inline JS and CSS in HTML resources
1463         https://bugs.webkit.org/show_bug.cgi?id=30831
1464
1465         * inspector/front-end/SourceHTMLTokenizer.js:
1466         (WebInspector.SourceHTMLTokenizer):
1467         (WebInspector.SourceHTMLTokenizer.prototype.set line):
1468         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
1469         * inspector/front-end/SourceHTMLTokenizer.re2js:
1470
1471 2011-01-28  Alexander Pavlov  <apavlov@chromium.org>
1472
1473         Reviewed by Yury Semikhatsky.
1474
1475         Web Inspector: [STYLES] Up/Down-suggestion breaks an existing keyword
1476         https://bugs.webkit.org/show_bug.cgi?id=53295
1477
1478         Select the current word suffix before switching to the next suggestion.
1479
1480         * inspector/front-end/StylesSidebarPane.js:
1481         ():
1482
1483 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
1484
1485         Reviewed by Xan Lopez.
1486
1487         [GTK] Fix dist compilation for the release
1488         https://bugs.webkit.org/show_bug.cgi?id=53290
1489
1490         * GNUmakefile.am: Added inspector files to the extra dist.
1491
1492 2011-01-28  Ilya Sherman  <isherman@chromium.org>
1493
1494         Reviewed by Andreas Kling.
1495
1496         Const-correct HTMLSelectElement and WebSelectElement
1497         https://bugs.webkit.org/show_bug.cgi?id=53293
1498
1499         * html/HTMLSelectElement.cpp:
1500         (WebCore::HTMLSelectElement::value): const.
1501         * html/HTMLSelectElement.h:
1502
1503 2011-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1504
1505         Unreviewed, rolling out r76893.
1506         http://trac.webkit.org/changeset/76893
1507         https://bugs.webkit.org/show_bug.cgi?id=53287
1508
1509         It made some tests crash on GTK and Qt debug bots (Requested
1510         by Ossy on #webkit).
1511
1512         * bridge/runtime_root.cpp:
1513         (JSC::Bindings::RootObject::invalidate):
1514         (JSC::Bindings::RootObject::addRuntimeObject):
1515         (JSC::Bindings::RootObject::removeRuntimeObject):
1516         * bridge/runtime_root.h:
1517
1518 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
1519
1520         Reviewed by Laszlo Gombos.
1521
1522         Get rid of prefix header dependency for WebKit2 build system
1523         https://bugs.webkit.org/show_bug.cgi?id=50174
1524
1525         Guard EmptyProtocalDefinitions.h to make sure it's not included twice.
1526
1527         * platform/mac/EmptyProtocolDefinitions.h:
1528
1529 2011-01-27  Abhishek Arya  <inferno@chromium.org>
1530
1531         Reviewed by Dan Bernstein.
1532
1533         Recalc table sections if needed before calculating the first line
1534         box baseline.
1535         https://bugs.webkit.org/show_bug.cgi?id=53265
1536
1537         When we try to calculate the baseline position of a table cell,
1538         we recurse through all the child sibling boxes (when children are
1539         non inline) and add their first linebox baseline values. If one of
1540         the children is a table with pending section recalc, we will access
1541         wrong table section values. We recalc table sections if it is needed.
1542
1543         Test: fast/table/recalc-section-first-body-crash-main.html
1544
1545         * rendering/RenderTable.cpp:
1546         (WebCore::RenderTable::firstLineBoxBaseline):
1547
1548 2011-01-27  Adrienne Walker  <enne@google.com>
1549
1550         Reviewed by Kenneth Russell.
1551
1552         [chromium] Add CRASH calls to further debug tiled compositor memcpy crash.
1553         https://bugs.webkit.org/show_bug.cgi?id=52379
1554
1555         Test: LayoutTests/compositing (to verify these weren't triggered)
1556
1557         * platform/graphics/chromium/LayerTilerChromium.cpp:
1558         (WebCore::LayerTilerChromium::invalidateRect):
1559         (WebCore::LayerTilerChromium::update):
1560
1561 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
1562
1563         Reviewed by Pavel Feldman.
1564
1565         Web Inspector: [STYLES] Cancelled suggestion of a property name results in a visual artifact
1566         https://bugs.webkit.org/show_bug.cgi?id=53242
1567
1568         * inspector/front-end/StylesSidebarPane.js:
1569         (WebInspector.StylePropertyTreeElement.prototype):
1570
1571 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1572
1573         Unreviewed, rolling out r76891.
1574         http://trac.webkit.org/changeset/76891
1575         https://bugs.webkit.org/show_bug.cgi?id=53280
1576
1577         Makes every layout test crash (Requested by othermaciej on
1578         #webkit).
1579
1580         * page/EventHandler.cpp:
1581         * page/EventHandler.h:
1582         * rendering/RenderObject.cpp:
1583         (WebCore::RenderObject::styleDidChange):
1584
1585 2011-01-27  Ryosuke Niwa  <rniwa@webkit.org>
1586
1587         Unreviewed, rolling out r76839.
1588         http://trac.webkit.org/changeset/76839
1589         https://bugs.webkit.org/show_bug.cgi?id=49744
1590
1591         broke pixel tests
1592
1593         * rendering/RenderBox.cpp:
1594         (WebCore::RenderBox::localCaretRect):
1595
1596 2011-01-27  Emil A Eklund  <eae@chromium.org>
1597
1598         Reviewed by Darin Adler.
1599
1600         contentEditable formatBlock crashes on divs with contenteditable="false"
1601         https://bugs.webkit.org/show_bug.cgi?id=53263
1602
1603         Check if editableRootForPosition returns null for position.
1604
1605         Test: editing/execCommand/format-block-contenteditable-false.html
1606
1607         * editing/FormatBlockCommand.cpp:
1608         (WebCore::FormatBlockCommand::formatRange):
1609
1610 2011-01-27  Dimitri Glazkov  <dglazkov@chromium.org>
1611
1612         Reviewed by Darin Adler.
1613
1614         Remove RenderMedia members that aren't used.
1615         https://bugs.webkit.org/show_bug.cgi?id=53245
1616
1617         Refactoring, no change in behavior, so no new tests.
1618
1619         * rendering/RenderMedia.h: Removed unused member variables.
1620
1621 2011-01-27  Michael Saboff  <msaboff@apple.com>
1622
1623         Reviewed by Darin Adler.
1624
1625         Potentially Unsafe HashSet of RuntimeObject* in RootObject definition
1626         https://bugs.webkit.org/show_bug.cgi?id=53271
1627
1628         Precautionary change.
1629         Changed RootObject to use WeakGCMap instead of HashSet.
1630         Found will looking for another issue, but can't produce a test case
1631         that is problematic.  THerefore there aren't any new tests.
1632
1633         * bridge/runtime_root.cpp:
1634         (JSC::Bindings::RootObject::invalidate):
1635         (JSC::Bindings::RootObject::addRuntimeObject):
1636         (JSC::Bindings::RootObject::removeRuntimeObject):
1637         * bridge/runtime_root.h:
1638
1639 2011-01-27  Kenneth Russell  <kbr@google.com>
1640
1641         Reviewed by James Robinson.
1642
1643         Rename Typed Array slice() to subset()
1644         https://bugs.webkit.org/show_bug.cgi?id=53273
1645
1646         * bindings/js/JSArrayBufferViewHelper.h:
1647         (WebCore::constructArrayBufferView):
1648         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1649         (WebCore::constructWebGLArray):
1650         * html/canvas/Float32Array.cpp:
1651         (WebCore::Float32Array::subset):
1652         * html/canvas/Float32Array.h:
1653         * html/canvas/Float32Array.idl:
1654         * html/canvas/Int16Array.cpp:
1655         (WebCore::Int16Array::subset):
1656         * html/canvas/Int16Array.h:
1657         * html/canvas/Int16Array.idl:
1658         * html/canvas/Int32Array.cpp:
1659         (WebCore::Int32Array::subset):
1660         * html/canvas/Int32Array.h:
1661         * html/canvas/Int32Array.idl:
1662         * html/canvas/Int8Array.cpp:
1663         (WebCore::Int8Array::subset):
1664         * html/canvas/Int8Array.h:
1665         * html/canvas/Int8Array.idl:
1666         * html/canvas/TypedArrayBase.h:
1667         (WebCore::TypedArrayBase::subsetImpl):
1668         * html/canvas/Uint16Array.cpp:
1669         (WebCore::Uint16Array::subset):
1670         * html/canvas/Uint16Array.h:
1671         * html/canvas/Uint16Array.idl:
1672         * html/canvas/Uint32Array.cpp:
1673         (WebCore::Uint32Array::subset):
1674         * html/canvas/Uint32Array.h:
1675         * html/canvas/Uint32Array.idl:
1676         * html/canvas/Uint8Array.cpp:
1677         (WebCore::Uint8Array::subset):
1678         * html/canvas/Uint8Array.h:
1679         * html/canvas/Uint8Array.idl:
1680
1681 2011-01-27  Darin Adler  <darin@apple.com>
1682
1683         Reviewed by Dan Bernstein.
1684
1685         Changing cursor style has no effect until the mouse moves
1686         https://bugs.webkit.org/show_bug.cgi?id=14344
1687         rdar://problem/7563712
1688
1689         No tests added because we don't have infrastructure for testing actual cursor
1690         changes (as opposed to cursor style computation) at this time. We might add it later.
1691
1692         * page/EventHandler.cpp:
1693         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Added.
1694         * page/EventHandler.h: Ditto.
1695
1696         * rendering/RenderObject.cpp:
1697         (WebCore::areNonIdenticalCursorListsEqual): Added.
1698         (WebCore::areCursorsEqual): Added.
1699         (WebCore::RenderObject::styleDidChange): Call dispatchFakeMouseMoveEventSoon if
1700         cursor styles changed.
1701
1702 2011-01-27  Leo Yang  <leo.yang@torchmobile.com.cn>
1703
1704         Reviewed by Dirk Schulze.
1705
1706         SVG Use Cycle is not detected
1707         https://bugs.webkit.org/show_bug.cgi?id=52544
1708
1709         We should check if SVGUseElement::buildInstanceTree finds problem
1710         for every child node. If it finds problem for any children we must
1711         return immediately because otherwise the foundProblem variable may
1712         be rewritten to false.
1713
1714         Test: svg/custom/recursive-use2.svg
1715
1716         * svg/SVGUseElement.cpp:
1717         (WebCore::SVGUseElement::buildInstanceTree):
1718
1719 2011-01-27  Zhenyao Mo  <zmo@google.com>
1720
1721         Reviewed by Kenneth Russell.
1722
1723         texSubImage2D's format/type needs to match the internalformat/type from the previous texImage2D call
1724         https://bugs.webkit.org/show_bug.cgi?id=53054
1725
1726         Test: fast/canvas/webgl/tex-sub-image-2d-bad-args.html
1727
1728         * html/canvas/WebGLRenderingContext.cpp:
1729         (WebCore::WebGLRenderingContext::texSubImage2DBase): Check format/type match.
1730
1731 2011-01-27  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
1732
1733         Reviewed by Andreas Kling.
1734
1735         [Qt] Add fullscreen media control button for html video
1736         https://bugs.webkit.org/show_bug.cgi?id=51543
1737
1738         Implement media control fullscreen button for QtWebKit html5 video.
1739
1740         * css/mediaControlsQt.css:
1741         (video::-webkit-media-controls-fullscreen-button):
1742         * platform/qt/RenderThemeQt.cpp:
1743         (WebCore::RenderThemeQt::paintMediaFullscreenButton):
1744
1745 2011-01-27  Nate Chapin  <japhet@chromium.org>
1746
1747         Reviewed by Adam Barth.
1748
1749         Remove FrameLoader::url() and update callers to use
1750         Document::url().
1751         https://bugs.webkit.org/show_bug.cgi?id=41165
1752
1753         Refactor, no new tests.
1754
1755         * WebCore.exp.in:
1756         * dom/Document.cpp:
1757         (WebCore::Document::processHttpEquiv):
1758         (WebCore::Document::removePendingSheet):
1759         * history/CachedFrame.cpp:
1760         (WebCore::CachedFrameBase::CachedFrameBase):
1761         * history/PageCache.cpp:
1762         (WebCore::logCanCacheFrameDecision):
1763         (WebCore::PageCache::canCachePageContainingThisFrame):
1764         * html/HTMLFrameElementBase.cpp:
1765         (WebCore::HTMLFrameElementBase::isURLAllowed):
1766         * html/HTMLPlugInImageElement.cpp:
1767         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL):
1768         * inspector/InspectorAgent.cpp:
1769         (WebCore::InspectorAgent::inspectedURL):
1770         * inspector/InspectorResourceAgent.cpp:
1771         (WebCore::buildObjectForFrame):
1772         * loader/DocumentWriter.cpp:
1773         (WebCore::DocumentWriter::replaceDocument):
1774         (WebCore::DocumentWriter::deprecatedFrameEncoding):
1775         * loader/FrameLoader.cpp:
1776         * loader/FrameLoader.h:
1777         * loader/HistoryController.cpp:
1778         (WebCore::HistoryController::updateForStandardLoad):
1779         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
1780         (WebCore::HistoryController::updateForSameDocumentNavigation):
1781         * loader/NavigationScheduler.cpp:
1782         (WebCore::ScheduledHistoryNavigation::fire):
1783         (WebCore::NavigationScheduler::scheduleLocationChange):
1784         (WebCore::NavigationScheduler::scheduleRefresh):
1785         * page/FrameView.cpp:
1786         (WebCore::FrameView::updateControlTints):
1787         * page/Location.cpp:
1788         (WebCore::Location::url):
1789         (WebCore::Location::setProtocol):
1790         (WebCore::Location::setHost):
1791         (WebCore::Location::setHostname):
1792         (WebCore::Location::setPort):
1793         (WebCore::Location::setPathname):
1794         (WebCore::Location::setSearch):
1795         (WebCore::Location::setHash):
1796         (WebCore::Location::reload):
1797         * page/Page.cpp:
1798         (WebCore::Page::goToItem):
1799
1800 2011-01-27  Stephen White  <senorblanco@chromium.org>
1801
1802         Reviewed by Darin Adler.
1803
1804         Fix performance regression in ImageQualityController::objectDestroyed().
1805         https://bugs.webkit.org/show_bug.cgi?id=52645
1806
1807         In r72282, I inadvertently introduced this regression by using a
1808         linear search through the hash map on object destruction.  This was
1809         because the hash key consisted of both object pointer and layer id,
1810         but on object destruction we only know the object pointer, requiring
1811         a search to find all the layers. 
1812         By replacing the hash map with two nested hash maps, where the outer key
1813         is the object and the inner key is the layer, we can find all the
1814         relevant data for an object in one hash lookup.
1815
1816         * rendering/RenderBoxModelObject.cpp:
1817         Replace the (object,layer)->size HashMap with object->layer and
1818         layer->size HashMaps.
1819         (WebCore::ImageQualityController::isEmpty):
1820         Implement isEmpty() for the outer HashMap.
1821         (WebCore::ImageQualityController::removeLayer):
1822         When a layer is removed, remove it from the inner hash map.
1823         (WebCore::ImageQualityController::set):
1824         Implement set():  if the inner map exists, set the layer->size tuple
1825         directly.  If not, create a new inner map, set the tuple, and insert
1826         it in the outer map.
1827         (WebCore::ImageQualityController::objectDestroyed):
1828         Look up the object in the outer map only.
1829         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
1830         Cosmetic changes for the renamed now-outer hash map.
1831         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1832         Do both outer and inner hash map lookups.  Call set() to add/update
1833         entries to the hash maps.  keyDestroyed() is now removeLayer().
1834         (WebCore::imageQualityController):
1835         Make the ImageQualityController a file-static global, so it can be
1836         created and destroyed on the fly.
1837         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
1838         If there is no ImageQualityController, don't call objectDestroyed().
1839         If it's empty, delete it.
1840         * rendering/RenderImage.cpp:
1841         (WebCore::RenderImage::paintIntoRect):
1842         Also pass the Image* as the (void*) layer, since 0 is not a valid
1843         HashMap key.
1844
1845 2011-01-27  Adrienne Walker  <enne@google.com>
1846
1847         Reviewed by James Robinson.
1848
1849         [chromium] Tiled compositor crashes if compositing turned off mid-paint
1850         https://bugs.webkit.org/show_bug.cgi?id=53198
1851
1852         * platform/graphics/chromium/LayerRendererChromium.cpp:
1853         (WebCore::LayerRendererChromium::drawLayers):
1854         * platform/graphics/chromium/LayerTilerChromium.cpp:
1855         (WebCore::LayerTilerChromium::update):
1856         (WebCore::LayerTilerChromium::draw):
1857
1858 2011-01-27  Carol Szabo <carol.szabo@nokia.com>
1859
1860         Reviewed by David Hyatt.
1861
1862         A corrupted counter tree is created when renderers are added to the
1863         tree bypassing RenderObject::addChild
1864         https://bugs.webkit.org/show_bug.cgi?id=51270
1865
1866         No new tests. This patch reimplements the fix for bugs 43812 and
1867         51637 and hence all tests are already there as part of the original
1868         fixes for those bugs.
1869
1870         * rendering/RenderCounter.cpp:
1871         (WebCore::findPlaceForCounter):
1872         Removed old workaround as this patch hopefully fixes the real
1873         problem.
1874         * rendering/RenderObject.cpp:
1875         (WebCore::RenderObject::addChild):
1876         Removed call to counter updater as it was moved to a lower level.
1877         (WebCore::RenderObject::destroy):
1878         Moved attached counter nodes destruction to after the node is
1879         removed from the tree.
1880         * rendering/RenderObjectChildList.cpp:
1881         (WebCore::RenderObjectChildList::removeChildNode):
1882         (WebCore::RenderObjectChildList::appendChildNode):
1883         (WebCore::RenderObjectChildList::insertChildNode):
1884         Added notifications to the Counter system such that the
1885         CounterForest reflects the changes to the RendererTree.
1886         * rendering/RenderWidget.cpp:
1887         (WebCore::RenderWidget::destroy):
1888         Applied the same changes as for RenderObject::destroy()
1889         since RenderObject::destroy() is not called from here.
1890
1891 2011-01-27  Adam Roben  <aroben@apple.com>
1892
1893         Add WKCACFViewLayerTreeHost
1894
1895         This is a class that derives from CACFLayerTreeHost and uses a WKCACFView to render.
1896
1897         Fixes <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost should use
1898         WKCACFView for rendering
1899
1900         * WebCore.vcproj/WebCore.vcproj: Added WKCACFViewLayerTreeHost.{cpp,h}.
1901
1902         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1903         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Make the test window have a
1904         non-zero size. WKCACFView will always say it can't render if you pass it a 0-sized window,
1905         so we need a non-empty window to perform a valid test.
1906         (WebCore::CACFLayerTreeHost::create): First try to create a WKCACFViewLayerTreeHost, then
1907         fall back to a LegacyCACFLayerTreeHost.
1908         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to react to the
1909         context flush from here...
1910         (WebCore::CACFLayerTreeHost::contextDidChange): ...to here. Derived classes are required to
1911         call this function whenever changes are flushed to the context.
1912
1913         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added contextDidChange.
1914
1915         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp:
1916         (WebCore::LegacyCACFLayerTreeHost::createRenderer):
1917         (WebCore::LegacyCACFLayerTreeHost::resize):
1918         Changed to use flushContext instead of flushing the context manually so that we will always
1919         notify the base class when the context gets flushed.
1920
1921         (WebCore::LegacyCACFLayerTreeHost::flushContext): Added a call to contextDidChange so the
1922         base class will know what happened. Moved code to schedule a render from here...
1923         (WebCore::LegacyCACFLayerTreeHost::contextDidChange): ...to here.
1924
1925         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added contextDidChange.
1926
1927         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp: Added.
1928         (WebCore::WKCACFViewLayerTreeHost::create): If WebKitQuartzCoreAdditions, which provides
1929         WKCACFView, isn't present, bail. Otherwise allocate and return a new host.
1930         (WebCore::WKCACFViewLayerTreeHost::WKCACFViewLayerTreeHost): Initialize members.
1931         (WebCore::WKCACFViewLayerTreeHost::updateViewIfNeeded): Update the view if we previously
1932         marked that we needed to do so, and flush the context if our layer's bounds have changed.
1933         (WebCore::WKCACFViewLayerTreeHost::contextDidChangeCallback): Call through to
1934         contextDidChange.
1935         (WebCore::WKCACFViewLayerTreeHost::contextDidChange): Tell the WKCACFView to start rendering
1936         (if we didn't already), then call up to the base class.
1937         (WebCore::WKCACFViewLayerTreeHost::initializeContext): Set the context's user data, the
1938         view's layer, and hook up our "context did change" callback.
1939         (WebCore::WKCACFViewLayerTreeHost::resize): Mark that the view needs to be updated the next
1940         time we paint.
1941         (WebCore::WKCACFViewLayerTreeHost::createRenderer): Update our view and return whether it is
1942         able to render or not.
1943         (WebCore::WKCACFViewLayerTreeHost::destroyRenderer): Clear out all the info we passed down
1944         to the view.
1945         (WebCore::WKCACFViewLayerTreeHost::lastCommitTime): Call through to the view.
1946         (WebCore::WKCACFViewLayerTreeHost::flushContext): Ditto.
1947         (WebCore::WKCACFViewLayerTreeHost::paint): Update the view so it will draw at the right
1948         size, then call up to the base class.
1949         (WebCore::WKCACFViewLayerTreeHost::render): Invalidate the view using the passed-in dirty
1950         rects, then ask it to draw.
1951
1952         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.h: Copied from Source/WebCore/platform/graphics/ca/win/LegacyCACFLayerTreeHost.h.
1953
1954 2011-01-27  Adam Roben  <aroben@apple.com>
1955
1956         Move LegacyCACFLayerTreeHost into its own files
1957
1958         More preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
1959         should use WKCACFView for rendering
1960
1961         Reviewed by Simon Fraser.
1962
1963         * WebCore.vcproj/WebCore.vcproj: Added LegacyCACFLayerTreeHost.{cpp,h}.
1964
1965         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Moved code from here to new files.
1966
1967         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Added.
1968         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Added.
1969
1970 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
1971
1972         Unreviewed WinCE build fix for r76824.
1973
1974         * platform/wince/DragDataWinCE.cpp:
1975         (WebCore::DragData::dragDataMap):
1976
1977 2011-01-27  Adam Roben  <aroben@apple.com>
1978
1979         Split CACFLayerTreeHost into base and derived classes
1980
1981         The derived class, LegacyCACFLayerTreeHost, contains all the D3D-related code. A later patch
1982         will add a new derived class that replaces the D3D code with a different rendering API.
1983
1984         For now, LegacyCACFLayerTreeHost lives in CACFLayerTreeHost.cpp. This keeps the diff a
1985         little smaller. A later patch will move it to its own source files.
1986
1987         Preparation for <http://webkit.org/b/53251> <rdar://problem/8925496> CACFLayerTreeHost
1988         should use WKCACFView for rendering
1989
1990         Reviewed by Simon Fraser.
1991
1992         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1993         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Clear the window before
1994         destroying the host, as that is now the API contract that clients must fulfill.
1995         (WebCore::LegacyCACFLayerTreeHost::create): Added. Simple creator.
1996         (WebCore::CACFLayerTreeHost::create): Now instantiates a LegacyCACFLayerTreeHost. Calls the
1997         new initialize function to perform initialization that has to happen after the vtable has
1998         been set up.
1999
2000         (WebCore::LegacyCACFLayerTreeHost::LegacyCACFLayerTreeHost):
2001         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost):
2002         (WebCore::LegacyCACFLayerTreeHost::initializeContext):
2003         (WebCore::CACFLayerTreeHost::initialize):
2004         Moved some initialization code from the CACFLayerTreeHost constructor into these new
2005         functions.
2006
2007         (WebCore::LegacyCACFLayerTreeHost::~LegacyCACFLayerTreeHost): Added. Moved code here from
2008         ~CACFLayerTreeHost.
2009         (WebCore::CACFLayerTreeHost::~CACFLayerTreeHost): Rather than clearing the window at this
2010         point (which would be too late, since we won't be able to call into the derived class's
2011         virtual functions), just assert that it has already been cleared (or was never set in the
2012         first place).
2013         (WebCore::LegacyCACFLayerTreeHost::createRenderer): Renamed from
2014         CACFLayerTreeHost::createRenderer, and changed to use getters instead of accessing
2015         CACFLayerTreeHost's data members directly.
2016
2017         (WebCore::LegacyCACFLayerTreeHost::destroyRenderer):
2018         (WebCore::CACFLayerTreeHost::destroyRenderer):
2019         Moved some code to the new LegacyCACFLayerTreeHost function.
2020
2021         (WebCore::LegacyCACFLayerTreeHost::resize):
2022         (WebCore::LegacyCACFLayerTreeHost::renderTimerFired):
2023         Moved these functions to LegacyCACFLayerTreeHost.
2024
2025         (WebCore::LegacyCACFLayerTreeHost::paint):
2026         (WebCore::CACFLayerTreeHost::paint):
2027         Moved some code to the new LegacyCACFLayerTreeHost function.
2028
2029         (WebCore::LegacyCACFLayerTreeHost::render):
2030         (WebCore::LegacyCACFLayerTreeHost::renderSoon):
2031         Moved these functions to LegacyCACFLayerTreeHost.
2032
2033         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Moved code to flush the context
2034         from here...
2035         (WebCore::LegacyCACFLayerTreeHost::flushContext): ...to this new function.
2036
2037         (WebCore::LegacyCACFLayerTreeHost::lastCommitTime): Moved code to get the last commit time
2038         to this new function...
2039         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): ...from here.
2040
2041         (WebCore::LegacyCACFLayerTreeHost::initD3DGeometry):
2042         (WebCore::LegacyCACFLayerTreeHost::resetDevice):
2043         Moved these functions to LegacyCACFLayerTreeHost.
2044
2045         * platform/graphics/ca/win/CACFLayerTreeHost.h: Made some functions virtual, removed some
2046         members that have moved to LegacyCACFLayerTreeHost, grouped remaining members more
2047         logically, and added some getters used by LegacyCACFLayerTreeHost.
2048
2049 2011-01-27  Adam Roben  <aroben@apple.com>
2050
2051         Move CACFLayerTreeHostClient to its own header file
2052
2053         Rubber-stamped by Steve Falkenburg.
2054
2055         * WebCore.vcproj/WebCore.vcproj: Added CACFLayerTreeHostClient.h. Also let VS have its way
2056         with the file.
2057
2058         * platform/graphics/ca/win/CACFLayerTreeHost.cpp: Added new #include.
2059
2060         * platform/graphics/ca/win/CACFLayerTreeHost.h: Removed CACFLayerTreeHostClient.
2061
2062         * platform/graphics/ca/win/CACFLayerTreeHostClient.h: Added.
2063
2064         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp: Moved some #includes here
2065         from the header file.
2066
2067         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Replaced broader #includes
2068         with more specific ones, plus a forward-declaration.
2069
2070 2011-01-27  James Simonsen  <simonjam@chromium.org>
2071
2072         Reviewed by Tony Chang.
2073
2074         [Chromium] Simplify small caps logic in complex text on linux
2075         https://bugs.webkit.org/show_bug.cgi?id=53207
2076
2077         Test: fast/text/atsui-multiple-renderers.html
2078               fast/text/atsui-small-caps-punctuation-size.html
2079
2080         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
2081         (WebCore::ComplexTextController::nextScriptRun): Remove redundant logic. Case changes in a text run imply FontData changes.
2082         (WebCore::ComplexTextController::setupFontForScriptRun): Update comment to reflect above.
2083
2084 2011-01-27  Adam Barth  <abarth@webkit.org>
2085
2086         In which I attempt to fix the EFL build.
2087
2088         * CMakeLists.txt:
2089
2090 2011-01-25  Levi Weintraub  <leviw@chromium.org>
2091
2092         Reviewed by Darin Adler.
2093
2094         Adding border and padding to the calculation of the local caret rect for RenderBoxes.
2095         Corrected for mistake in r76625
2096
2097         Undo moves caret to invalid position
2098         https://bugs.webkit.org/show_bug.cgi?id=49744
2099
2100         Tests: editing/selection/caret-painting-after-paste-undo-rtl.html
2101                editing/selection/caret-painting-after-paste-undo.html
2102
2103         * rendering/RenderBox.cpp:
2104         (WebCore::RenderBox::localCaretRect):
2105
2106 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2107
2108         Unreviewed, rolling out r76825.
2109         http://trac.webkit.org/changeset/76825
2110         https://bugs.webkit.org/show_bug.cgi?id=53256
2111
2112         "caused crashes on GTK and chromium" (Requested by rniwa on
2113         #webkit).
2114
2115         * rendering/RenderBoxModelObject.cpp:
2116         (WebCore::ImageQualityController::keyDestroyed):
2117         (WebCore::ImageQualityController::objectDestroyed):
2118         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2119         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2120         (WebCore::imageQualityController):
2121         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
2122
2123 2011-01-27  Adam Barth  <abarth@webkit.org>
2124
2125         Reviewed by Eric Seidel.
2126
2127         Generalize the mechanism view-source uses to remember the source for an HTMLToken
2128         https://bugs.webkit.org/show_bug.cgi?id=53200
2129
2130         Currently view-source tracks the source associated with each HTMLToken.
2131         We want to re-use this mechanism for the new XSS auditor.  This patch
2132         moves this code into its own class so it can be shared between the
2133         view-source parser and the general HTML parser.  This patch also add
2134         support for tracking the source of tokens that span document.write
2135         boundaries.
2136
2137         No functional change.  This code change is somewhat tested by our
2138         view-source layout tests.
2139
2140         * Android.mk:
2141         * GNUmakefile.am:
2142         * WebCore.gypi:
2143         * WebCore.pro:
2144         * WebCore.vcproj/WebCore.vcproj:
2145         * WebCore.xcodeproj/project.pbxproj:
2146             - Fun with updating build files.
2147         * html/parser/HTMLDocumentParser.cpp:
2148         (WebCore::HTMLDocumentParser::pumpTokenizer):
2149             - Teach HTMLDocumentParser to track the source for HTMLTokens.
2150               Currently, this information isn't used, but it will be shortly.
2151               I ran the HTML parser benchmark and this change didn't have a
2152               measurable effect.
2153         * html/parser/HTMLDocumentParser.h:
2154             - Composite in the HTMLSourceTracker.
2155         * html/parser/HTMLSourceTracker.cpp: Added.
2156         (WebCore::HTMLSourceTracker::HTMLSourceTracker):
2157         (WebCore::HTMLSourceTracker::start):
2158         (WebCore::HTMLSourceTracker::end):
2159             - This function should eventualy be folded into HTMLTokenizer.
2160         (WebCore::HTMLSourceTracker::sourceForToken):
2161         * html/parser/HTMLSourceTracker.h: Added.
2162         * html/parser/HTMLToken.h:
2163             - Now HTMLTokens always have a start index of zero.  To do the job
2164               of the old start index, this patch introduces the notion of a
2165               baseOffset.  Unlike the start index (which was used as the base
2166               offset for all the other indicies), the baseOffset can change
2167               over the lifetime of the token.  We need the flexibility to
2168               change the offset for tokens that span document.write boundaries.
2169               Values are now normalized to zero-offset when stored.
2170         (WebCore::HTMLToken::clear):
2171         (WebCore::HTMLToken::setBaseOffset):
2172         (WebCore::HTMLToken::end):
2173         (WebCore::HTMLToken::beginAttributeName):
2174         (WebCore::HTMLToken::endAttributeName):
2175         (WebCore::HTMLToken::beginAttributeValue):
2176         (WebCore::HTMLToken::endAttributeValue):
2177         * html/parser/HTMLViewSourceParser.cpp:
2178             - Updates the HTMLViewSourceParser to use the new
2179               HTMLSourceTracker.
2180         (WebCore::HTMLViewSourceParser::pumpTokenizer):
2181         (WebCore::HTMLViewSourceParser::append):
2182         (WebCore::HTMLViewSourceParser::sourceForToken):
2183             - This function now just calls through to HTMLSourceTracker.
2184         * html/parser/HTMLViewSourceParser.h:
2185         * platform/text/SegmentedString.cpp:
2186         (WebCore::SegmentedString::currentColumn):
2187         (WebCore::SegmentedString::setCurrentPosition):
2188         * platform/text/SegmentedString.h:
2189         (WebCore::SegmentedString::numberOfCharactersConsumed):
2190             - We need to handle the general case now.  The "slow" version
2191               doesn't turn out to be any slower in practice anyway.
2192
2193 2011-01-27  Sam Weinig  <sam@webkit.org>
2194
2195         Fix all the builds.
2196
2197         * platform/ScrollView.cpp:
2198         (WebCore::ScrollView::paintOverhangAreas): Add parameters.
2199
2200 2011-01-27  Sam Weinig  <sam@webkit.org>
2201
2202         Reviewed by Dave Hyatt.
2203
2204         Add ability to do an unconstrained scroll on a ScrollView
2205         https://bugs.webkit.org/show_bug.cgi?id=53249
2206
2207         * platform/ScrollView.cpp:
2208         (WebCore::ScrollView::ScrollView):
2209         Initialize m_constrainsScrollingToContentEdge to true.
2210
2211         (WebCore::ScrollView::setScrollOffset):
2212         Only constrain the offset if the m_constrainsScrollingToContentEdge is set.
2213
2214         (WebCore::ScrollView::updateScrollbars):
2215         Simplify expression converting an IntSize to an IntPoint.
2216         
2217         (WebCore::ScrollView::paint):
2218         Paint the overhang if there is any.
2219         
2220         (WebCore::ScrollView::calculateOverhangAreasForPainting):
2221         Calculate the overhang in viewport coordinates for painting.
2222
2223         * platform/ScrollView.h:
2224         (WebCore::ScrollView::constrainsScrollingToContentEdge):
2225         (WebCore::ScrollView::setConstrainsScrollingToContentEdge):
2226         Add bit to control whether the scroll position should be constrained
2227         to the content edge when set.
2228
2229         * platform/ScrollbarThemeComposite.cpp:
2230         (WebCore::usedTotalSize):
2231         (WebCore::ScrollbarThemeComposite::thumbPosition):
2232         (WebCore::ScrollbarThemeComposite::thumbLength):
2233         * platform/mac/ScrollbarThemeMac.mm:
2234         (WebCore::ScrollbarThemeMac::paint):
2235         Improve calculations of thumb size and position to take overhang into account.
2236
2237 2011-01-27  Dirk Schulze  <krit@webkit.org>
2238
2239         Reviewed by Nikolas Zimmermann.
2240
2241         SVG animation of Paths with segments of different coordinate modes on begin and end
2242         https://bugs.webkit.org/show_bug.cgi?id=52984
2243
2244         At the moment we just support SVG path animations, if the number of segments on the given start path
2245         is the same as the number of segments on the given end path. But a segment on a given position must be identical
2246         on both paths as well. Not only the segment type, also the coordinate mode of the segments must be identical.
2247         If MoveToRel is on the second position on the start path a MoveToRel must be on the second position
2248         of the end path too. According to the SVG spec, at least the coordinate mode can differ. Means, if we have MoveToRel
2249         in the start path, we can use MoveToAbs on the same position in the end path.
2250
2251         This patch fixes the blending code to follow the spec here. It was necessary to track the current position of
2252         both paths, transform coordinates to the same coordinate mode and transform the resulting animation coordinate back
2253         to the coordinate mode of either the start or the end path. Which mode is taken depends on the progress of the
2254         animation.
2255
2256         Tests: svg/animations/animate-path-animation-Cc-Ss.html
2257                svg/animations/animate-path-animation-Ll-Vv-Hh.html
2258                svg/animations/animate-path-animation-Qq-Tt.html
2259                svg/animations/animate-path-animation-cC-sS-inverse.html
2260                svg/animations/animate-path-animation-lL-vV-hH-inverse.html
2261                svg/animations/animate-path-animation-qQ-tT-inverse.html
2262
2263         * svg/SVGPathBlender.cpp:
2264         (WebCore::blendFloatPoint):
2265         (WebCore::blendAnimatedFloat):
2266         (WebCore::SVGPathBlender::blendAnimatedDimensionalFloat):
2267         (WebCore::SVGPathBlender::blendAnimatedFloatPoint):
2268         (WebCore::SVGPathBlender::blendMoveToSegment):
2269         (WebCore::SVGPathBlender::blendLineToSegment):
2270         (WebCore::SVGPathBlender::blendLineToHorizontalSegment):
2271         (WebCore::SVGPathBlender::blendLineToVerticalSegment):
2272         (WebCore::SVGPathBlender::blendCurveToCubicSegment):
2273         (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment):
2274         (WebCore::SVGPathBlender::blendCurveToQuadraticSegment):
2275         (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment):
2276         (WebCore::SVGPathBlender::blendArcToSegment):
2277         (WebCore::coordinateModeOfCommand):
2278         (WebCore::isSegmentEqual):
2279         (WebCore::SVGPathBlender::blendAnimatedPath):
2280         (WebCore::SVGPathBlender::cleanup):
2281         * svg/SVGPathBlender.h:
2282
2283 2011-01-27  Cris Neckar  <cdn@chromium.org>
2284
2285         Reviewed by Dimitri Glazkov.
2286
2287         Clear the parent on a css keyframe's m_style when removing it from the stylesheet.
2288         https://bugs.webkit.org/show_bug.cgi?id=52320
2289
2290         Test: fast/css/css-keyframe-style-crash.html
2291
2292         * css/CSSRuleList.cpp:
2293         (WebCore::CSSRuleList::deleteRule):
2294         * css/WebKitCSSKeyframesRule.cpp:
2295         (WebCore::WebKitCSSKeyframesRule::~WebKitCSSKeyframesRule):
2296
2297 2011-01-27  Rob Buis  <rwlbuis@gmail.com>
2298
2299         Reviewed by Kent Tamura.
2300
2301         Color changes to option elements in a select multiple aren't drawn immediately
2302         https://bugs.webkit.org/show_bug.cgi?id=49790
2303
2304         Redirect style changes on <option> element to the owner <select> element.
2305
2306         Test: fast/repaint/select-option-background-color.html
2307
2308         * html/HTMLOptionElement.cpp:
2309         (WebCore::HTMLOptionElement::setRenderStyle):
2310
2311 2011-01-19  Stephen White  <senorblanco@chromium.org>
2312
2313         Reviewed by Darin Adler.
2314
2315         Fix performance regression in ImageQualityController::objectDestroyed().
2316         https://bugs.webkit.org/show_bug.cgi?id=52645
2317
2318         In r72282, I inadvertently introduced this regression by using a
2319         linear search through the hash map on object destruction.  This was
2320         because the hash key consisted of both object pointer and layer id,
2321         but on object destruction we only know the object pointer, requiring
2322         a search to find all the layers. 
2323         By replacing the hash map with two nested hash maps, where the outer key
2324         is the object and the inner key is the layer, we can find all the
2325         relevant data for an object in one hash lookup.
2326
2327         * rendering/RenderBoxModelObject.cpp:
2328         Replace the (object,layer)->size HashMap with object->layer and
2329         layer->size HashMaps.
2330         (WebCore::ImageQualityController::isEmpty):
2331         Implement isEmpty() for the outer HashMap.
2332         (WebCore::ImageQualityController::removeLayer):
2333         When a layer is removed, remove it from the inner hash map.
2334         (WebCore::ImageQualityController::set):
2335         Implement set():  if the inner map exists, set the layer->size tuple
2336         directly.  If not, create a new inner map, set the tuple, and insert
2337         it in the outer map.
2338         (WebCore::ImageQualityController::objectDestroyed):
2339         Look up the object in the outer map only.
2340         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
2341         Cosmetic changes for the renamed now-outer hash map.
2342         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
2343         Do both outer and inner hash map lookups.  Call set() to add/update
2344         entries to the hash maps.  keyDestroyed() is now removeLayer().
2345         (WebCore::imageQualityController):
2346         Make the ImageQualityController a file-static global, so it can be
2347         created and destroyed on the fly.
2348         (WebCore::RenderBoxModelObject::~RenderBoxModelObject):
2349         If there is no ImageQualityController, don't call objectDestroyed().
2350         If it's empty, delete it.
2351
2352
2353 2011-01-26  Enrica Casucci  <enrica@apple.com>
2354
2355         Reviewed by Darin Adler and Adam Roben.
2356
2357         WebKit2: add support for drag and drop on Windows
2358         https://bugs.webkit.org/show_bug.cgi?id=52775
2359         <rdar://problem/8514409>
2360         
2361         On Windows the access to the content being dragged is
2362         provided via the IDataObject interface that is made available
2363         to the window that registers itself as drop target.
2364         Since this interface cannot be accessed from the WebProcess,
2365         in every call to one of the methods of the IDropTarget interface
2366         we serialize the content of the drag clipboard and send it over to
2367         the WebProcess.
2368         The bulk of this patch consists in the refactoring needed in DragData
2369         and ClipboardWin classes to extract the data from the serialized object.
2370         
2371         * platform/DragData.cpp:
2372         * platform/DragData.h:
2373         * platform/win/ClipboardUtilitiesWin.cpp:
2374         (WebCore::getWebLocData):
2375         (WebCore::getURL):
2376         (WebCore::getPlainText):
2377         (WebCore::getTextHTML):
2378         (WebCore::getCFHTML):
2379         (WebCore::fragmentFromFilenames):
2380         (WebCore::containsFilenames):
2381         (WebCore::fragmentFromHTML):
2382         (WebCore::containsHTML):
2383         (WebCore::getClipboardData):
2384         * platform/win/ClipboardUtilitiesWin.h:
2385         * platform/win/ClipboardWin.cpp:
2386         (WebCore::Clipboard::create):
2387         (WebCore::ClipboardWin::ClipboardWin):
2388         (WebCore::ClipboardWin::getData):
2389         (WebCore::ClipboardWin::types):
2390         (WebCore::ClipboardWin::files):
2391         (WebCore::ClipboardWin::hasData):
2392         * platform/win/ClipboardWin.h:
2393         (WebCore::ClipboardWin::create):
2394         * platform/win/DragDataWin.cpp:
2395         (WebCore::DragData::DragData):
2396         (WebCore::DragData::containsURL):
2397         (WebCore::DragData::dragDataMap):
2398         (WebCore::DragData::asURL):
2399         (WebCore::DragData::containsFiles):
2400         (WebCore::DragData::asFilenames):
2401         (WebCore::DragData::containsPlainText):
2402         (WebCore::DragData::asPlainText):
2403         (WebCore::DragData::canSmartReplace):
2404         (WebCore::DragData::containsCompatibleContent):
2405         (WebCore::DragData::asFragment):
2406
2407 2011-01-27  Mario Sanchez Prada  <msanchez@igalia.com>
2408
2409         Reviewed by Martin Robinson.
2410
2411         [GTK] Space characters in source document interfere with reported caret offset
2412         https://bugs.webkit.org/show_bug.cgi?id=53033
2413
2414         Calculate caret offset from rendered text instead of from node contents.
2415
2416         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2417         (objectAndOffsetUnignored): Calculate the caret offset based only
2418         on positions and ranges, instead of using the computed offset in
2419         the container node.
2420
2421 2011-01-26  Alexey Proskuryakov  <ap@apple.com>
2422
2423         Reviewed by Darin Adler.
2424
2425         https://bugs.webkit.org/show_bug.cgi?id=53197
2426         <rdar://problem/8895682> Make WebKit2 printing asynchronous
2427
2428         * WebCore.exp.in: Export more PrintContext methods that we didn't use on Mac before.
2429
2430         * page/PrintContext.cpp: (WebCore::PrintContext::spoolRect): Changed to make the same
2431         transformation as spoolPages does for consistency.
2432
2433 2011-01-27  David Grogan  <dgrogan@google.com>
2434
2435         Reviewed by Jeremy Orlow.
2436
2437         initial support for close() in indexeddb backend
2438         https://bugs.webkit.org/show_bug.cgi?id=53150
2439
2440         Test: storage/indexeddb/transaction-after-close.html
2441
2442         * storage/IDBDatabase.cpp:
2443         (WebCore::IDBDatabase::IDBDatabase):
2444         (WebCore::IDBDatabase::transaction):
2445         (WebCore::IDBDatabase::close):
2446         * storage/IDBDatabase.h:
2447         * storage/IDBDatabase.idl:
2448         * storage/IDBDatabaseBackendImpl.cpp:
2449         (WebCore::IDBDatabaseBackendImpl::transaction):
2450         (WebCore::IDBDatabaseBackendImpl::close):
2451
2452 2011-01-27  Dirk Schulze  <krit@webkit.org>
2453
2454         Reviewed by Nikolas Zimmermann.
2455
2456         SVG animation doesn't support calcMode discrete for number and color values.
2457         https://bugs.webkit.org/show_bug.cgi?id=53189
2458
2459         Add support for calcMode discrete on number and color animation.
2460
2461         Tests: svg/animations/animate-color-calcMode-discrete.html
2462                svg/animations/animate-number-calcMode-discrete.html
2463
2464         * svg/SVGAnimateElement.cpp:
2465         (WebCore::SVGAnimateElement::calculateAnimatedValue):
2466
2467 2011-01-26  Zhenyao Mo  <zmo@google.com>
2468
2469         Reviewed by Kenneth Russell.
2470
2471         shaderSource needs to preserve original source
2472         https://bugs.webkit.org/show_bug.cgi?id=52833
2473
2474         Test: fast/canvas/webgl/gl-getshadersource.html
2475
2476         * html/canvas/WebGLRenderingContext.cpp:
2477         (WebCore::WebGLRenderingContext::getShaderParameter): Intercept SHADER_SOURCE_LENGTH.
2478         (WebCore::WebGLRenderingContext::getShaderSource): Intercept the call.
2479         (WebCore::WebGLRenderingContext::shaderSource): Cache the source.
2480         * html/canvas/WebGLShader.cpp: Cache shader source.
2481         (WebCore::WebGLShader::WebGLShader):
2482         * html/canvas/WebGLShader.h: Ditto.
2483         (WebCore::WebGLShader::getSource):
2484         (WebCore::WebGLShader::setSource):
2485
2486 2011-01-27  Patrick Gansterer  <paroga@webkit.org>
2487
2488         Unreviewed WinCE build fix for r76743.
2489
2490         * platform/graphics/wince/FontWinCE.cpp:
2491         (WebCore::TextRunComponent::TextRunComponent):
2492
2493 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
2494
2495         Reviewed by Pavel Feldman.
2496
2497         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
2498         https://bugs.webkit.org/show_bug.cgi?id=53234
2499
2500         * inspector/front-end/ScopeChainSidebarPane.js:
2501         (WebInspector.ScopeChainSidebarPane):
2502         (WebInspector.ScopeChainSidebarPane.prototype.update):
2503
2504 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2505
2506         Unreviewed, rolling out r76789.
2507         http://trac.webkit.org/changeset/76789
2508         https://bugs.webkit.org/show_bug.cgi?id=53238
2509
2510         Broke GTK layout tests (Requested by podivilov on #webkit).
2511
2512         * inspector/front-end/ScopeChainSidebarPane.js:
2513         (WebInspector.ScopeChainSidebarPane):
2514         (WebInspector.ScopeChainSidebarPane.prototype.update):
2515
2516 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
2517
2518         Reviewed by Pavel Feldman.
2519
2520         Web Inspector: store all settings related to the agents on the frontend side
2521         https://bugs.webkit.org/show_bug.cgi?id=53174
2522
2523         * CMakeLists.txt:
2524         * GNUmakefile.am:
2525         * WebCore.exp.in:
2526         * WebCore.gypi:
2527         * WebCore.pro:
2528         * WebCore.vcproj/WebCore.vcproj:
2529         * WebCore.xcodeproj/project.pbxproj:
2530         * bindings/js/ScriptDebugServer.cpp:
2531         * bindings/js/ScriptDebugServer.h:
2532         * bindings/js/ScriptProfiler.cpp:
2533         * bindings/js/ScriptProfiler.h:
2534         * bindings/v8/ScriptDebugServer.cpp:
2535         * bindings/v8/ScriptDebugServer.h:
2536         * bindings/v8/ScriptProfiler.cpp:
2537         * bindings/v8/ScriptProfiler.h:
2538         * inspector/Inspector.idl:
2539         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
2540         on the front-end side and will be pushed to the backend when the frontend is loaded.
2541         (WebCore::InspectorAgent::InspectorAgent):
2542         (WebCore::InspectorAgent::disconnectFrontend):
2543         (WebCore::InspectorAgent::restoreDebugger):
2544         (WebCore::InspectorAgent::restoreProfiler):
2545         (WebCore::InspectorAgent::enableProfiler):
2546         (WebCore::InspectorAgent::disableProfiler):
2547         (WebCore::InspectorAgent::showAndEnableDebugger):
2548         (WebCore::InspectorAgent::enableDebugger):
2549         (WebCore::InspectorAgent::disableDebugger):
2550         * inspector/InspectorAgent.h:
2551         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
2552         if the front-end was opened during current browser session and XHR logging is turned on
2553         there.
2554         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2555         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2556         * inspector/InspectorDebuggerAgent.cpp:
2557         * inspector/InspectorDebuggerAgent.h:
2558         * inspector/InspectorInstrumentation.cpp:
2559         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2560         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2561         * inspector/InspectorProfilerAgent.cpp:
2562         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2563         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2564         * inspector/InspectorSettings.cpp: Removed.
2565         * inspector/InspectorSettings.h: Removed.
2566         * inspector/InspectorState.cpp:
2567         (WebCore::InspectorState::InspectorState):
2568         * inspector/InspectorState.h:
2569         * inspector/front-end/ConsoleView.js:
2570         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
2571         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2572         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
2573         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2574         * inspector/front-end/ProfilesPanel.js:
2575         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2576         * inspector/front-end/ScriptsPanel.js:
2577         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2578         * inspector/front-end/Settings.js:
2579         (WebInspector.Settings):
2580         * inspector/front-end/inspector.js:
2581
2582 2011-01-27  Pavel Podivilov  <podivilov@chromium.org>
2583
2584         Reviewed by Pavel Feldman.
2585
2586         Web Inspector: Closure and Global variable details automatically collapsing on each step through JavaScript code.
2587         https://bugs.webkit.org/show_bug.cgi?id=53234
2588
2589         * inspector/front-end/ScopeChainSidebarPane.js:
2590         (WebInspector.ScopeChainSidebarPane):
2591         (WebInspector.ScopeChainSidebarPane.prototype.update):
2592
2593 2011-01-27  Alexander Pavlov  <apavlov@chromium.org>
2594
2595         Reviewed by Pavel Feldman.
2596
2597         Web Inspector: [Elements panel] Tooltip for relative links incorrectly identifies current URL
2598         https://bugs.webkit.org/show_bug.cgi?id=53171
2599
2600         * inspector/front-end/inspector.js:
2601         (WebInspector.completeURL): Taught to understand partial href's that start with "?" (contain GET parameters only)
2602
2603 2011-01-27  Yury Semikhatsky  <yurys@chromium.org>
2604
2605         Reviewed by Pavel Feldman.
2606
2607         [V8] Crash in WebCore::addMessageToConsole
2608         https://bugs.webkit.org/show_bug.cgi?id=53227
2609
2610         * bindings/v8/V8Proxy.cpp: check that the Frame where the error
2611         occured still has a page before getting a console object from it.
2612         (WebCore::V8Proxy::reportUnsafeAccessTo):
2613
2614 2011-01-27  Hans Wennborg  <hans@chromium.org>
2615
2616         Reviewed by Jeremy Orlow.
2617
2618         IndexedDB: Remove IDBCallbacks::onSuccess() used for null values.
2619         https://bugs.webkit.org/show_bug.cgi?id=53178
2620
2621         Remove the IDBCallbacks::onSuccess() function that was used for
2622         null values, and replace such calls with calls to
2623         IDBCallBacks::onSuccess(SerializedScriptValue::nullValue())
2624         instead.
2625
2626         No new functionality, so no new tests.
2627
2628         * storage/IDBCallbacks.h:
2629         * storage/IDBCursorBackendImpl.cpp:
2630         (WebCore::IDBCursorBackendImpl::updateInternal):
2631         (WebCore::IDBCursorBackendImpl::continueFunctionInternal):
2632         * storage/IDBIndexBackendImpl.cpp:
2633         (WebCore::IDBIndexBackendImpl::openCursorInternal):
2634         * storage/IDBObjectStoreBackendImpl.cpp:
2635         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
2636         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
2637         * storage/IDBRequest.cpp:
2638         * storage/IDBRequest.h:
2639
2640 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2641
2642         Unreviewed, rolling out r76773.
2643         http://trac.webkit.org/changeset/76773
2644         https://bugs.webkit.org/show_bug.cgi?id=53230
2645
2646         breaks multiple GTK media tests (Requested by philn-tp on
2647         #webkit).
2648
2649         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2650         (WebCore::mimeTypeCache):
2651
2652 2011-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2653
2654         Unreviewed, rolling out r76770.
2655         http://trac.webkit.org/changeset/76770
2656         https://bugs.webkit.org/show_bug.cgi?id=53229
2657
2658         Some inspector tests fail (Requested by yurys on #webkit).
2659
2660         * CMakeLists.txt:
2661         * GNUmakefile.am:
2662         * WebCore.exp.in:
2663         * WebCore.gypi:
2664         * WebCore.pro:
2665         * WebCore.vcproj/WebCore.vcproj:
2666         * WebCore.xcodeproj/project.pbxproj:
2667         * bindings/js/ScriptDebugServer.cpp:
2668         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
2669         * bindings/js/ScriptDebugServer.h:
2670         * bindings/js/ScriptProfiler.cpp:
2671         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
2672         * bindings/js/ScriptProfiler.h:
2673         * bindings/v8/ScriptDebugServer.cpp:
2674         (WebCore::ScriptDebugServer::isDebuggerAlwaysEnabled):
2675         * bindings/v8/ScriptDebugServer.h:
2676         * bindings/v8/ScriptProfiler.cpp:
2677         (WebCore::ScriptProfiler::isProfilerAlwaysEnabled):
2678         * bindings/v8/ScriptProfiler.h:
2679         * inspector/Inspector.idl:
2680         * inspector/InspectorAgent.cpp:
2681         (WebCore::InspectorAgent::InspectorAgent):
2682         (WebCore::InspectorAgent::disconnectFrontend):
2683         (WebCore::InspectorAgent::restoreDebugger):
2684         (WebCore::InspectorAgent::restoreProfiler):
2685         (WebCore::InspectorAgent::ensureSettingsLoaded):
2686         (WebCore::InspectorAgent::enableProfiler):
2687         (WebCore::InspectorAgent::disableProfiler):
2688         (WebCore::InspectorAgent::showAndEnableDebugger):
2689         (WebCore::InspectorAgent::enableDebugger):
2690         (WebCore::InspectorAgent::disableDebugger):
2691         * inspector/InspectorAgent.h:
2692         (WebCore::InspectorAgent::settings):
2693         * inspector/InspectorConsoleAgent.cpp:
2694         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2695         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2696         * inspector/InspectorDebuggerAgent.cpp:
2697         (WebCore::InspectorDebuggerAgent::isDebuggerAlwaysEnabled):
2698         * inspector/InspectorDebuggerAgent.h:
2699         * inspector/InspectorInstrumentation.cpp:
2700         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2701         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2702         * inspector/InspectorProfilerAgent.cpp:
2703         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
2704         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2705         * inspector/InspectorSettings.cpp: Added.
2706         (WebCore::InspectorSettings::InspectorSettings):
2707         (WebCore::InspectorSettings::getBoolean):
2708         (WebCore::InspectorSettings::setBoolean):
2709         (WebCore::InspectorSettings::getLong):
2710         (WebCore::InspectorSettings::setLong):
2711         (WebCore::InspectorSettings::registerBoolean):
2712         (WebCore::InspectorSettings::registerLong):
2713         * inspector/InspectorSettings.h: Copied from Source/WebCore/bindings/v8/ScriptProfiler.h.
2714         * inspector/InspectorState.cpp:
2715         (WebCore::InspectorState::InspectorState):
2716         * inspector/InspectorState.h:
2717         * inspector/front-end/ConsoleView.js:
2718         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.monitoringXHRStateChanged):
2719         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2720         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2721         * inspector/front-end/ProfilesPanel.js:
2722         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2723         * inspector/front-end/ScriptsPanel.js:
2724         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2725         * inspector/front-end/Settings.js:
2726         (WebInspector.Settings):
2727         * inspector/front-end/inspector.js:
2728
2729 2011-01-26  Philippe Normand  <pnormand@igalia.com>
2730
2731         Reviewed by Martin Robinson.
2732
2733         [GTK] LayoutTests/media/audio-mpeg4-supported.html fails
2734         https://bugs.webkit.org/show_bug.cgi?id=53125
2735
2736         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2737         (WebCore::mimeTypeCache): Add audio/x-m4a mimetype in the cache.
2738
2739 2011-01-26  Yury Semikhatsky  <yurys@chromium.org>
2740
2741         Reviewed by Pavel Feldman.
2742
2743         Web Inspector: store all settings related to the agents on the frontend side
2744         https://bugs.webkit.org/show_bug.cgi?id=53174
2745
2746         * CMakeLists.txt:
2747         * GNUmakefile.am:
2748         * WebCore.exp.in:
2749         * WebCore.gypi:
2750         * WebCore.pro:
2751         * WebCore.vcproj/WebCore.vcproj:
2752         * WebCore.xcodeproj/project.pbxproj:
2753         * inspector/Inspector.idl:
2754         * inspector/InspectorAgent.cpp: profiler and debugger enablement state is now stored
2755         on the front-end side and will be pushed to the backend when the frontend is loaded.
2756         (WebCore::InspectorAgent::InspectorAgent):
2757         (WebCore::InspectorAgent::disconnectFrontend):
2758         (WebCore::InspectorAgent::restoreDebugger):
2759         (WebCore::InspectorAgent::restoreProfiler):
2760         (WebCore::InspectorAgent::enableProfiler):
2761         (WebCore::InspectorAgent::disableProfiler):
2762         (WebCore::InspectorAgent::showAndEnableDebugger):
2763         (WebCore::InspectorAgent::enableDebugger):
2764         (WebCore::InspectorAgent::disableDebugger):
2765         * inspector/InspectorAgent.h:
2766         * inspector/InspectorConsoleAgent.cpp: XHR failures will be logged to the console only
2767         if the front-end was opened during current browser session and XHR logging is turned on
2768         there.
2769         (WebCore::InspectorConsoleAgent::setMonitoringXHREnabled):
2770         (WebCore::InspectorConsoleAgent::setConsoleMessagesEnabled):
2771         * inspector/InspectorInstrumentation.cpp:
2772         (WebCore::InspectorInstrumentation::identifierForInitialRequestImpl):
2773         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
2774         * inspector/InspectorProfilerAgent.cpp:
2775         (WebCore::InspectorProfilerAgent::enable):
2776         (WebCore::InspectorProfilerAgent::startUserInitiatedProfiling):
2777         * inspector/InspectorProfilerAgent.h:
2778         * inspector/InspectorSettings.cpp: Removed.
2779         * inspector/InspectorSettings.h: Removed.
2780         * inspector/InspectorState.cpp:
2781         (WebCore::InspectorState::InspectorState):
2782         * inspector/InspectorState.h:
2783         * inspector/front-end/ConsoleView.js:
2784         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.consoleMessagesCleared):
2785         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2786         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
2787         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
2788         * inspector/front-end/ProfilesPanel.js:
2789         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2790         * inspector/front-end/ScriptsPanel.js:
2791         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2792         * inspector/front-end/Settings.js:
2793         (WebInspector.Settings):
2794         * inspector/front-end/inspector.js:
2795
2796 2011-01-27  Dan Bernstein  <mitz@apple.com>
2797
2798         Reviewed by Sam Weinig.
2799
2800         REGRESSION (r76743): Uneven spacing in right-to-left justified text
2801         https://bugs.webkit.org/show_bug.cgi?id=53225
2802
2803         Fixes failure in fast/text/atsui-spacing-features.html
2804
2805         There was an inconsistency between rendering code and font code in the interpretation of
2806         'after expansion' and 'trailing expansion'. Changed all code to interpret these in terms of
2807         visual order rather than logical.
2808
2809         * platform/graphics/Font.cpp:
2810         (WebCore::Font::expansionOpportunityCount): Added a text direction parameter and changed to
2811         iterate in visual order accordingly.
2812         * platform/graphics/Font.h:
2813         * platform/graphics/WidthIterator.cpp:
2814         (WebCore::WidthIterator::WidthIterator): Pass the run direction to expansionOpportunityCount().
2815         (WebCore::WidthIterator::advance): For right-to-left runs, evaluate the trailing expansion
2816         condition with respect to the first character, which is the trailing character in visual order.
2817         * platform/graphics/mac/ComplexTextController.cpp:
2818         (WebCore::ComplexTextController::ComplexTextController): Pass the run direction to
2819         expansionOpportunityCount().
2820         * rendering/RenderBlockLineLayout.cpp:
2821         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
2822
2823 2011-01-26  Adam Roben  <aroben@apple.com>
2824
2825         Don't create the Direct3D device before it's first needed
2826
2827         We only need the device once we decide to render. There's no point in creating it before
2828         then.
2829
2830         Reviewed by Sam Weinig.
2831
2832         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2833         (WebCore::CACFLayerTreeHost::setWindow): Removed the call to createRenderer() from here.
2834         We already have code to create it when we first try to draw.
2835         (WebCore::CACFLayerTreeHost::createRenderer): Flush the context after we set our layer's
2836         bounds so that the bounds will take effect the next time we render (which could be just
2837         after this function returns).
2838
2839 2011-01-26  Adam Roben  <aroben@apple.com>
2840
2841         Add assertions that CACFLayerTreeHost gains and loses an HWND only once
2842
2843         CACFLayerTreeHost doesn't support any other use pattern.
2844
2845         Reviewed by Sam Weinig.
2846
2847         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2848         (WebCore::CACFLayerTreeHost::CACFLayerTreeHost): Initialize new member.
2849         (WebCore::CACFLayerTreeHost::setWindow): Assert that we transition from not having a window,
2850         to having a window, to not having a window just once over the lifetime of this object.
2851
2852         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added m_state.
2853
2854 2011-01-26  Adam Roben  <aroben@apple.com>
2855
2856         Notify layers that their animations have started when we flush the context, not when we
2857         render
2858
2859         r76372 separated context flushing from rendering, but this bit of code got left behind.
2860
2861         Reviewed by Sam Weinig.
2862
2863         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2864         (WebCore::CACFLayerTreeHost::render): Moved code to notify the layers from here to
2865         notifyAnimationsStarted.
2866         (WebCore::CACFLayerTreeHost::flushPendingLayerChangesNow): Added a call to
2867         notifyAnimationsStarted after we flush the context.
2868         (WebCore::CACFLayerTreeHost::notifyAnimationsStarted): Added. Code came from render. Changed
2869         to call PlatformCALayer::animationStarted rather than calling through to the client
2870         directly.
2871
2872         * platform/graphics/ca/win/CACFLayerTreeHost.h: Added notifyAniamtionsStarted.
2873
2874 2011-01-26  Adam Roben  <aroben@apple.com>
2875
2876         Small cleanup in MediaPlayerPrivateFullscreenWindow
2877
2878         Reviewed by Sam Weinig.
2879
2880         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp:
2881         (WebCore::MediaPlayerPrivateFullscreenWindow::~MediaPlayerPrivateFullscreenWindow): Moved
2882         code here from close(), since this was the only place that called it after the following
2883         change to createWindow.
2884         (WebCore::MediaPlayerPrivateFullscreenWindow::createWindow): Replaced code that handled the
2885         case where we had already created the window with an assertion that we have not already done
2886         so. Our single caller (FullscreenVideoController) did not require this behavior.
2887
2888         * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: Removed layerView.
2889
2890 2011-01-26  Sam Weinig  <sam@webkit.org>
2891
2892         Reviewed by Adam Roben.
2893
2894         Move ScrollView scroll wheel code to ScrollAnimator.
2895
2896         * platform/ScrollAnimator.cpp:
2897         (WebCore::ScrollAnimator::handleWheelEvent):
2898         * platform/ScrollAnimator.h:
2899         Moved implementation of handleWheelEvent from ScrollView::wheelEvent.
2900
2901         * platform/ScrollView.cpp:
2902         (WebCore::ScrollView::wheelEvent):
2903         Call down to the ScrollableArea.
2904
2905         * platform/ScrollableArea.cpp:
2906         (WebCore::ScrollableArea::handleWheelEvent):
2907         Call down to the ScrollAnimator.
2908
2909         * platform/ScrollableArea.h:
2910         (WebCore::ScrollableArea::scrollPosition):
2911         (WebCore::ScrollableArea::minimumScrollPosition):
2912         (WebCore::ScrollableArea::maximumScrollPosition):
2913         (WebCore::ScrollableArea::visibleContentRect):
2914         (WebCore::ScrollableArea::visibleHeight):
2915         (WebCore::ScrollableArea::visibleWidth):
2916         Add functions needed to implement wheel event in the animator.
2917
2918 2011-01-26  David Kilzer  <ddkilzer@apple.com>
2919
2920         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
2921         <rdar://problem/8821760>
2922
2923         Reviewed by Antti Koivisto.
2924
2925         This adds support for HTTP pipelining in CFNetwork, but does not
2926         enable it.  To enable it post-SnowLeopard, use this command:
2927
2928             defaults write BUNDLE.ID WebKitEnableHTTPPipelining -bool YES
2929
2930         Once enabled, it is possible to force the same load priority
2931         (high) to be sent to CFNetwork to allow WebCore to handle the
2932         scheduling:
2933
2934             defaults write BUNDLE.ID WebKitForceHTTPPipeliningPriorityHigh -bool YES
2935
2936         * WebCore.exp.in: Export _wkGetHTTPPipeliningPriority and
2937         _wkSetHTTPPipeliningPriority.
2938
2939         * loader/DocumentThreadableLoader.cpp:
2940         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequestWithPreflight):
2941         Copy the priority to preflightRequest.
2942
2943         * loader/ResourceLoadScheduler.cpp:
2944         (WebCore::ResourceLoadScheduler::scheduleLoad): Refactored code
2945         at the end of the method to use an early return.
2946
2947         * loader/cache/CachedResourceRequest.cpp:
2948         (WebCore::CachedResourceRequest::load): Set the priority on the
2949         ResourceRequest object based on the priority of the
2950         CachedResourceRequest before calling
2951         ResourceLoadScheduler::scheduleSubresourceLoad().
2952
2953         * loader/icon/IconLoader.cpp:
2954         (WebCore::IconLoader::startLoading): Create a ResourceRequest
2955         object and set its priority to ResourceLoadPriorityLow before
2956         passing it to ResourceLoadScheduler::scheduleSubresourceLoad().
2957
2958         * platform/mac/WebCoreSystemInterface.h:
2959         (wkGetHTTPPipeliningPriority): Added.
2960         (wkSetHTTPPipeliningPriority): Added.
2961         * platform/mac/WebCoreSystemInterface.mm:
2962         (wkGetHTTPPipeliningPriority): Added.
2963         (wkSetHTTPPipeliningPriority): Added.
2964
2965         * platform/network/ResourceRequestBase.cpp:
2966         (WebCore::ResourceRequestBase::adopt): Set m_priority when
2967         adopting a CrossThreadResourceRequestData.
2968         (WebCore::ResourceRequestBase::copyData): Set m_priority when
2969         creating a CrossThreadResourceRequestData.
2970         (WebCore::ResourceRequestBase::priority): Added.
2971         (WebCore::ResourceRequestBase::setPriority): Added.
2972         (WebCore::equalIgnoringHeaderFields): Priorities must match when
2973         comparing two ResourceRequest objects.
2974
2975         * platform/network/ResourceRequestBase.h:
2976         (WebCore::ResourceRequestBase::ResourceRequestBase): Set default
2977         priority of new objects to ResourceLoadPriorityLow.
2978         (WebCore::ResourceRequestBase::priority): Added declaration.
2979         (WebCore::ResourceRequestBase::setPriority): Added declaration.
2980         (WebCore::isHTTPPipeliningEnabled): Added.
2981         (WebCore::shouldUseHTTPPipeliningPriority): Added.
2982
2983         * platform/network/cf/ResourceRequestCFNet.cpp: Updated so that
2984         Mac OS X and Windows share code.
2985         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Always
2986         set the HTTP connection count per host, but return an
2987         'unlimited' value when using HTTP pipelining.  This method used
2988         to be defined in ResourceRequestMac.mm for Mac OS X.
2989         (WebCore::readBooleanPreference): Added.  Helper method for
2990         reading boolean user defaults.
2991         (WebCore::isHTTPPipeliningEnabled): Returns value of user
2992         default key WebKitEnableHTTPPipelining, or false if not set.
2993         (WebCore::shouldUseHTTPPipeliningPriority): Returns value of
2994         user default key WebKitForceHTTPPipeliningPriorityHigh, or false
2995         if not set.
2996         * platform/network/cf/ResourceRequestCFNet.h: Updated so that
2997         Mac OS X and Windows share code.  Fixed indentation.
2998         (WebCore::mapHTTPPipeliningPriorityToResourceLoadPriority): Added.
2999         (WebCore::mapResourceLoadPriorityToHTTPPipeliningPriority): Added.
3000
3001         * platform/network/mac/ResourceRequestMac.mm:
3002         (WebCore::ResourceRequest::doUpdatePlatformRequest): Update
3003         HTTP pipelining priority on NSMutableFURLRequest object.
3004         (WebCore::ResourceRequest::doUpdateResourceRequest): Update
3005         m_priority from the NSURLRequest object.
3006         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Removed.
3007         Code is now shared with Windows in ResourceRequestCFNet.cpp.
3008
3009 2011-01-26  Beth Dakin  <bdakin@apple.com>
3010
3011         Reviewed by Darin Adler.
3012
3013         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
3014         when using WKScrollbars.
3015
3016         New WebKitSystemInterface Functionality.
3017         * WebCore.exp.in:
3018         * platform/mac/WebCoreSystemInterface.h:
3019         * platform/mac/WebCoreSystemInterface.mm:
3020
3021         Some of the terrible static arrays are now only needed in the 
3022         old non-WK code, so they are if-def'd now.
3023         * platform/mac/ScrollbarThemeMac.mm:
3024         
3025         Just patching this function in a better way than I did
3026         before.
3027         (WebCore::updateArrowPlacement):
3028         
3029         Call into WK for the right values.
3030         (WebCore::ScrollbarThemeMac::scrollbarThickness):
3031         (WebCore::ScrollbarThemeMac::hasThumb):
3032         (WebCore::ScrollbarThemeMac::minimumThumbLength):
3033         
3034         Return false if there are no buttons.
3035         (WebCore::ScrollbarThemeMac::hasButtons):
3036
3037         Return an empty IntRect if there are not buttons.
3038         (WebCore::buttonRepaintRect):
3039
3040 2011-01-26  Sam Weinig  <sam@webkit.org>
3041
3042         Reviewed by Maciej Stachowiak.
3043
3044         Add events to represent the start/end of a gesture scroll
3045         https://bugs.webkit.org/show_bug.cgi?id=53215
3046
3047         * WebCore.exp.in: 
3048         Add new file.
3049
3050         * WebCore.xcodeproj/project.pbxproj:
3051         Add new file.
3052
3053         * page/EventHandler.cpp:
3054         (WebCore::EventHandler::handleGestureEvent):
3055         * page/EventHandler.h:
3056         Add entry point for handling gesture events.
3057
3058         * platform/PlatformGestureEvent.h: Added.
3059         (WebCore::PlatformGestureEvent::PlatformGestureEvent):
3060         (WebCore::PlatformGestureEvent::type):
3061         (WebCore::PlatformGestureEvent::position):
3062         (WebCore::PlatformGestureEvent::globalPosition):
3063         (WebCore::PlatformGestureEvent::timestamp):
3064         Add platform agnostic representation of a gesture event.
3065
3066 2011-01-26  Dan Bernstein  <mitz@apple.com>
3067
3068         Reviewed by Dave Hyatt.
3069
3070         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
3071         https://bugs.webkit.org/show_bug.cgi?id=53184
3072
3073         Tests: fast/text/justify-ideograph-complex.html
3074                fast/text/justify-ideograph-simple.html
3075                fast/text/justify-ideograph-vertical.html
3076
3077         * html/canvas/CanvasRenderingContext2D.cpp:
3078         (WebCore::CanvasRenderingContext2D::drawTextInternal): Corrected the type of the third parameter
3079         passed to the TextRun constructor and added the trailingExpansionBehavior parameter.
3080         * platform/graphics/Font.cpp:
3081         (WebCore::Font::expansionOpportunityCount): Added. Returns the number of expansion opportunities
3082         for text justification. On entry, isAfterExpansion says whether an expansion opportunity exists
3083         before the first character. On return, isAfterExpansion says whether an expansion opportunity
3084         exists after the last character.
3085         * platform/graphics/Font.h: 
3086         * platform/graphics/GlyphBuffer.h:
3087         (WebCore::GlyphBuffer::expandLastAdvance): Added.
3088         * platform/graphics/TextRun.h:
3089         (WebCore::TextRun::TextRun): Added a TrailingExpansionBehavior parameter to the constructors.
3090         Renamed padding to expansion.
3091         (WebCore::TextRun::expansion): Renamed padding() to this.
3092         (WebCore::TextRun::allowsTrailingExpansion): Added this accessor.
3093         * platform/graphics/WidthIterator.cpp:
3094         (WebCore::WidthIterator::WidthIterator): Initialize m_isAfterExpansion. Use Font::expansionOpportunityCount()
3095         and adjust the count if it includes a trailing expansion opportunity but the run disallows trailing
3096         expansion.
3097         (WebCore::WidthIterator::advance): Apply expansion before and after CJK ideographs.
3098         (WebCore::WidthIterator::advanceOneCharacter): Changed to not clear the GlyphBuffer so that advance()
3099         can expand the last advance if it is followed by a CJK ideograph.
3100         * platform/graphics/WidthIterator.h: Renamed m_padding to m_expansion and m_padPerSpace
3101         to m_expansionPerOpportunity.
3102         * platform/graphics/chromium/FontChromiumWin.cpp:
3103         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3104         * platform/graphics/chromium/FontLinux.cpp:
3105         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3106         * platform/graphics/efl/FontEfl.cpp:
3107         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3108         * platform/graphics/gtk/FontGtk.cpp:
3109         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3110         * platform/graphics/haiku/FontHaiku.cpp:
3111         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3112         * platform/graphics/mac/ComplexTextController.cpp:
3113         (WebCore::ComplexTextController::ComplexTextController): Initialize m_isAfterExpansion. Use
3114         Font::expansionOpportunityCount() and adjust the count if it includes a trailing expansion
3115         opportunity but the run disallows trailing expansion.
3116         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Moved the definition and initialization
3117         of hasExtraSpacing outside the loop. Apply expansion before and after CJK ideographs.
3118         * platform/graphics/mac/ComplexTextController.h: Renamed m_padding to m_expansion and m_padPerSpace
3119         to m_expansionPerOpportunity.
3120         * platform/graphics/mac/FontMac.mm:
3121         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3122         * platform/graphics/qt/FontQt.cpp:
3123         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3124         * platform/graphics/win/FontWin.cpp:
3125         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3126         * platform/graphics/win/UniscribeController.cpp:
3127         (WebCore::UniscribeController::UniscribeController): Updated for rename.
3128         * platform/graphics/wince/FontWinCE.cpp:
3129         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3130         * platform/graphics/wx/FontWx.cpp:
3131         (WebCore::Font::canExpandAroundIdeographsInComplexText): Added.
3132         * rendering/EllipsisBox.cpp:
3133         (WebCore::EllipsisBox::paint): Pass a TrailingExpansionBehavior to the TextRun constructor.
3134         (WebCore::EllipsisBox::selectionRect): Ditto.
3135         (WebCore::EllipsisBox::paintSelection): Ditto.
3136         * rendering/InlineBox.h:
3137         (WebCore::InlineBox::InlineBox): Renamed m_toAdd to m_expansion.
3138         (WebCore::InlineBox::expansion): Renamed toAdd() to this.
3139         * rendering/InlineTextBox.cpp:
3140         (WebCore::InlineTextBox::selectionRect): Pass a TrailingExpansionBehavior to the TextRun constructor.
3141         (WebCore::InlineTextBox::paint): Ditto.
3142         (WebCore::InlineTextBox::paintSelection): Ditto.
3143         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
3144         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker): Ditto.
3145         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
3146         (WebCore::InlineTextBox::computeRectForReplacementMarker): Ditto.
3147         (WebCore::InlineTextBox::offsetForPosition): Ditto.
3148         (WebCore::InlineTextBox::positionForOffset): Ditto.
3149         * rendering/InlineTextBox.h:
3150         (WebCore::InlineTextBox::setExpansion): Renamed setSpaceAdd() to this.
3151         (WebCore::InlineTextBox::trailingExpansionBehavior): Added. Trailing expansion is allowed if this
3152         is not the last leaf box on the line.
3153         * rendering/RenderBlockLineLayout.cpp:
3154         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Keep expansion opportunity counts
3155         in a vector instead of computing them twice. Discard the trailing expansion opportunity in the
3156         last text box.
3157         * rendering/RenderFileUploadControl.cpp:
3158         (WebCore::RenderFileUploadControl::paintObject): Pass a TrailingExpansionBehavior to the TextRun constructor.
3159         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths): Ditto.
3160         * rendering/RenderListBox.cpp:
3161         (WebCore::RenderListBox::updateFromElement): Ditto.
3162         (WebCore::RenderListBox::paintItemForeground): Ditto. Also corrected the type of the second parameter.
3163         * rendering/RenderTextControl.cpp:
3164         (WebCore::RenderTextControl::getAvgCharWidth): Ditto.
3165         (WebCore::RenderTextControl::paintPlaceholder): Ditto.
3166         * rendering/svg/SVGInlineTextBox.cpp:
3167         (WebCore::SVGInlineTextBox::constructTextRun): Ditto.
3168
3169 2011-01-26  Andy Estes  <aestes@apple.com>
3170
3171         Rubber-stamped by Darin Adler.
3172
3173         Inline HTMLObjectElement::hasValidClassId().
3174
3175         * html/HTMLObjectElement.cpp:
3176         (WebCore::HTMLObjectElement::hasValidClassId):
3177
3178 2011-01-26  Evan Martin  <evan@chromium.org>
3179
3180         Reviewed by Tony Chang.
3181
3182         [chromium] crash on getBoundingClientRect in complex text
3183         https://bugs.webkit.org/show_bug.cgi?id=53199
3184
3185         Use the correct array bound; we want the number of characters processed by
3186         the shaper, not the longest continuous script run length.
3187
3188         Test: platform/chromium-linux/fast/text/international/complex-text-rectangle.html
3189
3190         * platform/graphics/chromium/ComplexTextControllerLinux.cpp:
3191         (WebCore::ComplexTextController::nextScriptRun):
3192         * platform/graphics/chromium/ComplexTextControllerLinux.h:
3193         (WebCore::ComplexTextController::numCodePoints):
3194
3195 2011-01-26  Emil A Eklund  <eae@chromium.org>
3196
3197         Reviewed by Alexey Proskuryakov.
3198
3199         Remove cached document reference from CSSStyleSheet and XSLStyleSheet.
3200         https://bugs.webkit.org/show_bug.cgi?id=52084
3201
3202         Test: fast/dom/css-delete-doc.html
3203
3204         * css/CSSMediaRule.cpp:
3205         (WebCore::CSSMediaRule::insertRule):
3206         (WebCore::CSSMediaRule::deleteRule):
3207         * css/CSSStyleSheet.cpp:
3208         (WebCore::CSSStyleSheet::CSSStyleSheet):
3209         (WebCore::CSSStyleSheet::document):
3210         * css/CSSStyleSheet.h:
3211         * xml/XSLStyleSheet.h:
3212         (WebCore::XSLStyleSheet::parentStyleSheet):
3213         * xml/XSLStyleSheetLibxslt.cpp:
3214         (WebCore::XSLStyleSheet::XSLStyleSheet):
3215         (WebCore::XSLStyleSheet::cachedResourceLoader):
3216         (WebCore::XSLStyleSheet::setParentStyleSheet):
3217         (WebCore::XSLStyleSheet::ownerDocument):
3218         * xml/XSLStyleSheetQt.cpp:
3219         (WebCore::XSLStyleSheet::XSLStyleSheet):
3220         (WebCore::XSLStyleSheet::cachedResourceLoader):
3221         (WebCore::XSLStyleSheet::ownerDocument):
3222
3223 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
3224
3225         Reviewed by Kent Tamura.
3226
3227         Reduce ref-count churn in shadowPseudoId.
3228         https://bugs.webkit.org/show_bug.cgi?id=53136
3229
3230         Refactoring, so no new tests.
3231
3232         * dom/Element.h:
3233         (WebCore::Element::shadowPseudoId): Changed signature to use const AtomicString&
3234         * html/ValidationMessage.cpp:
3235         (WebCore::ElementWithPseudoId::shadowPseudoId): Ditto.
3236         * html/shadow/SliderThumbElement.cpp:
3237         (WebCore::SliderThumbElement::shadowPseudoId): Ditto, plus moved from the header file.
3238         * html/shadow/SliderThumbElement.h: Ditto.
3239         * rendering/MediaControlElements.cpp:
3240         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Ditto.
3241         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Ditto.
3242         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Ditto.
3243         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Ditto.
3244         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Ditto.
3245         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Ditto.
3246         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Ditto.
3247         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Ditto.
3248         (WebCore::MediaControlTimelineElement::shadowPseudoId): Ditto.
3249         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Ditto.
3250         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Ditto.
3251         * rendering/MediaControlElements.h: Ditto.
3252
3253 2011-01-26  Dave Hyatt  <hyatt@apple.com>
3254
3255         Reviewed by Dan Bernstein.
3256
3257         https://bugs.webkit.org/show_bug.cgi?id=46421, make multi-column layout work with vertical text.
3258
3259         Added new tests in fast/multicol/vertical-lr and fast/multicol/vertical-rl.
3260
3261         * css/html.css:
3262         Update p, blockquote and h1-h6 to respect directionality so that column layout tests that use those
3263         elements work properly.
3264
3265         * rendering/InlineFlowBox.cpp:
3266         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3267         Fix a flipping bug with the computation of lineTopIncludingMargins where it could be incorrectly shrunk
3268         in some cases (causing lines to all stack on top of one another).
3269
3270         * rendering/InlineTextBox.h:
3271         (WebCore::InlineTextBox::calculateBoundaries):
3272         Fix calculateBoundaries to be physical rather than logical.
3273
3274         * rendering/LayoutState.cpp:
3275         (WebCore::LayoutState::addForcedColumnBreak):
3276         * rendering/LayoutState.h:
3277         Rename childY to childLogicalOffset.
3278
3279         * rendering/RenderBlock.cpp:
3280         (WebCore::RenderBlock::layoutBlock):
3281         (WebCore::RenderBlock::addOverflowFromChildren):
3282         (WebCore::RenderBlock::addOverflowFromFloats):
3283         (WebCore::RenderBlock::collapseMargins):
3284         (WebCore::RenderBlock::estimateLogicalTopPosition):
3285         (WebCore::RenderBlock::layoutBlockChild):
3286         (WebCore::RenderBlock::markForPaginationRelayoutIfNeeded):
3287         (WebCore::RenderBlock::paintColumnRules):
3288         (WebCore::RenderBlock::paintColumnContents):
3289         (WebCore::RenderBlock::paintFloats):
3290         (WebCore::RenderBlock::selectionGaps):
3291         (WebCore::RenderBlock::removeFloatingObjectsBelow):
3292         (WebCore::RenderBlock::addOverhangingFloats):
3293         (WebCore::RenderBlock::hitTestFloats):
3294         (WebCore::RenderBlock::hitTestColumns):
3295         (WebCore::RenderBlock::calcColumnWidth):
3296         (WebCore::RenderBlock::desiredColumnWidth):
3297         (WebCore::RenderBlock::columnRectAt):
3298         (WebCore::RenderBlock::layoutColumns):
3299         (WebCore::RenderBlock::adjustPointToColumnContents):
3300         (WebCore::RenderBlock::adjustRectForColumns):
3301         (WebCore::RenderBlock::flipForWritingModeIncludingColumns):
3302         (WebCore::RenderBlock::adjustForColumns):
3303         (WebCore::RenderBlock::adjustForBorderFit):
3304         (WebCore::RenderBlock::nextPageLogicalTop):
3305         (WebCore::RenderBlock::applyBeforeBreak):
3306         (WebCore::RenderBlock::applyAfterBreak):
3307         (WebCore::RenderBlock::adjustForUnsplittableChild):
3308         (WebCore::RenderBlock::adjustLinePositionForPagination):
3309         * rendering/RenderBlock.h:
3310         (WebCore::RenderBlock::logicalRightOffsetForContent):
3311         (WebCore::RenderBlock::logicalLeftOffsetForContent):
3312         (WebCore::RenderBlock::leftForFloatIncludingMargin):
3313         (WebCore::RenderBlock::topForFloatIncludingMargin):
3314         * rendering/RenderBlockLineLayout.cpp:
3315         (WebCore::RenderBlock::layoutInlineChildren):
3316         (WebCore::RenderBlock::determineStartPosition):
3317         Reworking of all the RenderBlock column functions to support flipping and vertical modes.
3318
3319         * rendering/RenderBox.cpp:
3320         (WebCore::RenderBox::offsetFromContainer):
3321         (WebCore::RenderBox::flipForWritingModeIncludingColumns):
3322         Patch offsetFromContainer to be aware of flipped block writing modes when dealing with column layouts.
3323
3324         * rendering/RenderBox.h:
3325         (WebCore::RenderBox::clientLogicalBottom):
3326         Fix a bug in clientLogicalBottom where it didn't add in the right border/padding.
3327         
3328         * rendering/RenderFlexibleBox.cpp:
3329         (WebCore::RenderFlexibleBox::layoutBlock):
3330         Better terminology for pagination.
3331
3332         * rendering/RenderInline.cpp:
3333         (WebCore::RenderInline::offsetFromContainer):
3334         (WebCore::RenderInline::mapLocalToContainer):
3335         * rendering/RenderLayer.cpp:
3336         (WebCore::RenderLayer::paintChildLayerIntoColumns):
3337         (WebCore::RenderLayer::hitTestChildLayerColumns):
3338         (WebCore::RenderLayer::localBoundingBox):
3339         (WebCore::RenderLayer::boundingBox):
3340         Patch painting in RenderLayers to be vertical-text-aware.
3341     
3342         * rendering/RenderObject.cpp:
3343         (WebCore::RenderObject::mapLocalToContainer):
3344         Add code to be flipped block-aware with columns.
3345
3346         * rendering/RenderTable.cpp:
3347         (WebCore::RenderTable::layout):
3348         * rendering/RenderTableRow.cpp:
3349         (WebCore::RenderTableRow::layout):
3350         * rendering/RenderTableSection.cpp:
3351         (WebCore::RenderTableSection::layoutRows):
3352         Fix pagination to use better terminology.
3353         
3354         * rendering/RenderText.cpp:
3355         (WebCore::RenderText::absoluteQuads):
3356         (WebCore::RenderText::absoluteQuadsForRange):
3357         Fix a bug where vertical text wasn't taken into account.
3358
3359 2011-01-26  Dimitri Glazkov  <dglazkov@chromium.org>
3360
3361         Unreviewed, rolling out r76719.
3362         http://trac.webkit.org/changeset/76719
3363         https://bugs.webkit.org/show_bug.cgi?id=53122
3364
3365         Broke a bunch of media tests in Chromium/Qt/GTK.
3366
3367 2011-01-26  Tony Chang  <tony@chromium.org>
3368
3369         Reviewed by Ryosuke Niwa.
3370
3371         [gtk] strip NUL characters when copying text/html on GTK+
3372         https://bugs.webkit.org/show_bug.cgi?id=52508
3373
3374         Putting NUL characters in the text/html clipboard doesn't work in
3375         WebKit GTK+ (the pasted value is truncated at the NUL).  Since we're
3376         already stripping this character for plain text (for Windows), strip
3377         it in text/html too.
3378
3379         * editing/MarkupAccumulator.h: mark function as virtual
3380         * editing/markup.cpp:
3381         (WebCore::StyledMarkupAccumulator::appendString):
3382         (WebCore::StyledMarkupAccumulator::takeResults): strip nulls
3383
3384 2011-01-26  Mario Sanchez Prada  <msanchez@igalia.com>
3385
3386         Reviewed by Martin Robinson.
3387
3388         [GTK] Reliable crash with getTextAtOffset()
3389         https://bugs.webkit.org/show_bug.cgi?id=53131
3390
3391         Properly calculate length in bytes for a UTF8 substring.
3392
3393         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3394         (utf8Substr): Use character instead of bytes as units to
3395         calculate the length in bytes for the UTF8 string.
3396
3397 2011-01-25  Dimitri Glazkov  <dglazkov@chromium.org>
3398
3399         Reviewed by Kent Tamura.
3400
3401         Change HTMLInputElement-derived parts of media element shadow DOM to use shadowPseudoId.
3402         https://bugs.webkit.org/show_bug.cgi?id=53122
3403
3404         This is the first step in converting HTMLMediaElement to the new shadow DOM.
3405
3406         Should not regress any existing tests. No observable change in behavior.
3407
3408         * css/CSSSelector.cpp:
3409         (WebCore::CSSSelector::pseudoId): Removed now-unnecessary hard-coded pseudo-element selectors.
3410         (WebCore::nameToPseudoTypeMap): Ditto.
3411         (WebCore::CSSSelector::extractPseudoType): Ditto.
3412         * css/CSSSelector.h: Ditto.
3413         * css/mediaControls.css: Added proper initial values, now that elements use the proper selector pipeline.
3414         * rendering/MediaControlElements.cpp:
3415         (WebCore::MediaControlInputElement::MediaControlInputElement): Removed the switch statement,
3416             which is now replaced with virtual shadowPseudoId on each corresponding class.
3417         (WebCore::MediaControlInputElement::styleForElement): Changed to use element pipeline.
3418         (WebCore::MediaControlMuteButtonElement::MediaControlMuteButtonElement): Changed to set
3419             display type in constructor.
3420         (WebCore::MediaControlMuteButtonElement::create): Changed to not take PseudoId as
3421             constructor argument.
3422         (WebCore::MediaControlMuteButtonElement::shadowPseudoId): Added.
3423         (WebCore::MediaControlVolumeSliderMuteButtonElement::MediaControlVolumeSliderMuteButtonElement): Added
3424             to disambiguate from the MediaControlMuteButtonElement.
3425         (WebCore::MediaControlVolumeSliderMuteButtonElement::create): Added.
3426         (WebCore::MediaControlVolumeSliderMuteButtonElement::shadowPseudoId): Added.
3427         (WebCore::MediaControlPlayButtonElement::MediaControlPlayButtonElement): Changed to not take PseudoId as
3428             constructor argument.
3429         (WebCore::MediaControlPlayButtonElement::shadowPseudoId): Added.
3430         (WebCore::MediaControlSeekButtonElement::MediaControlSeekButtonElement): Changed to not take PseudoId as
3431             constructor argument.
3432         (WebCore::MediaControlSeekForwardButtonElement::MediaControlSeekForwardButtonElement): Added.
3433         (WebCore::MediaControlSeekForwardButtonElement::create): Added.
3434         (WebCore::MediaControlSeekForwardButtonElement::shadowPseudoId): Added.
3435         (WebCore::MediaControlSeekBackButtonElement::MediaControlSeekBackButtonElement): Added.
3436         (WebCore::MediaControlSeekBackButtonElement::create): Added.
3437         (WebCore::MediaControlSeekBackButtonElement::shadowPseudoId): Added.
3438         (WebCore::MediaControlRewindButtonElement::MediaControlRewindButtonElement): Added.
3439         (WebCore::MediaControlRewindButtonElement::shadowPseudoId): Added.
3440         (WebCore::MediaControlReturnToRealtimeButtonElement::MediaControlReturnToRealtimeButtonElement): Changed to not take PseudoId as
3441             constructor argument.
3442         (WebCore::MediaControlReturnToRealtimeButtonElement::shadowPseudoId): Added.
3443         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement): Changed to not take PseudoId as
3444             constructor argument.
3445         (WebCore::MediaControlToggleClosedCaptionsButtonElement::shadowPseudoId): Added.
3446         (WebCore::MediaControlTimelineElement::MediaControlTimelineElement): Changed to not take PseudoId as
3447             constructor argument.
3448         (WebCore::MediaControlTimelineElement::shadowPseudoId): Added.
3449         (WebCore::MediaControlVolumeSliderElement::MediaControlVolumeSliderElement): Changed to not take PseudoId as
3450             constructor argument.
3451         (WebCore::MediaControlVolumeSliderElement::shadowPseudoId): Added.
3452         (WebCore::MediaControlFullscreenButtonElement::MediaControlFullscreenButtonElement): Changed to not take PseudoId as
3453             constructor argument.
3454         (WebCore::MediaControlFullscreenButtonElement::shadowPseudoId): Added.
3455         * rendering/MediaControlElements.h:
3456         (WebCore::MediaControlSeekForwardButtonElement::isForwardButton): Added.
3457         (WebCore::MediaControlSeekBackButtonElement::isForwardButton): Added.