Source/WebCore: VoiceOver cannot navigate the iTunes album view table
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-06-14  Chris Fleizach  <cfleizach@apple.com>
2
3         Reviewed by David Kilzer.
4
5         VoiceOver cannot navigate the iTunes album view table
6         https://bugs.webkit.org/show_bug.cgi?id=62335
7
8         This is a regression from https://bugs.webkit.org/show_bug.cgi?id=57463.
9         Part of that patch made a change so that an ARIA table will only look at it's children and grandchildren
10         for possible rows. That however, doesn't allow arbitrary hierarchies to work with ARIA, like in iTunes album view.
11
12         Test: platform/mac/accessibility/aria-grid-with-strange-hierarchy.html
13
14         * accessibility/AccessibilityARIAGrid.cpp:
15         (WebCore::AccessibilityARIAGrid::addChild):
16         (WebCore::AccessibilityARIAGrid::addChildren):
17         * accessibility/AccessibilityARIAGrid.h:
18
19 2011-06-14  Sheriff Bot  <webkit.review.bot@gmail.com>
20
21         Unreviewed, rolling out r88823.
22         http://trac.webkit.org/changeset/88823
23         https://bugs.webkit.org/show_bug.cgi?id=62652
24
25         Broke the Lion build (Requested by estes on #webkit).
26
27         * platform/mac/MemoryPressureHandlerMac.mm:
28
29 2011-06-14  Michael Saboff  <msaboff@apple.com>
30
31         Reviewed by Joseph Pecoraro.
32
33         Incorrect #if[n]def for building without DISPATCH_VM_PRESSURE
34         https://bugs.webkit.org/show_bug.cgi?id=62649
35
36         The #ifdef DISPATCH_VM_PRESSURE actually needs to be #ifndef
37         to handle when DISPATCH_VM_PRESSURE is NOT defined in the
38         system header files.
39
40         No functional changes, fixing build issue therefore no tests.
41
42         * platform/mac/MemoryPressureHandlerMac.mm:
43
44 2011-06-13  Adrienne Walker  <enne@google.com>
45
46         Reviewed by James Robinson.
47
48         [chromium] Disable drawing for huge mask layers
49         https://bugs.webkit.org/show_bug.cgi?id=62607
50
51         Because masks have a different layer size than the layer they are
52         masking, they are untiled.  If they are too large to be contained
53         within a single texture, then they should just be disabled.
54
55         Test: platform/chromium/compositing/huge-mask-layer.html
56
57         * platform/graphics/chromium/ContentLayerChromium.cpp:
58         (WebCore::ContentLayerChromium::drawsContent):
59         (WebCore::ContentLayerChromium::paintContentsIfDirty):
60         * platform/graphics/chromium/LayerTilerChromium.h:
61         (WebCore::LayerTilerChromium::getSingleTexture):
62         (WebCore::LayerTilerChromium::numTiles):
63
64 2011-06-14  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
65
66         Reviewed by Laszlo Gombos.
67
68         [Qt] [Symbian] GraphicsLayer: support plugins on symbian
69         https://bugs.webkit.org/show_bug.cgi?id=57418
70
71         Implement graphics layer for plugins on Symbian.
72
73         * plugins/PluginView.h:
74         * plugins/qt/PluginViewQt.cpp:
75         (WebCore::PluginView::shouldUseAcceleratedCompositing):
76         (WebCore::PluginView::platformStart):
77         * plugins/symbian/PluginViewSymbian.cpp:
78         (WebCore::PluginGraphicsLayerQt::PluginGraphicsLayerQt):
79         (WebCore::PluginGraphicsLayerQt::~PluginGraphicsLayerQt):
80         (WebCore::PluginGraphicsLayerQt::paint):
81         (WebCore::PluginView::shouldUseAcceleratedCompositing):
82         (WebCore::PluginView::paint):
83         (WebCore::PluginView::invalidateRect):
84         (WebCore::PluginView::platformStart):
85         (WebCore::PluginView::platformLayer):
86
87 2011-06-14  Sreeram Ramachandran  <sreeram@chromium.org>
88
89         Reviewed by Pavel Feldman.
90
91         Web Inspector: Allow the console to persist on page refresh or navigation
92         https://bugs.webkit.org/show_bug.cgi?id=53359
93
94         Adds a context menu checkbox to preserve the console log across
95         navigations. However, the underlying messages and objects are actually
96         deleted from the backend, so they are not expandable; their continued
97         display in the console frontend is merely cosmetic.
98
99         Test: inspector/console/console-preserve-log.html
100
101         * English.lproj/localizedStrings.js:
102         * inspector/front-end/ConsoleView.js:
103         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
104         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
105         (WebInspector.ConsoleView.prototype.requestClearMessages):
106         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction):
107         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.preserveLogItemAction):
108         (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
109         * inspector/front-end/Settings.js:
110         (WebInspector.Settings):
111         * inspector/front-end/inspector.js:
112         (WebInspector.reset):
113
114 2011-06-14  Pavel Podivilov  <podivilov@chromium.org>
115
116         Reviewed by Pavel Feldman.
117
118         Web Inspector: add tooltip to file select options in scripts panel.
119         https://bugs.webkit.org/show_bug.cgi?id=62537
120
121         * inspector/front-end/ScriptsPanel.js:
122         (WebInspector.ScriptsPanel):
123         (WebInspector.ScriptsPanel.prototype._sourceFileAdded):
124         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.compare):
125         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
126         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
127         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
128
129 2011-06-14  Luke Macpherson   <macpherson@chromium.org>
130
131         Reviewed by Eric Seidel.
132
133         Implement CSS border radius properies in CSSStyleApplyProperty
134         https://bugs.webkit.org/show_bug.cgi?id=62265
135
136         No new tests / refactoring only.
137
138         * css/CSSStyleApplyProperty.cpp:
139         Implement new class to culculate border radius, initialize for appropriate properties.
140         (WebCore::ApplyPropertyBorderRadius::ApplyPropertyBorderRadius):
141         (WebCore::ApplyPropertyBorderRadius::applyValue):
142         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
143         * css/CSSStyleSelector.cpp:
144         Remove old implementations.
145         (WebCore::CSSStyleSelector::applyProperty):
146         * page/animation/AnimationBase.cpp:
147         Pass LengthSize by value.
148         (WebCore::AnimationBase::ensurePropertyMap):
149         * rendering/style/RenderStyle.h:
150         Pass LengthSize by value consistently.
151
152 2011-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
153
154         Reviewed by Martin Robinson.
155
156         [GTK] Rename convertWidgetRectToScreenRect() to convertWidgetPointToScreenPoint()
157         https://bugs.webkit.org/show_bug.cgi?id=62626
158
159         The method actually converts coordinates, the rectangle size is
160         not affected, so it can be modified to return a point
161         instead. Fix also a bug in the implementation, it was translating
162         the coordinates twice returning the wrong position when the given
163         rectangle was not at 0,0.
164
165         * platform/gtk/GtkUtilities.cpp:
166         (WebCore::convertWidgetPointToScreenPoint):
167         * platform/gtk/GtkUtilities.h:
168         * platform/gtk/PopupMenuGtk.cpp:
169         (WebCore::PopupMenuGtk::show): Use
170         convertWidgetPointToScreenPoint().
171
172 2011-06-14  Carlos Garcia Campos  <cgarcia@igalia.com>
173
174         Reviewed by Martin Robinson.
175
176         [GTK] Support authentication dialogs in WebKit2
177         https://bugs.webkit.org/show_bug.cgi?id=62366
178
179         Add a new class to show an authentication dialog that is used by
180         both WebKit1 and WebKit2.
181
182         * GNUmakefile.list.am: Add new files to compilation.
183         * platform/gtk/GtkAuthenticationDialog.cpp: Added.
184         (WebCore::addEntryToTable):
185         (WebCore::sessionCanSavePasswords):
186         (WebCore::GtkAuthenticationDialog::~GtkAuthenticationDialog):
187         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
188         (WebCore::getSavedLogin):
189         (WebCore::GtkAuthenticationDialog::show):
190         (WebCore::GtkAuthenticationDialog::destroy):
191         (WebCore::GtkAuthenticationDialog::savePasswordCallback):
192         (WebCore::GtkAuthenticationDialog::savePassword):
193         (WebCore::GtkAuthenticationDialog::authenticate):
194         (WebCore::GtkAuthenticationDialog::authenticationDialogResponseCallback):
195         * platform/gtk/GtkAuthenticationDialog.h: Added.
196
197 2011-06-14  Tommy Widenflycht  <tommyw@google.com>
198
199         Reviewed by Tony Gentilcore.
200
201         Media Stream PeerConnection API: adding the StreamList and supporting classes.
202         https://bugs.webkit.org/show_bug.cgi?id=61539
203
204         * dom/StreamContainer.h: Added.
205         (WebCore::StreamContainer::create):
206         (WebCore::StreamContainer::~StreamContainer):
207         (WebCore::StreamContainer::length):
208         (WebCore::StreamContainer::item):
209         (WebCore::StreamContainer::add):
210         (WebCore::StreamContainer::remove):
211         (WebCore::StreamContainer::contains):
212         (WebCore::StreamContainer::get):
213         (WebCore::StreamContainer::StreamContainer):
214         * dom/StreamList.cpp: Added.
215         (WebCore::StreamList::create):
216         (WebCore::StreamList::StreamList):
217         (WebCore::StreamList::~StreamList):
218         (WebCore::StreamList::length):
219         (WebCore::StreamList::item):
220         * dom/StreamList.h: Added.
221         * dom/StreamList.idl: Added.
222
223 2011-06-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
224
225         Reviewed by Andreas Kling.
226
227         [Qt] tst_QWebFrame::overloadedSlots() fails
228         https://bugs.webkit.org/show_bug.cgi?id=37319
229
230         Increase the likeness that JSElements are converted to QWebElements. When hinted
231         with QWebElement metatype, we qualify the conversion from JSElement as a "perfect
232         match".
233
234         The test was failing because the wrong slot was called, since the QWebElement
235         match was taken as equal to the others and not chosen when the metacall happened.
236
237         We also remove the implicit conversion between JSDocument (which is not an
238         element) to QWebElement. The conversion only worked for calling slots, while
239         without hint it returned a QVariantMap (as can be seen in domCycles test). It was
240         added for supporting DRT, but since this change we can use it as QVariantMap and
241         get the value for "documentElement".
242
243         This patch is based on Noam Rosenthal original patch in the same bug.
244
245         * bridge/qt/qt_runtime.cpp:
246         (JSC::Bindings::hintForRealType):
247         Extracted function to choose the metatype hint based on the JSValue type.  Add
248         QWebElement metatype as a hint for JSElement objects, this way if no hint is
249         provided, JSElement objects will always be converted to QWebElements.
250
251         (JSC::Bindings::convertValueToQVariant):
252         Use previous function. Identify the conversion between JSElement to QWebElement
253         as a "perfect match" (dist = 0). And remove the implicit conversion when the hint
254         is QWebElement metatype and we have a JSDocument.  Changed from JSHTMLElement to
255         JSElement to cover the 'documentElement'.
256
257 2011-06-14  Andreas Kling  <kling@webkit.org>
258
259         Reviewed by Benjamin Poulain.
260
261         Remove some unnecessary includes.
262
263         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
264
265 2011-06-14  Yael Aharon  <yael.aharon@nokia.com>
266
267         Reviewed by Kent Tamura.
268
269         <progress> should support :indeterminate pseudo-class
270         https://bugs.webkit.org/show_bug.cgi?id=62430
271
272         Add support for :indeterminate pseudo class for progress element.
273
274         Tests: fast/dom/HTMLProgressElement/indeterminate-progress-001.html
275                fast/dom/HTMLProgressElement/indeterminate-progress-002.html
276
277         * css/CSSStyleSelector.cpp:
278         (WebCore::CSSStyleSelector::canShareStyleWithControl):
279         (WebCore::CSSStyleSelector::canShareStyleWithElement):
280         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector):
281         * html/HTMLProgressElement.cpp:
282         (WebCore::HTMLProgressElement::isDeterminate):
283         (WebCore::HTMLProgressElement::didElementStateChange):
284         * html/HTMLProgressElement.h:
285
286 2011-06-14  Pavel Feldman  <pfeldman@google.com>
287
288         Reviewed by Yury Semikhatsky.
289
290         Web Inspector: use ew-resize instead of col-resize for non-columns.
291         https://bugs.webkit.org/show_bug.cgi?id=62640
292
293         * inspector/front-end/ElementsPanel.js:
294         (WebInspector.ElementsPanel.prototype.rightSidebarResizerDragStart):
295         * inspector/front-end/Panel.js:
296         (WebInspector.Panel.prototype._startSidebarDragging):
297         * inspector/front-end/ScriptsPanel.js:
298         (WebInspector.ScriptsPanel.prototype._startSidebarResizeDrag):
299         * inspector/front-end/TimelineOverviewPane.js:
300         (WebInspector.TimelineOverviewPane.prototype._resizeWindow):
301         (WebInspector.TimelineOverviewPane.prototype._dragWindow):
302         * inspector/front-end/inspector.css:
303         (body.attached #toolbar):
304         (body.drawer-visible #main-status-bar):
305         (#scripts-sidebar-resizer-widget):
306         (.sidebar-resizer-vertical):
307         (.timeline-window-resizer):
308
309 2011-06-14  Pavel Feldman  <pfeldman@google.com>
310
311         Reviewed by Yury Semikhatsky.
312
313         Web Inspector: reload from within inspector window does not work while debugger is paused.
314         https://bugs.webkit.org/show_bug.cgi?id=62631
315
316         Test: inspector/debugger/debugger-reload-on-pause.html
317
318         * loader/FrameLoader.cpp:
319         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
320
321 2011-06-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
322
323         Reviewed by Kent Tamura.
324
325         [EFL] Support for painting thumb of media slider
326         https://bugs.webkit.org/show_bug.cgi?id=62174
327
328         Replace RenderObject parameter with RenderStyle's in adjustSliderThumbSize.
329         Because, parameter of the function was changed. And, add constant variable to
330         paintMediaSliderThumb().
331
332         * platform/efl/RenderThemeEfl.cpp:
333         (WebCore::RenderThemeEfl::RenderThemeEfl):
334         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
335         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
336         * platform/efl/RenderThemeEfl.h:
337
338 2011-06-14  Kent Tamura  <tkent@chromium.org>
339
340         [Qt] Attempt to fix a build break by r88757.
341         https://bugs.webkit.org/show_bug.cgi?id=52920
342
343         * platform/qt/RenderThemeQt.cpp:
344         (WebCore::RenderThemeQt::paintSliderTrack):
345
346 2011-06-13  Kent Tamura  <tkent@chromium.org>
347
348         [EFL] The second try to fix a build break.
349
350         * platform/efl/RenderThemeEfl.cpp:
351         (WebCore::RenderThemeEfl::paintThemePart):
352
353 2011-06-13  Kent Tamura  <tkent@chromium.org>
354
355         [EFL] Fix a typo.
356
357         * platform/efl/RenderThemeEfl.cpp:
358         (WebCore::RenderThemeEfl::paintThemePart):
359
360 2011-06-13  Kent Tamura  <tkent@chromium.org>
361
362         [EFL] Try to fix a build break by r88757.
363
364         * platform/efl/RenderThemeEfl.cpp:
365         (WebCore::RenderThemeEfl::paintThemePart):
366
367 2011-06-10  Kent Tamura  <tkent@chromium.org>
368
369         Reviewed by Dimitri Glazkov.
370
371         Use CSS machinery to position slider thumb.
372         https://bugs.webkit.org/show_bug.cgi?id=52920
373
374         Remove RenderSlider::layout().
375         In order to remove it, we introduce new three shadow nodes:
376          - A flex box container occupying the whole box
377          - A flex box item representing a movable area of the thumb
378          - A flex box item limiting the movable area of the thumb
379         The thumb position is specified by percentage position in the second element.
380
381         This change also fixes Bug 60353.
382
383         Tests: fast/forms/input-appearance-range.html
384                fast/forms/validation-message-on-range.html
385
386         * accessibility/AccessibilitySlider.cpp:
387         (WebCore::AccessibilitySliderThumb::elementRect):
388           Use Node::getRect() for the thumb element.
389         * css/html.css: Add new style definitions for the new node layout.
390         (input[type="range"]::-webkit-slider-container):
391         (input[type="range"]::-webkit-slider-runnable-track):
392         (input[type="range"]::-webkit-slider-thumb):
393         * html/RangeInputType.cpp:
394         (WebCore::RangeInputType::handleMouseDownEvent):
395           Accepts events on shadow nodes, use sliderThumbElementOf().
396         (WebCore::RangeInputType::createShadowSubtree):
397           Creates new nodes layout.
398         (WebCore::RangeInputType::valueChanged): Use sliderThumbElementOf().
399         * html/RangeInputType.h: Remove shadowSliderThumb().
400         * html/shadow/SliderThumbElement.cpp:
401         (WebCore::sliderPosition): Moved from RenderSlider.cpp.
402         (WebCore::hasVerticalAppearance): New utility function.
403         (WebCore::sliderThumbElementOf): New utility function.
404         (WebCore::RenderSliderThumb::layout):
405           Sets CSS top/left values.
406         (WebCore::RenderSliderContainer::RenderSliderContainer):
407         (WebCore::RenderSliderContainer::layout):
408           Add some adjustment code.
409           - Setting box-orient
410           - Adjust heights of some nodes. It is required to pass existing tests.
411         (WebCore::SliderThumbElement::setPositionFromValue):
412           Update comments.
413         (WebCore::SliderThumbElement::setPositionFromPoint):
414           Calculate the current position from absolute positions.
415         (WebCore::SliderThumbElement::hostInput):
416           Removed unnecessary variable.
417         (WebCore::TrackLimiterElement::TrackLimiterElement):
418         (WebCore::TrackLimiterElement::create): Adjust style.
419         (WebCore::TrackLimiterElement::createRenderer):
420           This node uses RenderSliderThumb.
421         (WebCore::TrackLimiterElement::shadowPseudoId):
422           This node also uses -webkit-slider-thumb.
423         (WebCore::SliderContainerElement::SliderContainerElement):
424         (WebCore::SliderContainerElement::create):
425         (WebCore::SliderContainerElement::createRenderer):
426           Uses RenderSliderContainer.
427         (WebCore::SliderContainerElement::shadowPseudoId):
428         * html/shadow/SliderThumbElement.h:
429           Make hostInput() public, add declarations of TrackLimiterElement
430           and SliderContainerElement.
431         * rendering/RenderSlider.cpp:
432         (WebCore::RenderSlider::RenderSlider): Added an assertion.
433         (WebCore::RenderSlider::inDragMode): Uses sliderThumbElementOf().
434         * rendering/RenderSlider.h: Remove declarations of removed functions.
435         * rendering/RenderTheme.cpp:
436         (WebCore::RenderTheme::adjustSliderThumbStyle):
437           Calls adjustSliderThumbSize().
438
439 2011-06-13  Joone Hur  <joone.hur@collabora.co.uk>
440
441         Reviewed by Martin Robinson.
442
443         [GTK] Add configure option to enable/disable register protocol handler
444         https://bugs.webkit.org/show_bug.cgi?id=62534
445
446         * GNUmakefile.am: Add ENABLE_REGISTER_PROTOCOL_HANDLER.
447
448 2011-06-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
449
450         Reviewed by Kent Tamura.
451
452         [EFL] Support for painting thumb of media slider
453         https://bugs.webkit.org/show_bug.cgi?id=62174
454
455         Implement paintMediaSliderThumb() function to show thumb of media slider.
456         adjustSliderThumbSize() should be implemented in order to call paintMediaSliderThumb().
457
458         * platform/efl/RenderThemeEfl.cpp:
459         (WebCore::RenderThemeEfl::RenderThemeEfl):
460         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
461         (WebCore::RenderThemeEfl::paintMediaSliderTrack):
462         (WebCore::RenderThemeEfl::paintMediaSliderThumb):
463         (WebCore::RenderThemeEfl::paintMediaCurrentTime):
464         * platform/efl/RenderThemeEfl.h:
465
466 2011-06-13  Keishi Hattori  <keishi@webkit.org>
467
468         Sort WebCore.xcodeproj
469         Accomplished using sort-Xcode-project-file.
470
471         * WebCore.xcodeproj/project.pbxproj:
472
473 2011-06-13  James Simonsen  <simonjam@chromium.org>
474
475         Reviewed by James Robinson.
476
477         [Chromium] Implement monotonicallyIncreasingClock()
478         https://bugs.webkit.org/show_bug.cgi?id=62162
479
480         * platform/chromium/PlatformBridge.h:
481         * platform/chromium/SystemTimeChromium.cpp:
482         (WebCore::monotonicallyIncreasingTime): Use Chrome's implementation.
483
484 2011-06-13  Steve Block  <steveblock@google.com>
485
486         Reviewed by Darin Adler.
487
488         Remove Android defines from WebCore/config.h
489         https://bugs.webkit.org/show_bug.cgi?id=62602
490
491         No new tests, build cleanup only.
492
493         * config.h:
494
495 2011-06-13  Adam Barth  <abarth@webkit.org>
496
497         Reviewed by David Levin.
498
499         Remove redundant "true" parameter to scheduleLocationChange
500         https://bugs.webkit.org/show_bug.cgi?id=62612
501
502         This parameter defaults to true anyway.
503
504         * loader/appcache/ApplicationCacheGroup.cpp:
505         (WebCore::ApplicationCacheGroup::selectCache):
506
507 2011-06-13  Kentaro Hara  <haraken@google.com>
508
509         Reviewed by Alexey Proskuryakov.
510
511         Add resizePageRectsKeepingRatio(), which expands/shrinks a page, keeping the ratio of the original page
512         https://bugs.webkit.org/show_bug.cgi?id=61256
513
514         In order to prevent rounding error caused by expanding/shrinking a page
515         using different calculation here and there, I added a common calculation
516         method, resizePageRectsKeepingRatio(), which expands/shrinks a page,
517         keeping the ratio of width and height of the original page.
518         PrintContext::computePageRects() and PrintContext::begin()
519         use resizePageRectsKeepingRatio() to expand/shrink a page.
520
521         Test: printing/page-count-with-one-word.html
522
523         * WebCore.exp.in:
524         * page/Frame.cpp:
525         (WebCore::Frame::resizePageRectsKeepingRatio):
526         * page/Frame.h:
527         * page/PrintContext.cpp:
528         (WebCore::PrintContext::computePageRects):
529         (WebCore::PrintContext::begin):
530
531 2011-06-13  Adam Barth  <abarth@webkit.org>
532
533         Reviewed by Darin Adler.
534
535         anyPageIsProcessingUserGesture is not longer needed because user gesture state is static
536         https://bugs.webkit.org/show_bug.cgi?id=62601
537
538         Previously, our user-gesture state was per-frame.  Code needed to check
539         the "global" user gesture state called anyPageIsProcessingUserGesture()
540         to iterate through all the frames and look for one that was processing
541         a user gesture.  Since we changed the user gesture state to be static,
542         iterating over every frame in existence isn't needed.
543
544         This patch also cleans up a couple other user-gesture callsites I saw
545         while I was in this code.  Code should just call
546         ScriptController::processingUserGesture directly instead of
547         trampolining through other functions.
548
549         * bindings/ScriptControllerBase.cpp:
550         (WebCore::ScriptController::executeScript):
551         * bindings/generic/BindingSecurity.h:
552         (WebCore::::allowPopUp):
553         * bindings/js/JSDOMBinding.cpp:
554         * bindings/js/JSDOMBinding.h:
555         * bindings/js/JSDocumentCustom.cpp:
556         (WebCore::JSDocument::setLocation):
557         * bindings/js/ScriptController.cpp:
558         * bindings/js/ScriptController.h:
559         * bindings/scripts/CodeGeneratorJS.pm:
560         * bindings/scripts/CodeGeneratorV8.pm:
561         * bindings/v8/ScriptController.cpp:
562         * bindings/v8/ScriptController.h:
563         (WebCore::ScriptController::setProcessingTimerCallback):
564         * bindings/v8/V8Utilities.cpp:
565         * bindings/v8/V8Utilities.h:
566         * bindings/v8/specialization/V8BindingState.cpp:
567         * bindings/v8/specialization/V8BindingState.h:
568         * html/HTMLFormElement.cpp:
569         (WebCore::HTMLFormElement::submitFromJavaScript):
570         (WebCore::HTMLFormElement::submit):
571         * page/DOMWindow.cpp:
572         (WebCore::DOMWindow::setLocation):
573         (WebCore::DOMWindow::createWindow):
574         (WebCore::DOMWindow::open):
575
576 2011-06-13  Jeffrey Pfau  <jpfau@apple.com>
577
578         Reviewed by Darin Adler.
579
580         Crash in WebCore::RenderMathMLUnderOver::layout()
581         https://bugs.webkit.org/show_bug.cgi?id=57900
582
583         Add more null checks so that removing children in MathML elements does not cause crashes.
584         Note that this only half fixes the third repro in the Bugzilla bug, as another bug will
585         still crash that repro.
586
587         Test: mathml/munderover-remove-children.html
588
589         * rendering/mathml/RenderMathMLSubSup.cpp:
590         (WebCore::RenderMathMLSubSup::stretchToHeight):
591         * rendering/mathml/RenderMathMLUnderOver.cpp:
592         (WebCore::RenderMathMLUnderOver::layout):
593         (WebCore::RenderMathMLUnderOver::nonOperatorHeight):
594
595 2011-06-13  Dmitry Lomov  <dslomov@google.com>
596
597         Reviewed by Adam Barth.
598
599         https://bugs.webkit.org/show_bug.cgi?id=62345
600         Use per-isolate embedder data instead of statics for caches in bindings.
601         This is a prerequisite for more than one v8 isolate per process.
602
603         * bindings/scripts/CodeGeneratorV8.pm:
604         * bindings/v8/IDBBindingUtilities.cpp:
605         (WebCore::createIDBKeyFromSerializedValueAndKeyPath):
606         (WebCore::injectIDBKeyIntoSerializedValue):
607         * bindings/v8/V8Binding.cpp:
608         (WebCore::V8BindingPerIsolateData::V8BindingPerIsolateData):
609         (WebCore::V8BindingPerIsolateData::~V8BindingPerIsolateData):
610         (WebCore::V8BindingPerIsolateData::create):
611         (WebCore::V8BindingPerIsolateData::ensureInitialized):
612         (WebCore::V8BindingPerIsolateData::dispose):
613         (WebCore::getToStringName):
614         (WebCore::getToStringTemplate):
615         * bindings/v8/V8Binding.h:
616         (WebCore::V8BindingPerIsolateData::get):
617         (WebCore::V8BindingPerIsolateData::current):
618         (WebCore::V8BindingPerIsolateData::rawTemplateMap):
619         (WebCore::V8BindingPerIsolateData::templateMap):
620         (WebCore::V8BindingPerIsolateData::toStringName):
621         (WebCore::V8BindingPerIsolateData::toStringTemplate):
622         * bindings/v8/V8DOMWindowShell.cpp:
623         (WebCore::V8DOMWindowShell::initContextIfNeeded):
624         * bindings/v8/V8Utilities.cpp:
625         (WebCore::V8LocalContext::V8LocalContext):
626         (WebCore::V8LocalContext::~V8LocalContext):
627         * bindings/v8/V8Utilities.h:
628         * bindings/v8/WorkerContextExecutionProxy.cpp:
629         (WebCore::WorkerContextExecutionProxy::initV8IfNeeded):
630
631 2011-06-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
632
633         Reviewed by Adam Barth.
634
635         Simplify logic in ProgressTracker::progressCompleted()
636         https://bugs.webkit.org/show_bug.cgi?id=62598
637
638         Testing for "m_numProgressTrackedFrames != 0" is unnecessary because it is
639         always true, otherwise we would entered in the first part of the conditional.
640
641         * loader/ProgressTracker.cpp:
642         (WebCore::ProgressTracker::progressCompleted):
643
644 2011-06-13  Dimitri Glazkov  <dglazkov@chromium.org>
645
646         Unreviewed, rolling out r88704.
647         http://trac.webkit.org/changeset/88704
648         https://bugs.webkit.org/show_bug.cgi?id=62466
649
650         Caused layout test failures on Chromium Mac.
651
652         * platform/chromium/ClipboardChromium.cpp:
653         (WebCore::ClipboardChromium::declareAndWriteDragImage):
654
655 2011-06-13   Morgan Winer  <mwiner@apple.com>
656
657         Reviewed by Enrica Casucci.
658
659         Frame::visiblePositionForPoint returns null position if the point is over an imagemap.
660         https://bugs.webkit.org/show_bug.cgi?id=62562
661         <rdar://problem/9313885>
662
663         The innerNode() of an imageMap is an area, and doesn't have a renderer and
664         therefore can't report a position.
665         Every result's innerNonSharedNode() should be the same as the innerNode(),
666         except for imageMaps, which will have the actual image as its innerNonSharedNode(),
667         and will therefore have a renderer and can report a position.
668
669         There are no layout tests for this, since it can be tested only at API level.
670
671         * page/Frame.cpp:
672         (WebCore::Frame::visiblePositionForPoint): Changing innerNode() to innerNonSharedNode().
673
674 2011-06-13  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
675
676         Reviewed by Eric Seidel.
677
678         [CMAKE] Conditionally generate DerivedSources
679         https://bugs.webkit.org/show_bug.cgi?id=62277
680
681         Speedup build by not generating DerivedSources of features that are
682         disabled. This was already been done for some features like ENABLE_SVG
683         and now it's extended the following features: ENABLE_DATABASE,
684         ENABLE_INDEXED_DATABASE, ENABLE_DOM_STORAGE, ENABLE_XPATH,
685         ENABLE_OFFLINE_WEB_APPLICATIONS, ENABLE_WEB_SOCKETS,
686         ENABLE_DATA_TRANSFER_ITEMS.
687
688         No change in functionality so no new tests.
689
690         * CMakeLists.txt: move .idl files to be conditionally generated.
691
692 2011-06-13  Leandro Pereira  <leandro@profusion.mobi>
693
694         Reviewed by Eric Seidel.
695
696         [CMake] Allow building with ENABLE_NETSCAPE_PLUGIN_API on platforms
697         without plugin support
698         https://bugs.webkit.org/show_bug.cgi?id=62394
699
700         No behaviour changes, so no new tests.
701
702         * CMakeLists.txt: Remove references to Plugin{Package,View}.cpp and
703         Plugin{Package,View}None.cpp and move them to CMakeListWinCE and
704         CMakeListsEfl, respectively.
705         * CMakeListsEfl.txt:
706         * CMakeListsWinCE.txt:
707
708 2011-06-13  Andrey Kosyakov  <caseq@chromium.org>
709
710         Reviewed by Eric Seidel.
711
712         Web Inspector: [refactoring] remove dead code from NetworkPanel
713         https://bugs.webkit.org/show_bug.cgi?id=62481
714
715         * inspector/front-end/NetworkPanel.js:
716
717 2011-06-13  Daniel Cheng  <dcheng@chromium.org>
718
719         Reviewed by Eric Seidel.
720
721         [chromium] Dragging images to Mail.app results in broken attachments
722         https://bugs.webkit.org/show_bug.cgi?id=62466
723
724         No new tests.
725
726         * platform/chromium/ClipboardChromium.cpp:
727         (WebCore::ClipboardChromium::declareAndWriteDragImage):
728
729 2011-06-13  Adrienne Walker  <enne@google.com>
730
731         Reviewed by Simon Fraser.
732
733         Overlap test needs to consider children of composited layers
734         https://bugs.webkit.org/show_bug.cgi?id=62465
735
736         Any child layer with a compositing ancestor will be put into a
737         composited layer even though they themselves don't need compositing.
738         As layer bounds aren't hierarchical, these layer bounds themselves
739         need to be put into the overlap map because the composited layer
740         itself is not sufficient.
741
742         Test: compositing/layer-creation/overlap-animated-layer.html
743
744         * rendering/RenderLayerCompositor.cpp:
745         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
746
747 2011-06-13  Xan Lopez  <xlopez@igalia.com>
748
749         Unreviewed build fix.
750
751         Touch this to try to fix the build...
752
753         * platform/gtk/WidgetGtk.cpp:
754         (WebCore::Widget::~Widget):
755
756 2011-06-13  Xan Lopez  <xlopez@igalia.com>
757
758         Try to fix GTK+ build.
759
760         * GNUmakefile.list.am: remove CredentialStorage.cpp
761
762 2011-06-13  Stephen White  <senorblanco@chromium.org>
763
764         Reviewed by James Robinson.
765
766         Improve GPU canvas startup time on the SkiaGPU path.
767         https://bugs.webkit.org/show_bug.cgi?id=62594
768         
769         Fixed by skipping creation of shaders used only by the legacy path.
770
771         Covered by existing canvas tests.
772
773         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
774         (WebCore::SharedGraphicsContext3D::create):
775
776 2011-06-13  Michael Saboff  <msaboff@apple.com>
777
778         Reviewed by Oliver Hunt.
779
780         Additional FontCache::FontCachePurgePreventer instances needed
781         https://bugs.webkit.org/show_bug.cgi?id=62498
782
783         Added some needed and speculative FontCachePurgePreventer objects.
784         Built and ran Safari with debug version of webkit that purges all
785         purgeable fonts in FontCache::purgeInactiveFontDataIfNeeded in order
786         to find system fallback fonts access via code paths that aren't
787         protected with FontCachePurgePreventer objects.  Also examined
788         platform specific code that calls either Font::drawText() or
789         Canvas::drawText().  For those methods that may be called from currently
790         unprotected paths, added FontCachePurgePreventer objects.
791
792         No new functionality so no new tests.
793
794         * inspector/DOMNodeHighlighter.cpp:
795         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
796         (PlatformCALayerWinInternal::displayCallback):
797         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
798         (WebCore::CCHeadsUpDisplay::drawHudContents):
799         * platform/mac/DragImageMac.mm:
800         (WebCore::widthWithFont):
801         (WebCore::drawAtPoint):
802         * rendering/RenderMenuList.cpp:
803         (WebCore::RenderMenuList::updateOptionsWidth):
804
805 2011-06-13  Ryosuke Niwa  <rniwa@webkit.org>
806
807         Reviewed by Dan Bernstein.
808
809         REGRESSION (r81518): Crash in makeRange() when invoking the dictionary panel over a file input
810         https://bugs.webkit.org/show_bug.cgi?id=62544
811
812         Fixed the crash by adding null pointer checks.
813
814         No new tests since there's no way to open dictionary panel.
815
816         * dom/Position.cpp:
817         (WebCore::Position::parentAnchoredEquivalent):
818         * editing/VisiblePosition.cpp:
819         (WebCore::makeRange):
820         * page/Frame.cpp:
821         (WebCore::Frame::rangeForPoint):
822
823 2011-06-13  Adam Barth  <abarth@webkit.org>
824
825         Reviewed by Nate Chapin.
826
827         Factor IconController out of FrameLoader
828         https://bugs.webkit.org/show_bug.cgi?id=62509
829
830         This new class contains all the icon-related logic from FrameLoader.
831         The icon-related logic and state has almost zero interaction with the
832         rest of FrameLoader and is better handled as a separate concern.
833
834         * CMakeLists.txt:
835         * GNUmakefile.list.am:
836         * WebCore.gypi:
837         * WebCore.pro:
838         * WebCore.vcproj/WebCore.vcproj:
839         * WebCore.xcodeproj/project.pbxproj:
840         * dom/Document.cpp:
841         (WebCore::Document::implicitClose):
842         (WebCore::Document::setIconURL):
843         * inspector/InspectorResourceAgent.cpp:
844         (WebCore::InspectorResourceAgent::didReceiveResponse):
845         * loader/DocumentLoader.cpp:
846         (WebCore::DocumentLoader::iconLoadDecisionAvailable):
847         (WebCore::DocumentLoader::continueIconLoadWithDecision):
848         * loader/FrameLoader.cpp:
849         (WebCore::FrameLoader::FrameLoader):
850         (WebCore::FrameLoader::stop):
851         * loader/FrameLoader.h:
852         (WebCore::FrameLoader::icon):
853         * loader/icon/IconLoader.cpp:
854         (WebCore::IconLoader::startLoading):
855         (WebCore::IconLoader::finishLoading):
856         * loader/icon/IconLoader.h:
857
858 2011-06-13  Nate Chapin  <japhet@chromium.org>
859
860         Reviewed by Darin Fisher.
861
862         [V8] Cache V8NPObjects so that we don't create multiple
863         NPObjects for the same v8::Object.
864         https://bugs.webkit.org/show_bug.cgi?id=61482
865
866         Test: plugins/npruntime/embed-property-equality.html
867
868         * bindings/v8/NPV8Object.cpp:
869         (WebCore::freeV8NPObject):
870         (WebCore::npCreateV8ScriptObject):
871
872 2011-06-13  Xan Lopez  <xlopez@igalia.com>
873
874         Reviewed by Martin Robinson.
875
876         Distcheck fixes.
877
878         * GNUmakefile.am:
879         * GNUmakefile.list.am:
880
881 2011-06-13  Dirk Schulze  <krit@webkit.org>
882
883         Reviewed build fix of mac.
884
885         SVGAnimation should use direct unit animation for SVGLength
886         https://bugs.webkit.org/show_bug.cgi?id=61368
887
888         Forgot to add SVGAnimatedLength.cpp. 
889
890         * WebCore.xcodeproj/project.pbxproj:
891
892 2011-06-13  Dirk Schulze  <krit@webkit.org>
893
894         Reviewed by Nikolas Zimmermann.
895
896         SVGAnimation should use direct unit animation for SVGLength
897         https://bugs.webkit.org/show_bug.cgi?id=61368
898
899         When running SMIL animations  within SVG, we unnecessarily transform the underlying SVG primitive datatype to strings, number+units, and back. As first step the target element
900         gets asked for its current value. This value gets transformed to a string. In SVGAnimateElement we try to parse this string again and
901         split it into a number and its unit. In the further steps we just animate the number. This number gets transformed back to a string
902         together with the parsed unit. The string gets passed back to the target element, which is responsible for parsing the passed string back
903         to a value as a SVG primitive datatype (like SVGLength, SVGNumber, SVGAngle, SVGColor, ...), relayout and rerendering.
904
905         In short: SVG primitive datatype -> string -> number + unit animation -> string -> SVG primitive datatype.
906
907         This patch does not attempt to change the string transformations, but addresses the parsing of the string back to a number and unit in the
908         SVG animation code. There's no need to write a new parser in SVGAnimateElement to parse SVG primitive datatypes, we can instead reuse the existing ones.
909         Also the current parser of SVGAnimateElement does not handle most unit types, nor is it possible to animate lists like SVGLengthList with the
910         parsed content. An animation of values with different unit types is not possible:
911
912         <rect width="20" height="20">
913             <animate animateAttribute="width" from="20px" to="10%" dur="4s"/>
914         </rect>
915
916         For the example above we would animate the rect width from 20px to 10px in 4 seconds and jump to the 10% of the viewport at the end of the
917         animation.
918         With using the parsers of SVG primitive datatypes we will also use the SVG primitive datatypes in the animation code itself. And that makes
919         it possible to do such animations.
920
921         In short: SVG primitive datatype -> string -> SVG primitive datatype animation -> string -> SVG primitive datatype.
922
923         It will be easier to avoid the string transformation once all SVG primitive datatypes are supported.
924
925         To hide the complexity of the animation code, the actual calculations of SVG animation specific values was moved to the corresponding
926         SVGAnimated* files (SVGAnimatedLength.cpp for SVGLength). SVGAnimateElement itself just works with the new added generic datatype SVGAnimationType.
927         SVGAnimatorFactory creates the SVG primitive datatype specific animators. This makes the main animation code a lot more readable and 
928         maintainable.
929
930         With this patch I add the SVGAnimatorFactory and convert SVGLength animation to the new concept.
931
932         Tests: svg/animations/svglength-animation-LengthModeHeight.html
933                svg/animations/svglength-animation-LengthModeOther.html
934                svg/animations/svglength-animation-LengthModeWidth.html
935                svg/animations/svglength-animation-invalid-value-1.html
936                svg/animations/svglength-animation-invalid-value-2.html
937                svg/animations/svglength-animation-invalid-value-3.html
938                svg/animations/svglength-animation-number-to-number.html
939                svg/animations/svglength-animation-px-to-cm.html
940                svg/animations/svglength-animation-px-to-ems.html
941                svg/animations/svglength-animation-px-to-exs.html
942                svg/animations/svglength-animation-px-to-in.html
943                svg/animations/svglength-animation-px-to-number.html
944                svg/animations/svglength-animation-px-to-pc.html
945                svg/animations/svglength-animation-px-to-percentage.html
946                svg/animations/svglength-animation-px-to-pt.html
947                svg/animations/svglength-animation-px-to-px.html
948                svg/animations/svglength-animation-values.html
949
950         * CMakeLists.txt: Added new files to build system.
951         * GNUmakefile.list.am: Ditto.
952         * WebCore.gypi: Ditto.
953         * WebCore.pro: Ditto.
954         * WebCore.vcproj/WebCore.vcproj: Ditto.
955         * WebCore.xcodeproj/project.pbxproj: Ditto.
956         * svg/SVGAllInOne.cpp: Added SVGAnimatedLength.cpp for Win and other build systems.
957         * svg/SVGAnimateElement.cpp:
958         (WebCore::parseNumberValueAndUnit): Remove parsing code for SVGLength. Use SVGLength parser directly.
959         (WebCore::SVGAnimateElement::adjustForCurrentColor): Made adjustForCurrentColor public as preperation for SVGAnimatedColor.
960         (WebCore::getPropertyValue): Inline function to get computedStyle of CSS property.
961         (WebCore::SVGAnimateElement::adjustForInheritance): Made adjustForInheritance as preperation for SVGAnimated* files.
962         (WebCore::SVGAnimateElement::determineAnimatedAttributeType): SVGLength need special handling via SVGAnimator now.
963         (WebCore::SVGAnimateElement::calculateAnimatedValue): Cleanup. Make use of SVGAnimator for SVGLength.
964         (WebCore::SVGAnimateElement::calculateFromAndToValues): Ditto.
965         (WebCore::SVGAnimateElement::calculateFromAndByValues): Ditto.
966         (WebCore::SVGAnimateElement::resetToBaseValue): Ditto.
967         (WebCore::SVGAnimateElement::applyResultsToTarget): Ditto.
968         (WebCore::SVGAnimateElement::calculateDistance): Ditto.
969         * svg/SVGAnimateElement.h:
970         * svg/SVGAnimatedLength.cpp: Added.
971         (WebCore::SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator):
972         (WebCore::sharedSVGLength):
973         (WebCore::SVGAnimatedLengthAnimator::constructFromString):
974         (WebCore::SVGAnimatedLengthAnimator::calculateFromAndToValues):
975         (WebCore::SVGAnimatedLengthAnimator::calculateFromAndByValues):
976         (WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
977         (WebCore::SVGAnimatedLengthAnimator::calculateDistance):
978         * svg/SVGAnimatedLength.h: Added new class SVGAnimatedLengthAnimator which is responsible for the actual animation.
979         (WebCore::SVGAnimatedLengthAnimator::~SVGAnimatedLengthAnimator):
980         * svg/SVGAnimatedType.h: Added. Generic SVG unit type for animations in SVGAnimateElement.
981         (WebCore::SVGAnimatedType::createLength):
982         (WebCore::SVGAnimatedType::~SVGAnimatedType):
983         (WebCore::SVGAnimatedType::type):
984         (WebCore::SVGAnimatedType::length):
985         (WebCore::SVGAnimatedType::SVGAnimatedType):
986         * svg/SVGAnimatedTypeAnimator.h: Added. Base class for SVGAnimatedLengthAnimator and future SVG unit animators.
987         (WebCore::SVGAnimatedTypeAnimator::~SVGAnimatedTypeAnimator):
988         (WebCore::SVGAnimatedTypeAnimator::setContextElement):
989         (WebCore::SVGAnimatedTypeAnimator::SVGAnimatedTypeAnimator):
990         * svg/SVGAnimationElement.cpp:
991         (WebCore::SVGAnimationElement::parseMappedAttribute): We do not use parseNumberValueAndUnit for SVGLength now. Have to strip white spaces here. Whitespaces shouldn't
992           be stripped on the following attributes: 'from', 'to' and 'by'. This is not the case for SVGLength anymore. Added new tests to check this behavior.
993         (WebCore::SVGAnimationElement::animationMode): Enum is accessible in WebCore namespace now.
994         (WebCore::SVGAnimationElement::calcMode): Ditto.
995         * svg/SVGAnimationElement.h:
996         * svg/SVGAnimatorFactory.h: Added.
997         (WebCore::SVGAnimatorFactory::create):
998         * svg/SVGLength.cpp:
999         (WebCore::SVGLength::setValueAsString): New setter with string and SVGLengthMode.
1000         (WebCore::SVGLength::lengthModeForAnimatedLengthAttribute): Get LengthMode for SVGLength depending on the attribute name.
1001         * svg/SVGLength.h:
1002
1003 2011-06-13  Adam Barth  <abarth@webkit.org>
1004
1005         Reviewed by Darin Adler.
1006
1007         r87539 broke HTMLMediaElement url logging
1008         https://bugs.webkit.org/show_bug.cgi?id=62551
1009
1010         Returning pointers to temporaries is bad times!
1011
1012         * html/HTMLMediaElement.cpp:
1013         (WebCore::urlForLogging):
1014         (WebCore::HTMLMediaElement::loadResource):
1015         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1016         (WebCore::HTMLMediaElement::selectNextSourceChild):
1017         (WebCore::HTMLMediaElement::sourceWasAdded):
1018         (WebCore::HTMLMediaElement::sourceWillBeRemoved):
1019
1020 2011-06-13  Tony Chang  <tony@chromium.org>
1021
1022         Reviewed by Dimitri Glazkov.
1023
1024         rename ENABLE_NEW_FLEXBOX to ENABLE_CSS3_FLEXBOX
1025         https://bugs.webkit.org/show_bug.cgi?id=62578
1026
1027         * Configurations/FeatureDefines.xcconfig:
1028
1029 2011-06-13  Mark Pilgrim  <pilgrim@chromium.org>
1030
1031         Reviewed by Tony Chang.
1032
1033         IndexedDB: setVersion() version argument is required
1034         https://bugs.webkit.org/show_bug.cgi?id=62401
1035
1036         Test: storage/indexeddb/setVersion-undefined.html
1037
1038         * storage/IDBDatabase.cpp:
1039         (WebCore::IDBDatabase::setVersion): check for null version
1040         * storage/IDBDatabase.idl: add IDL magic to force undefined to null so we can handle both missing and null arguments
1041
1042 2011-06-13  Simon Fraser  <simon.fraser@apple.com>
1043
1044         Reviewed by Adele Peterson.
1045
1046         Print out bounds origin in layer dump
1047         https://bugs.webkit.org/show_bug.cgi?id=62583
1048
1049         Include m_boundsOrigin in the layer dump, which is used by layerTreeAsText().
1050
1051         * platform/graphics/GraphicsLayer.cpp:
1052         (WebCore::GraphicsLayer::dumpProperties):
1053
1054 2011-06-13  Simon Fraser  <simon.fraser@apple.com>
1055
1056         Reviewed by Adele Peterson.
1057
1058         Add utility method to report whether a RenderLayer has any scrollbars
1059         https://bugs.webkit.org/show_bug.cgi?id=62579
1060         
1061         New method that returns true with either scrollbar is present.
1062
1063         * rendering/RenderLayer.h:
1064         (WebCore::RenderLayer::hasScrollbars):
1065
1066 2011-06-11  Jer Noble  <jer.noble@apple.com>
1067
1068         Reviewed by Anders Carlsson.
1069
1070         Avoid flashing when exiting full-screen mode.
1071         https://bugs.webkit.org/show_bug.cgi?id=62338
1072
1073         No new tests; covered by the existing full-screen tests.
1074
1075         Now that we are forcing a repaint inside of setRootFullScreenLayer() instead of during
1076         the next run loop, make sure that we have disabled animation before calling 
1077         setRootFullScreenLayer() so that the RenderFullScreen renderer and its contents are
1078         painted.
1079
1080         * dom/Document.cpp:
1081         (WebCore::Document::webkitDidEnterFullScreenForElement):
1082
1083 2011-06-10  Jer Noble  <jer.noble@apple.com>
1084
1085         Reviewed by Darin Adler.
1086
1087         Flash of white on left and right edges of screen when showing fullscreen controller when movie doesn't fill the entire screen
1088         https://bugs.webkit.org/show_bug.cgi?id=62491
1089         <rdar://problem/9584427>
1090
1091         No new tests; should be covered by existing fullscreen pixel tests.
1092
1093         On certain displays, when a RenderFullScreen renderer is created, it is large enough to trigger the 
1094         creation of a tiled CALayer (instead of a normal CALayer).  Painting in these layers necessarily
1095         happens asynchronously, so the flash is occurring because of the async painting of the RenderFullScreen
1096         renderer's background color.  Since we know the RenderFullScreen does not otherwise paint its contents,
1097         we can add a special case in the RenderLayerBacking to set the GraphicsLayer contents to be the
1098         renderer's background color.  Fill in support for creating a contentLayer to contain the background 
1099         color inside GraphicsLayerCA.
1100
1101         * platform/graphics/GraphicsLayer.h:
1102         (WebCore::GraphicsLayer::setContentsToBackgroundColor): Renamed from setContentsBackgroundColor to match
1103             the other setContentsTo... functions.
1104         * platform/graphics/ca/GraphicsLayerCA.cpp:
1105         (WebCore::GraphicsLayerCA::setContentsToBackgroundColor): Added. Creates a contentsLayer to host the 
1106             background color.
1107         (WebCore::GraphicsLayerCA::updateLayerBackgroundColor): Removed a comment only.
1108         * platform/graphics/ca/GraphicsLayerCA.h:
1109         * rendering/RenderLayerBacking.cpp:
1110         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Special case the RenderFullScreen
1111             renderer to call updateBackgroundColor.
1112         (WebCore::RenderLayerBacking::updateBackgroundColor): Added.
1113         (WebCore::RenderLayerBacking::containsPaintedContent): Tell the backing that the RenderFullScreen
1114             renderer does not paint its contents.
1115         * rendering/RenderLayerBacking.h:
1116
1117 2011-06-13  Tim Horton  <timothy_horton@apple.com>
1118
1119         Reviewed by Simon Fraser.
1120
1121         REGRESSION(87152): Crash on page with svg fonts
1122         https://bugs.webkit.org/show_bug.cgi?id=61556
1123
1124         We can't assume that the parent of a SVG-font-styled
1125         text node won't be an anonymous block.
1126
1127         Test: svg/text/text-font-anonymous-parent.xhtml
1128
1129         * rendering/svg/SVGTextRunRenderingContext.cpp:
1130         (WebCore::firstParentRendererForNonTextNode):
1131         (WebCore::SVGTextRunWalker::walk):
1132         (WebCore::floatWidthOfSubStringUsingSVGFont):
1133         (WebCore::SVGTextRunRenderingContext::drawTextUsingSVGFont):
1134
1135 2011-06-13  Tony Chang  <tony@chromium.org>
1136
1137         Reviewed by Adam Barth.
1138
1139         rename ENABLE_FLEXBOX to ENABLE_NEW_FLEXBOX
1140         https://bugs.webkit.org/show_bug.cgi?id=62545
1141
1142         * Configurations/FeatureDefines.xcconfig:
1143
1144 2011-06-13  Xan Lopez  <xlopez@igalia.com>
1145
1146         Reviewed by Martin Robinson.
1147
1148         Some distcheck fixes. Still broken, but this is moves us closer to
1149         the target.
1150
1151         * GNUmakefile.am: fix vpath syntax and add missing files to
1152         EXTRA_DIST.
1153         * GNUmakefile.list.am: add missing files and remove dead files.
1154         * bindings/gobject/GNUmakefile.am: fix comment.
1155
1156 2011-06-13  Noam Rosenthal  <noam.rosenthal@nokia.com>
1157
1158         Reviewed by Kenneth Rohde Christiansen.
1159
1160         Add layer factory to GraphicsLayer for creating non-default layer type.
1161         https://bugs.webkit.org/show_bug.cgi?id=61925
1162
1163         Use the new factory function in TextureMapper.
1164
1165         No new functionality so no new tests.
1166
1167         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1168         (WebCore::GraphicsLayer::create):
1169
1170 2011-06-13  Young Han Lee  <joybro@company100.net>
1171
1172         Reviewed by Kenneth Rohde Christiansen.
1173
1174         [Texmap][Qt] Accelerated animation is repeating as if its direction property is always 'alternate'.
1175         https://bugs.webkit.org/show_bug.cgi?id=62281
1176
1177         syncAnimations() has miscalculated a normalized progress value as if the animation always has alternate direction property.
1178
1179         Test: animations/animation-direction-normal.html
1180
1181         * platform/graphics/texmap/TextureMapperNode.cpp:
1182         (WebCore::TextureMapperNode::syncAnimations):
1183
1184 2011-06-13  Dirk Schulze  <krit@webkit.org>
1185
1186         Reviewed by Rob Buis.
1187
1188         SVG patternTransform not animatable
1189         https://bugs.webkit.org/show_bug.cgi?id=62538
1190
1191         SVG animation did not take attribute 'patternTransform' into account. Added support for combination of
1192         SVGPatternElement and attribute 'patternTransform' to SVGAnimateTransformElement.
1193
1194         Tests: svg/animations/animateTransform-pattern-transform.html
1195                svg/animations/animateTransform-transformable-transform.html
1196
1197         * svg/SVGAnimateTransformElement.cpp:
1198         (WebCore::transformListFor):
1199         (WebCore::SVGAnimateTransformElement::resetToBaseValue):
1200         (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
1201
1202 2011-06-13  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1203
1204         Reviewed by Andreas Kling.
1205
1206         [Qt] JSC Bridge: convert QtConnectionObject to use JSC API
1207         https://bugs.webkit.org/show_bug.cgi?id=62330
1208
1209         This patch is based on the draft patch by Noam Rosenthal in bug 60842.
1210         Qt API autotests cover the bridge behavior and pass after this patch.
1211
1212         * bridge/qt/qt_runtime.h: Change QtConnectionObject to use JSC API types. In
1213         particular, we got rid of Strong<JSObject> members. Renamed some members and
1214         arguments to follow existing naming in QObject::connect().
1215
1216         * bridge/qt/qt_runtime.cpp:
1217         (JSC::Bindings::QtRuntimeConnectionMethod::call): Use a new helper function
1218         to create a connection, passing the ExecState* that will be used when the
1219         connection is activated (signal emitted). Use JSC API types when looking up
1220         the matching signal to disconnect.
1221
1222         (JSC::Bindings::QtConnectionObject::QtConnectionObject): Use JSC API to
1223         protect the receiver and receiverFunction from being garbage
1224         collected. Removed the ASSERT() since we don't hold ProtectedPtrs (in current
1225         code were Strong<>) anymore.
1226
1227         (JSC::Bindings::QtConnectionObject::~QtConnectionObject): Explain why is safe
1228         to use m_originalSender here. Unprotect values that we protected in constructor.
1229
1230         (JSC::Bindings::isJavaScriptFunction): Helper function to identify whether a
1231         JSObjectRef is a JS function (in contrast to a native function exposed to JS).
1232
1233         (JSC::Bindings::QtConnectionObject::execute):
1234         (JSC::Bindings::QtConnectionObject::match):
1235         Both updated to use JSC API when appliable. Note that convertQVariantToValue
1236         still returns JSC internal types, will be handled in a different patch.
1237
1238         (JSC::Bindings::QtConnectionObject::createWithInternalJSC):
1239         Convenince for the existing caller until it is converted to JSC as well.
1240
1241 2011-06-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1242
1243         Reviewed by Martin Robinson.
1244
1245         [GTK] Add context menu support for Webkit2
1246         https://bugs.webkit.org/show_bug.cgi?id=54827
1247
1248         * platform/ContextMenuItem.h: Add gtkAction().
1249         * platform/gtk/ContextMenuGtk.cpp:
1250         (WebCore::ContextMenu::ContextMenu): Implement constructor that
1251         receives a platform menu.
1252         (WebCore::ContextMenu::setPlatformDescription): Make sure we don't
1253         destroy the menu if the new context menu is the current one.
1254         (WebCore::contextMenuItemVector): Implement this method to return
1255         the list of menu items in the given context menu, required by WebKit2.
1256         (WebCore::platformMenuDescription): Implement this method to
1257         return a platform menu for the given menu items.
1258         * platform/gtk/ContextMenuItemGtk.cpp:
1259         (WebCore::createPlatformMenuItemDescription): Helper function to
1260         create a platform context menu item.
1261         (WebCore::ContextMenuItem::ContextMenuItem): Use
1262         createPlatformMenuItemDescription().
1263         (WebCore::ContextMenuItem::title): Convert the title from UTF-8.
1264         (WebCore::ContextMenuItem::setTitle): Use gtkAction().
1265         (WebCore::ContextMenuItem::setSubMenu): Implement setSubMenu()
1266         that receives a list of items.
1267         (WebCore::ContextMenuItem::setChecked): Use gtkAction().
1268         (WebCore::ContextMenuItem::checked): Implement this, required by WebKit2.
1269         (WebCore::ContextMenuItem::enabled): Ditto.
1270         (WebCore::ContextMenuItem::setEnabled): Use gtkAction().
1271         (WebCore::ContextMenuItem::gtkAction): Return the GtkAction
1272         associated to the context menu item.
1273
1274 2011-06-13  Keishi Hattori  <keishi@webkit.org>
1275
1276         Sort WebCore.xcodeproj
1277
1278         Accomplished using sort-Xcode-project-file.
1279
1280         * WebCore.xcodeproj/project.pbxproj:
1281
1282 2011-06-12  Jer Noble  <jer.noble@apple.com>
1283
1284         Reviewed by Darin Adler.
1285
1286         REGRESSION (full screen video): Watch Again button is obscured after full screen playback ends at Apple trailers page
1287         https://bugs.webkit.org/show_bug.cgi?id=62507
1288
1289         No new tests; DRT would have to be modified to delay between receiving exitFullScreenForElement() and calling 
1290         webkitWillExitFullScreenForElement() to be able to test this.
1291
1292         If the full-screen element is removed, and webkitWillExitFullScreenForElement() is not called before
1293         fullScreenElementRemoved() returns, then ancestors of the full-screen element will not have their
1294         containsFullScreenElement property removed.  To protect against this, reset the property by calling 
1295         setContainsFullScreenElementRecursively() from within fullScreenElementRemoved().
1296
1297         * dom/Document.cpp:
1298         (WebCore::Document::fullScreenElementRemoved): Added call to setContainsFullScreenElementRecursively.
1299
1300 2011-06-12  Adam Barth  <abarth@webkit.org>
1301
1302         Reviewed by Alexey Proskuryakov.
1303
1304         Rename FrameLoaderClient::interruptForPolicyChangeError to use the past tense
1305         https://bugs.webkit.org/show_bug.cgi?id=62516
1306
1307         As requested by Alexey in https://bugs.webkit.org/show_bug.cgi?id=62510.
1308
1309         * loader/EmptyClients.h:
1310         (WebCore::EmptyFrameLoaderClient::interruptedForPolicyChangeError):
1311         * loader/FrameLoaderClient.h:
1312         * loader/MainResourceLoader.cpp:
1313         (WebCore::MainResourceLoader::interruptedForPolicyChangeError):
1314         (WebCore::MainResourceLoader::stopLoadingForPolicyChange):
1315         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1316         * loader/MainResourceLoader.h:
1317
1318 2011-06-12  Hironori Bono  <hbono@chromium.org>
1319
1320         Reviewed by Hajime Morita.
1321
1322         Add null checks to HTMLTextAreaElement::removeSpellcheckRange().
1323         https://bugs.webkit.org/show_bug.cgi?id=62526
1324
1325         This change adds null checks to the following function to prevent crashes
1326         when calling removeSpellcheckRange() with null:
1327         HTMLTextAreaElement::removeSpellcheckRange(),
1328         HTMLInputElement::removeSpellcheckRange(), and
1329         HTMLDivElement::removeSpellcheckRange().
1330
1331         Test: editing/spelling/spellcheck-api-crash.html
1332
1333         * html/HTMLDivElement.cpp:
1334         (WebCore::HTMLDivElement::removeSpellcheckRange):
1335         * html/HTMLInputElement.cpp:
1336         (WebCore::HTMLInputElement::removeSpellcheckRange):
1337         * html/HTMLTextAreaElement.cpp:
1338         (WebCore::HTMLTextAreaElement::removeSpellcheckRange):
1339
1340 2011-06-12  Adam Barth  <abarth@webkit.org>
1341
1342         Reviewed by Darin Adler.
1343
1344         DocumentParser::appendBytes should use size_t for length instead of int
1345         https://bugs.webkit.org/show_bug.cgi?id=62508
1346
1347         size_t is the proper type for distances in memory, especially on 64 bit
1348         machines.
1349
1350         * dom/DecodedDataDocumentParser.cpp:
1351         (WebCore::DecodedDataDocumentParser::appendBytes):
1352         * dom/DecodedDataDocumentParser.h:
1353         * dom/DocumentParser.h:
1354         * html/ImageDocument.cpp:
1355         (WebCore::ImageDocumentParser::appendBytes):
1356         * html/MediaDocument.cpp:
1357         (WebCore::MediaDocumentParser::appendBytes):
1358         * html/PluginDocument.cpp:
1359         (WebCore::PluginDocumentParser::appendBytes):
1360         * loader/SinkDocument.cpp:
1361         (WebCore::SinkDocumentParser::appendBytes):
1362
1363 2011-06-12  Adam Barth  <abarth@webkit.org>
1364
1365         Reviewed by Eric Seidel.
1366
1367         Remove FrameLoader::isProcessingUserGesture
1368         https://bugs.webkit.org/show_bug.cgi?id=62519
1369
1370         This function is a remnant of the old user gesture design, which
1371         involved per-frame state stored on FrameLoader.  Now that we're using
1372         static state, we don't need this function anymore.
1373
1374         This function used to check whether JavaScript was enabled for the
1375         top-level frame, but that check doesn't make any sense (like much of
1376         the old user gesture code).
1377
1378         * WebCore.exp.in:
1379         * html/HTMLMediaElement.cpp:
1380         (WebCore::HTMLMediaElement::processingUserGesture):
1381         * loader/FrameLoader.cpp:
1382         (WebCore::FrameLoader::submitForm):
1383         * loader/FrameLoader.h:
1384         * rendering/RenderFileUploadControl.cpp:
1385         (WebCore::RenderFileUploadControl::click):
1386
1387 2011-06-12  Adam Barth  <abarth@webkit.org>
1388
1389         Fix fullscreen/full-screen-iframe-legacy.html.
1390
1391         * html/HTMLVideoElement.idl:
1392
1393 2011-06-12  Adam Barth  <abarth@webkit.org>
1394
1395         Reviewed by Alexey Proskuryakov.
1396
1397         Remove trival "forward-to-client" member functions from FrameLoader
1398         https://bugs.webkit.org/show_bug.cgi?id=62510
1399
1400         Originally, FrameLoader was supposed to abstract FrameLoaderClient, but
1401         we lost that battle log ago.  Nowadays, it's easier if folks just call
1402         into FrameLoaderClient directly.  Many of these functions have direct
1403         callers already anyway.
1404
1405         * WebCore.exp.in:
1406         * html/HTMLMediaElement.cpp:
1407         (WebCore::HTMLMediaElement::createRenderer):
1408         (WebCore::HTMLMediaElement::attach):
1409         * loader/DocumentLoader.cpp:
1410         (WebCore::DocumentLoader::setRequest):
1411         (WebCore::DocumentLoader::setMainDocumentError):
1412         (WebCore::DocumentLoader::setupForReplaceByMIMEType):
1413         * loader/FrameLoader.cpp:
1414         (WebCore::FrameLoader::didFirstLayout):
1415         * loader/FrameLoader.h:
1416             - cancelledError is slightly more delicate, so I'm going to move it in
1417               a separate patch.
1418         * loader/MainResourceLoader.cpp:
1419         (WebCore::MainResourceLoader::interruptForPolicyChangeError):
1420         (WebCore::MainResourceLoader::stopLoadingForPolicyChange):
1421         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1422         (WebCore::MainResourceLoader::handleEmptyLoad):
1423         (WebCore::MainResourceLoader::loadNow):
1424         * loader/MainResourceLoader.h:
1425         * loader/NetscapePlugInStreamLoader.cpp:
1426         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1427         * loader/PingLoader.cpp:
1428         (WebCore::PingLoader::PingLoader):
1429         * loader/PolicyChecker.cpp:
1430         (WebCore::PolicyChecker::continueAfterNavigationPolicy):
1431         * loader/ResourceLoader.cpp:
1432         (WebCore::ResourceLoader::blockedError):
1433         (WebCore::ResourceLoader::cannotShowURLError):
1434         (WebCore::ResourceLoader::shouldUseCredentialStorage):
1435         (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace):
1436         * page/ContextMenuController.cpp:
1437         (WebCore::ContextMenuController::populate):
1438
1439 2011-06-12  Dan Bernstein  <mitz@apple.com>
1440
1441         Reviewed by Darin Adler.
1442
1443         <rdar://problem/9513180> REGRESSION (r84166): recalcStyle for display:inline to display:none transition has complexity N^2 where N is the number of child Text nodes
1444         https://bugs.webkit.org/show_bug.cgi?id=61557
1445
1446         Replaced the fix for bug 58500 with a refined version.
1447
1448         * rendering/RenderText.cpp:
1449         (WebCore::RenderText::clippedOverflowRectForRepaint): Use the containing block unless it is
1450         across a layer boundary.
1451
1452 2011-06-12  Adam Barth  <abarth@webkit.org>
1453
1454         Reviewed by Andreas Kling.
1455
1456         Minor user-gesture related cleanup
1457         https://bugs.webkit.org/show_bug.cgi?id=62511
1458
1459         In reading the user gesture code, I noticed that these lines of code
1460         should be deleted because they don't do anything.
1461
1462         * bindings/v8/NPV8Object.cpp:
1463         * html/HTMLAnchorElement.cpp:
1464         * html/HTMLVideoElement.idl:
1465
1466 2011-06-11  Nikolas Zimmermann  <nzimmermann@rim.com>
1467
1468         Reviewed by Dirk Schulze.
1469
1470         Add TextRun charactersLength member
1471         https://bugs.webkit.org/show_bug.cgi?id=62501
1472
1473         Preparation patch 2: Propagate the maximum length of the characters buffer the TextRun operates on, even when we're only measuring a substring.
1474         For example: In RenderText when we're measuring 'len' characters starting from "text()->characters() + start", there's a portion
1475         of "textLength() - start" characters that we're not processing. In order to support ligatures when integrating SVG Fonts
1476         within the GlyphPage concept, we need this extra information, to lookup ligatures even when single chars are measured.
1477         If a font defines an eg "ffl" ligature, and we're measuring the "f" of "ffl", it shall looukp the "ffl" glyph from the font,
1478         and skip the next two characters (this will be done in WidthIterator).
1479
1480         This doesn't yet affect any test, the new SVG Fonts code is not merged yet, this is the preparaion patch 2.
1481
1482         * platform/graphics/Font.h: Add yet-unused "const TextRun&" parameter to drawGlyphBuffer/drawEmphasisMarks.
1483         * platform/graphics/FontFastPath.cpp: Ditto. This parameter will be used to looukp the TextRunRenderingContext in a follow-up patch.
1484         (WebCore::Font::drawSimpleText):
1485         (WebCore::Font::drawEmphasisMarksForSimpleText):
1486         (WebCore::Font::drawGlyphBuffer):
1487         (WebCore::Font::drawEmphasisMarks):
1488         * platform/graphics/TextRun.h: Add "int m_charactersLength", similar to "int m_len". It denotes the maximum length of the characters buffer
1489                                        that we're holding. It defaults to the passed "len" value, but is overriden by explicit setCharactersLength calls.
1490         (WebCore::TextRun::TextRun):
1491         (WebCore::TextRun::charactersLength):
1492         (WebCore::TextRun::setCharactersLength):
1493         * platform/graphics/mac/FontComplexTextMac.cpp: Pass TextRun do drawGlyphBuffer/drawEmphasisMarks.
1494         (WebCore::Font::drawComplexText):
1495         (WebCore::Font::drawEmphasisMarksForComplexText):
1496         * platform/graphics/win/FontWin.cpp: Ditto.
1497         (WebCore::Font::drawComplexText):
1498         (WebCore::Font::drawEmphasisMarksForComplexText):
1499         * platform/graphics/wx/FontWx.cpp: Ditto.
1500         (WebCore::Font::drawComplexText):
1501         (WebCore::Font::drawEmphasisMarksForComplexText):
1502         * rendering/InlineTextBox.cpp: Call setCharactersLength on the processed TextRun.
1503         (WebCore::InlineTextBox::constructTextRun):
1504         * rendering/RenderBlockLineLayout.cpp: Ditto.
1505         (WebCore::textWidth):
1506         (WebCore::tryHyphenating):
1507         * rendering/RenderText.cpp: Ditto.
1508         (WebCore::RenderText::widthFromCache):
1509         (WebCore::RenderText::computePreferredLogicalWidths):
1510         (WebCore::RenderText::width):
1511         * rendering/svg/SVGInlineTextBox.cpp: Ditto.
1512         (WebCore::SVGInlineTextBox::constructTextRun):
1513
1514 2011-06-12  Robert Hogan  <robert@webkit.org>
1515
1516         Reviewed by Andreas Kling.
1517
1518         [Qt] Fix methods.html and methods-lower-case.html
1519         https://bugs.webkit.org/show_bug.cgi?id=62221
1520
1521         * platform/network/qt/QNetworkReplyHandler.cpp:
1522         (WebCore::QNetworkReplyHandler::clearContentsHeaders): Refactor code from sendNetworkRequest
1523         (WebCore::QNetworkReplyHandler::getIODevice): ditto
1524         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
1525             - Remove ContentType and ContentLength headers from GET, DELETE and HEAD requests since
1526               we do not send data with any of these requests.
1527             - If a custom HTTP operation contains data, send it.
1528         * platform/network/qt/QNetworkReplyHandler.h:
1529
1530 2011-06-11  Michael Saboff  <msaboff@apple.com>
1531
1532         Reviewed by James Robinson.
1533
1534         REGRESSION(88260): 10-50% performance regression across many page cyclers
1535         https://bugs.webkit.org/show_bug.cgi?id=62349
1536
1537         Made CHROMIUM platform specific values for cMaxInactiveFontData and
1538         cTargetInactiveFontData to mitigate the current performance issue on Chromium
1539         page cycler tests.  Made the chromium value for cMaxInactiveFontData 250 based
1540         on recommendation from James Robinson.  Changed cTargetInactiveFontData to 200
1541         so that 50 inactive fonts will be cleaned up at a time.
1542
1543         Change made to address existing Chromium performance test regression.
1544
1545         * platform/graphics/FontCache.cpp:
1546
1547 2011-06-11  Adam Barth  <abarth@webkit.org>
1548
1549         Reviewed by Darin Adler.
1550
1551         Remove unnecessary strlen from DocumentWriter
1552         https://bugs.webkit.org/show_bug.cgi?id=62505
1553
1554         This ugly piece of code appears not to be needed.  Rejoice.
1555
1556         * WebCore.exp.in:
1557         * loader/DocumentLoader.cpp:
1558         (WebCore::DocumentLoader::commitData):
1559         * loader/DocumentLoader.h:
1560         * loader/DocumentWriter.cpp:
1561         (WebCore::DocumentWriter::addData):
1562         * loader/DocumentWriter.h:
1563
1564 2011-06-11  Adam Barth  <abarth@webkit.org>
1565
1566         Reviewed by Darin Adler.
1567
1568         DocumentParser::appendBytes shouldn't have a "flush" boolean parameter
1569         https://bugs.webkit.org/show_bug.cgi?id=62499
1570
1571         This patch removes the "flush" Boolean parameter from
1572         DocumentParser::appendBytes in favor of a new flush method.  This makes
1573         some code in DocumentWriter look less ridiculous.
1574
1575         There's still lots of on contorting to do here, but it's a start.
1576
1577         * dom/DecodedDataDocumentParser.cpp:
1578         (WebCore::DecodedDataDocumentParser::appendBytes):
1579         (WebCore::DecodedDataDocumentParser::flush):
1580         * dom/DecodedDataDocumentParser.h:
1581         * dom/DocumentParser.h:
1582         * dom/RawDataDocumentParser.h:
1583         (WebCore::RawDataDocumentParser::flush):
1584         * html/ImageDocument.cpp:
1585         (WebCore::ImageDocumentParser::appendBytes):
1586         * html/MediaDocument.cpp:
1587         (WebCore::MediaDocumentParser::appendBytes):
1588         * html/PluginDocument.cpp:
1589         (WebCore::PluginDocumentParser::appendBytes):
1590         * loader/DocumentWriter.cpp:
1591         (WebCore::DocumentWriter::reportDataReceived):
1592         (WebCore::DocumentWriter::addData):
1593         (WebCore::DocumentWriter::endIfNotLoadingMainResource):
1594         * loader/DocumentWriter.h:
1595         * loader/SinkDocument.cpp:
1596         (WebCore::SinkDocumentParser::appendBytes):
1597
1598 2011-06-11  Dimitri Glazkov  <dglazkov@chromium.org>
1599
1600         Unreviewed, rolling out r88569.
1601         http://trac.webkit.org/changeset/88569
1602         https://bugs.webkit.org/show_bug.cgi?id=62398
1603
1604         Broke Chromium browser test:
1605         IndexedDBBrowserTestWithGCExposed.DatabaseCallbacksTest
1606
1607         * storage/IDBFactory.idl:
1608
1609 2011-06-11  Dimitri Glazkov  <dglazkov@chromium.org>
1610
1611         Unreviewed, rolling out r88565.
1612         http://trac.webkit.org/changeset/88565
1613         https://bugs.webkit.org/show_bug.cgi?id=62401
1614
1615         Broke Chromium browser test:
1616         IndexedDBBrowserTestWithGCExposed.DatabaseCallbacksTest
1617
1618         * storage/IDBDatabase.cpp:
1619         (WebCore::IDBDatabase::setVersion):
1620         * storage/IDBDatabase.idl:
1621
1622 2011-06-10  Abhishek Arya  <inferno@chromium.org>
1623
1624         Reviewed by Simon Fraser.
1625
1626         Null parent element sheet pointers in CSSMutableStyleDeclaration consumers
1627         when removed from document, set them when reinserted into document.
1628         https://bugs.webkit.org/show_bug.cgi?id=62230
1629
1630         When a HTMLBodyElement, StyledElement are removed from document,
1631         we didn't clear out the parent pointers from their link, style declarations.
1632         These parent pointers pointed to the document's element sheet which will
1633         get removed when document is getting destroyed. It does make sense to
1634         clear out parent pointers when we are getting removed from document and
1635         readd them when we get inserted again.
1636
1637         Tests: fast/dom/body-link-decl-parent-crash.html
1638                fast/dom/styled-inline-style-decl-parent-crash.html
1639
1640         * dom/StyledElement.cpp:
1641         (WebCore::StyledElement::insertedIntoDocument):
1642         (WebCore::StyledElement::removedFromDocument):
1643         * dom/StyledElement.h:
1644         * html/HTMLBodyElement.cpp:
1645         (WebCore::HTMLBodyElement::parseMappedAttribute):
1646         (WebCore::HTMLBodyElement::insertedIntoDocument):
1647         (WebCore::HTMLBodyElement::removedFromDocument):
1648         (WebCore::HTMLBodyElement::didMoveToNewOwnerDocument):
1649         * html/HTMLBodyElement.h:
1650
1651 2011-06-10  Adam Barth  <abarth@webkit.org>
1652
1653         Remove bogus ASSERTs.  These ASSERTs used to be correct before I
1654         changed DocumentWriter to put the onus for ignoring empty writes onto
1655         the parser.
1656
1657         This patch should stop these test from triggering ASSERTs:
1658
1659         plugins/plugin-document-back-forward.html
1660         plugins/return-error-from-new-stream-callback-in-full-frame-plugin.html
1661         userscripts/user-script-plugin-document.html
1662
1663         * html/MediaDocument.cpp:
1664         (WebCore::MediaDocumentParser::appendBytes):
1665         * html/PluginDocument.cpp:
1666         (WebCore::PluginDocumentParser::appendBytes):
1667
1668 2011-06-09  Jer Noble  <jer.noble@apple.com>
1669
1670         Reviewed by Darin Adler.
1671
1672         REGRESSION: End of apple.com video in full-screen mode leads to unusable page.
1673         https://bugs.webkit.org/show_bug.cgi?id=62411
1674         
1675         Test: fullscreen/full-screen-remove-ancestor-after.html
1676
1677         The placeholder for RenderFullScreen was being created as a non-anonymous object, which led
1678         to the document's renderer being set to 0 when the placeholder was removed due to its parent
1679         being removed. Setting the placeholder to be anonymous, however, means that it will be
1680         coalesced with sibling anonymous blocks, so added the RenderFullScreenPlaceholder to the
1681         list of anonymous objects that are not considered anonymous blocks, to avoid the placeholder
1682         being so coalesced. To do so, made the placeholder object a true subclass, and add and
1683         override its destroy() function to notify the RenderFullScreen object that it has been
1684         destroyed.
1685
1686         * rendering/RenderFullScreen.cpp:
1687         (RenderFullScreenPlaceholder::RenderFullScreenPlaceholder): Added.
1688         (RenderFullScreenPlaceholder::~RenderFullScreenPlaceholder): Added.
1689         (RenderFullScreenPlaceholder::isRenderFullScreenPlaceholder): Added.
1690         (RenderFullScreenPlaceholder::destroy): Notify the owner renderer that its placeholder
1691             has been destroyed.
1692         (RenderFullScreen::destroy): Assert that the m_placeholder ivar is 0 after destroying it.
1693         (RenderFullScreen::setPlaceholder): Added.
1694         (RenderFullScreen::createPlaceholder): Do not make the placeholder anonymous.
1695         * rendering/RenderFullScreen.h:
1696         * rendering/RenderObject.h:
1697         (WebCore::RenderObject::isRenderFullScreenPlaceholder): Added.
1698         (WebCore::RenderObject::isAnonymousBlock): Added the placeholder class to the list of
1699             objects which are not anonymous blocks.
1700
1701 2011-06-10  Gavin Barraclough  <barraclough@apple.com>
1702
1703         Reviewed by Sam Weinig.
1704
1705         https://bugs.webkit.org/show_bug.cgi?id=16777
1706         Eliminate JSC::NaN and JSC::Inf
1707
1708         There's no good reason for -K-J-S- JSC to have its own NAN and infinity constants.
1709         The ones in std::numeric_limits are perfectly good.
1710         Remove JSC::Inf, JSC::NaN, switch some cases of (isnan || isinf) to !isfinite.
1711
1712         * bindings/js/JSDataViewCustom.cpp:
1713         (WebCore::getDataViewMember):
1714
1715 2011-06-10  James Simonsen  <simonjam@chromium.org>
1716
1717         Reviewed by Eric Seidel.
1718
1719         <script> inside <svg> should be executed
1720         https://bugs.webkit.org/show_bug.cgi?id=62412
1721
1722         Tests: svg/in-html/script-external.html
1723                svg/in-html/script-nested.html
1724                svg/in-html/script-write.html
1725                svg/in-html/script.html
1726
1727         * html/parser/HTMLTreeBuilder.cpp:
1728         (WebCore::HTMLTreeBuilder::processEndTag):
1729
1730 2011-06-10  Adam Barth  <abarth@webkit.org>
1731
1732         Reviewed by Darin Adler.
1733
1734         Script-created parsers should ignore data from the network
1735         https://bugs.webkit.org/show_bug.cgi?id=62336
1736
1737         If the network packet boundaries line up just right, we can end up
1738         feeding network data to a parser created by document.write (or
1739         document.open).  That's incorrect.
1740
1741         This patch causes DocumentWriter to grab hold of the original parser
1742         and direct all input to that parser.
1743
1744         Test: fast/parser/document-write-ignores-later-network-bytes.html
1745
1746         * dom/Document.cpp:
1747         (WebCore::Document::explicitClose):
1748         * loader/DocumentWriter.cpp:
1749         (WebCore::DocumentWriter::begin):
1750         (WebCore::DocumentWriter::addData):
1751         (WebCore::DocumentWriter::endIfNotLoadingMainResource):
1752         (WebCore::DocumentWriter::setDocumentWasLoadedAsPartOfNavigation):
1753         * loader/DocumentWriter.h:
1754
1755 2011-06-10  Simon Fraser  <simon.fraser@apple.com>
1756
1757         Reviewed by Dan Bernstein.
1758
1759         Keep overlap testing logic until real 3d transforms are being used
1760         https://bugs.webkit.org/show_bug.cgi?id=49857
1761         
1762         For pages that use the translateZ(0) hack to force compositing layers, it's
1763         advantageous to keep overlap testing, to avoid putting too many other
1764         elements into layers.
1765         
1766         Only turn off overlap testing if non-identity 3D transforms are used.
1767
1768         Tests: compositing/layer-creation/rotate3d-overlap.html
1769                compositing/layer-creation/translatez-overlap.html
1770
1771         * rendering/RenderLayerCompositor.cpp:
1772         (WebCore::RenderLayerCompositor::updateBacking):
1773         (WebCore::RenderLayerCompositor::hasNonIdentity3DTransform):
1774         * rendering/RenderLayerCompositor.h:
1775
1776 2011-06-10  David Levin  <levin@chromium.org>
1777
1778         Reviewed by Dmitry Titov.
1779
1780         Web Worker fails to fire error event when a resource fetch fails.
1781         https://bugs.webkit.org/show_bug.cgi?id=62475
1782
1783         Test: http/tests/workers/worker-workerScriptNotThere.html
1784
1785         * workers/WorkerScriptLoader.cpp:
1786         (WebCore::WorkerScriptLoader::didFinishLoading): Ensure that
1787         the client is notified of the error when it happens during loading.
1788
1789 2011-06-10  David Levin  <levin@chromium.org>
1790
1791         Reviewed by Dmitry Titov.
1792
1793         Fetching a Worker with url that isn't allowed from a file based test causes DRT to crash.
1794         https://bugs.webkit.org/show_bug.cgi?id=62469
1795
1796         Test: fast/workers/worker-crash-with-invalid-location.html
1797
1798         * workers/DefaultSharedWorkerRepository.cpp:
1799         (WebCore::SharedWorkerScriptLoader::load): Changed to using the RefCounted version of WorkerScriptLoader.
1800         * workers/Worker.cpp:
1801         (WebCore::Worker::create): Ditto.
1802         * workers/Worker.h: Ditto.
1803         * workers/WorkerContext.cpp:
1804         (WebCore::WorkerContext::importScripts):  Ditto.
1805         * workers/WorkerScriptLoader.cpp:
1806         (WebCore::WorkerScriptLoader::~WorkerScriptLoader): Created to
1807         allow removing some header includes in WorkerScriptLoader.h.
1808         (WebCore::WorkerScriptLoader::loadAsynchronously): Fix the ordering
1809         of setPendingActivity and keep WorkerScriptLoader alive during a
1810         potential callback.
1811         * workers/WorkerScriptLoader.h: Made this RefCounted to allow for
1812         keeping it alive during callbacks. Also, removed unnecessary header
1813         inclusions (and added a destructor to facilitate that).
1814         (WebCore::WorkerScriptLoader::create):
1815
1816 2011-06-10  Alok Priyadarshi  <alokp@chromium.org>
1817
1818         Reviewed by James Robinson.
1819
1820         [chromium] Top portion of page is rendered messed up with accelerated drawing
1821         https://bugs.webkit.org/show_bug.cgi?id=62484
1822
1823         Fixed the math in flipping the texture from bottom-up to top-down.
1824         Test: compositing/repaint/shrink-layer.html (existing)
1825
1826         * platform/graphics/chromium/LayerTilerChromium.cpp:
1827         (WebCore::LayerTilerChromium::draw):
1828
1829 2011-06-10  Tony Chang  <tony@chromium.org>
1830
1831         Reviewed by Ojan Vafai.
1832
1833         add a compile guard ENABLE(FLEXBOX)
1834         https://bugs.webkit.org/show_bug.cgi?id=62049
1835
1836         * Configurations/FeatureDefines.xcconfig:
1837
1838 2011-06-10  Sam Weinig  <sam@webkit.org>
1839
1840         Roll out r88568. It is not the right fix for the problem.
1841
1842         * loader/appcache/ApplicationCacheHost.cpp:
1843         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
1844
1845 2011-06-10  Mark Rowe  <mrowe@apple.com>
1846
1847         Reviewed by Dimitri Glazkov.
1848
1849         <rdar://problem/9562114> Fix DumpRenderTree build for production configuration.
1850
1851         Rename the built WebCoreTestSupport dylib to libWebCoreTestSupport.dylib so
1852         that it can be found via the library search path rather than requiring an
1853         absolute path be passed to the linker.
1854
1855         Install the library and its associated header file in a more appropriate location
1856         for the production configuration.
1857
1858         * Configurations/WebCoreTestSupport.xcconfig:
1859
1860 2011-06-10  Simon Fraser  <simon.fraser@apple.com>
1861
1862         Reviewed by Dave Hyatt.
1863
1864         Add a scheduleSetNeedsStyleRecalc() method to ContainerNode for use by RenderLayerCompositor
1865         https://bugs.webkit.org/show_bug.cgi?id=62471
1866
1867         RenderLayerCompositor had some code that did a setNeedsStyleRecalc(), but
1868         in a way that was safe to call during existing style recalc or layout.
1869         
1870         Move this code to ContainerElement so it can be called elsewhere.
1871         Also add a param to the node callback so we can pass the style change type.
1872
1873         * dom/ContainerNode.cpp:
1874         (WebCore::ContainerNode::queuePostAttachCallback):
1875         (WebCore::ContainerNode::dispatchPostAttachCallbacks):
1876         (WebCore::needsStyleRecalcCallback):
1877         (WebCore::ContainerNode::scheduleSetNeedsStyleRecalc):
1878         * dom/ContainerNode.h:
1879         * dom/Node.h:
1880         (WebCore::Node::scheduleSetNeedsStyleRecalc):
1881         * html/HTMLFormControlElement.cpp:
1882         (WebCore::focusPostAttach):
1883         (WebCore::updateFromElementCallback):
1884         * html/HTMLPlugInImageElement.cpp:
1885         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
1886         * html/HTMLPlugInImageElement.h:
1887         * rendering/RenderLayerCompositor.cpp:
1888         (WebCore::RenderLayerCompositor::attachRootPlatformLayer):
1889         (WebCore::RenderLayerCompositor::detachRootPlatformLayer):
1890         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange):
1891         * rendering/RenderLayerCompositor.h:
1892         * svg/SVGUseElement.cpp:
1893         (WebCore::updateFromElementCallback):
1894
1895 2011-06-10  Mark Pilgrim  <pilgrim@chromium.org>
1896
1897         Reviewed by Tony Chang.
1898
1899         IndexedDB: indexedDB.open() name argument is required
1900         https://bugs.webkit.org/show_bug.cgi?id=62398
1901
1902         Test: storage/indexeddb/database-name-undefined.html
1903
1904         * storage/IDBFactory.idl: use appropriate IDL magic to force undefined values to null, so we handle missing arguments as well as null arguments
1905
1906 2011-06-10  Sam Weinig  <sam@webkit.org>
1907
1908         Reviewed by Beth Dakin.
1909
1910         Common crash in ApplicationCacheHost::isApplicationCacheEnabled
1911         <rdar://problem/9328684>
1912
1913         * loader/appcache/ApplicationCacheHost.cpp:
1914         (WebCore::ApplicationCacheHost::isApplicationCacheEnabled):
1915         Speculative fix for a null frame on ApplicationCacheHost's DocumentLoader.
1916
1917 2011-06-10  Adam Barth  <abarth@webkit.org>
1918
1919         Reviewed by Eric Seidel.
1920
1921         Remove Document::finishParsing
1922         https://bugs.webkit.org/show_bug.cgi?id=62474
1923
1924         This function appears to exist only to confuse and befuddle us.  This
1925         patch prepares for DocumentWriter to grab hold of the parser.
1926
1927         This patch removes one of the print statements from
1928         INSTRUMENT_LAYOUT_SCHEDULING, but I'm not sure
1929         INSTRUMENT_LAYOUT_SCHEDULING works anymore anyway.
1930
1931         * dom/Document.cpp:
1932         * dom/Document.h:
1933         * dom/XMLDocumentParser.cpp:
1934         (WebCore::XMLDocumentParser::finish):
1935         * html/parser/HTMLDocumentParser.cpp:
1936         (WebCore::HTMLDocumentParser::finish):
1937         * loader/DocumentWriter.cpp:
1938         (WebCore::DocumentWriter::addData):
1939         (WebCore::DocumentWriter::endIfNotLoadingMainResource):
1940         * loader/FrameLoader.cpp:
1941         (WebCore::FrameLoader::stop):
1942
1943 2011-06-10  Mark Pilgrim  <pilgrim@chromium.org>
1944
1945         Reviewed by Tony Chang.
1946
1947         IndexedDB: setVersion() version argument is required
1948         https://bugs.webkit.org/show_bug.cgi?id=62401
1949
1950         Test: storage/indexeddb/setVersion-undefined.html
1951
1952         * storage/IDBDatabase.cpp:
1953         (WebCore::IDBDatabase::setVersion): check for null version
1954         * storage/IDBDatabase.idl: add IDL magic to force undefined to null so we can handle both missing and null arguments
1955
1956 2011-06-10  Simon Fraser  <simon.fraser@apple.com>
1957
1958         Reviewed by Dan Bernstein.
1959
1960         Null-check the layer owner again when painting layers
1961         https://bugs.webkit.org/show_bug.cgi?id=62473
1962
1963         Speculative fix for a crash that occurs when the layer's owner
1964         gets destroyed during painting.
1965
1966         * platform/graphics/mac/WebLayer.mm:
1967         (drawLayerContents):
1968
1969 2011-06-08  Robert Hogan  <robert@webkit.org>
1970
1971         Reviewed by Andreas Kling.
1972
1973         [Qt] Lighten the --no-svg build a little
1974         https://bugs.webkit.org/show_bug.cgi?id=62314
1975
1976         Only generate source from SVG*.idl if the build is svg-enabled.
1977
1978         * CodeGenerators.pri:
1979
1980 2011-06-10  Nikolas Zimmermann  <nzimmermann@rim.com>
1981
1982         Reviewed by Rob Buis.
1983
1984         Integrate SVG Fonts within GlyphPage concept, removing the special SVG code paths from Font, making it possible to reuse the simple text code path for SVG Fonts
1985         https://bugs.webkit.org/show_bug.cgi?id=59085
1986
1987         Add glyph table to SVGFontElement mapping between SVGGlyph <-> Glyph
1988         https://bugs.webkit.org/show_bug.cgi?id=62441
1989
1990         Preparation patch 1: Introduce the internal glyph table in SVGGlyphMap that will be used to identify each
1991         SVGGlyph identifier with a Glyph (which is just an ushort). It will be used by follow-up patches.
1992
1993         Doesn't affect any test so far.
1994
1995         * platform/graphics/SVGGlyph.h:
1996         (WebCore::SVGGlyph::SVGGlyph):
1997         (WebCore::SVGGlyph::operator==):
1998         * rendering/svg/SVGTextRunRenderingContext.cpp:
1999         (WebCore::SVGTextRunWalker::walk):
2000         * svg/SVGFontData.cpp:
2001         (WebCore::SVGFontData::initializeFontData):
2002         * svg/SVGFontElement.cpp:
2003         (WebCore::SVGFontElement::SVGFontElement):
2004         (WebCore::SVGFontElement::registerLigaturesInGlyphCache):
2005         (WebCore::SVGFontElement::ensureGlyphCache):
2006         (WebCore::kerningForPairOfStringsAndGlyphs):
2007         (WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs):
2008         (WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs):
2009         (WebCore::SVGFontElement::collectGlyphsForString):
2010         (WebCore::SVGFontElement::collectGlyphsForGlyphName):
2011         (WebCore::SVGFontElement::svgGlyphForGlyph):
2012         (WebCore::SVGFontElement::missingGlyph):
2013         * svg/SVGFontElement.h:
2014         (WebCore::SVGKerningPair::SVGKerningPair):
2015         * svg/SVGGlyphMap.h:
2016         (WebCore::SVGGlyphMap::addGlyphByUnicodeString):
2017         (WebCore::SVGGlyphMap::addGlyphByName):
2018         (WebCore::SVGGlyphMap::appendToGlyphTable):
2019         (WebCore::SVGGlyphMap::collectGlyphsForString):
2020         (WebCore::SVGGlyphMap::clear):
2021         (WebCore::SVGGlyphMap::svgGlyphForGlyph):
2022         (WebCore::SVGGlyphMap::glyphIdentifierForGlyphName):
2023
2024 2011-06-10  Emil A Eklund  <eae@chromium.org>
2025
2026         Reviewed by Eric Seidel.
2027
2028         Regression r85573: Blank pages appear at the end of some wikipedia documents.
2029         https://bugs.webkit.org/show_bug.cgi?id=62343
2030
2031         Fix regression caused by r85573. Cached document size not updated after layout.
2032
2033         Test: printing/page-count-relayout-shrink.html
2034
2035         * page/FrameView.cpp:
2036         (WebCore::FrameView::forceLayoutForPagination):
2037
2038 2011-06-10  Rob Buis  <rbuis@rim.com>
2039
2040         Reviewed by Nikolas Zimmermann.
2041
2042         amation event handling broken: focusin
2043         https://bugs.webkit.org/show_bug.cgi?id=12894
2044
2045         focusin, focusout, activate not implemented in SVG
2046         https://bugs.webkit.org/show_bug.cgi?id=40545
2047
2048         Make elements that should support GraphicalEventAttribute handle focussing, since focusin, focusout is part of that:
2049
2050         http://www.w3.org/TR/SVG11/intro.html#TermGraphicalEventAttribute
2051
2052         Match Opera behaviour ; elements that support GraphicalEventAttribute can receive visual mouse focus when having either a focusin or focusout event handler. Elements that support GraphicalEventAttribute can receive visual keyboard focus when having either a focusin or focusout event handler. Keyboard focus does not advance to SVG elements that are not focusable at the time.
2053
2054         Tests: svg/custom/focus-event-handling-keyboard.xhtml
2055                svg/custom/focus-event-handling.xhtml
2056
2057         * rendering/svg/SVGRenderSupport.cpp:
2058         (WebCore::SVGRenderSupport::computeRectForRepaint):
2059         * svg/SVGCircleElement.h:
2060         (WebCore::SVGCircleElement::supportsFocus):
2061         * svg/SVGEllipseElement.h:
2062         (WebCore::SVGEllipseElement::supportsFocus):
2063         * svg/SVGGElement.h:
2064         (WebCore::SVGGElement::supportsFocus):
2065         * svg/SVGImageElement.h:
2066         (WebCore::SVGImageElement::supportsFocus):
2067         * svg/SVGLineElement.h:
2068         (WebCore::SVGLineElement::supportsFocus):
2069         * svg/SVGPathElement.h:
2070         (WebCore::SVGPathElement::supportsFocus):
2071         * svg/SVGPolyElement.h:
2072         (WebCore::SVGPolyElement::supportsFocus):
2073         * svg/SVGRectElement.h:
2074         (WebCore::SVGRectElement::supportsFocus):
2075         * svg/SVGSVGElement.h:
2076         (WebCore::SVGSVGElement::supportsFocus):
2077         * svg/SVGStyledElement.cpp:
2078         (WebCore::SVGStyledElement::isMouseFocusable):
2079         (WebCore::SVGStyledElement::isKeyboardFocusable):
2080         * svg/SVGStyledElement.h:
2081         * svg/SVGSwitchElement.h:
2082         (WebCore::SVGSwitchElement::supportsFocus):
2083         * svg/SVGSymbolElement.h:
2084         (WebCore::SVGSymbolElement::supportsFocus):
2085         * svg/SVGTextElement.h:
2086         (WebCore::SVGTextElement::supportsFocus):
2087         * svg/SVGUseElement.h:
2088         (WebCore::SVGUseElement::supportsFocus):
2089
2090 2011-06-10  Luke Macpherson   <macpherson@chromium.org>
2091
2092         Reviewed by Eric Seidel.
2093
2094         Clean up CSSPrimitiveValue::computeLength*
2095         https://bugs.webkit.org/show_bug.cgi?id=61612
2096
2097         No new tests as no functionality changed.
2098
2099         * css/CSSGradientValue.cpp:
2100         Use new computeLength functions.
2101         * css/CSSPrimitiveValue.cpp:
2102         (WebCore::CSSPrimitiveValue::computeLengthIntForLength):
2103         Reduce to a single function using default parameter values.
2104         (WebCore::CSSPrimitiveValue::computeLength):
2105         Redefine existing functions with separate names as a single function using templated function specialization.
2106         * css/CSSPrimitiveValue.h:
2107         Prototypes for computeLengthIntForLength and computeLength.
2108         * css/CSSStyleApplyProperty.cpp:
2109         Use new computeLength functions.
2110         * css/CSSStyleSelector.cpp:
2111         Use new computeLength functions.
2112         * css/MediaQueryEvaluator.cpp:
2113         Use new computeLength functions.
2114         * css/SVGCSSStyleSelector.cpp:
2115         Use new computeLength functions.
2116
2117 2011-06-10  Simon Fraser  <simon.fraser@apple.com>
2118
2119         Reviewed by Beth Dakin.
2120
2121         Add utility to RenderLayer to determine if the layer is scrollable
2122         https://bugs.webkit.org/show_bug.cgi?id=62467
2123
2124         New method that returns true if either scrollbar is present and enabled.
2125         Not called anywhere yet.
2126
2127         * rendering/RenderLayer.cpp:
2128         (WebCore::RenderLayer::allowsScrolling):
2129         * rendering/RenderLayer.h:
2130
2131 2011-06-10  Dimitri Glazkov  <dglazkov@chromium.org>
2132
2133         Reviewed by Tony Chang.
2134
2135         REGRESSION (r88332): prototype-inheritance-2 ASSERTS attempting to enumerate spellCheckRanges
2136         https://bugs.webkit.org/show_bug.cgi?id=62460
2137
2138         Test: fast/dom/prototype-inheritance-2.html
2139
2140         * dom/DocumentMarkerController.cpp:
2141         (WebCore::DocumentMarkerController::userSpellingMarkersForNode): Added an extra 0-check.
2142
2143 2011-06-10  James Simonsen  <simonjam@chromium.org>
2144
2145         Reviewed by Tony Gentilcore.
2146
2147         Don't execute scripts in shadow SVG.
2148         https://bugs.webkit.org/show_bug.cgi?id=62225
2149
2150         Test: svg/dom/use-style-recalc-script-execute-crash.html
2151
2152         * dom/ScriptElement.cpp:
2153         (WebCore::ScriptElement::prepareScript):
2154
2155 2011-06-10  Konstantin Tokarev  <ktokarev@smartlabs.tv>
2156
2157         Reviewed by Joseph Pecoraro.
2158
2159         Fixed build with enabled workers and disabled inspector
2160         https://bugs.webkit.org/show_bug.cgi?id=62461
2161
2162         * inspector/InspectorWorkerAgent.cpp: Added inspector guard
2163
2164 2011-06-10  Darin Adler  <darin@apple.com>
2165
2166         Reviewed by Eric Carlson.
2167
2168         REGRESSION: Fullscreen video controller can't be dragged
2169         https://bugs.webkit.org/show_bug.cgi?id=62462
2170
2171         No regression test because we don't have machinery for testing the fullscreen
2172         mode. We may find a way to add this in the future.
2173
2174         * html/shadow/MediaControlElements.cpp:
2175         (WebCore::MediaControlPanelElement::MediaControlPanelElement): Initialize new
2176         booleans related to dragging.
2177         (WebCore::MediaControlPanelElement::startDrag): Added. Starts drag if dragging
2178         is allowed and a drag isn't already in progress.
2179         (WebCore::MediaControlPanelElement::continueDrag): Added. Moves the window if
2180         dragging is already in progress.
2181         (WebCore::MediaControlPanelElement::endDrag): Added. Ends the capture that is
2182         done during the dragging process.
2183         (WebCore::MediaControlPanelElement::setPosition): Added. Positions the panel
2184         using explicit top/left.
2185         (WebCore::MediaControlPanelElement::resetPosition): Added. Removes the positioning
2186         done by setPosition.
2187         (WebCore::MediaControlPanelElement::defaultEventHandler): Added. Calls startDrag,
2188         continueDrag, and endDrag in response to mouse events.
2189         (WebCore::MediaControlPanelElement::setCanBeDragged): Added.
2190         * html/shadow/MediaControlElements.h: Added new function and data members
2191         as mentioned above.
2192
2193         * html/shadow/MediaControlRootElement.cpp:
2194         (WebCore::MediaControlRootElement::enteredFullscreen): Call setCanBeDragged(true)
2195         so you can drag the panel while in fullscreen.
2196         (WebCore::MediaControlRootElement::exitedFullscreen): Call setCanBeDragged(false)
2197         so you can't drag the panel while not in fullscreen. Also call resetPosition so
2198         position changes from dragging don't affect the panel in other contexts.
2199
2200 2011-06-10  Darin Adler  <darin@apple.com>
2201
2202         Reviewed by Eric Carlson.
2203
2204         REGRESSION: Full screen video HUD is positioned too low for standalone video documents
2205         https://bugs.webkit.org/show_bug.cgi?id=62463
2206
2207         No test because we don't currently have machinery for testing fullscreen.
2208
2209         * css/fullscreen.css: Removed rule that said bottom: 0px for the control panel
2210         for full page media in full screen mode. This is not needed because the control
2211         panel for full screen mode already has style rules to set its vertical position.
2212         (:-webkit-full-screen-ancestor:not(iframe)): Fixed typo where it said
2213         -webkit-tranform. This will fix a potential problem where fullscreen would
2214         malfunction on a page that had a media element inside a transform.
2215
2216 2011-06-10  Sergio Villar Senin  <svillar@igalia.com>
2217
2218         Reviewed by Gustavo Noronha Silva.
2219
2220         [GTK] Add support for non-ASCII filenames in Content-Disposition header
2221         https://bugs.webkit.org/show_bug.cgi?id=62454
2222
2223         Try latin1 as fallback for header parameter values as some servers
2224         do not follow RFC 2045 for example with filename parameter in
2225         Content-Disposition.
2226
2227         No new tests required as no functionality changed.
2228
2229         * platform/network/soup/ResourceResponseSoup.cpp:
2230         (WebCore::ResourceResponse::updateFromSoupMessage):
2231
2232 2011-06-10  No'am Rosenthal  <noam.rosenthal@nokia.com> and Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
2233
2234         Reviewed by Kenneth Rohde Christiansen.
2235
2236         Add layer factory to GraphicsLayer for creating non-default layer type.
2237         https://bugs.webkit.org/show_bug.cgi?id=61925
2238
2239         Added a static factory protected member to GraphicsLayer, which should be accessed from
2240         a port-specific implementation of GraphicsLayer::create. For now this is enabled for Qt only.
2241
2242         This is needed for accelerated compositing across processes in WebKit2, since WebCore
2243         doesn't know in compile time whether it's in WebKit or WebKit2, which makes having two
2244         different implementations of GraphicsLayer coexist impossible without some runtime
2245         factory that can be overridden by the web process.
2246
2247         Note that the use of the factory would be optional, and the port-specific GraphicsLayer::create
2248         would have to explicitly call it, in order to be unintrusive with current implementations.
2249
2250         No new functionality, so no new tests.
2251
2252         * platform/graphics/GraphicsLayer.cpp:
2253         (WebCore::GraphicsLayer::setGraphicsLayerFactory):
2254         * platform/graphics/GraphicsLayer.h:
2255
2256 2011-06-10  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
2257
2258         Reviewed by Kenneth Rohde Christiansen.
2259
2260         [CMAKE] Add generic support for building with WebGL
2261         https://bugs.webkit.org/show_bug.cgi?id=62376
2262
2263         Set new THIRDPARTY_DIR variable to compile sources under ThirdParty.
2264
2265         No change in functionality so no new tests.
2266
2267         * CMakeLists.txt:
2268
2269 2011-06-10  Ryuan Choi  <ryuan.choi@samsung.com>
2270
2271         Reviewed by Andreas Kling.
2272
2273         [GTK][EFL] m_imageInterpolationQuality is not initialized in PlatformContextCairo::PlatformContextCairo.
2274         https://bugs.webkit.org/show_bug.cgi?id=62435
2275
2276         No new tests required as just fixed warning.
2277
2278         * platform/graphics/cairo/PlatformContextCairo.cpp:
2279         (WebCore::PlatformContextCairo::PlatformContextCairo):
2280
2281 2011-06-11-06-09  Ilya Tikhonovsky  <loislo@chromium.org>
2282
2283         Reviewed by Yury Semikhatsky.
2284
2285         Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
2286         https://bugs.webkit.org/show_bug.cgi?id=62377
2287
2288         * inspector/InspectorValues.cpp:
2289
2290 2011-06-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2291
2292         Unreviewed, rolling out r88530.
2293         http://trac.webkit.org/changeset/88530
2294         https://bugs.webkit.org/show_bug.cgi?id=62440
2295
2296         qt build was broken (Requested by loislo on #webkit).
2297
2298         * inspector/InspectorValues.cpp:
2299
2300 2011-06-09  Ilya Tikhonovsky  <loislo@chromium.org>
2301
2302         Reviewed by Yury Semikhatsky.
2303
2304         Web Inspector: protocol: json: Whitespace can be inserted between any pair of tokens.
2305         https://bugs.webkit.org/show_bug.cgi?id=62377
2306
2307         * inspector/InspectorValues.cpp:
2308
2309 2011-06-09  Jer Noble  <jer.noble@apple.com>
2310
2311         Reviewed by Darin Adler.
2312
2313         REGRESSION: Vertical scroll bar appears when taking videos into full screen at jerryseinfeld.com
2314         https://bugs.webkit.org/show_bug.cgi?id=62402
2315
2316         Sites are able to override the "overflow:hidden" rule for root full-screen nodes
2317         simply by adding a "html {}" rule.  Make this rule !important, and also make it apply
2318         to root nodes who are merely ancestors of full-screen elements, to cover the case of
2319         a root node containing an <iframe> whose contents have gone full-screen.
2320
2321         * css/fullscreen.css:
2322         (:root:-webkit-full-screen-document:not(:-webkit-full-screen),
2323             :root:-webkit-full-screen-ancestor): Apply the overflow rule to root elements
2324             who are full-screen ancestors, and make them !important.
2325
2326 2011-06-09  Luke Macpherson   <macpherson@chromium.org>
2327
2328         Reviewed by Eric Seidel.
2329
2330         Rename RenderStyle visuallyOrdered property and use an enum instead of a bool.
2331         https://bugs.webkit.org/show_bug.cgi?id=61495
2332
2333         No new tests required as no functionality changed.
2334
2335         * css/CSSPrimitiveValueMappings.h:
2336         Support cast to/from Order
2337         * css/CSSStyleSelector.cpp:
2338         (WebCore::CSSStyleSelector::styleForDocument):
2339         Convert from bool to enum type.
2340         (WebCore::CSSStyleSelector::applyProperty):
2341         Convert to macro that uses the cast defined in CSSPrimitiveValueMappings.
2342         * dom/Document.cpp:
2343         (WebCore::Document::setVisuallyOrdered):
2344         Change call to RenderStyle::setRTLOrdering using enum parameter.
2345         * rendering/style/RenderStyle.h:
2346         rename visuallyOrdered proerties rtlOrdering and use appropriate enum types.
2347         * rendering/style/RenderStyleConstants.h:
2348         Define enum type.
2349
2350 2011-06-09  Luke Macpherson   <macpherson@chromium.org>
2351
2352         Reviewed by Eric Seidel.
2353
2354         Implement CSSPropertyOutlineStyle handler in CSSStyleApplyProperty
2355         https://bugs.webkit.org/show_bug.cgi?id=61601
2356
2357         No new tests. No new functionality added / covered by existing tests.
2358
2359         * css/CSSPrimitiveValueMappings.h:
2360         (WebCore::CSSPrimitiveValue::operator EBorderStyle):
2361         Support CSSValueAuto as required by outline-style property.
2362         (WebCore::CSSPrimitiveValue::operator OutlineIsAuto):
2363         Add cast to new OutlineIsAuto enum.
2364         * css/CSSStyleApplyProperty.cpp:
2365         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2366         Initialize handler for CSSPropertyOutlineStyle.
2367         * css/CSSStyleSelector.cpp:
2368         (WebCore::CSSStyleSelector::applyProperty):
2369         Remove old handler for CSSPropertyOutlineStyle.
2370         * rendering/style/OutlineValue.h:
2371         Use new OutlineIsAuto enum instead of bool.
2372         * rendering/style/RenderStyle.h:
2373         Split existing two-parameter setter setOutlineStyle into separate setters for style and auto properties.
2374         Use new OutlineIsAuto enum type.
2375         * rendering/style/RenderStyleConstants.h:
2376         Define new enum OutlineIsAuto.
2377
2378 2011-06-09  Luke Macpherson   <macpherson@chromium.org>
2379
2380         Reviewed by Eric Seidel.
2381
2382         Code cleanup - add wrappers for function pointer dereferences to improve readability in ApplyPropertyDefaultBase and derived classes.
2383         https://bugs.webkit.org/show_bug.cgi?id=62418
2384
2385         No new tests / cleanup only.
2386
2387         * css/CSSStyleApplyProperty.cpp:
2388         (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
2389         Use new wrapper functions.
2390         (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
2391         Use new wrapper functions.
2392         (WebCore::ApplyPropertyDefaultBase::setValue):
2393         Wrapper for calling m_setter function pointer.
2394         (WebCore::ApplyPropertyDefaultBase::value):
2395         Wrapper for calling m_getter function pointer.
2396         (WebCore::ApplyPropertyDefaultBase::initial):
2397         Wrapper for calling m_initial function pointer.
2398         (WebCore::ApplyPropertyDefault::applyValue):
2399         Use new setValue function.
2400         (WebCore::ApplyPropertyLength::applyValue):
2401         Use new setValue function.
2402         (WebCore::ApplyPropertyWidth::applyValue):
2403         Use new setValue function.
2404
2405 2011-06-09  Hyowon Kim  <hw1008.kim@samsung.com>
2406
2407         Reviewed by Antonio Gomes.
2408
2409         [EFL] Make accelerated compositing build in Webkit-EFL
2410         https://bugs.webkit.org/show_bug.cgi?id=62361
2411
2412         Add a new class, GraphicsLayerEfl - not yet implemented.
2413         Add ACCELERATED_COMPOSITING related files to CMakeLists.
2414
2415         * CMakeLists.txt:
2416         * CMakeListsEfl.txt:
2417         * platform/graphics/efl/GraphicsLayerEfl.cpp: Added.
2418         (WebCore::GraphicsLayer::create):
2419         (WebCore::GraphicsLayerEfl::GraphicsLayerEfl):
2420         (WebCore::GraphicsLayerEfl::~GraphicsLayerEfl):
2421         (WebCore::GraphicsLayerEfl::setNeedsDisplay):
2422         (WebCore::GraphicsLayerEfl::setNeedsDisplayInRect):
2423         * platform/graphics/efl/GraphicsLayerEfl.h: Added.
2424
2425 2011-06-09  Jian Li  <jianli@chromium.org>
2426
2427         Reviewed by David Levin.
2428
2429         Calling WebKitBlobBuilder.append with null argument should not crash
2430         https://bugs.webkit.org/show_bug.cgi?id=62419
2431
2432         Test: fast/files/blob-builder-crash.html
2433
2434         * fileapi/WebKitBlobBuilder.cpp:
2435         (WebCore::WebKitBlobBuilder::append):
2436
2437 2011-06-09  Jer Noble  <jer.noble@apple.com>
2438
2439         Reviewed by David Hyatt.
2440
2441         Roll out r88468, and fix bug #61911 without making Element::offset functions virtual.
2442         https://bugs.webkit.org/show_bug.cgi?id=62400
2443
2444         No new tests; covered by existing fullscreen/full-screen-video-offset.html test.
2445
2446         * rendering/RenderVideo.cpp:
2447         (WebCore::rendererPlaceholder): Added; returns the placeholder block, if it exists.
2448         (WebCore::RenderVideo::offsetLeft): Pass the offset request to the placeholder block.
2449         (WebCore::RenderVideo::offsetTop): Ditto.
2450         (WebCore::RenderVideo::offsetWidth): Ditto.
2451         (WebCore::RenderVideo::offsetHeight): Ditto.
2452         * rendering/RenderVideo.h: Added virtual overrides for the offset functions.
2453
2454 2011-06-09  James Robinson  <jamesr@chromium.org>
2455
2456         Reviewed by Kenneth Russell.
2457
2458         [chromium] Scissor rect not set for clipping layers set offscreen
2459         https://bugs.webkit.org/show_bug.cgi?id=62339
2460
2461         We set a scissorRect on each layer, but only layers with masksToBounds and their descendants should actually set
2462         a scissor.  Layers that didn't need to scissor had empty scissorRects.  Unfortunately layers with masksToBounds
2463         and their descendants that are scrolled offscreen also end up with an empty clipped scissor rect.
2464
2465         This patch sets an explicit bit on each layer that should scissor and then checks that bit instead of checking
2466         for an empty scissor rect at draw time.  RenderSurfaceChromiums have different requirements for
2467         setScissorToRect, so the old behavior is still available with a flag.  This can probably be cleaned up more.
2468
2469         Test: platform/chromium/compositing/scissor-out-of-viewport.html
2470
2471         * platform/graphics/chromium/LayerRendererChromium.cpp:
2472         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2473         (WebCore::LayerRendererChromium::drawLayer):
2474         (WebCore::LayerRendererChromium::setScissorToRect):
2475         * platform/graphics/chromium/LayerRendererChromium.h:
2476         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
2477         (WebCore::RenderSurfaceChromium::draw):
2478         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2479         (WebCore::CCLayerImpl::CCLayerImpl):
2480         * platform/graphics/chromium/cc/CCLayerImpl.h:
2481         (WebCore::CCLayerImpl::setUsesLayerScissor):
2482         (WebCore::CCLayerImpl::usesLayerScissor):
2483
2484 2011-06-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2485
2486         Unreviewed, rolling out r88468.
2487         http://trac.webkit.org/changeset/88468
2488         https://bugs.webkit.org/show_bug.cgi?id=62408
2489
2490         It broke build if !ENABLE(FULLSCREEN_API) (Requested by Ossy
2491         on #webkit).
2492
2493         * dom/Element.cpp:
2494         (WebCore::adjustForLocalZoom):
2495         * dom/Element.h:
2496         * html/HTMLMediaElement.cpp:
2497         * html/HTMLMediaElement.h:
2498
2499 2011-06-09  Kenneth Russell  <kbr@google.com>
2500
2501         Reviewed by Adam Barth.
2502
2503         Disallow use of cross-domain media (images, video) in WebGL
2504         https://bugs.webkit.org/show_bug.cgi?id=62257
2505
2506         Updated WebGL implementation to track recent spec updates in this area.
2507
2508         Tests: http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html
2509                http/tests/security/webgl-remote-read-remote-image-allowed.html
2510                http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html
2511
2512         * html/canvas/CanvasRenderingContext.cpp:
2513         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
2514         (WebCore::CanvasRenderingContext::checkOrigin):
2515         * html/canvas/CanvasRenderingContext.h:
2516         (WebCore::CanvasRenderingContext::checkOrigin):
2517         * html/canvas/WebGLRenderingContext.cpp:
2518         (WebCore::WebGLRenderingContext::readPixels):
2519         (WebCore::WebGLRenderingContext::texImage2D):
2520         (WebCore::WebGLRenderingContext::videoFrameToImage):
2521         (WebCore::WebGLRenderingContext::texSubImage2D):
2522         * html/canvas/WebGLRenderingContext.h:
2523
2524 2011-06-09  Adam Barth  <abarth@webkit.org>
2525
2526         Reviewed by Eric Seidel.
2527
2528         Add an ASSERT to HTMLTreeBuilder
2529         https://bugs.webkit.org/show_bug.cgi?id=62403
2530
2531         This ASSERT was useful in investigating a re-entrancy bug.  We should
2532         keep it.
2533
2534         * html/parser/HTMLTreeBuilder.cpp:
2535         (WebCore::HTMLTreeBuilder::processEndOfFile):
2536
2537 2011-06-09  Dan Bernstein  <mitz@apple.com>
2538
2539         Reviewed by Darin Adler.
2540
2541         Fix a regression from r88478.
2542
2543         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
2544         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Add the runs
2545         in reverse order in the RTL case here, since the whole vector is reversed by collectComplexTextRuns()
2546         afterwards.
2547
2548 2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>
2549
2550         Reviewed by Antti Koivisto.
2551
2552         REGRESSION(84329): Stylesheets on some pages do not load
2553         https://bugs.webkit.org/show_bug.cgi?id=61400
2554
2555         Test: fast/css/link-disabled-attr.html
2556
2557         Fixed r84329: the change did not take into account the fact
2558         that HTMLLinkElement did already contain the disabled information
2559         and the 2 information were not linked as they should have!
2560
2561         The new logic pushes the information to the stylesheet as this
2562         is what the spec mandates and what FF is doing. Also it keeps
2563         one bit of information (that JS enabled the stylesheet) as it
2564         is needed for the recalcStyleSelector logic.
2565
2566         * dom/Document.cpp:
2567         (WebCore::Document::recalcStyleSelector): s/isDisabled/disabled.
2568
2569         * html/HTMLLinkElement.cpp:
2570         (WebCore::HTMLLinkElement::HTMLLinkElement): Removed m_disabledState,
2571         replaced by m_isEnabledViaScript.
2572         (WebCore::HTMLLinkElement::setDisabled): Updated the logic after
2573         m_disabledState removal. It also matches the spec by forwarding
2574         the disabled state to our stylesheet if we have one.
2575         (WebCore::HTMLLinkElement::parseMappedAttribute): Removed harmful
2576         handling of the disabledAttr.
2577         (WebCore::HTMLLinkElement::process): Updated after m_disabledState removal.
2578         * html/HTMLLinkElement.h:
2579         (WebCore::HTMLLinkElement::isEnabledViaScript): Ditto.
2580         (WebCore::HTMLLinkElement::isAlternate): Ditto.
2581
2582 2011-06-09  Dan Bernstein  <mitz@apple.com>
2583
2584         Reviewed by Darin Adler.
2585
2586         Simplify ComplexTextController::collectComplexTextRuns()
2587         https://bugs.webkit.org/show_bug.cgi?id=62387
2588
2589         No new test, since functionality is unchanged.
2590
2591         * platform/graphics/mac/ComplexTextController.cpp:
2592         (WebCore::ComplexTextController::collectComplexTextRuns): Always iterate characters in logical order,
2593         then reverse the run vector for RTL.
2594
2595 2011-06-09  Dimitri Glazkov  <dglazkov@chromium.org>
2596
2597         Reviewed by Kent Tamura.
2598
2599         Fold isShadowBoundary into isShadowRoot.
2600         https://bugs.webkit.org/show_bug.cgi?id=62317
2601
2602         Since there are no longer cases where Node::isShadowBoundary() != Node::isShadowRoot, we can remove this function.
2603
2604         In one case where isShadowBoundary was also tested to find ShadowContentElemnt, added a new isContentElement function.
2605
2606         Refactoring, covered by existing tests.
2607
2608         * css/CSSStyleSelector.cpp:
2609         (WebCore::isAtShadowBoundary): Changed to use isShadowRoot.
2610         * dom/Element.cpp:
2611         (WebCore::Element::isSpellCheckingEnabled): Ditto.
2612         * dom/Node.cpp:
2613         (WebCore::Node::nonBoundaryShadowTreeRootNode): Ditto.
2614         (WebCore::Node::nonShadowBoundaryParentNode): Ditto.
2615         * dom/Node.h:
2616         (WebCore::Node::isContentElement): Added.
2617         * dom/NodeRenderingContext.cpp:
2618         (WebCore::NodeRenderingContext::NodeRenderingContext): Changed to use isShadowRoot.
2619         * dom/Position.cpp:
2620         (WebCore::Position::Position): Ditto.
2621         * dom/ShadowContentElement.h:
2622         (WebCore::ShadowContentElement::isContentElement): Added.
2623         * dom/ShadowRoot.cpp:
2624         (WebCore::ShadowRoot::hasContentElement): Changed to use isContentElement.
2625         * editing/CompositeEditCommand.cpp:
2626         (WebCore::CompositeEditCommand::insertNodeAfter): Changed to use isShadowRoot.
2627         * editing/htmlediting.cpp:
2628         (WebCore::visiblePositionBeforeNode): Ditto.
2629         (WebCore::visiblePositionAfterNode): Ditto.
2630         * page/DragController.cpp:
2631         (WebCore::asFileInput): Ditto.
2632         * rendering/RenderTreeAsText.cpp:
2633         (WebCore::nodePosition): Ditto.
2634
2635 2011-06-09  Simon Fraser  <simon.fraser@apple.com>
2636
2637         Reviewed by Darin Adler.
2638
2639         Crashes in RenderLayerBacking::paintingGoesToWindow
2640         https://bugs.webkit.org/show_bug.cgi?id=61159
2641
2642         Speculative fix for unreproducible crash that can occur when RenderObject::repaintUsingContainer()
2643         finds a repaintContainer that is not the RenderView, but that is also not
2644         composited (for unknown reasons), by checking to see if the layer is
2645         compositing before using backing(). An assertion remains to try to catch
2646         this in debug builds.
2647
2648         * rendering/RenderLayer.cpp:
2649         (WebCore::RenderLayer::setBackingNeedsRepaintInRect):
2650
2651 2011-06-09  Julien Chaffraix  <jchaffraix@webkit.org>
2652
2653         Reviewed by Darin Adler.
2654
2655         WebCore::WebKitCSSKeyframesRuleInternal::nameAttrSetter() - crash
2656         https://bugs.webkit.org/show_bug.cgi?id=62384
2657
2658         Test: fast/css/webkit-keyframes-crash.html
2659
2660         * css/WebKitCSSKeyframesRule.cpp:
2661         (WebCore::WebKitCSSKeyframesRule::setName): stylesheet() is never garanteed
2662         to return a non-null pointer. Thus null-check here like the rest of the code.
2663
2664 2011-06-09  Julien Chaffraix  <jchaffraix@codeaurora.org>
2665
2666         Reviewed by David Hyatt.
2667
2668         chrome.dll!WebCore::RenderStyle::fontMetrics ReadAV@NULL (two crashes)
2669         https://bugs.webkit.org/show_bug.cgi?id=57756
2670
2671         Tests: fast/css/fontMetric-border-radius-null-crash.html
2672                fast/css/fontMetric-webkit-border-end-width-null-crash.html
2673
2674         * css/CSSStyleSelector.cpp:
2675         (WebCore::CSSStyleSelector::styleForElement): Added a call to Font::update
2676         so that our FontFallbackList is allocated if we ever need it when applying our
2677         style rules.
2678
2679 2011-06-09  Cary Clark  <caryclark@google.com>
2680
2681         Reviewed by Eric Seidel.
2682
2683         Create local CG context for Mac UI elements when Skia is renderer
2684         https://bugs.webkit.org/show_bug.cgi?id=62213
2685
2686         When building Mac Chrome using Skia as the WebKit renderer,
2687         add state to LocalCurrentGraphicsContext to convert the SkCanvas
2688         context passed by WebKit into the CGContext needed by UI
2689         rendering.
2690
2691         No new tests.  The define typo in question is
2692         not yet enabled, so this change has no functional
2693         impact.
2694
2695         * platform/mac/LocalCurrentGraphicsContext.h:
2696         Add SkiaBitLocker to create and release the converted CGContext.
2697         Add ContextContainer, a class for Skia to create and release
2698         the converted CGContext. If Skia is not used, the class has no effect.
2699
2700         * platform/mac/LocalCurrentGraphicsContext.mm:
2701         (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext):
2702         When building with Skia, create the CGContext before passing it on.
2703
2704         (WebCore::LocalCurrentGraphicsContext::cgContext):
2705         Get the CGContext from the SkiaBitLocker, or the saved context,
2706         as appropriate.
2707
2708         * rendering/RenderThemeMac.mm:
2709         Get the CGContext from Skia conversion or native, as appropriate.
2710         Use the LocalCurrentGraphicsContext if there is one. Otherwise,
2711         add a ContextContainer to house the SkCanvas to CGContext conversion.
2712
2713         (WebCore::RenderThemeMac::paintCapsLockIndicator):
2714         (WebCore::RenderThemeMac::paintProgressBar):
2715         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2716         (WebCore::RenderThemeMac::paintSliderTrack):
2717         (WebCore::RenderThemeMac::paintMediaFullscreenButton):
2718         (WebCore::RenderThemeMac::paintMediaMuteButton):
2719         (WebCore::RenderThemeMac::paintMediaPlayButton):
2720         (WebCore::RenderThemeMac::paintMediaSeekBackButton):
2721         (WebCore::RenderThemeMac::paintMediaSeekForwardButton):
2722         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2723         (WebCore::RenderThemeMac::paintMediaSliderThumb):
2724         (WebCore::RenderThemeMac::paintMediaRewindButton):
2725         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
2726         (WebCore::RenderThemeMac::paintMediaToggleClosedCaptionsButton):
2727         (WebCore::RenderThemeMac::paintMediaControlsBackground):
2728         (WebCore::RenderThemeMac::paintMediaCurrentTime):
2729         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
2730         (WebCore::RenderThemeMac::paintMediaVolumeSliderContainer):
2731         (WebCore::RenderThemeMac::paintMediaVolumeSliderTrack):
2732         (WebCore::RenderThemeMac::paintMediaVolumeSliderThumb):
2733
2734 2011-06-02  Jer Noble  <jer.noble@apple.com>
2735
2736         Reviewed by Maciej Stachowiak.
2737
2738         REGRESSION: Page layout messed up after exiting full screen after video ends at jerryseinfeld.com
2739         https://bugs.webkit.org/show_bug.cgi?id=61911
2740         <rdar://problem/9523017>
2741
2742         Test: fullscreen/full-screen-video-offset.html
2743
2744         When the video element is taken full-screen in the new element full-screen API, return the
2745         offset width and height of the placeholder renderer which is filling in for the full-screen
2746         element.  To do so, override offsetWidth, Height, Left, and Top from Element.  These are
2747         non-virtual functions, so make them virtual.
2748
2749         * dom/Element.cpp:
2750         (WebCore::Element::adjustForLocalZoom): Made into a class-static function.
2751         * dom/Element.h: Made offset functions virtual.
2752         * html/HTMLMediaElement.cpp:
2753         (WebCore::elementPlaceholder): Added; utility function.
2754         (WebCore::HTMLMediaElement::offsetLeft): Added; virtual override of the 
2755             Element function. Will be called directly via javascript.
2756         (WebCore::HTMLMediaElement::offsetTop): Ditto.
2757         (WebCore::HTMLMediaElement::offsetWidth): Ditto.
2758         (WebCore::HTMLMediaElement::offsetHeight): Ditto.
2759         * html/HTMLMediaElement.h:
2760
2761 2011-06-09  Dave Tapuska  <dtapuska@rim.com>
2762
2763         Reviewed by Daniel Bates.
2764
2765         PingLoader destructor could dereference 0 if the Resource
2766         Handle creation failed.
2767
2768         https://bugs.webkit.org/show_bug.cgi?id=62304
2769
2770         * loader/PingLoader.cpp:
2771         (WebCore::PingLoader::~PingLoader):
2772
2773 2011-06-08  Abhishek Arya  <inferno@chromium.org>
2774
2775         Reviewed by Ryosuke Niwa.
2776
2777         Make indexForVisiblePosition and isSelectableElement static.
2778         https://bugs.webkit.org/show_bug.cgi?id=62329
2779
2780         This protects us when converting frame->selection->start() or end()
2781         to VisiblePosition which blows away the RenderTextControl from
2782         underneath (due to layout update).
2783
2784         Test: fast/forms/text-control-selection-crash.html
2785
2786         * accessibility/AccessibilityRenderObject.cpp:
2787         (WebCore::AccessibilityRenderObject::indexForVisiblePosition):
2788         * rendering/RenderTextControl.cpp:
2789         (WebCore::RenderTextControl::selectionStart):
2790         (WebCore::RenderTextControl::selectionEnd):
2791         (WebCore::RenderTextControl::isSelectableElement):
2792         (WebCore::RenderTextControl::indexForVisiblePosition):
2793         * rendering/RenderTextControl.h:
2794
2795 2011-06-09  Ben Murdoch  <benm@google.com>
2796
2797         Reviewed by Yury Semikhatsky.
2798
2799         Build break in ScriptProfile.cpp and inspector disabled.
2800         https://bugs.webkit.org/show_bug.cgi?id=62373
2801
2802         No new tests - build fix only.
2803
2804         * bindings/v8/ScriptProfile.cpp: Add necessary guards.
2805         * bindings/v8/ScriptProfile.h: ditto.
2806
2807 2011-06-09  Vsevolod Vlasov  <vsevik@chromium.org>
2808
2809         Reviewed by Yury Semikhatsky.
2810
2811         Web Inspector: Network panel preview tab does not reattach SourceFrame when switching between preview and response tabs.
2812         https://bugs.webkit.org/show_bug.cgi?id=62298
2813
2814         * inspector/front-end/ResourcePreviewView.js:
2815         (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown.callback):
2816         (WebInspector.ResourcePreviewView.prototype._ensureInnerViewShown):
2817
2818 2011-06-09  Csaba Osztrogonác  <ossy@webkit.org>
2819
2820         [Qt][Mac] Speculative buildfix after r88286.
2821
2822         * platform/graphics/IntPoint.h:
2823
2824 2011-06-09  Mike Lawther  <mikelawther@chromium.org>
2825
2826         Reviewed by Kent Tamura.
2827
2828         Parsing issue with -webkit-calc
2829         https://bugs.webkit.org/show_bug.cgi?id=62276
2830
2831         Set the CSSParserString for the calc functions.
2832
2833         Test: css3/calc/regression-62276.html
2834
2835         * css/CSSParser.cpp:
2836         (WebCore::CSSParser::lex):
2837
2838 2011-06-09  Robert Hogan  <robert@webkit.org>
2839
2840         Reviewed by Andreas Kling.
2841
2842         Teach Qt about window.internals
2843         https://bugs.webkit.org/show_bug.cgi?id=61074
2844
2845         A weakness of the Qt DRT setup is that things like JSContextRef are abstracted
2846         away from the QtWebKit API so we need DumpRenderTreeSupportQt to access WebCore internals.
2847         Since the window.internals object requires JSContextRef we need to implement it in DumpRenderTreeSupportQt
2848         where we can access it. DumpRenderTreeSupportQt cannot be compiled outside Qt's WebCore and as it
2849         is our only possible route into the WebCoreTestSupport class neither can the new window.internals plumbing.
2850         Likewise we can't put the accessor in WebCoreTestSupport because it would then need to know about QWebFrame
2851         and others. The only alternative seems like a compile time guard which we would have to teach the bots about.
2852
2853         * CodeGenerators.pri:
2854         * WebCore.pri:
2855         * WebCore.pro:
2856
2857 2011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
2858
2859         Reviewed by Pavel Feldman.
2860
2861         Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
2862         https://bugs.webkit.org/show_bug.cgi?id=52791
2863
2864         No new tests. The problem can be reproduced by trying to create InspectorValue
2865         from 1.0e-100 and call ->toJSONString() on this.
2866
2867         * inspector/InspectorValues.cpp:
2868         (WebCore::InspectorBasicValue::writeJSON):
2869         Added checking the predicted buffer size and choosing exponential format, or
2870         eventually "NaN" if the buffer is too small for decimal format.
2871
2872 2011-06-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2873
2874         Unreviewed, rolling out r88387.
2875         http://trac.webkit.org/changeset/88387
2876         https://bugs.webkit.org/show_bug.cgi?id=62368
2877
2878         New tests introduced in 88387 fail on Leopard,GTK,Qt bots
2879         (Requested by Ossy on #webkit).
2880
2881         * html/canvas/CanvasRenderingContext.cpp:
2882         (WebCore::CanvasRenderingContext::checkOrigin):
2883         * html/canvas/CanvasRenderingContext.h:
2884         * html/canvas/WebGLRenderingContext.cpp:
2885         (WebCore::WebGLRenderingContext::readPixels):
2886         (WebCore::WebGLRenderingContext::texImage2D):
2887         (WebCore::WebGLRenderingContext::videoFrameToImage):
2888         (WebCore::WebGLRenderingContext::texSubImage2D):
2889         * html/canvas/WebGLRenderingContext.h:
2890
2891 2011-06-09  Adam Barth  <abarth@webkit.org>
2892
2893         Reviewed by Eric Seidel.
2894
2895         Running script from attach can remove elements from the stack of open elements
2896         https://bugs.webkit.org/show_bug.cgi?id=62160
2897
2898         When the tree build runs script synchronously, that script can remove
2899         arbitrary elements from the stack of open elements.  We need to hold a
2900         reference to |parent| in attach instead of rely upon the reference in
2901         the stack of open elements.
2902
2903         Test: fast/parser/document-write-onload-clear.html
2904
2905         * html/parser/HTMLConstructionSite.cpp:
2906         (WebCore::HTMLConstructionSite::attach):
2907
2908 2011-06-08  Luke Macpherson   <macpherson@chromium.org>
2909
2910         Reviewed by Eric Seidel.
2911
2912         Make CSSPrimitiveValue support cast to EVerticalAlign.
2913         https://bugs.webkit.org/show_bug.cgi?id=62356
2914
2915         No new tests / refactoring only.
2916
2917         * css/CSSPrimitiveValueMappings.h:
2918         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2919         (WebCore::CSSPrimitiveValue::operator EVerticalAlign):
2920         * css/CSSStyleSelector.cpp:
2921         (WebCore::CSSStyleSelector::applyProperty):
2922
2923 2011-06-08  Justin Novosad  <junov@chromium.org>
2924
2925         Reviewed by James Robinson.
2926
2927         [Chromium] Crash when closing a tab with accelerated 2d canvas
2928         https://bugs.webkit.org/show_bug.cgi?id=62324
2929         Upon graphics context destruction, it is important to signal skia
2930         to abandon all of its resource handles.  This prevents a crash caused
2931         by skia attempting to release resources that were in the destroyed
2932         graphics context.
2933
2934         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
2935         (WebCore::SharedGraphicsContext3D::~SharedGraphicsContext3D):
2936
2937 2011-06-08  James Robinson  <jamesr@chromium.org>
2938
2939         Reviewed by Darin Fisher.
2940
2941         REGRESSION(88260): 10-50% performance regression across many page cyclers
2942         https://bugs.webkit.org/show_bug.cgi?id=62349
2943
2944         r88260 fixed a font cache resource leak and lowered the inactive font cache threshold.  The latter caused a
2945         significant performance regression across many chromium page cyclers, for example
2946         http://build.chromium.org/f/chromium/perf/linux-release-webkit-latest/moz/report.html?history=50&rev=88279.
2947
2948         This restores the previous inactive font size thresholds to their previous values, but retains the font cleanup
2949         logic.
2950
2951         * platform/graphics/FontCache.cpp:
2952
2953 2011-06-08  Hayato Ito  <hayato@chromium.org>
2954
2955         Reviewed by Dimitri Glazkov.
2956
2957         A forward/backward tab traversal now visits focusable elements in a shadow root.
2958         https://bugs.webkit.org/show_bug.cgi?id=61410
2959
2960         Test: fast/dom/shadow/tab-order-iframe-and-shadow.html
2961
2962         Like a iframe element, a shadow host becomes a scope of
2963         tabindex. That means all descendant elements in a shadow root are
2964         skipped if the host node of the shadow root is not focusable.
2965
2966         The patch doesn't affect HTMLInputElement and HTMLTextAreaElement,
2967         which uses a shadow root and do extra works in their focus()
2968         method.
2969
2970         A shadow root's <content> is not considered in this patch.
2971         That will be addressed in a following patch.
2972
2973         * page/FocusController.cpp:
2974         (WebCore::shadowRoot):
2975         (WebCore::isTreeScopeOwner):
2976         (WebCore::FocusController::deepFocusableNode):
2977         (WebCore::FocusController::advanceFocusInDocumentOrder):
2978         (WebCore::FocusController::findFocusableNodeAcrossTreeScope):
2979         (WebCore::FocusController::findFocusableNode):
2980         (WebCore::FocusController::nextFocusableNode):
2981         (WebCore::FocusController::previousFocusableNode):
2982         (WebCore::FocusController::ownerOfTreeScope):
2983         * page/FocusController.h:
2984
2985 2011-06-08  Hayato Ito  <hayato@chromium.org>
2986
2987         Reviewed by Hajime Morita.
2988
2989         Makes sure that document.activeElement won't be an element in shadow root.
2990
2991         https://bugs.webkit.org/show_bug.cgi?id=61413
2992
2993         Test: fast/dom/shadow/activeelement-should-be-shadowhost.html
2994
2995         * html/HTMLDocument.cpp:
2996         (WebCore::focusedFrameOwnerElement):
2997         (WebCore::HTMLDocument::activeElement):
2998
2999 2011-06-08  Kent Tamura  <tkent@chromium.org>
3000
3001         Reviewed by Dimitri Glazkov.
3002
3003         Allow drawing a slider thumb for any nodes.
3004         https://bugs.webkit.org/show_bug.cgi?id=62196
3005
3006         RenderObject::node() should provide various information which is
3007         necessary for rendering. We don't need to refer the parent renderer.
3008
3009         * dom/Node.cpp:
3010         (WebCore::Node::focusDe1egate): Added.
3011         * dom/Node.h: Added a declaration.
3012         * html/shadow/MediaControlElements.cpp:
3013         (WebCore::toParentMediaElement):
3014           Added an overload of toParentMediaElement() with Node* parameter.
3015         * html/shadow/MediaControlElements.h:
3016         (WebCore::toParentMediaElement): ditto.
3017         * html/shadow/SliderThumbElement.cpp:
3018         (WebCore::SliderThumbElement::isEnabledFormControl):
3019           Returns the status of the host node.
3020         (WebCore::SliderThumbElement::isReadOnlyFormControl): ditto.
3021         (WebCore::SliderThumbElement::focusDe1egate):
3022           Returns the host node so that RenderTheme::isFocused() returns true.
3023         (WebCore::SliderThumbElement::detach): Style nit.
3024         (WebCore::SliderThumbElement::hostInput):
3025           Make it const because it is called by const functions.
3026         * html/shadow/SliderThumbElement.h:
3027           - Remove inDragMode()
3028           - Update declarations
3029         * platform/qt/RenderThemeQt.cpp:
3030         (WebCore::RenderThemeQt::paintMediaSliderThumb):
3031           Use Node::shadowAncestorNode() instead of RenderObject::parent() to
3032           support deeper thumb nodes.
3033         * rendering/RenderMediaControlsChromium.cpp:
3034         (WebCore::paintMediaSliderThumb): ditto.
3035         (WebCore::paintMediaVolumeSliderThumb): Remove isSlider() check.
3036         * rendering/RenderSlider.cpp:
3037         (WebCore::RenderSlider::inDragMode):
3038           SliderThumbElement::inDragMode() was removed, and Node::active() has
3039           the same information.
3040         * rendering/RenderTheme.cpp:
3041         (WebCore::RenderTheme::paint): Remove isSlider() checks.
3042         (WebCore::RenderTheme::isFocused): Apply Node::focusDelegate().
3043         * rendering/RenderThemeChromiumLinux.cpp:
3044         (WebCore::RenderThemeChromiumLinux::paintSliderThumb):
3045           isPressed() is enough.
3046         * rendering/RenderThemeChromiumWin.cpp:
3047           isEnabled(), isFocused(), and isPressed() are enough.
3048         (WebCore::RenderThemeChromiumWin::determineSliderThumbState):
3049         (WebCore::RenderThemeChromiumWin::determineClassicState):
3050         * rendering/RenderThemeMac.mm:
3051         (WebCore::RenderThemeMac::paintSliderThumb):
3052           - Remove isSlider() check.
3053           - Passing 'o' to udpateFooState functions is enough.
3054           - isPressed() is enough.
3055         * rendering/RenderThemeSafari.cpp:
3056         (WebCore::RenderThemeSafari::paintSliderThumb):
3057           We don't need special handling anymore.
3058         * rendering/RenderThemeWin.cpp:
3059         (WebCore::RenderThemeWin::determineSliderThumbState):
3060           isEnabled(), isFocused(), and isPressed() are enough.
3061
3062 2011-06-08  Adam Barth  <abarth@webkit.org>
3063
3064         Reviewed by Eric Seidel.
3065
3066         constructTreeFromToken can re-enter parser, causing ASSERTs
3067         https://bugs.webkit.org/show_bug.cgi?id=62160
3068
3069         This patch clears the HTMLToken before constructing the tree from the
3070         token, putting the HTMLDocumentParser in a good state to be re-entered.
3071
3072         Tests: fast/parser/document-write-onload-nesting.html
3073                fast/parser/document-write-onload-ordering.html
3074
3075         * html/parser/HTMLDocumentParser.cpp:
3076         (WebCore::HTMLDocumentParser::pumpTokenizer):
3077         * html/parser/HTMLToken.h:
3078         (WebCore::HTMLToken::isUninitialized):
3079         * html/parser/HTMLTreeBuilder.cpp:
3080         (WebCore::HTMLTreeBuilder::constructTreeFromToken):
3081
3082 2011-06-08  Kent Tamura  <tkent@chromium.org>
3083
3084         Fix Qt build for r88405.
3085         https://bugs.webkit.org/show_bug.cgi?id=62208
3086
3087         * platform/qt/RenderThemeQt.h:
3088
3089 2011-06-08  Kent Tamura  <tkent@chromium.org>
3090
3091         Reviewed by Dimitri Glazkov.
3092
3093         Change the argument of RenderTheme::adjustSliderThumbSize(): RenderObject* -> RenderStyle*
3094         https://bugs.webkit.org/show_bug.cgi?id=62208
3095
3096         Change the argument type of RenderTheme::adjustSliderThumbSize() and
3097         RenderMediaControls::adjustMediaSliderThumbSize() from RenderObject* to RenderStyle*.
3098
3099         Also, each of adjustSliderThumbStyle() overrides calls RenderTheme::
3100         adjustSliderThumbStyle() for future changes.
3101
3102         No new tests. This is a refactoring and should not change any behavior.
3103
3104         * html/shadow/SliderThumbElement.cpp:
3105         (WebCore::RenderSliderThumb::layout): Passing RenderStyle* and remove a FIXME comment.
3106         * platform/efl/RenderThemeEfl.cpp:
3107         (WebCore::RenderThemeEfl::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle().
3108         * platform/gtk/RenderThemeGtk.cpp:
3109         (WebCore::RenderThemeGtk::adjustSliderThumbStyle): ditto.
3110         (WebCore::RenderThemeGtk::adjustMediaSliderThumbSize):
3111         * platform/gtk/RenderThemeGtk.h:
3112         * platform/gtk/RenderThemeGtk2.cpp:
3113         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
3114         * platform/gtk/RenderThemeGtk3.cpp:
3115         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
3116         * platform/qt/RenderThemeQt.cpp:
3117         (WebCore::RenderThemeQt::adjustSliderThumbStyle): ditto.
3118         (WebCore::RenderThemeQt::adjustSliderThumbSize):
3119         * rendering/RenderMediaControls.cpp:
3120         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
3121         * rendering/RenderMediaControls.h:
3122         * rendering/RenderMediaControlsChromium.cpp:
3123         (WebCore::RenderMediaControlsChromium::adjustMediaSliderThumbSize):
3124         * rendering/RenderMediaControlsChromium.h:
3125         * rendering/RenderSlider.cpp:
3126         (WebCore::RenderSlider::layout): Passing RenderStyle* and remove a FIXME comment.
3127         * rendering/RenderTheme.cpp:
3128         (WebCore::RenderTheme::adjustSliderThumbStyle): Add a comment.
3129         (WebCore::RenderTheme::adjustSliderThumbSize):
3130         * rendering/RenderTheme.h:
3131         * rendering/RenderThemeChromiumLinux.cpp:
3132         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
3133         * rendering/RenderThemeChromiumLinux.h:
3134         * rendering/RenderThemeChromiumMac.h:
3135         * rendering/RenderThemeChromiumMac.mm:
3136         (WebCore::RenderThemeChromiumMac::adjustMediaSliderThumbSize):
3137         * rendering/RenderThemeChromiumSkia.cpp:
3138         (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
3139         * rendering/RenderThemeChromiumSkia.h:
3140         * rendering/RenderThemeChromiumWin.cpp:
3141         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
3142         * rendering/RenderThemeChromiumWin.h:
3143         * rendering/RenderThemeMac.h:
3144         * rendering/RenderThemeMac.mm:
3145         (WebCore::RenderThemeMac::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle().
3146         (WebCore::RenderThemeMac::adjustSliderThumbSize):
3147         (WebCore::RenderThemeMac::adjustMediaSliderThumbSize):
3148         * rendering/RenderThemeSafari.cpp:
3149         (WebCore::RenderThemeSafari::adjustSliderThumbStyle): Calls RenderTheme::adjustSliderThumbStyle().
3150         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
3151         * rendering/RenderThemeSafari.h:
3152         * rendering/RenderThemeWin.cpp:
3153         (WebCore::RenderThemeWin::adjustSliderThumbSize):
3154         * rendering/RenderThemeWin.h:
3155         * rendering/RenderThemeWinCE.cpp:
3156         (WebCore::RenderThemeWinCE::adjustSliderThumbSize):
3157         * rendering/RenderThemeWinCE.h:
3158
3159 2011-06-08  Brian Salomon  <bsalomon@google.com>
3160
3161         Reviewed by James Robinson.
3162
3163         Avoid always binding FBO 0 implicitly when deleting FBO in DrawingBuffer code because it invalidates Ganesh's cache of the current FBO.
3164         https://bugs.webkit.org/show_bug.cgi?id=62318
3165
3166         Chromium-only crash
3167         Failures takes multiple seconds to occur, relying on JS garbage-collection to occur 
3168         http://www.hotbazooka.com/privatejoe-large
3169
3170         * platform/graphics/gpu/DrawingBuffer.cpp:
3171         (WebCore::DrawingBuffer::clear):
3172
3173 2011-06-08  Emil A Eklund  <eae@chromium.org>
3174
3175         Reviewed by Eric Seidel.
3176
3177         RenderEmbeddedObject::getReplacementTextGeometry
3178         https://bugs.webkit.org/show_bug.cgi?id=62313
3179
3180         Replace the last use of tx, ty with IntPoint.
3181
3182         Covered by existing tests.
3183
3184         * platform/graphics/FloatRect.h:
3185         (WebCore::FloatRect::move):
3186         (WebCore::FloatRect::moveBy):
3187         * rendering/RenderEmbeddedObject.cpp:
3188         (WebCore::RenderEmbeddedObject::paintReplaced):
3189         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
3190         (WebCore::RenderEmbeddedObject::isInMissingPluginIndicator):
3191         * rendering/RenderEmbeddedObject.h:
3192
3193 2011-06-08  Tim Horton  <timothy_horton@apple.com>
3194
3195         Reviewed by Ryosuke Niwa.
3196
3197         Use correct CFURLStorageSessionRef definition on Leopard, as
3198         we created an inconsistency in const-ness between
3199         WebCoreSystemInterface.h and these two files in the case
3200         of Leopard only.
3201         https://bugs.webkit.org/show_bug.cgi?id=62223
3202
3203         * platform/network/ResourceHandle.h:
3204         * platform/network/cf/ResourceRequest.h:
3205
3206 2011-06-08  Sailesh Agrawal  <sail@chromium.org>
3207
3208         Reviewed by Mihai Parparita.
3209
3210         Chromium Mac: Enable overlay scrollbars
3211         https://bugs.webkit.org/show_bug.cgi?id=59756
3212
3213         Sync ScrollbarThemeChromiumMac.mm/.h with ScrollbarThemeMac.mm to pick up support for overlay scrollbars. The only changes are renaming ScrollbarThemeMac to ScrollbarThemeChromiumMac and using runtime checks instead of #ifdef's.
3214
3215         No new tests, since this code is only enabled on future versions of Mac OS X.
3216
3217         * platform/chromium/ScrollAnimatorChromiumMac.mm: All changes to this file except in scroll() were to swap #if USE(WK_SCROLLBAR_PAINTER) with runtime checks.
3218         (WebCore::ScrollAnimatorChromiumMac::ScrollAnimatorChromiumMac):
3219         (WebCore::ScrollAnimatorChromiumMac::~ScrollAnimatorChromiumMac):
3220         (WebCore::ScrollAnimatorChromiumMac::notityPositionChanged):
3221         (WebCore::ScrollAnimatorChromiumMac::contentAreaWillPaint):
3222         (WebCore::ScrollAnimatorChromiumMac::mouseEnteredContentArea):
3223         (WebCore::ScrollAnimatorChromiumMac::mouseExitedContentArea):
3224         (WebCore::ScrollAnimatorChromiumMac::mouseMovedInContentArea):
3225         (WebCore::ScrollAnimatorChromiumMac::willStartLiveResize):
3226         (WebCore::ScrollAnimatorChromiumMac::contentsResized):
3227         (WebCore::ScrollAnimatorChromiumMac::willEndLiveResize):
3228         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidShow):
3229         (WebCore::ScrollAnimatorChromiumMac::contentAreaDidHide):
3230         (WebCore::ScrollAnimatorChromiumMac::didBeginScrollGesture):
3231         (WebCore::ScrollAnimatorChromiumMac::didEndScrollGesture):
3232         (WebCore::ScrollAnimatorChromiumMac::didAddVerticalScrollbar):
3233         (WebCore::ScrollAnimatorChromiumMac::willRemoveVerticalScrollbar):
3234         (WebCore::ScrollAnimatorChromiumMac::didAddHorizontalScrollbar):
3235         (WebCore::ScrollAnimatorChromiumMac::willRemoveHorizontalScrollbar):
3236         (WebCore::ScrollAnimatorChromiumMac::cancelAnimations):
3237         * platform/chromium/ScrollbarOverlayUtilitiesChromiumMac.mm:
3238         (preferredScrollerStyle): Disabled overlay scrollbar styles due to trailing artifacts.
3239         (wkScrollbarPainterPaint): Fixed a problem where the scrollbar track wasn't being drawn.
3240         (wkScrollbarPainterKnobRect): Implemented a previously unimplemented function.
3241         (wkSetScrollbarPainterKnobStyle): Implemented a function that's now supported by the latest Mac OS X seeds.
3242         (isScrollbarOverlayAPIAvailable): Enabled new scrollbar code.
3243         * platform/chromium/ScrollbarThemeChromiumMac.h:
3244         * platform/chromium/ScrollbarThemeChromiumMac.mm: Sync with ScrollbarThemeMac.mm.
3245         (WebCore::scrollbarMap):
3246         (+[ScrollbarPrefsObserver appearancePrefsChanged:]):
3247         (WebCore::updateArrowPlacement):
3248         (WebCore::ScrollbarThemeChromiumMac::registerScrollbar):
3249         (WebCore::ScrollbarThemeChromiumMac::unregisterScrollbar):
3250         (WebCore::ScrollbarThemeChromiumMac::setNewPainterForScrollbar):
3251         (WebCore::ScrollbarThemeChromiumMac::painterForScrollbar):
3252         (WebCore::ScrollbarThemeChromiumMac::scrollbarThickness):
3253         (WebCore::ScrollbarThemeChromiumMac::usesOverlayScrollbars):
3254         (WebCore::ScrollbarThemeChromiumMac::hasButtons):
3255         (WebCore::ScrollbarThemeChromiumMac::hasThumb):
3256         (WebCore::buttonRepaintRect):
3257         (WebCore::ScrollbarThemeChromiumMac::minimumThumbLength):
3258         (WebCore::ScrollbarThemeChromiumMac::shouldDragDocumentInsteadOfThumb):
3259         (WebCore::toScrollbarPainterKnobStyle):
3260         (WebCore::ScrollbarThemeChromiumMac::paint):
3261
3262 2011-06-06  Nate Chapin  <japhet@chromium.org>
3263
3264         Reviewed by Adam Barth.
3265
3266         Remove all knowledge of CachedResourceRequests from
3267         CachedResourceLoader. This puts the full burden of
3268         canceling these requests on DocumentLoader (via
3269         SubresourceLoader), and makes a CachedResourceRequest
3270         an OwnPtr in CachedResource.
3271
3272         https://bugs.webkit.org/show_bug.cgi?id=62308
3273
3274         * loader/FrameLoader.cpp:
3275         (WebCore::FrameLoader::stopLoading):
3276         * loader/cache/CachedResource.cpp:
3277         (WebCore::CachedResource::CachedResource):
3278         (WebCore::CachedResource::load):
3279         (WebCore::CachedResource::stopLoading):
3280         * loader/cache/CachedResource.h:
3281         * loader/cache/CachedResourceLoader.cpp:
3282         (WebCore::CachedResourceLoader::~CachedResourceLoader):
3283         (WebCore::CachedResourceLoader::loadDone):
3284         * loader/cache/CachedResourceLoader.h:
3285         * loader/cache/CachedResourceRequest.cpp:
3286         (WebCore::CachedResourceRequest::CachedResourceRequest):
3287         (WebCore::CachedResourceRequest::~CachedResourceRequest):
3288         (WebCore::CachedResourceRequest::load):
3289         (WebCore::CachedResourceRequest::didFinishLoading):
3290         (WebCore::CachedResourceRequest::didFail):
3291         (WebCore::CachedResourceRequest::didReceiveResponse):
3292         (WebCore::CachedResourceRequest::end):
3293         * loader/cache/CachedResourceRequest.h:
3294
3295 2011-06-08  Mike Reed  <reed@google.com>
3296
3297         Reviewed by James Robinson.
3298
3299         [Skia] check for null-shader from gradient factory
3300         https://bugs.webkit.org/show_bug.cgi?id=62319
3301
3302         * platform/graphics/skia/GradientSkia.cpp:
3303         (WebCore::Gradient::platformDestroy):
3304         (WebCore::Gradient::platformGradient):
3305
3306 2011-06-08  Kenneth Russell  <kbr@google.com>
3307
3308         Reviewed by Adam Barth.
3309
3310         Disallow use of cross-domain media (images, video) in WebGL
3311         https://bugs.webkit.org/show_bug.cgi?id=62257
3312
3313         Updated WebGL implementation to track recent spec updates in this area.
3314
3315         Tests: http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html
3316                http/tests/security/webgl-remote-read-remote-image-allowed.html
3317                http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html
3318
3319         * html/canvas/CanvasRenderingContext.cpp:
3320         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
3321         (WebCore::CanvasRenderingContext::checkOrigin):
3322         * html/canvas/CanvasRenderingContext.h:
3323         (WebCore::CanvasRenderingContext::checkOrigin):
3324         * html/canvas/WebGLRenderingContext.cpp:
3325         (WebCore::WebGLRenderingContext::readPixels):
3326         (WebCore::WebGLRenderingContext::texImage2D):
3327         (WebCore::WebGLRenderingContext::videoFrameToImage):
3328         (WebCore::WebGLRenderingContext::texSubImage2D):
3329         * html/canvas/WebGLRenderingContext.h:
3330
3331 2011-06-08  John Bauman  <jbauman@chromium.org>
3332
3333         Reviewed by James Robinson.
3334
3335         Only draw portions of tiles in contentRect
3336         https://bugs.webkit.org/show_bug.cgi?id=62243
3337
3338         Old garbage data can remain in tiles, so make sure to draw only those
3339         portions that are supposed to be drawn.
3340
3341         Test: compositing/repaint/shrink-layer.html
3342
3343         * platform/graphics/chromium/LayerTilerChromium.cpp:
3344         (WebCore::LayerTilerChromium::draw):
3345
3346 2011-06-08  Emil A Eklund  <eae@chromium.org>
3347
3348         Reviewed by Eric Seidel.
3349
3350         Convert RenderBlock::isPointInOverflowControl to IntPoint
3351         https://bugs.webkit.org/show_bug.cgi?id=62312
3352
3353         Covered by existing tests.
3354
3355         * rendering/RenderBlock.cpp:
3356         (WebCore::RenderBlock::isPointInOverflowControl):
3357         (WebCore::RenderBlock::nodeAtPoint):
3358         * rendering/RenderBlock.h:
3359         * rendering/RenderListBox.cpp:
3360         (WebCore::RenderListBox::isPointInOverflowControl):
3361         * rendering/RenderListBox.h:
3362
3363 2011-06-08  James Simonsen  <simonjam@chromium.org>
3364
3365         Reviewed by Tony Gentilcore.
3366
3367         Fix clang issue, virtual function const mismatch
3368         https://bugs.webkit.org/show_bug.cgi?id=62307
3369
3370         No new tests. Built with clang & ran layout tests.
3371
3372         * page/MediaStreamFrameController.h:
3373         (WebCore::MediaStreamFrameController::GenericClient::isGenericClient):
3374
3375 2011-06-08  Chris Rogers  <crogers@google.com>
3376
3377         Reviewed by Kenneth Russell.
3378
3379         Implement BiquadFilterNode for filter types: LOWPASS, HIGHPASS, BANDPASS, LOWSHELF, HIGHSHELF, PEAKING, NOTCH, ALLPASS
3380         https://bugs.webkit.org/show_bug.cgi?id=62078
3381
3382         No new tests since audio API is not yet implemented.
3383
3384         * DerivedSources.make:
3385         * WebCore.gypi:
3386         * WebCore.xcodeproj/project.pbxproj:
3387         * platform/audio/Biquad.cpp:
3388         (WebCore::Biquad::Biquad):
3389         (WebCore::Biquad::reset):
3390         (WebCore::Biquad::setLowpassParams):
3391         (WebCore::Biquad::setHighpassParams):
3392         (WebCore::Biquad::setNormalizedCoefficients):
3393         (WebCore::Biquad::setLowShelfParams):
3394         (WebCore::Biquad::setHighShelfParams):
3395         (WebCore::Biquad::setPeakingParams):
3396         (WebCore::Biquad::setAllpassParams):
3397         (WebCore::Biquad::setNotchParams):
3398         (WebCore::Biquad::setBandpassParams):
3399         (WebCore::Biquad::setZeroPolePairs):
3400         (WebCore::Biquad::setAllpassPole):
3401         * platform/audio/Biquad.h:
3402         * webaudio/AudioContext.cpp:
3403         (WebCore::AudioContext::createBiquadFilter):
3404         (WebCore::AudioContext::createLowPass2Filter):
3405         (WebCore::AudioContext::createHighPass2Filter):
3406         * webaudio/AudioContext.h:
3407         * webaudio/AudioContext.idl:
3408         * webaudio/AudioNode.h:
3409         * webaudio/BiquadDSPKernel.cpp:
3410         (WebCore::BiquadDSPKernel::process):
3411         * webaudio/BiquadFilterNode.cpp: Added.
3412         (WebCore::BiquadFilterNode::BiquadFilterNode):
3413         * webaudio/BiquadFilterNode.h: Added.
3414         (WebCore::BiquadFilterNode::create):
3415         (WebCore::BiquadFilterNode::type):
3416         (WebCore::BiquadFilterNode::setType):
3417         (WebCore::BiquadFilterNode::frequency):
3418         (WebCore::BiquadFilterNode::q):
3419         (WebCore::BiquadFilterNode::gain):
3420         (WebCore::BiquadFilterNode::biquadProcessor):
3421         * webaudio/BiquadFilterNode.idl: Added.
3422         * webaudio/BiquadProcessor.cpp:
3423         (WebCore::BiquadProcessor::BiquadProcessor):
3424         * webaudio/BiquadProcessor.h:
3425         (WebCore::BiquadProcessor::setType):
3426         * webaudio/HighPass2FilterNode.cpp:
3427         (WebCore::HighPass2FilterNode::HighPass2FilterNode):
3428         * webaudio/LowPass2FilterNode.cpp:
3429         (WebCore::LowPass2FilterNode::LowPass2FilterNode):
3430
3431 2011-06-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
3432
3433         Reviewed by Kenneth Rohde Christiansen.
3434
3435         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
3436         https://bugs.webkit.org/show_bug.cgi?id=61694
3437
3438         No new tests, code path is not activated yet.
3439
3440         * WebCore.xcodeproj/project.pbxproj: Changed the TransformOperation subclassed from "project" to "private"
3441
3442 2011-06-08  Tom Sepez  <tsepez@chromium.org>
3443
3444         Reviewed by Adam Barth.
3445
3446         Cause checks for insecure content blocking policy to callback to client.
3447         https://bugs.webkit.org/show_bug.cgi?id=61946
3448         Tests: platform/chromium/http/tests/security/mixedContent/insecure-image-in-main-frame-allowed.html
3449                platform/chromium/http/tests/security/mixedContent/insecure-image-in-main-frame-blocked.html
3450                platform/chromium/http/tests/security/mixedContent/insecure-script-in-main-frame-allowed.html
3451                platform/chromium/http/tests/security/mixedContent/insecure-script-in-main-frame-blocked.html
3452
3453         * loader/FrameLoader.cpp:
3454         (WebCore::FrameLoader::checkIfDisplayInsecureContent):
3455         (WebCore::FrameLoader::checkIfRunInsecureContent):
3456         * loader/FrameLoaderClient.h:
3457         (WebCore::FrameLoaderClient::allowDisplayingInsecureContent):
3458         (WebCore::FrameLoaderClient::allowRunningInsecureContent):
3459
3460 2011-06-08  Kevin Ollivier  <kevino@theolliviers.com>
3461
3462         [wx] Build fix after introduction of FontCache::ShouldRetain
3463
3464         * platform/graphics/wx/FontCacheWx.cpp:
3465         (WebCore::FontCache::getFontDataForCharacters):
3466
3467 2011-06-08  Sheriff Bot  <webkit.review.bot@gmail.com>
3468
3469         Unreviewed, rolling out r88365.
3470         http://trac.webkit.org/changeset/88365
3471         https://bugs.webkit.org/show_bug.cgi?id=62301
3472
3473         windows bots broken (Requested by loislo_ on #webkit).
3474
3475         * inspector/InspectorValues.cpp:
3476         (WebCore::InspectorBasicValue::writeJSON):
3477
3478 2011-06-08  Mikołaj Małecki  <m.malecki@samsung.com>
3479
3480         Reviewed by Pavel Feldman.
3481
3482         Web Inspector: Crash by buffer overrun crash when serializing inspector object tree.
3483         https://bugs.webkit.org/show_bug.cgi?id=52791
3484
3485         No new tests. The problem can be reproduced by trying to create InspectorValue
3486         from 1.0e-100 and call ->toJSONString() on this.
3487
3488         * inspector/InspectorValues.cpp:
3489      &nbs