2011-04-22 Xiaomei Ji <xji@chromium.org>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-22  Xiaomei Ji  <xji@chromium.org>
2
3         Reviewed by Ryosuke Niwa.
4
5         move caret by word in visual order returns wrong result when caret itself is at word boundary.
6         https://bugs.webkit.org/show_bug.cgi?id=58504.
7
8         positionBeforeNextWord should take care that the current position is after current word.
9         positionAfterPreviousWord should take care that the current positin is before current word.
10
11         * editing/visible_units.cpp:
12         (WebCore::positionBeforeNextWord):
13         (WebCore::positionAfterPreviousWord):
14
15 2011-04-19  Jer Noble  <jer.noble@apple.com>
16
17         Reviewed by Daniel Bates.
18
19         Full Screen from within an <iframe> does not cause <iframe> to resize.
20         https://bugs.webkit.org/show_bug.cgi?id=58638
21
22         Tests: fullscreen/full-screen-frameset.html
23
24         * css/CSSStyleSelector.cpp:
25         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Add the 
26             -webkit-full-screen pseudo class to frame elements which contain
27             full screen elements.
28         * css/fullscreen.css:
29         (iframe:-webkit-full-screen): Add iframe-specific styling rules.
30         * dom/Document.cpp:
31         (WebCore::Document::setContainsFullScreenElementRecursively): Added.  Walk up each
32             successive document owner element, calling setContainsFullScreenElement() if 
33             owner is a frame element.
34         (WebCore::Document::fullScreenIsAllowedForElement): Use the new Element::isFrameElementBase
35             call instead of checking the element's tag name.
36         (WebCore::Document::webkitWillEnterFullScreenForElement): Mark any containing
37             iframes as containing a full screen element.
38         (WebCore::Document::webkitWillExitFullScreenForElement): Ditto.
39         * dom/Element.h:
40         (WebCore::Element::isFrameElementBase): Added.
41         * html/HTMLFrameElement.h:
42         (WebCore::HTMLFrameElement::allowFullScreen): Disable full screen from within
43             HTMLFrameElements.
44         * html/HTMLFrameElementBase.cpp:
45         (WebCore::HTMLFrameElementBase::setContainsFullScreenElement): Added.
46         * html/HTMLFrameElementBase.h:
47         (WebCore::HTMLFrameElementBase::containsFullScreenElement): Added.
48         (WebCore::HTMLFrameElementBase::isFrameElementBase): Added.
49
50 2011-04-22  Michael Saboff  <msaboff@apple.com>
51
52         Reviewed by Maciej Stachowiak.
53
54         Creating copy of ContainerNode's when inserting or removing is inefficient
55         https://bugs.webkit.org/show_bug.cgi?id=58695
56
57         Eliminated node copying in willRemove() and insertedIntoDocument().
58
59         No new tests as this is a more efficient implementation of
60         existing code that is covered by existing tests.
61
62         * dom/ContainerNode.cpp:
63         (WebCore::ContainerNode::willRemove): Changed method to use
64         RefPtr<> to protect against modification during removal.
65         (WebCore::ContainerNode::insertedIntoDocument): Changed method to use
66         RefPtr<> and two other deletion checks to protect against 
67         modification during insertion.
68
69 2011-04-22  Geoffrey Garen  <ggaren@apple.com>
70
71         Reviewed by Sam Weinig.
72
73         We have an autogenerator, so use it
74         https://bugs.webkit.org/show_bug.cgi?id=59247
75
76         * bindings/js/JSCSSRuleCustom.cpp:
77         * bindings/js/JSCSSRuleListCustom.cpp:
78         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
79         * bindings/js/JSCSSValueCustom.cpp:
80         * bindings/js/JSCanvasRenderingContextCustom.cpp:
81         * bindings/js/JSDOMImplementationCustom.cpp:
82         * bindings/js/JSDOMStringMapCustom.cpp:
83         * bindings/js/JSHTMLCollectionCustom.cpp:
84         * bindings/js/JSNamedNodeMapCustom.cpp:
85         * bindings/js/JSNodeCustom.h:
86         * bindings/js/JSNodeListCustom.cpp:
87         * bindings/js/JSStyleSheetCustom.cpp:
88         * bindings/js/JSStyleSheetListCustom.cpp: Removed repetitive hand-written code.
89
90         * bindings/scripts/CodeGeneratorJS.pm: Augmented autogenerator to do the job.
91
92         * css/CSSRule.idl:
93         * css/CSSRuleList.idl:
94         * css/CSSStyleDeclaration.idl:
95         * css/CSSValue.idl:
96         * css/MediaList.idl:
97         * css/StyleSheet.idl:
98         * css/StyleSheetList.idl:
99         * dom/DOMImplementation.idl:
100         * dom/DOMStringMap.idl:
101         * dom/NamedNodeMap.idl:
102         * dom/Node.idl:
103         * dom/NodeList.idl:
104         * html/DOMTokenList.idl:
105         * html/HTMLCollection.idl:
106         * html/canvas/CanvasRenderingContext.idl: Updated attributes to plug into
107         the autogenerator.
108
109 2011-04-22  Beth Dakin  <bdakin@apple.com>
110
111         Reviewed by Maciej Stachowiak.
112
113         https://bugs.webkit.org/show_bug.cgi?id=59223
114         REGRESSION (r82185): iframe not displayed after navigation back to cached page
115
116         Manual test added.
117         * manual-tests/frame-layout-on-back.html: Added.
118         * manual-tests/resources/empty-document-goes-back.html: Added.
119         * manual-tests/resources/simple-iframe.html: Added.
120
121 2011-04-22  Yael Aharon  <yael.aharon@nokia.com>
122
123         Reviewed by Sam Weinig.
124
125         HTMLFormControlElement::labels should allow custom attributes.
126         https://bugs.webkit.org/show_bug.cgi?id=59128
127
128         Cache the labels list when it is created and keep using it for future
129         labels calls.
130
131         Test: fast/forms/labels-custom-property.html
132
133         * html/HTMLFormControlElement.cpp:
134         (WebCore::HTMLFormControlElement::labels):
135
136 2011-04-22  Adrienne Walker  <enne@google.com>
137
138         Reviewed by James Robinson.
139
140         [chromium] Remove minimum texture size for compositor tiling
141         https://bugs.webkit.org/show_bug.cgi?id=59236
142
143         This was mistakenly committed in r83915 and causes bad filtering
144         on very small textures.
145
146         Tests: compositing/images/content-image-change.html
147
148         * platform/graphics/chromium/LayerTilerChromium.cpp:
149         (WebCore::LayerTilerChromium::setTileSize):
150
151 2011-04-22  Beth Dakin  <bdakin@apple.com>
152
153         Reviewed by Maciej Stachowiak.
154
155         https://bugs.webkit.org/show_bug.cgi?id=59223
156         REGRESSION (r82185): iframe not displayed after navigation back to cached page
157         -and corresponding-
158         <rdar://problem/9323763>
159
160         Cache the scroll position in Document::setInPageCache() instead of 
161         FrameView::resetScrollbarsAndClearContentsSize(), and only clear the contents size 
162         for the mainFrame(). Still resetScrollbars() for other frames, which matches pre-
163         r82185 code.
164         * dom/Document.cpp:
165         (WebCore::Document::setInPageCache):
166         * page/FrameView.cpp:
167         (WebCore::FrameView::resetScrollbarsAndClearContentsSize):
168
169 2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>
170
171         Reviewed by Kent Tamura.
172
173         Let the RenderTheme decide if an input type should have a spinner
174         https://bugs.webkit.org/show_bug.cgi?id=59246
175
176         Whether an input should have a spinner or not should
177         be a UI decision made by the RenderTheme. Remove
178         WebCore's default hasSpinButton values and defer
179         to the RenderTheme.
180
181         No change in functionality, covered by existing tests.
182
183         * html/HTMLInputElement.cpp:
184         (WebCore::HTMLInputElement::isRangeControl): expose isRangeControl
185         for possible RenderTheme queries.
186         * html/HTMLInputElement.h:
187
188         * rendering/RenderTextControlSingleLine.cpp:
189         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
190         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
191         For both of these ask the render theme if the input should
192         have a spinner.
193
194         * rendering/RenderTheme.cpp:
195         (WebCore::RenderTheme::shouldHaveSpinButtonForInputElement):
196         Steppable inputs (number, date, and range) but not range
197         should have spinners. This does not change existing behavior.
198         * rendering/RenderTheme.h:
199
200         * dom/InputElement.h:
201         * html/BaseDateAndTimeInputType.cpp: remove hasSpinButton.
202         * html/BaseDateAndTimeInputType.h: remove hasSpinButton.
203         * html/InputType.cpp: remove hasSpinButton.
204         * html/InputType.h: remove hasSpinButton.
205         * html/NumberInputType.cpp: remove hasSpinButton.
206         * html/NumberInputType.h: remove hasSpinButton.
207
208 2011-04-22  Joseph Pecoraro  <joepeck@webkit.org>
209
210         Reviewed by Kent Tamura.
211
212         Don't rely on hasSpinButton to check if an input type can be stepped
213         https://bugs.webkit.org/show_bug.cgi?id=59224
214
215         Add isSteppable to know for certain if an input type can
216         be stepped or not. Previously we were checking if the input
217         has a spin control or is the range input type. These are UI
218         details, but the step functionality does not require there
219         to be a UI.
220
221         No change in behavior, covered by existing tests.
222
223         * html/BaseDateAndTimeInputType.cpp:
224         (WebCore::BaseDateAndTimeInputType::isSteppable):
225         * html/BaseDateAndTimeInputType.h:
226         * html/HTMLInputElement.cpp:
227         (WebCore::HTMLInputElement::isSteppable):
228         (WebCore::HTMLInputElement::stepUpFromRenderer): remove the
229         check for a spinner and range control and instead ASSERT
230         that the type is steppable.
231         * html/HTMLInputElement.h:
232         * html/InputType.cpp:
233         (WebCore::InputType::isSteppable):
234         * html/InputType.h:
235         * html/NumberInputType.cpp:
236         (WebCore::NumberInputType::isSteppable):
237         * html/NumberInputType.h:
238         * html/RangeInputType.cpp:
239         (WebCore::RangeInputType::isSteppable):
240         * html/RangeInputType.h:
241
242 2011-04-22  Adam Barth  <abarth@webkit.org>
243
244         Reviewed by Eric Seidel.
245
246         CSP frame-src is missing
247         https://bugs.webkit.org/show_bug.cgi?id=58643
248
249         In this patch, I've audited all the callers to
250         SecurityOrigin::canDisplay to make sure they all the appropriate
251         Content-Security-Policy method as well.  I'm not sure how to test all
252         these cases, but making this changes fixed the frame-src test.
253
254         * loader/SubframeLoader.cpp:
255         (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
256         (WebCore::SubframeLoader::createJavaAppletWidget):
257         (WebCore::SubframeLoader::loadSubframe):
258         (WebCore::SubframeLoader::loadPlugin):
259         * loader/SubresourceLoader.cpp:
260         (WebCore::SubresourceLoader::create):
261         * loader/cache/CachedResourceLoader.cpp:
262         (WebCore::CachedResourceLoader::canRequest):
263         (WebCore::CachedResourceLoader::requestResource):
264             - While I was understanding this code, I fixed the FIXME here.
265         * loader/cache/CachedResourceLoader.h:
266
267 2011-04-22  Adrienne Walker  <enne@google.com>
268
269         Reviewed by Simon Fraser.
270
271         Clear shared graphics context when destroying CanvasRenderingContext2D.
272         https://bugs.webkit.org/show_bug.cgi?id=59212
273
274         * html/canvas/CanvasRenderingContext2D.cpp:
275         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
276
277 2011-04-22  Levi Weintraub  <leviw@chromium.org>
278
279         Reviewed by Ryosuke Niwa.
280
281         End/Home keys do not work in a contentEditable element
282         https://bugs.webkit.org/show_bug.cgi?id=50564
283
284         Changing logical[Start/End]OfLine to return a valid VisiblePosition for for editable contexts that are
285         inline and share a line with non-editable content.
286
287         Test: editing/selection/modify-by-lineboundary-in-inline-editable-contexts.html
288
289         * editing/visible_units.cpp:
290         (WebCore::logicalStartOfLine):
291         (WebCore::logicalEndOfLine):
292
293 2011-04-22  Dimitri Glazkov  <dglazkov@chromium.org>
294
295         Reviewed by Kent Tamura.
296
297         Make showTree/showTreeForThis aware of the shadow DOM
298         https://bugs.webkit.org/show_bug.cgi?id=52965
299
300         No new tests, because this code is only compiled in DEBUG.
301
302         * dom/Node.cpp:
303         (WebCore::traverseTreeAndMark): Moved tree traversal logic here, adding
304             recursive sub-traversal of the shadow tree.
305         (WebCore::Node::showTreeAndMark): Changed to use the new tree traversal function.
306
307 2011-04-22  Sam Weinig  <sam@webkit.org>
308
309         Reviewed by Gavin Barraclough and Oliver Hunt.
310
311         Arrays should participate in global object forwarding fun
312         https://bugs.webkit.org/show_bug.cgi?id=59215
313
314         Change callers of constructArray to use the new variant that takes
315         a global object.
316
317         * bindings/js/JSClipboardCustom.cpp:
318         (WebCore::JSClipboard::types):
319         * bindings/js/JSConsoleCustom.cpp:
320         (WebCore::JSConsole::profiles):
321         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
322         (WebCore::JSJavaScriptCallFrame::scopeChain):
323         * bindings/js/JSMessageEventCustom.cpp:
324         (WebCore::JSMessageEvent::ports):
325         * bindings/js/JSScriptProfileNodeCustom.cpp:
326         (WebCore::JSScriptProfileNode::children):
327         * bindings/js/JSWebGLRenderingContextCustom.cpp:
328         (WebCore::toJS):
329         (WebCore::JSWebGLRenderingContext::getAttachedShaders):
330         (WebCore::JSWebGLRenderingContext::getSupportedExtensions):
331
332 2011-04-22  Csaba Osztrogon√°c  <ossy@webkit.org>
333
334         [Qt] Unreviewed typo fix after r84522.
335
336         * WebCore.pro:
337
338 2011-04-22  Daniel Bates  <dbates@rim.com>
339
340         Fix misspelled word in comment; tagets => targets.
341
342         * page/EventHandler.cpp:
343         (WebCore::EventHandler::handleTouchEvent):
344
345 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
346
347         Reviewed by Oliver Hunt.
348
349         Removed a use of markDOMObjectWrapper: Element and Document
350         https://bugs.webkit.org/show_bug.cgi?id=59178
351
352         * GNUmakefile.list.am:
353         * UseJSC.cmake:
354         * WebCore.gypi:
355         * WebCore.pro:
356         * WebCore.vcproj/WebCore.vcproj:
357         * WebCore.xcodeproj/project.pbxproj:
358         * bindings/js/JSBindingsAllInOne.cpp: Build!
359
360         * bindings/js/JSDOMImplementationCustom.cpp:
361         (WebCore::JSDOMImplementationOwner::isReachableFromOpaqueRoots):
362         (WebCore::JSDOMImplementationOwner::finalize):
363         (WebCore::wrapperOwner):
364         (WebCore::wrapperContext):
365         (WebCore::toJS): Use the opaque roots system for DOMImplementation. Also,
366         DOMImplementation does not need to keep its document wrapper alive, since
367         there's no DOM API for getting a DOMImplementation's document.
368
369         * bindings/js/JSDOMStringMapCustom.cpp:
370         (WebCore::JSDOMStringMapOwner::isReachableFromOpaqueRoots):
371         (WebCore::JSDOMStringMapOwner::finalize):
372         (WebCore::wrapperOwner):
373         (WebCore::wrapperContext):
374         (WebCore::toJS): Use the opaque roots system for DOMStringMap.
375
376         * bindings/js/JSDOMTokenListCustom.cpp: Added.
377         (WebCore::JSDOMTokenListOwner::isReachableFromOpaqueRoots):
378         (WebCore::JSDOMTokenListOwner::finalize):
379         (WebCore::wrapperOwner):
380         (WebCore::wrapperContext):
381         (WebCore::toJS): Use the opaque roots system for DOMTokenList.
382
383         * bindings/js/JSDocumentCustom.cpp:
384         (WebCore::JSDocument::visitChildren):
385         * bindings/js/JSElementCustom.cpp: No more need for explicit marking.
386
387         * bindings/scripts/CodeGeneratorV8.pm: Boo on whoever made this design decision.
388
389         * dom/DOMImplementation.cpp:
390         (WebCore::DOMImplementation::DOMImplementation):
391         (WebCore::DOMImplementation::createDocument):
392         (WebCore::DOMImplementation::createHTMLDocument):
393         * dom/DOMImplementation.h:
394         (WebCore::DOMImplementation::create):
395         (WebCore::DOMImplementation::ref):
396         (WebCore::DOMImplementation::deref):
397         (WebCore::DOMImplementation::document): Fixed the DOMImplementation
398         ownership model to match other satellite objects in the DOM. This was
399         necessary to fix some crashes due to incorrect reference counting.
400
401         * dom/DOMImplementation.idl:
402         * dom/DOMStringMap.idl:
403         * dom/Document.cpp:
404         (WebCore::Document::~Document):
405         * dom/Document.h:
406         * dom/Element.cpp:
407         * dom/Element.h:
408         * dom/Element.idl:
409         * html/DOMTokenList.idl: Updated to match changes above.
410
411 2011-04-22  Simon Fraser  <simon.fraser@apple.com>
412
413         Reviewed by Dan Bernstein.
414
415         Rounded corners don't looks smooth when background-image is a gradient
416         https://bugs.webkit.org/show_bug.cgi?id=59213
417         
418         Add the "shrink background" behavior to the slow background
419         drawing code path.
420
421         Test: fast/backgrounds/gradient-background-leakage.html
422
423         * rendering/RenderBoxModelObject.cpp:
424         (WebCore::backgroundRectAdjustedForBleedAvoidance):
425         Utility function that returns a shrunk border rect based
426         on the context scale.
427         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
428         Use backgroundRectAdjustedForBleedAvoidance() in both the fast
429         and slow paths.
430
431 2011-04-22  Xiaomei Ji  <xji@chromium.org>
432
433         Reviewed by David Hyatt.
434
435         Local caret rectangle calculation should be relative to its containing block.
436         https://bugs.webkit.org/show_bug.cgi?id=49508.
437
438         InlineBox and caret rectangle are positioned relative to its containing block.
439         So its left and right edge value should be relative to its containing block as well. 
440
441         Test: fast/forms/cursor-at-editable-content-boundary.html
442
443         * rendering/RenderText.cpp:
444         (WebCore::RenderText::localCaretRect):
445
446 2011-04-22  Levi Weintraub  <leviw@chromium.org>
447
448         Reviewed by Darin Fisher.
449
450         REGRESSION: left property broken with position:fixed elements in RTL documents
451         https://bugs.webkit.org/show_bug.cgi?id=59204
452         http://code.google.com/p/chromium/issues/detail?id=80216
453
454         Test: fast/block/positioning/rtl-fixed-positioning.html
455               fast/block/positioning/vertical-rl/fixed-positioning.html
456
457         Returning the proper scroll offsets for fixed position content in RTL documents.
458         We regressed to X and Y offsets not updating while scrolling when we clamped to zero,
459         but RTL documents scroll in negative space.
460
461         * page/FrameView.cpp:
462         (WebCore::FrameView::scrollXForFixedPosition): Properly handling RTL documents where
463         the scroll origin and offsets are negative.
464         (WebCore::FrameView::scrollYForFixedPosition): Properly handling vertical writing-
465         mode RTL documents, like above.
466         * platform/ScrollView.h:
467         (WebCore::ScrollView::scrollOrigin): Changing this accessor to const.
468
469 2011-04-22  Justin Schuh  <jschuh@chromium.org>
470
471         Reviewed by Eric Seidel.
472
473         Should assert on invalid type in FEComponentTransfer::apply
474         https://bugs.webkit.org/show_bug.cgi?id=57959
475
476         No functional change. No new tests needed.
477
478         * platform/graphics/filters/FEComponentTransfer.cpp:
479         (WebCore::FEComponentTransfer::apply):
480
481 2011-04-22  MORITA Hajime  <morrita@google.com>
482
483         Unreviewed crash fix.
484
485         * html/HTMLDetailsElement.cpp:
486         (WebCore::DetailsSummaryElement::shouldInclude):
487
488 2011-04-22  Dan Bernstein  <mitz@apple.com>
489
490         Reviewed by Sam Weinig.
491
492         Exclude scrollbars from the dirty rect passed to the document
493         https://bugs.webkit.org/show_bug.cgi?id=59206
494
495         No test added because functionality is unchanged.
496
497         * platform/ScrollView.cpp:
498         (WebCore::ScrollView::paint): Compute a clip rectangle (analogous to the frame of the clip view
499         in an NSScrollView) by subtracting non-overlay scrollbars, and intersect the document dirty rect
500         with it. If the result is empty, avoid calling paintContents().
501
502 2011-04-22  Jer Noble  <jer.noble@apple.com>
503
504         Reviewed by Maciej Stachowiak.
505
506         Disable MediaPlayerPrivateAVFoundation when using old full screen mode.
507         https://bugs.webkit.org/show_bug.cgi?id=59147
508
509         Add a new isAVFoundationEnabled setting and check it before adding 
510         MediaPlayerPrivateAVFoundationObjC to the media engine registry.
511
512         * WebCore.exp.in:
513         * page/Settings.cpp:
514         * page/Settings.h:
515         (WebCore::Settings::setAVFoundationEnabled): Added.
516         (WebCore::Settings::isAVFoundationEnabled): Added.
517         * platform/graphics/MediaPlayer.cpp:
518         (WebCore::installedMediaEngines): Check the settings added above.
519
520 2011-04-22  Sam Weinig  <sam@webkit.org>
521
522         Reviewed by Gavin Barraclough.
523
524         Remove remaining uses of deprecated version of toJS
525         https://bugs.webkit.org/show_bug.cgi?id=59170
526
527         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
528         (WebCore::toJS):
529         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
530         (WebCore::JSCanvasRenderingContext2D::fillStyle):
531         (WebCore::JSCanvasRenderingContext2D::createPattern):
532         * bindings/js/JSConsoleCustom.cpp:
533         (WebCore::JSConsole::profiles):
534         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
535         (WebCore::JSSQLStatementErrorCallback::handleEvent):
536         * bindings/js/JSDOMBinding.h:
537         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
538         (WebCore::JSDOMMimeTypeArray::nameGetter):
539         * bindings/js/JSDOMPluginArrayCustom.cpp:
540         (WebCore::JSDOMPluginArray::nameGetter):
541         * bindings/js/JSDOMPluginCustom.cpp:
542         (WebCore::JSDOMPlugin::nameGetter):
543         * bindings/js/JSDOMWindowCustom.cpp:
544         (WebCore::namedItemGetter):
545         (WebCore::JSDOMWindow::event):
546         * bindings/js/JSEventTarget.cpp:
547         (WebCore::toJS):
548         * bindings/js/JSInjectedScriptHostCustom.cpp:
549         Propagate stored global object down access chain.
550
551         (WebCore::InjectedScriptHost::nodeAsScriptValue):
552         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype.
553
554         (WebCore::JSInjectedScriptHost::currentCallFrame):
555         (WebCore::JSInjectedScriptHost::inspectedNode):
556         * bindings/js/JSNamedNodeMapCustom.cpp:
557         (WebCore::JSNamedNodeMap::nameGetter):
558         * bindings/js/JSNodeListCustom.cpp:
559         (WebCore::callNodeList):
560         (WebCore::JSNodeList::nameGetter):
561         * bindings/js/JSScriptProfileNodeCustom.cpp:
562         (WebCore::JSScriptProfileNode::children):
563         * bindings/js/JSStyleSheetListCustom.cpp:
564         (WebCore::JSStyleSheetList::nameGetter):
565         * bindings/js/JSXSLTProcessorCustom.cpp:
566         (WebCore::JSXSLTProcessor::transformToFragment):
567         (WebCore::JSXSLTProcessor::transformToDocument):
568         * bindings/scripts/CodeGeneratorJS.pm:
569         Propagate stored global object down access chain.
570
571         * css/MediaQueryListListener.cpp:
572         (WebCore::MediaQueryListListener::queryChanged):
573         Replace use of deprecated toJS overload with explicit call to deprecatedGlobalObjectForPrototype,
574         we will want refactor this to match other callbacks so we can remove this.
575
576 2011-04-22  Naoki Takano  <takano.naoki@gmail.com>
577
578         Reviewed by Eric Seidel.
579
580         [Chromium]Mac UI polish to add left/right padding space for autofill popup window.
581         https://bugs.webkit.org/show_bug.cgi?id=58960
582         http://code.google.com/p/chromium/issues/detail?id=51077
583
584         No new test because Chromium Autofill popup window doesn't have any test framework.
585         This assumes only AutofillPopupMenuClient gives TexFieldPart appearance.
586         Only if Autofill popup window has right/left padding.
587         The code should be removed after Autofill popup window logic is separated from WebKit to Chromium.
588
589         * rendering/RenderThemeChromiumMac.h: Add popupInternalPaddingRight() and popupInternalPaddingLeft().
590         * rendering/RenderThemeChromiumMac.mm:
591         (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft): Return padding size only if TextFieldPart is specified.
592         (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight): Return padding size only if TextFieldPart is specified.
593
594 2011-04-21  Adam Roben  <aroben@apple.com>
595
596         Add code to enumerate all the functions imported by a particular Windows binary
597
598         PEImage is where all the logic starts. It represents a single Portable Executable (PE)
599         binary. The various enumerator classes are used in conjunction with PEImage to enumerate the
600         modules and functions imported by that image.
601
602         I couldn't figure out how to write a test for this. :-(
603
604         Part of <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No
605         context menu appears when right-clicking on windowless Flash plugin
606
607         Reviewed by Sam Weinig, and given a good once-over by Jeff Miller.
608
609         * WebCore.vcproj/WebCore.vcproj: Added the new files.
610
611         * platform/win/PEImage.cpp: Added.
612         (WebCore::PEImage::PEImage): Checks that the module contains the expected magic numbers,
613         then initializes m_ntHeaders using the module.
614         (WebCore::PEImage::convertRVAToAddress): Converts a relative virtual address (RVA) to a
615         non-relative address, which can then be dereferenced. (The PE format uses RVAs in lots of
616         places.)
617         (WebCore::PEImage::dataDirectoryEntryAddress): Returns the address of the data associated
618         with the given entry in the image's DataDirectory.
619
620         * platform/win/PEImage.h: Added.
621         (WebCore::PEImage::isValid): We're a valid image if the validation code in our constructor
622         succeeded, in which case m_ntHeaders will be set.
623
624         * platform/win/ImportedFunctionsEnumerator.cpp: Added. This class enumerates all the
625         functions imported by the image from a single module by walking the Import Name Table (INT)
626         and Import Address Table (IAT).
627         (WebCore::ImportedFunctionsEnumerator::ImportedFunctionsEnumerator): Initialize our members.
628         (WebCore::ImportedFunctionsEnumerator::isAtEnd): The INT and IAT are both 0-terminated
629         arrays.
630         (WebCore::ImportedFunctionsEnumerator::next): Step to the next entries in the INT and IAT.
631         (WebCore::ImportedFunctionsEnumerator::currentFunctionName): Gets the address of the
632         function's name, if possible, using the INT.
633         (WebCore::ImportedFunctionsEnumerator::addressOfCurrentFunctionPointer): Returns the address
634         of the function pointer for the current function. This function pointer is used whenever
635         code in m_image calls the current function. (A future patch will take advantage of this by
636         overwriting this function pointer with another, thereby redirecting calls to that function.)
637
638         * platform/win/ImportedFunctionsEnumerator.h: Added.
639
640         * platform/win/ImportedModulesEnumeratorBase.h: Added. This base class is used by
641         ImportedModulesEnumerator and DelayLoadedModulesEnumerator, and allows code to be written
642         that works with either one.
643
644         * platform/win/ImportedModulesEnumerator.cpp: Added. This class enumerates all the
645         non-delay-loaded modules imported by the image by walking the image's import array.
646         (WebCore::ImportedModulesEnumerator::ImportedModulesEnumerator): Module import information
647         is stored in the IMAGE_DIRECTORY_ENTRY_IMPORT entry of the image's DataDirectory.
648         (WebCore::ImportedModulesEnumerator::isAtEnd): The import array is 0-terminated.
649         (WebCore::ImportedModulesEnumerator::next): Steps along the import array.
650         (WebCore::ImportedModulesEnumerator::currentModuleName): Gets the address of the module's
651         name.
652         (WebCore::ImportedModulesEnumerator::functionsEnumerator): Get's the addresses of the INT
653         and IAT for this module and wraps them in an ImportedFunctionsEnumerator.
654
655         * platform/win/ImportedModulesEnumerator.h: Added.
656
657         * platform/win/DelayLoadedModulesEnumerator.cpp: Added. This class enumerates all the
658         delay-loaded modules that are imported by the given PEImage by walking the image's
659         ImageDelayDescr array.
660         (WebCore::DelayLoadedModulesEnumerator::DelayLoadedModulesEnumerator): Delay-load
661         information is stored in the IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT entry of the image's
662         DataDirectory.
663         (WebCore::DelayLoadedModulesEnumerator::isAtEnd): The delay-loaded modules array is
664         0-terminated.
665         (WebCore::DelayLoadedModulesEnumerator::next): Steps along the delay-loaded modules array.
666         (WebCore::DelayLoadedModulesEnumerator::currentModuleName): Gets the address of the module's
667         name out of the descriptor.
668         (WebCore::DelayLoadedModulesEnumerator::functionsEnumerator): Gets the INT and IAT for the
669         current module out of the descriptor and makes an ImportedFunctionsEnumerator from them.
670         (WebCore::DelayLoadedModulesEnumerator::convertPotentialRVAToAddress): Pre-VC7.0 images
671         stored non-relative addresses in the ImageDelayDescr structures, while VC7.0 and later
672         images store RVAs. This function abstracts away the difference.
673
674         * platform/win/DelayLoadedModulesEnumerator.h: Added.
675
676 2011-04-21  Adam Roben  <aroben@apple.com>
677
678         Add a shared do-nothing window class that anyone can use
679
680         Fixes <http://webkit.org/b/59102> WebKit has too many dummy window classes
681
682         Reviewed by Anders Carlsson.
683
684         * WebCore.vcproj/WebCore.vcproj: Added DefWndProcWindowClass.{cpp,h}. Moved Arena.cpp out of
685         platform/win and into platform. Let VS reorder other files.
686
687         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
688         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable): Changed to use the shared
689         dummy window class instead of creating our own.
690
691         * platform/win/DefWndProcWindowClass.cpp: Added.
692         (WebCore::registerClass): Register it!
693         (WebCore::defWndProcWindowClassName): Register it and return it!
694
695         * platform/win/DefWndProcWindowClass.h: Added.
696
697 2011-04-21  MORITA Hajime  <morrita@google.com>
698
699         Reviewed by Dimitri Glazkov.
700         
701         Content of <details> should be forwarded through the shadow DOM
702         https://bugs.webkit.org/show_bug.cgi?id=59055
703
704         - Made ShadowContentElement abstract and added shouldInclude() pure virtual method.
705         - Added SummaryContentElement, DetailsContentElement, DetailsSummaryElement as
706           subclasses of ShadowContentElement.
707         - Gave two shadow children for HTMLDetailsElement. One is DetailsContentElement, that
708           handles non-summary contents of <details>. Another is SummaryContentElement, that
709           handles the main summary element.
710         - Removed most of RenderDetails custom layout mechanism, which is replaced by
711           ShadowContentElement subclasses.
712
713         Tests: fast/html/details-add-child-1.html
714                fast/html/details-add-child-2.html
715                fast/html/details-remove-child-1.html
716                fast/html/details-remove-child-2.html
717
718         * dom/ShadowRoot.cpp:
719         (WebCore::ShadowRoot::contentContainerFor):
720         (WebCore::ShadowRoot::hostChildrenChanged):
721         (WebCore::ShadowRoot::hasContentElement):
722         * dom/ShadowRoot.h:
723         * html/HTMLDetailsElement.cpp:
724         (WebCore::DetailsContentElement::DetailsContentElement):
725         (WebCore::DetailsContentElement::create):
726         (WebCore::DetailsContentElement::shouldInclude):
727         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
728         (WebCore::DetailsSummaryElement::create):
729         (WebCore::DetailsSummaryElement::shouldInclude):
730         (WebCore::HTMLDetailsElement::create):
731         (WebCore::HTMLDetailsElement::HTMLDetailsElement):
732         (WebCore::HTMLDetailsElement::ensureShadowSubtreeOf):
733         (WebCore::findSummaryFor):
734         (WebCore::HTMLDetailsElement::ensureMainSummary):
735         (WebCore::HTMLDetailsElement::refreshMainSummary):
736         (WebCore::HTMLDetailsElement::createShadowSubtree):
737         * html/HTMLDetailsElement.h:
738         * html/HTMLSummaryElement.cpp:
739         (WebCore::SummaryContentElement::SummaryContentElement):
740         (WebCore::SummaryContentElement::shouldInclude):
741         (WebCore::SummaryContentElement::create):
742         (WebCore::HTMLSummaryElement::createShadowSubtree):
743         * html/shadow/ShadowContentElement.h:
744         * rendering/RenderDetails.cpp:
745         (WebCore::RenderDetails::RenderDetails):
746         (WebCore::RenderDetails::addChild):
747         * rendering/RenderDetails.h:
748         * rendering/RenderSummary.cpp:
749         * rendering/RenderSummary.h:
750
751 2011-04-21  Simon Fraser  <simon.fraser@apple.com>
752
753         Reviewed by Dan Bernstein.
754
755         Extra GraphicsContext::save() in InlineTextBox::paintDecoration()
756         https://bugs.webkit.org/show_bug.cgi?id=59109
757         
758         Remove an extraneous GraphicsContext::save() in InlineTextBox::paintDecoration().
759         
760         Add an assertion that fires when a GraphicsContext() is destroyed with a non-
761         empty state stack. Fix canvas to avoid this assertion, since bad content might
762         trigger it.
763         
764         Also add an assertion that fires for mismatched begin/endTransparencyLayers.
765
766         Test: fast/text/multiple-text-shadow-alpha.html
767
768         * html/HTMLCanvasElement.cpp:
769         (WebCore::HTMLCanvasElement::~HTMLCanvasElement):
770         Make sure that the CanvasRenderingContext goes away before the ImageBuffer,
771         so that CanvasRenderingContext2D has a chance to unwind the state stack in
772         the ImageBuffer's GraphicsContext.
773         
774         * html/canvas/CanvasRenderingContext2D.cpp:
775         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
776         Balance unmatched state saves in the canvas context.
777         
778         * platform/graphics/GraphicsContext.cpp:
779         (WebCore::GraphicsContext::~GraphicsContext):
780         Assert that the stack is empty.
781         
782         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
783         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
784         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
785         (WebCore::GraphicsContextPlatformPrivate::beginTransparencyLayer):
786         (WebCore::GraphicsContextPlatformPrivate::endTransparencyLayer):
787         Changes to allow for asserting for unmatched transparency layer begin/ends.
788         
789         * rendering/InlineTextBox.cpp:
790         (WebCore::InlineTextBox::paintDecoration):
791         Remove an unbalanced save().
792
793 2011-04-22  Pavel Feldman  <pfeldman@google.com>
794
795         Reviewed by Yury Semikhatsky.
796
797         Web Inspector: add Save As context menu item to the TextViewer.
798         https://bugs.webkit.org/show_bug.cgi?id=59196
799
800         * inspector/front-end/ResourceView.js:
801         (WebInspector.ResourceSourceFrame.prototype.requestContent):
802         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
803         (WebInspector.RevisionSourceFrame.prototype.requestContent):
804         (WebInspector.RevisionSourceFrame.prototype.suggestedFileName):
805         * inspector/front-end/ScriptsPanel.js:
806         (WebInspector.ScriptsPanel.prototype._createSourceFrame):
807         (WebInspector.SourceFrameDelegateForScriptsPanel):
808         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.formatSourceFilesToggled):
809         (WebInspector.SourceFrameDelegateForScriptsPanel.prototype.suggestedFileName):
810         * inspector/front-end/SourceFrame.js:
811         (WebInspector.SourceFrame.prototype._initializeTextViewer):
812         (WebInspector.SourceFrame.prototype.populateTextAreaContextMenu):
813         (WebInspector.SourceFrame.prototype.suggestedFileName):
814         (WebInspector.SourceFrameDelegate.prototype.formatSourceFilesToggled):
815         (WebInspector.SourceFrameDelegate.prototype.suggestedFileName):
816         * inspector/front-end/TextViewer.js:
817         (WebInspector.TextViewer.prototype._contextMenu):
818         (WebInspector.TextViewerDelegate.prototype.cancelEditing):
819         (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
820         (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
821         (WebInspector.TextViewerDelegate.prototype.suggestedFileName):
822
823 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
824
825         Reviewed by Pavel Feldman.
826
827         Web Inspector: [Chromium] Move detailed heap snapshots storage and processing into workers.
828         https://bugs.webkit.org/show_bug.cgi?id=59094
829
830         * WebCore.gypi:
831         * WebCore.vcproj/WebCore.vcproj:
832         * gyp/streamline-inspector-source.sh:
833         * inspector/front-end/DetailedHeapshotGridNodes.js:
834         (WebInspector.HeapSnapshotGridNode.prototype.dispose):
835         (WebInspector.HeapSnapshotObjectNode.prototype._createProvider):
836         (WebInspector.HeapSnapshotInstanceNode.prototype._createProvider):
837         (WebInspector.HeapSnapshotConstructorNode.prototype._createNodesProvider):
838         (WebInspector.HeapSnapshotIteratorsTuple.prototype.dispose):
839         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
840         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider.createProvider):
841         (WebInspector.HeapSnapshotDiffNode.prototype._createNodesProvider):
842         (WebInspector.HeapSnapshotDominatorObjectNode.prototype._createProvider):
843         (MixInSnapshotNodeFunctions):
844         * inspector/front-end/DetailedHeapshotView.js:
845         (WebInspector.HeapSnapshotSortableDataGrid.prototype.dispose):
846         (WebInspector.HeapSnapshotSortableDataGrid.prototype.resetSortingCache):
847         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
848         (WebInspector.HeapSnapshotRetainingPathsList.prototype.dispose):
849         (WebInspector.HeapSnapshotRetainingPathsList.prototype._resetPaths):
850         (WebInspector.HeapSnapshotRetainingPathsList.prototype.setDataSource):
851         (WebInspector.HeapSnapshotRetainingPathsList.prototype.showNext):
852         (WebInspector.HeapSnapshotRetainingPathsList.prototype.searchCancelled):
853         (WebInspector.HeapSnapshotRetainingPathsList.prototype._setRootChildrenForFinder):
854         (WebInspector.DetailedHeapshotView.prototype.dispose):
855         (WebInspector.DetailedHeapshotView.prototype.get profileWrapper):
856         (WebInspector.DetailedHeapshotView.prototype.get baseProfileWrapper):
857         * inspector/front-end/HeapSnapshot.js:
858         (WebInspector.HeapSnapshotLoader):
859         (WebInspector.HeapSnapshotLoader.prototype.finishLoading):
860         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
861         (WebInspector.HeapSnapshot.prototype.pushBaseIds):
862         (WebInspector.HeapSnapshot.prototype.createDiff):
863         (WebInspector.HeapSnapshot.prototype._parseFilter):
864         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
865         (WebInspector.HeapSnapshot.prototype.createNodesProvider):
866         (WebInspector.HeapSnapshot.prototype.createPathFinder):
867         (WebInspector.HeapSnapshot.prototype.updateStaticData):
868         (WebInspector.HeapSnapshotPathFinder):
869         (WebInspector.HeapSnapshotPathFinder.prototype.updateRoots):
870         (WebInspector.HeapSnapshotPathFinder.prototype._reset):
871         * inspector/front-end/HeapSnapshotProxy.js:
872         (WebInspector.HeapSnapshotRealWorker):
873         (WebInspector.HeapSnapshotRealWorker.prototype._messageReceived):
874         (WebInspector.HeapSnapshotRealWorker.prototype.postMessage):
875         (WebInspector.HeapSnapshotRealWorker.prototype.terminate):
876         (WebInspector.HeapSnapshotFakeWorker):
877         (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage):
878         (WebInspector.HeapSnapshotFakeWorker.prototype.terminate):
879         (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker):
880         (WebInspector.HeapSnapshotWorker):
881         (WebInspector.HeapSnapshotWorker.prototype.createObject):
882         (WebInspector.HeapSnapshotWorker.prototype.dispose):
883         (WebInspector.HeapSnapshotWorker.prototype.disposeObject):
884         (WebInspector.HeapSnapshotWorker.prototype.callGetter):
885         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod.wrapCallback):
886         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
887         (WebInspector.HeapSnapshotWorker.prototype.callMethod):
888         (WebInspector.HeapSnapshotWorker.prototype._findFunction):
889         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
890         (WebInspector.HeapSnapshotWorker.prototype._postMessage):
891         (WebInspector.HeapSnapshotProxyObject):
892         (WebInspector.HeapSnapshotProxyObject.prototype._callWorker):
893         (WebInspector.HeapSnapshotProxyObject.prototype.dispose):
894         (WebInspector.HeapSnapshotProxyObject.prototype.disposeWorker):
895         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod):
896         (WebInspector.HeapSnapshotProxyObject.prototype.callGetter):
897         (WebInspector.HeapSnapshotProxyObject.prototype.callMethod):
898         (WebInspector.HeapSnapshotLoaderProxy):
899         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.callLoadCallbacks):
900         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData):
901         (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
902         (WebInspector.HeapSnapshotLoaderProxy.prototype.get loaded):
903         (WebInspector.HeapSnapshotLoaderProxy.prototype.startLoading):
904         (WebInspector.HeapSnapshotLoaderProxy.prototype.pushJSONChunk):
905         (WebInspector.HeapSnapshotProxy):
906         (WebInspector.HeapSnapshotProxy.prototype.aggregates):
907         (WebInspector.HeapSnapshotProxy.prototype.createDiff):
908         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
909         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
910         (WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
911         (WebInspector.HeapSnapshotProxy.prototype.dispose):
912         (WebInspector.HeapSnapshotProxy.prototype.finishLoading):
913         (WebInspector.HeapSnapshotProxy.prototype.get loaded):
914         (WebInspector.HeapSnapshotProxy.prototype.get nodeCount):
915         (WebInspector.HeapSnapshotProxy.prototype.nodeFieldValuesByIndex):
916         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
917         (WebInspector.HeapSnapshotProxy.prototype.get rootNodeIndex):
918         (WebInspector.HeapSnapshotProxy.prototype.updateStaticData):
919         (WebInspector.HeapSnapshotProxy.prototype.startLoading):
920         (WebInspector.HeapSnapshotProxy.prototype.get totalSize):
921         (WebInspector.HeapSnapshotProxy.prototype.get uid):
922         (WebInspector.HeapSnapshotProviderProxy):
923         (WebInspector.HeapSnapshotProviderProxy.prototype.isEmpty):
924         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
925         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
926         (WebInspector.HeapSnapshotPathFinderProxy):
927         (WebInspector.HeapSnapshotPathFinderProxy.prototype.findNext):
928         (WebInspector.HeapSnapshotPathFinderProxy.prototype.updateRoots):
929         (WebInspector.HeapSnapshotsDiffProxy):
930         (WebInspector.HeapSnapshotsDiffProxy.prototype.calculate):
931         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
932         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
933         * inspector/front-end/HeapSnapshotWorker.js: Added.
934         (WebInspector.UIString):
935         (postMessageWrapper):
936         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: Added.
937         (WebInspector.HeapSnapshotWorkerDispatcher):
938         (WebInspector.HeapSnapshotWorkerDispatcher.prototype._findFunction):
939         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
940         * inspector/front-end/ProfilesPanel.js:
941         (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
942         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.else.parsed):
943         (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
944         * inspector/front-end/WebKit.qrc:
945         * inspector/front-end/inspector.html:
946
947 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
948
949         Reviewed by Pavel Feldman.
950
951         Web Inspector: fix de-obfuscation of scripts inlined in html.
952         https://bugs.webkit.org/show_bug.cgi?id=58538
953
954         Use html tokenizer to find script boundaries instead of relying on scriptParsed events.
955
956         Test: inspector/debugger/script-formatter.html
957
958         * WebCore.gypi:
959         * WebCore.vcproj/WebCore.vcproj:
960         * inspector/front-end/JavaScriptFormatter.js: Renamed from Source/WebCore/inspector/front-end/UglifyJS/JavaScriptFormatter.js.
961         * inspector/front-end/ScriptFormatter.js:
962         (WebInspector.ScriptFormatter):
963         (WebInspector.ScriptFormatter.prototype.formatContent):
964         (WebInspector.ScriptFormatter.prototype._didFormatContent):
965         * inspector/front-end/ScriptFormatterWorker.js:
966         (onmessage):
967         (formatScript):
968         (HTMLScriptFormatter):
969         (HTMLScriptFormatter.prototype.format):
970         (HTMLScriptFormatter.prototype.scriptStarted):
971         (HTMLScriptFormatter.prototype.scriptEnded):
972         (HTMLScriptFormatter.prototype.styleSheetStarted):
973         (HTMLScriptFormatter.prototype.styleSheetEnded):
974         * inspector/front-end/SourceFile.js:
975         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
976         * inspector/front-end/SourceHTMLTokenizer.js:
977         (WebInspector.SourceHTMLTokenizer.prototype.scriptStarted):
978         (WebInspector.SourceHTMLTokenizer.prototype.scriptEnded):
979         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetStarted):
980         (WebInspector.SourceHTMLTokenizer.prototype.styleSheetEnded):
981         (WebInspector.SourceHTMLTokenizer.prototype.nextToken):
982         * inspector/front-end/SourceHTMLTokenizer.re2js:
983         * inspector/front-end/WebKit.qrc:
984
985 2011-04-22  Andrey Kosyakov  <caseq@chromium.org>
986
987         Reviewed by Pavel Feldman.
988
989         Web Inspector: [Extensions API] misc API cleanup
990         https://bugs.webkit.org/show_bug.cgi?id=59194
991
992         * inspector/front-end/ExtensionAPISchema.json:
993         * inspector/front-end/ExtensionPanel.js:
994         (WebInspector.ExtensionSidebarPane.prototype._setObject):
995
996 2011-04-21  Pavel Feldman  <pfeldman@google.com>
997
998         Reviewed by Yury Semikhatsky.
999
1000         Web Inspector: group content scripts in the scripts panel drop down.
1001         https://bugs.webkit.org/show_bug.cgi?id=59108
1002
1003         * English.lproj/localizedStrings.js:
1004         * inspector/front-end/ScriptsPanel.js:
1005         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect.optionCompare):
1006         (WebInspector.ScriptsPanel.prototype._addOptionToFilesSelect):
1007
1008 2011-04-22  Mike West  <mkwst@google.com>
1009
1010         Reviewed by Pavel Feldman.
1011
1012         Web Inspector: Tiny improvement to UI for adding an XHR breakpoint
1013         https://bugs.webkit.org/show_bug.cgi?id=59100
1014
1015         Improve web inspector UI around adding XHR breakpoints by adding
1016         a textual label to the input-like `span` used to specify which
1017         XHR requests the breakpoint ought to target.
1018
1019         * inspector/front-end/BreakpointsSidebarPane.js:
1020         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked.finishEditing):
1021         (WebInspector.XHRBreakpointsSidebarPane.prototype._addButtonClicked):
1022         * inspector/front-end/inspector.css:
1023         (#breakpoint-condition-input):
1024
1025 2011-04-22  Pavel Podivilov  <podivilov@chromium.org>
1026
1027         Reviewed by Pavel Feldman.
1028
1029         Web Inspector: js formatter should never insert new tokens or remove existing tokens and comments.
1030         https://bugs.webkit.org/show_bug.cgi?id=59191
1031
1032         * WebCore.gypi:
1033         * WebCore.vcproj/WebCore.vcproj:
1034         * inspector/front-end/ScriptFormatter.js:
1035         (WebInspector.ScriptFormatter.prototype.formatContent.didFormatChunks):
1036         (WebInspector.ScriptFormatter.prototype.formatContent):
1037         * inspector/front-end/ScriptFormatterWorker.js:
1038         (onmessage):
1039         * inspector/front-end/SourceFile.js:
1040         (WebInspector.SourceFile.prototype._loadResourceContent):
1041         (WebInspector.FormattedSourceFile.prototype._didRequestContent):
1042         (WebInspector.FormattedSourceMapping):
1043         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
1044         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
1045         (WebInspector.FormattedSourceMapping.prototype._convertPosition):
1046         * inspector/front-end/UglifyJS/JavaScriptFormatter.js: Added.
1047         (FormattedContentBuilder): Helper class for building formatted script content.
1048         (FormattedContentBuilder.prototype.addToken):
1049         (FormattedContentBuilder.prototype.addSpace):
1050         (FormattedContentBuilder.prototype.addNewLine):
1051         (FormattedContentBuilder.prototype.increaseNestingLevel):
1052         (FormattedContentBuilder.prototype.decreaseNestingLevel):
1053         (FormattedContentBuilder.prototype.content):
1054         (FormattedContentBuilder.prototype.mapping):
1055         (Tokenizer): Wrapper class for UglifyJS tokenizer.
1056         (Tokenizer.prototype.content):
1057         (Tokenizer.prototype.next):
1058         (Tokenizer.prototype._convertUglifyToken):
1059         (JavaScriptFormatter): New formatter based on UglifyJS tokenizer.
1060         (JavaScriptFormatter.prototype.format):
1061         * inspector/front-end/UglifyJS/process.js: Removed.
1062         * inspector/front-end/WebKit.qrc:
1063
1064 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
1065
1066         Reviewed by Pavel Feldman.
1067
1068         Web Inspector: [Chromium] Refactor code prior to moving detailed heap snapshots into workers.
1069         https://bugs.webkit.org/show_bug.cgi?id=59189
1070
1071         * WebCore.gypi:
1072         * WebCore.vcproj/WebCore.vcproj:
1073         * inspector/front-end/BinarySearch.js: Added.
1074         * inspector/front-end/DetailedHeapshotGridNodes.js:
1075         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
1076         (WebInspector.HeapSnapshotGridNode.prototype._populate):
1077         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1078         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort.afterPopulate):
1079         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
1080         (WebInspector.HeapSnapshotGridNode.prototype.sort):
1081         (WebInspector.HeapSnapshotObjectNode):
1082         (WebInspector.HeapSnapshotObjectNode.prototype._createChildNode):
1083         (WebInspector.HeapSnapshotInstanceNode.prototype._createChildNode):
1084         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
1085         (WebInspector.HeapSnapshotInstanceNode.prototype.get isDeletedNode):
1086         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.diffCalculated):
1087         (WebInspector.HeapSnapshotDiffNode.prototype.calculateDiff.baseIdsReceived):
1088         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
1089         * inspector/front-end/DetailedHeapshotView.js:
1090         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged.sort):
1091         (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
1092         (WebInspector.HeapSnapshotSortableDataGrid.prototype._performSorting):
1093         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingEnter):
1094         (WebInspector.HeapSnapshotSortableDataGrid.prototype.recursiveSortingLeave):
1095         (WebInspector.HeapSnapshotContainmentDataGrid):
1096         (WebInspector.HeapSnapshotContainmentDataGrid.prototype._defaultPopulateCount.100.setDataSource):
1097         (WebInspector.HeapSnapshotContainmentDataGrid.prototype.sortingChanged):
1098         (WebInspector.HeapSnapshotDiffDataGrid.prototype.setBaseDataSource):
1099         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived.addNodeIfNonZeroDiff):
1100         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren.baseAggregatesReceived.aggregatesReceived):
1101         (WebInspector.HeapSnapshotDiffDataGrid.prototype.populateChildren):
1102         (WebInspector.HeapSnapshotDominatorsDataGrid):
1103         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype._defaultPopulateCount.25.setDataSource):
1104         (WebInspector.HeapSnapshotDominatorsDataGrid.prototype.sortingChanged):
1105         (WebInspector.HeapSnapshotRetainingPathsList.prototype._performSorting):
1106         (WebInspector.DetailedHeapshotView.prototype._changeBase.baseProfileLoaded):
1107         (WebInspector.DetailedHeapshotView.prototype._changeBase):
1108         (WebInspector.DetailedHeapshotView.prototype._changeView):
1109         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup.displayString):
1110         (WebInspector.DetailedHeapshotView.prototype._showStringContentPopup):
1111         * inspector/front-end/HeapSnapshot.js:
1112         (WebInspector.HeapSnapshot.prototype.dispose):
1113         (WebInspector.HeapSnapshot.prototype.pushBaseNodeIds):
1114         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeNextItems):
1115         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
1116         (WebInspector.HeapSnapshotEdgesProvider.prototype._serialize):
1117         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
1118         (WebInspector.HeapSnapshotsDiff.prototype.calculate):
1119         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseIds):
1120         (WebInspector.HeapSnapshotsDiff.prototype.pushBaseSelfSizes):
1121         * inspector/front-end/HeapSnapshotProxy.js:
1122         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
1123         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
1124         (WebInspector.HeapSnapshotProxy.prototype.pushBaseIds):
1125         (WebInspector.HeapSnapshotProviderProxy):
1126         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeNextItems):
1127         (WebInspector.HeapSnapshotProviderProxy.prototype.sortAndRewind):
1128         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseIds):
1129         (WebInspector.HeapSnapshotsDiffProxy.prototype.pushBaseSelfSizes):
1130         * inspector/front-end/PleaseWaitMessage.js:
1131         (WebInspector.PleaseWaitMessage.prototype.showAndWaitFor):
1132         (WebInspector.PleaseWaitMessage.prototype.unlistenAndHide):
1133         * inspector/front-end/WebKit.qrc:
1134         * inspector/front-end/inspector.html:
1135         * inspector/front-end/utilities.js:
1136
1137 2011-04-22  Mikhail Naganov  <mnaganov@chromium.org>
1138
1139         Unreviewed fix after r84484 -- conditional statement was inverted incorrectly.
1140
1141         * inspector/front-end/ProfilesPanel.js:
1142         (WebInspector.ProfilesPanel.prototype.handleShortcut):
1143
1144 2011-04-22  Annie Sullivan  <sullivan@chromium.org>
1145
1146         Reviewed by Pavel Feldman.
1147
1148         Web Inspector: Timeline is too narrow
1149         https://bugs.webkit.org/show_bug.cgi?id=58399
1150
1151         Changed Network Panel widths so that Timeline is 50%.
1152         Added titles to the values in the other columns, so that a tooltip will show the value if the column is too narrow.
1153
1154         * inspector/front-end/NetworkPanel.js:
1155         (WebInspector.NetworkPanel.prototype._createTable):  Changed column widths.
1156         (WebInspector.NetworkPanel.prototype._toggleGridMode): Changed column widths.
1157         (WebInspector.NetworkDataGridNode.prototype.refreshResource): Added titles to column values.
1158         (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell): Ditto
1159         (WebInspector.NetworkDataGridNode.prototype._refreshSizeCell): Ditto
1160         (WebInspector.NetworkDataGridNode.prototype._refreshTimeCell): Ditto
1161         * inspector/front-end/utilities.js:
1162         (Element.prototype.setTextAndTitle): Added new method to set the textContent and title of an Element at the same time, so that it can have a tooltip.
1163
1164 2011-04-22  Dan Bernstein  <mitz@apple.com>
1165
1166         Reviewed by Maciej Stachowiak.
1167
1168         <rdar://problem/9322486> REGRESSION (r83397): Default controls fade out when playing audio-only media
1169         https://bugs.webkit.org/show_bug.cgi?id=59180
1170
1171         Test: media/audio-controls-do-not-fade-out.html
1172
1173         * html/HTMLMediaElement.cpp:
1174         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Only start fading out the controls if there is
1175         a video track.
1176
1177 2011-04-22  Luke Macpherson   <macpherson@chromium.org>
1178
1179         Reviewed by Eric Seidel.
1180
1181         Add FontItalics and FontSmallCaps enums to be used instead of boolean values.
1182         https://bugs.webkit.org/show_bug.cgi?id=59080
1183
1184         No new tests as no new functionality added.
1185
1186         * css/CSSPrimitiveValueMappings.h:
1187         Add casts to/from FontItalics and FontSmallCaps
1188         * css/CSSStyleSelector.cpp:
1189         Use new casts defined in PrimitiveValueMappings.h
1190         * platform/graphics/Font.h:
1191         Use FontItalics enum.
1192         * platform/graphics/FontDescription.h:
1193         Define and use FontItalics and FontSmallCaps enums.
1194
1195 2011-04-21  Andrey Kosyakov  <caseq@chromium.org>
1196
1197         Reviewed by Yury Semikhatsky.
1198
1199         Web Inspector: exception in front-end when user selects resource info for resource that does not have response headers yet
1200         https://bugs.webkit.org/show_bug.cgi?id=59123
1201
1202         * inspector/front-end/ResourceCookiesView.js:
1203         (WebInspector.ResourceCookiesView):
1204         (WebInspector.ResourceCookiesView.prototype.show):
1205         (WebInspector.ResourceCookiesView.prototype.get _gotCookies):
1206         (WebInspector.ResourceCookiesView.prototype._buildCookiesTable):
1207
1208 2011-04-21  Beth Dakin  <bdakin@apple.com>
1209
1210         Reviewed by Dan Bernstein.
1211
1212         https://bugs.webkit.org/show_bug.cgi?id=57898
1213         REGRESSION (r82185): Scroll position not restored on navigation back to a page in 
1214         the page cache
1215         -and corresponding-
1216         <rdar://problem/9226652>
1217
1218         The original fix for this change broke scroll-position restore for pages that are 
1219         *not* in the page cache. This patch fixes both cached and non-cached pages by 
1220         using the cachedScrollPosition() only for cached pages.
1221         * loader/HistoryController.cpp:
1222         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1223
1224 2011-04-21  Luke Macpherson   <macpherson@chromium.org>
1225
1226         Reviewed by Eric Seidel.
1227
1228         Remove redundant calls to RenderStyle::setDisplay()
1229         https://bugs.webkit.org/show_bug.cgi?id=59060
1230
1231         No new tests / no new functionality added.
1232
1233         * css/CSSStyleSelector.cpp:
1234         (WebCore::CSSStyleSelector::applyProperty):
1235         Remove redundant calls to RenderStyle::setDisplay()
1236
1237 2011-04-21  John Bauman  <jbauman@chromium.org>
1238
1239         Reviewed by Kenneth Russell.
1240
1241         WebGL context drawing buffer may not be cleared if FBO bound
1242         https://bugs.webkit.org/show_bug.cgi?id=58956
1243
1244         Clear the drawing buffer even if it's not currently bound, by
1245         switching between FBOs around the clear. Also, make sure that we
1246         handle depth and stencil masks properly.
1247
1248         No new tests, because testing this under DRT doesn't work.
1249
1250         * html/canvas/WebGLRenderingContext.cpp:
1251         (WebCore::WebGLRenderingContext::initializeNewContext):
1252         (WebCore::WebGLRenderingContext::clearIfComposited):
1253         (WebCore::WebGLRenderingContext::depthMask):
1254         * html/canvas/WebGLRenderingContext.h:
1255         *
1256 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
1257
1258         Reviewed by Beth Dakin.
1259
1260         WebKit is erroneously modifying the DOM; adding 'aria-selected' to tables
1261         https://bugs.webkit.org/show_bug.cgi?id=59140
1262
1263         WebKit should not modify the DOM when the screen reader requests certain things be set. There is no
1264         specification that allows this behavior yet, but we are working on something for the future.
1265
1266         * accessibility/AccessibilityRenderObject.cpp:
1267         (WebCore::AccessibilityRenderObject::setARIAGrabbed):
1268         (WebCore::AccessibilityRenderObject::setIsExpanded):
1269         (WebCore::AccessibilityRenderObject::setSelected):
1270         (WebCore::AccessibilityRenderObject::setValue):
1271
1272 2011-04-21  Chris Fleizach  <cfleizach@apple.com>
1273
1274         Reviewed by Beth Dakin.
1275
1276         AX: order AccessibilityRole alphabetically
1277         https://bugs.webkit.org/show_bug.cgi?id=31524
1278
1279         * accessibility/AccessibilityObject.h:
1280
1281 2011-04-21  Jia Pu  <jpu@apple.com>
1282
1283         Reviewed by Maciej Stachowiak.
1284
1285         [Mac] correctionPanelTimerFired() crashes due to rangeToBeReplaced being cleared.
1286         https://bugs.webkit.org/show_bug.cgi?id=59155
1287         <rdar://problem/9261698>
1288
1289         Make sure the range isn't cleared before calling windowRectForRange() on it. Also removed unused functions in Editor.h,
1290         and fixed a typo in function name.
1291
1292         * editing/Editor.h:
1293         * editing/SpellingCorrectionController.cpp:
1294         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
1295         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1296         * editing/SpellingCorrectionController.h:
1297         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
1298
1299 2011-04-21  Maciej Stachowiak  <mjs@apple.com>
1300
1301         Reviewed by Adam Roben.
1302
1303         Add a feature define to allow <details> and <summary> to be disabled
1304         https://bugs.webkit.org/show_bug.cgi?id=59118
1305         <rdar://problem/9257045>
1306
1307         No new tests; no behavior change.
1308
1309         * Configurations/FeatureDefines.xcconfig:
1310         * DerivedSources.make:
1311         * GNUmakefile.am:
1312         * features.pri:
1313         * html/HTMLDetailsElement.cpp:
1314         * html/HTMLSummaryElement.cpp:
1315         * html/HTMLTagNames.in:
1316         * html/shadow/DetailsMarkerControl.cpp:
1317         * rendering/RenderBlock.cpp:
1318         (WebCore::canMergeContiguousAnonymousBlocks):
1319         * rendering/RenderDetails.cpp:
1320         * rendering/RenderDetails.h:
1321         * rendering/RenderDetailsMarker.cpp:
1322         * rendering/RenderDetailsMarker.h:
1323         * rendering/RenderObject.h:
1324         * rendering/RenderSummary.cpp:
1325         * rendering/RenderSummary.h:
1326         * rendering/RenderTreeAsText.cpp:
1327         (WebCore::RenderTreeAsText::writeRenderObject):
1328
1329 2011-04-21  Dimitri Glazkov  <dglazkov@chromium.org>
1330
1331         Reviewed by Adele Peterson.
1332
1333         REGRESSION (r83386): Typing in WSJ.com search field doesn't clear placeholder text
1334         https://bugs.webkit.org/show_bug.cgi?id=59053
1335
1336         Turns out, the relatedTarget of an event could be also an ancestor of an event,
1337         not just its parent. Duh.
1338
1339         * dom/EventDispatcher.cpp:
1340         (WebCore::EventDispatcher::adjustToShadowBoundaries): Changed to use shadowHost
1341             explicitly.
1342
1343 2011-04-21  Michael Saboff  <msaboff@apple.com>
1344
1345         Reviewed by Maciej Stachowiak.
1346
1347         Qualified names used for all TagName access, yet namespace usage is rare
1348         https://bugs.webkit.org/show_bug.cgi?id=58997
1349
1350         The methods getElementsByTagName and getElementsByTagNameNS where
1351         always creating and using QualifiedNames.  QualifiedName::init
1352         was consistently in the top 3 routines when running the Dromaeo
1353         DOM-query benchmark.  Split out the functionality so that
1354         getElementsByTagName uses just the local name, an implied "*"
1355         namespace and a separate TagNodeListCache keyed by an atomic name
1356         instead of a QualifiedName.  Access to elements via
1357         getElementsByTagNameNS that have "*" namespace are forwarded to
1358         getElementsByTagName as well.  This provides ~10% speed up in that
1359         Dromaeo test.
1360
1361         No new tests added, existing tests have coverage.  The changes are
1362         an optimization of existing functionality.
1363
1364         * dom/Node.cpp:
1365         (WebCore::Node::removeCachedTagNodeList):
1366         (WebCore::Node::getElementsByTagName):
1367         (WebCore::Node::getElementsByTagNameNS):
1368         (WebCore::NodeListsNodeData::invalidateCaches):
1369         (WebCore::NodeListsNodeData::isEmpty):
1370         * dom/Node.h:
1371         * dom/NodeRareData.h:
1372         * dom/TagNodeList.cpp:
1373         (WebCore::TagNodeList::~TagNodeList):
1374
1375 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
1376
1377         Reviewed by Oliver Hunt.
1378
1379         Removed a use of markDOMObjectWrapper: more style- and node-related stuff
1380         https://bugs.webkit.org/show_bug.cgi?id=59127
1381
1382         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1383         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1384         (WebCore::JSCanvasRenderingContextOwner::isReachableFromOpaqueRoots):
1385         (WebCore::JSCanvasRenderingContextOwner::finalize):
1386         (WebCore::wrapperOwner):
1387         (WebCore::wrapperContext): Use opaque roots for marking canvas rendering
1388         contexts, so JSNode isn't responsible for it.
1389
1390         * bindings/js/JSElementCustom.cpp:
1391         (WebCore::JSElement::markChildren):
1392         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1393         * bindings/js/JSHTMLLinkElementCustom.cpp:
1394         * bindings/js/JSHTMLStyleElementCustom.cpp: Removed obsolete marking code.
1395
1396         * bindings/js/JSNodeCustom.cpp:
1397         (WebCore::isObservable):
1398         (WebCore::isReachableFromDOM):
1399         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots): Removed a bunch of
1400         CSS object model related special cases, since the CSS object model
1401         now tracks its own lifetime through the opaque roots system. Removed
1402         canvas special case, covered above.
1403
1404         * bindings/js/JSProcessingInstructionCustom.cpp:
1405         * bindings/js/JSWebKitAnimationListCustom.cpp:
1406         * dom/ProcessingInstruction.idl:
1407         * html/HTMLCanvasElement.idl:
1408         * html/HTMLLinkElement.idl:
1409         * html/HTMLStyleElement.idl:
1410         * page/WebKitAnimationList.idl: Removed obsolete marking code.
1411
1412 2011-04-21  Vangelis Kokkevis  <vangelis@chromium.org>
1413
1414         Reviewed by James Robinson.
1415
1416         [chromium] Only update the contents of layers that are going to
1417         be drawn. Remove individual texture unreserves that happen
1418         after the layer draw calls with a single unreserve for all the
1419         textures in the texture manager.
1420         https://bugs.webkit.org/show_bug.cgi?id=59129
1421
1422         Tests: No new functionality.  Covered by existing layout tests.
1423
1424         * platform/graphics/chromium/ContentLayerChromium.cpp:
1425         (WebCore::ContentLayerChromium::draw):
1426         * platform/graphics/chromium/ContentLayerChromium.h:
1427         * platform/graphics/chromium/ImageLayerChromium.cpp:
1428         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1429         (WebCore::ImageLayerChromium::updateCompositorResources):
1430         * platform/graphics/chromium/LayerRendererChromium.cpp:
1431         (WebCore::LayerRendererChromium::drawRootLayer):
1432         (WebCore::LayerRendererChromium::updateAndDrawLayers):
1433         (WebCore::LayerRendererChromium::updateLayers):
1434         (WebCore::LayerRendererChromium::paintLayerContents):
1435         * platform/graphics/chromium/LayerRendererChromium.h:
1436         * platform/graphics/chromium/LayerTexture.cpp:
1437         * platform/graphics/chromium/LayerTexture.h:
1438         * platform/graphics/chromium/LayerTilerChromium.cpp:
1439         * platform/graphics/chromium/LayerTilerChromium.h:
1440         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1441         (WebCore::RenderSurfaceChromium::drawSurface):
1442         * platform/graphics/chromium/TextureManager.cpp:
1443         (WebCore::TextureManager::unprotectAllTextures):
1444         * platform/graphics/chromium/TextureManager.h:
1445         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1446         (WebCore::CCHeadsUpDisplay::draw):
1447         * platform/graphics/chromium/cc/CCLayerImpl.h:
1448         (WebCore::CCLayerImpl::owner):
1449
1450 2011-04-21  Ryosuke Niwa  <rniwa@webkit.org>
1451
1452         Reviewed by Sam Weinig.
1453
1454         Add Frame* to the argument lists of canCopyCut and canPaste
1455         https://bugs.webkit.org/show_bug.cgi?id=59153
1456
1457         canCopyCut and canPaste now takes Frame* for which supportedCopyCut and supportedPaste are called.
1458         This allows editor client to grant copy/cut and paste permissions per origin.
1459
1460         * editing/EditorCommand.cpp:
1461         (WebCore::supportedCopyCut):
1462         (WebCore::supportedPaste):
1463         * loader/EmptyClients.h:
1464         (WebCore::EmptyEditorClient::canCopyCut):
1465         (WebCore::EmptyEditorClient::canPaste):
1466         * page/EditorClient.h:
1467
1468 2011-04-21  Oliver Hunt  <oliver@apple.com>
1469
1470         Whoops, change lost during merge
1471
1472         * bindings/js/JSEventListener.h:
1473
1474 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
1475
1476         Reviewed by Sam Weinig.
1477
1478         Fixed a failure seen in fast/dom/prototype-inheritance-2.html due to
1479         wrong global object use.
1480
1481         * bindings/js/JSHTMLDocumentCustom.cpp:
1482         (WebCore::JSHTMLDocument::nameGetter):
1483         (WebCore::JSHTMLDocument::all):
1484         * bindings/js/JSHTMLFormElementCustom.cpp:
1485         (WebCore::JSHTMLFormElement::nameGetter): Use the right global object.
1486
1487 2011-04-21  Oliver Hunt  <oliver@apple.com>
1488
1489         Reviewed by Geoffrey Garen.
1490
1491         Start moving to a general visitor pattern for GC traversal
1492         https://bugs.webkit.org/show_bug.cgi?id=59141
1493
1494         This is just a rename:
1495             markChildren -> visitChildren
1496             markAggregate -> visitAggregate
1497             markStack -> visitor
1498             MarkStack -> typedef'd to SlotVisitor
1499
1500         * bindings/js/JSAttrCustom.cpp:
1501         (WebCore::JSAttr::visitChildren):
1502         * bindings/js/JSAudioConstructor.cpp:
1503         (WebCore::constructAudio):
1504         * bindings/js/JSCSSRuleCustom.cpp:
1505         (WebCore::JSCSSRule::visitChildren):
1506         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1507         (WebCore::JSCSSStyleDeclaration::visitChildren):
1508         * bindings/js/JSDOMBinding.cpp:
1509         (WebCore::visitActiveObjectsForContext):
1510         (WebCore::markDOMObjectWrapper):
1511         * bindings/js/JSDOMBinding.h:
1512         * bindings/js/JSDOMGlobalObject.cpp:
1513         (WebCore::JSDOMGlobalObject::visitChildren):
1514         * bindings/js/JSDOMGlobalObject.h:
1515         * bindings/js/JSDOMImplementationCustom.cpp:
1516         (WebCore::JSDOMImplementation::visitChildren):
1517         * bindings/js/JSDOMWindowCustom.cpp:
1518         (WebCore::JSDOMWindow::visitChildren):
1519         * bindings/js/JSDOMWindowShell.cpp:
1520         (WebCore::JSDOMWindowShell::visitChildren):
1521         * bindings/js/JSDOMWindowShell.h:
1522         * bindings/js/JSDocumentCustom.cpp:
1523         (WebCore::JSDocument::visitChildren):
1524         * bindings/js/JSElementCustom.cpp:
1525         (WebCore::JSElement::visitChildren):
1526         * bindings/js/JSEventListener.cpp:
1527         (WebCore::JSEventListener::markJSFunction):
1528         * bindings/js/JSEventListener.h:
1529         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1530         (WebCore::JSHTMLCanvasElement::visitChildren):
1531         * bindings/js/JSHTMLLinkElementCustom.cpp:
1532         (WebCore::JSHTMLLinkElement::visitChildren):
1533         * bindings/js/JSHTMLStyleElementCustom.cpp:
1534         (WebCore::JSHTMLStyleElement::visitChildren):
1535         * bindings/js/JSImageConstructor.cpp:
1536         (WebCore::constructImage):
1537         * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
1538         (WebCore::JSJavaScriptAudioNode::visitChildren):
1539         * bindings/js/JSMessageChannelCustom.cpp:
1540         (WebCore::JSMessageChannel::visitChildren):
1541         * bindings/js/JSMessagePortCustom.cpp:
1542         (WebCore::JSMessagePort::visitChildren):
1543         * bindings/js/JSNamedNodeMapCustom.cpp:
1544         (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
1545         (WebCore::JSNamedNodeMap::visitChildren):
1546         * bindings/js/JSNavigatorCustom.cpp:
1547         (WebCore::JSNavigator::visitChildren):
1548         * bindings/js/JSNodeCustom.cpp:
1549         (WebCore::isObservable):
1550         (WebCore::isReachableFromDOM):
1551         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1552         (WebCore::JSNode::visitChildren):
1553         * bindings/js/JSNodeCustom.h:
1554         * bindings/js/JSNodeFilterCondition.cpp:
1555         (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
1556         * bindings/js/JSNodeFilterCondition.h:
1557         * bindings/js/JSNodeFilterCustom.cpp:
1558         (WebCore::JSNodeFilter::visitChildren):
1559         * bindings/js/JSNodeIteratorCustom.cpp:
1560         (WebCore::JSNodeIterator::visitChildren):
1561         * bindings/js/JSNodeListCustom.cpp:
1562         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
1563         * bindings/js/JSProcessingInstructionCustom.cpp:
1564         (WebCore::JSProcessingInstruction::visitChildren):
1565         * bindings/js/JSSVGElementInstanceCustom.cpp:
1566         (WebCore::JSSVGElementInstance::visitChildren):
1567         * bindings/js/JSSharedWorkerCustom.cpp:
1568         (WebCore::JSSharedWorker::visitChildren):
1569         * bindings/js/JSStyleSheetCustom.cpp:
1570         (WebCore::JSStyleSheet::visitChildren):
1571         * bindings/js/JSTreeWalkerCustom.cpp:
1572         (WebCore::JSTreeWalker::visitChildren):
1573         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1574         (WebCore::JSWebGLRenderingContext::visitChildren):
1575         * bindings/js/JSWebKitAnimationListCustom.cpp:
1576         (WebCore::JSWebKitAnimationList::visitChildren):
1577         * bindings/js/JSWorkerContextCustom.cpp:
1578         (WebCore::JSWorkerContext::visitChildren):
1579         * bindings/js/JSXMLHttpRequestCustom.cpp:
1580         (WebCore::JSXMLHttpRequest::visitChildren):
1581         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1582         (WebCore::JSXMLHttpRequestUpload::visitChildren):
1583         * bindings/scripts/CodeGeneratorJS.pm:
1584         * bridge/qt/qt_instance.cpp:
1585         (JSC::Bindings::QtRuntimeObject::visitChildren):
1586         (JSC::Bindings::QtInstance::markAggregate):
1587         * bridge/qt/qt_instance.h:
1588         * bridge/qt/qt_pixmapruntime.cpp:
1589         * bridge/qt/qt_runtime.cpp:
1590         (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
1591         * bridge/qt/qt_runtime.h:
1592         * dom/EventListener.h:
1593         (WebCore::EventListener::visitJSFunction):
1594         * dom/EventTarget.h:
1595         (WebCore::EventTarget::visitJSEventListeners):
1596         * dom/Node.h:
1597         * dom/NodeFilterCondition.h:
1598         (WebCore::NodeFilterCondition::visitAggregate):
1599         * page/DOMWindow.h:
1600         * workers/WorkerContext.h:
1601
1602 2011-04-21  Beth Dakin  <bdakin@apple.com>
1603
1604         Reviewed by Dan Bernstein.
1605
1606         https://bugs.webkit.org/show_bug.cgi?id=59048
1607         Need to track whether overlay scrollbar is currently visible and in lower-
1608         righthand corner
1609         -and corresponding-
1610         <rdar://problem/9211232>
1611
1612         Whenever we start a new ScrollbarPartAnimation, check if the scrollbar is vertical 
1613         and showing (alpha of 1), and if so, call setVisibleScrollerThumbRect with the 
1614         knob rect, otherwise with an empty rect. ScrollAnimatorMac has a local rect to 
1615         track this value so that it can avoid sending messages across the ChromeClient to 
1616         the UIProcess if the rect has not changed.
1617         * platform/mac/ScrollAnimatorMac.h:
1618         * platform/mac/ScrollAnimatorMac.mm:
1619         (-[ScrollbarPainterDelegate setUpAnimation:scrollerPainter:part:WebCore::animateAlphaTo:duration:]):
1620         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1621         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
1622
1623         Plumbing for the chrome client.
1624         * page/ChromeClient.h:
1625         (WebCore::ChromeClient::notifyScrollerThumbIsVisibleInRect):
1626         * page/FrameView.cpp:
1627         (WebCore::FrameView::setVisibleScrollerThumbRect):
1628         * page/FrameView.h:
1629         * platform/ScrollableArea.h:
1630         (WebCore::ScrollableArea::setVisibleScrollerThumbRect):
1631
1632         New WebCoreSystemInterface function to get the knob rect.
1633         * WebCore.exp.in:
1634         * platform/mac/WebCoreSystemInterface.h:
1635         * platform/mac/WebCoreSystemInterface.mm:
1636
1637 2011-04-21  Nat Duca  <nduca@chromium.org>
1638
1639         Reviewed by James Robinson.
1640
1641         [chromium] Fix artefacts in compositor HUD when resizing
1642         https://bugs.webkit.org/show_bug.cgi?id=58969
1643
1644         HUD was using the tiler program and not setting the texture
1645         transform. The HUD would thus draw with a texture transform based
1646         on the last tile drawn, leading sometimes to distortion.
1647
1648         * platform/graphics/chromium/LayerRendererChromium.cpp:
1649         (WebCore::LayerRendererChromium::initializeSharedObjects):
1650         (WebCore::LayerRendererChromium::cleanupSharedObjects):
1651         * platform/graphics/chromium/LayerRendererChromium.h:
1652         (WebCore::LayerRendererChromium::headsUpDisplayProgram):
1653         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1654         (WebCore::CCHeadsUpDisplay::draw):
1655         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1656
1657 2011-04-21  Mike Reed  <reed@google.com>
1658
1659         Reviewed by Kenneth Russell.
1660
1661         only return false if we actually in a skia-gpu accelerated canvas for isNativeFontRenderingAllowed
1662         https://bugs.webkit.org/show_bug.cgi?id=59024
1663
1664         No new tests. The bug (and fix) depend on enabling SKIA_GPU. When that is enabled, the bug
1665         shows all text w/o lcd rendering. This is a regression from a recent CL when we switch to
1666         calling skia::SupportsPlatformPaint. This CL fixes that.
1667         There should be no change for the default builds when SKIA_GPU is not enabled.
1668
1669         * platform/graphics/skia/PlatformContextSkia.cpp:
1670         (WebCore::PlatformContextSkia::isNativeFontRenderingAllowed):
1671
1672 2011-04-21  Adrienne Walker  <enne@google.com>
1673
1674         Reviewed by James Robinson.
1675
1676         [chromium] Don't upload partially drawn tiles in the compositor
1677         https://bugs.webkit.org/show_bug.cgi?id=59112
1678
1679         Use the same set of tiles for painting as is used for updating.
1680         Before, a larger set of tiles were being uploaded, causing some to
1681         only be partially undirtied because they were not fully painted.
1682         As tiles are clear their dirty rect after being unpainted, this caused
1683         artifacts to appear when scrolling.
1684
1685         Unfortunately, no layout test can test this behavior yet because
1686         scrolling invalidations are done differently in test shell.
1687
1688         * platform/graphics/chromium/ImageLayerChromium.cpp:
1689         (WebCore::ImageLayerChromium::updateCompositorResources):
1690         * platform/graphics/chromium/LayerTilerChromium.cpp:
1691         (WebCore::LayerTilerChromium::update):
1692         (WebCore::LayerTilerChromium::uploadCanvas):
1693         (WebCore::LayerTilerChromium::updateFromPixels):
1694         * platform/graphics/chromium/LayerTilerChromium.h:
1695
1696 2011-04-21  Ben Taylor  <bentaylor.solx86@gmail.com>
1697
1698         Reviewed by Alexey Proskuryakov.
1699
1700         https://bugs.webkit.org/show_bug.cgi?id=58725
1701
1702         Fix a compile issue on Solaris 10 with Sun Studio 12,
1703         ternary operators (?:) must have the same types
1704
1705         * loader/DocumentLoader.cpp:
1706         (WebCore::DocumentLoader::popArchiveForSubframe):
1707         * loader/archive/ArchiveFactory.cpp:
1708         (WebCore::ArchiveFactory::create):
1709         * loader/icon/IconDatabase.cpp:
1710         (WebCore::IconDatabase::setIconDataForIconURL):
1711         * page/animation/AnimationBase.cpp:
1712         (WebCore::blendFunc):
1713         * rendering/RenderLayer.cpp:
1714         (WebCore::RenderLayer::updateScrollCornerStyle):
1715         (WebCore::RenderLayer::updateResizerStyle):
1716         * rendering/RenderScrollbar.cpp:
1717         (WebCore::RenderScrollbar::updateScrollbarPart):
1718         * rendering/RenderTextFragment.cpp:
1719         (WebCore::RenderTextFragment::RenderTextFragment):
1720
1721 2011-04-21  Mike Reed  <reed@google.com>
1722
1723         Reviewed by Kenneth Russell.
1724
1725         [chromium, win] Multiple failures of shadow rendering layout tests
1726         https://bugs.webkit.org/show_bug.cgi?id=58772
1727
1728         No new tests. This CL fixes a regression in the following tests
1729         fast/multicol/shadow-breaking.html
1730         fast/repaint/shadow-multiple-horizontal.html
1731         fast/repaint/shadow-multiple-strict-horizontal.html
1732         fast/repaint/shadow-multiple-strict-vertical.html
1733         fast/repaint/shadow-multiple-vertical.html
1734         fast/text/shadow-translucent-fill.html
1735         fast/transforms/shadows.html
1736         svg/css/group-with-shadow.svg
1737         svg/css/shadow-changes.svg
1738         svg/css/text-shadow-multiple.xhtml
1739         transitions/svg-text-shadow-transition.html
1740         svg/css/composite-shadow-text.svg
1741  
1742
1743         * platform/graphics/skia/GraphicsContextSkia.cpp:
1744         (WebCore::GraphicsContext::setPlatformShadow):
1745
1746 2011-04-21  Geoffrey Garen  <ggaren@apple.com>
1747
1748         Try to fix the Qt build.
1749
1750         * UseJSC.cmake:
1751         * WebCore.pro: Use correct file name.
1752
1753 2011-04-21  Dirk Schulze  <krit@webkit.org>
1754
1755         Unreviewed Qt build fix.
1756
1757         SVG feDropShadow implementation of SVG Filters 1.2
1758         https://bugs.webkit.org/show_bug.cgi?id=52513
1759
1760         * CodeGenerators.pri:
1761
1762 2011-04-21  Adrienne Walker  <enne@google.com>
1763
1764         Reviewed by James Robinson.
1765
1766         [chromium] Clamp dirty regions on content layers to layer bounds
1767         https://bugs.webkit.org/show_bug.cgi?id=58933
1768
1769         This prevents garbage being rendered when layers are resized and a
1770         previous invalidation (now off-layer) is no longer valid.
1771
1772         * platform/graphics/chromium/ContentLayerChromium.cpp:
1773         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1774
1775 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
1776
1777         Reviewed by Kent Tamura.
1778
1779         Bug 59012 - Shadows should be imported along with their host nodes
1780         https://bugs.webkit.org/show_bug.cgi?id=59012
1781
1782         Copy the shadow tree of an element (even on a shallow copy!).
1783
1784         Test: fast/dom/shadow/import-shadowroot.html
1785
1786         * dom/Element.cpp:
1787         (WebCore::Element::copyNonAttributeProperties):
1788         * dom/Element.h:
1789
1790 2011-04-20  Geoffrey Garen  <ggaren@apple.com>
1791
1792         Reviewed by Oliver Hunt.
1793
1794         Removed a use of markDOMObjectWrapper: CSS Object Model
1795         https://bugs.webkit.org/show_bug.cgi?id=59057
1796
1797         This is 24 hours of my life I will never get back. Thank you, W3C.
1798
1799         * GNUmakefile.list.am:
1800         * WebCore.gypi:
1801         * WebCore.vcproj/WebCore.vcproj:
1802         * WebCore.xcodeproj/project.pbxproj: Build!
1803
1804         * bindings/js/JSCSSFontFaceRuleCustom.cpp:
1805         * bindings/js/JSCSSImportRuleCustom.cpp:
1806         * bindings/js/JSCSSMediaRuleCustom.cpp:
1807         * bindings/js/JSCSSPageRuleCustom.cpp:
1808         * bindings/js/JSCSSRuleCustom.cpp:
1809         (WebCore::JSCSSRuleOwner::isReachableFromOpaqueRoots):
1810         (WebCore::JSCSSRuleOwner::finalize):
1811         (WebCore::wrapperOwner):
1812         (WebCore::wrapperContext):
1813         (WebCore::JSCSSRule::markChildren):
1814         * bindings/js/JSCSSRuleListCustom.cpp:
1815         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1816         (WebCore::JSCSSRuleListOwner::finalize):
1817         (WebCore::wrapperOwner):
1818         (WebCore::wrapperContext):
1819         (WebCore::toJS):
1820         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1821         (WebCore::JSCSSStyleDeclarationOwner::isReachableFromOpaqueRoots):
1822         (WebCore::JSCSSStyleDeclarationOwner::finalize):
1823         (WebCore::wrapperOwner):
1824         (WebCore::wrapperContext):
1825         (WebCore::JSCSSStyleDeclaration::markChildren): Removed custom mark functions,
1826         and replaced with use of the opaque roots system. This has the nice benefit
1827         of allowing us to eagerly recycle far more CSS wrappers and their associated
1828         DOM wrappers.
1829
1830         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Made this function
1831         custom because it must maintain the sorrowful invariant that primitive
1832         values can be mapped back to objects that are reachable through the DOM.
1833         We maintain this invariant through an external hash table because
1834         making all primitive values bigger would be a too-large memory use
1835         penalty. Luckily, nobody uses this feature, so the cost of the hash table
1836         is no big deal.
1837
1838         (WebCore::toJS): We need a custom toJS so we can specify our own WeakHandleOwner.
1839
1840         * bindings/js/JSCSSStyleRuleCustom.cpp: Removed custom mark, as above.
1841
1842         * bindings/js/JSCSSValueCustom.cpp:
1843         (WebCore::cssValueRoots):
1844         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
1845         (WebCore::JSCSSValueOwner::finalize):
1846         (WebCore::wrapperOwner):
1847         (WebCore::wrapperContext): Use the opaque roots system. Piggy-back on
1848         the external hash table filled by JSCSSStyleDeclaration::getPropertyCSSValue.
1849
1850         * bindings/js/JSDocumentCustom.cpp:
1851         (WebCore::JSDocument::markChildren): No need to mark our stylesheet list,
1852         since all style-related objects can use our opaque root to determine
1853         liveness.
1854
1855         * bindings/js/JSMediaListCustom.cpp: Added.
1856         (WebCore::JSMediaListOwner::isReachableFromOpaqueRoots):
1857         (WebCore::JSMediaListOwner::finalize):
1858         (WebCore::wrapperOwner):
1859         (WebCore::wrapperContext):
1860         (WebCore::toJS): Use the opaque roots system.
1861
1862         * bindings/js/JSNodeCustom.h:
1863         (WebCore::root): Added helpers for computing style-related roots.
1864
1865         * bindings/js/JSStyleSheetCustom.cpp:
1866         (WebCore::JSStyleSheetOwner::isReachableFromOpaqueRoots):
1867         (WebCore::JSStyleSheetOwner::finalize):
1868         (WebCore::wrapperOwner):
1869         (WebCore::wrapperContext):
1870         (WebCore::JSStyleSheet::markChildren): Use the opaque roots system instead
1871         of direct marking.
1872         
1873         * bindings/js/JSStyleSheetListCustom.cpp:
1874         (WebCore::JSStyleSheetListOwner::isReachableFromOpaqueRoots):
1875         (WebCore::JSStyleSheetListOwner::finalize):
1876         (WebCore::wrapperOwner):
1877         (WebCore::wrapperContext):
1878         (WebCore::toJS): Ditto.
1879
1880         * bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp:
1881         * bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp:
1882         * css/CSSFontFaceRule.idl:
1883         * css/CSSImportRule.idl: No more custom mark, since we use the opaque
1884         roots system instead.
1885
1886         * css/CSSMediaRule.cpp:
1887         (WebCore::CSSMediaRule::CSSMediaRule): Fixed a bug where a media rule
1888         would incorrectly have no parent, since this got in the way of correctly
1889         computing the media rule's root.
1890
1891         * css/CSSMediaRule.idl:
1892         * css/CSSPageRule.idl:
1893         * css/CSSRuleList.idl:
1894         * css/CSSStyleDeclaration.idl:
1895         * css/CSSStyleRule.idl:
1896         * css/MediaList.idl: Match behavior changes above.
1897
1898         * css/StyleBase.cpp:
1899         (WebCore::StyleBase::node): Helper function for computing roots of the
1900         style system. This object model is pretty weird and not very well factored,
1901         but I'm pretty sure this covers all the relevant cases.
1902
1903         * css/StyleBase.h:
1904         * css/StyleSheetList.idl:
1905         * css/WebKitCSSKeyframeRule.idl:
1906         * css/WebKitCSSKeyframesRule.idl: Updated to match the behavior changes above.
1907
1908 2011-04-21  Dirk Schulze  <krit@webkit.org>
1909
1910         Reviewed by Nikolas Zimmermann.
1911
1912         SVG feDropShadow implementation of SVG Filters 1.2
1913         https://bugs.webkit.org/show_bug.cgi?id=52513
1914
1915         This is the implementation of feDropShadow, a shorthand filter and a combination of feGaussianBlur,
1916         feOffset, feFlood and feComposite to create a drop shadow of an input effect.
1917         Creating this new filter effect makes it possible to optimize the often used workflow. ShadowBlur, with its
1918         fast blurring algorithm, is used to blur the shadow and composite operators are responsible for combining the
1919         source with different colored shadows.
1920         Shadow color and opacity can be set with the properties flood-color and flood-opacity.
1921
1922         Tests: svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
1923                svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
1924                svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
1925                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
1926                svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
1927                svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
1928                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
1929                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
1930                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
1931                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
1932                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
1933                svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
1934                svg/filters/feDropShadow.svg
1935
1936         * Android.mk:
1937         * CMakeLists.txt:
1938         * DerivedSources.cpp:
1939         * DerivedSources.make:
1940         * GNUmakefile.list.am:
1941         * WebCore.exp.in:
1942         * WebCore.gypi:
1943         * WebCore.pro:
1944         * WebCore.vcproj/WebCore.vcproj:
1945         * WebCore.xcodeproj/project.pbxproj:
1946         * bindings/objc/DOM.mm:
1947         (WebCore::createElementClassMap):
1948         * bindings/objc/DOMSVG.h:
1949         * page/DOMWindow.idl:
1950         * platform/graphics/ShadowBlur.cpp: Added missing copyright after r84410.
1951         * platform/graphics/ShadowBlur.h: Made blurLayerImage public.
1952         * platform/graphics/filters/FEDropShadow.cpp: Added.
1953         (WebCore::FEDropShadow::FEDropShadow):
1954         (WebCore::FEDropShadow::create):
1955         (WebCore::FEDropShadow::determineAbsolutePaintRect):
1956         (WebCore::FEDropShadow::apply):
1957         (WebCore::FEDropShadow::dump):
1958         (WebCore::FEDropShadow::externalRepresentation):
1959         * platform/graphics/filters/FEDropShadow.h: Added.
1960         (WebCore::FEDropShadow::stdDeviationX):
1961         (WebCore::FEDropShadow::setStdDeviationX):
1962         (WebCore::FEDropShadow::stdDeviationY):
1963         (WebCore::FEDropShadow::setStdDeviationY):
1964         (WebCore::FEDropShadow::dx):
1965         (WebCore::FEDropShadow::setDx):
1966         (WebCore::FEDropShadow::dy):
1967         (WebCore::FEDropShadow::setDy):
1968         (WebCore::FEDropShadow::shadowColor):
1969         (WebCore::FEDropShadow::setShadowColor):
1970         (WebCore::FEDropShadow::shadowOpacity):
1971         (WebCore::FEDropShadow::setShadowOpacity):
1972         * platform/graphics/filters/FEGaussianBlur.cpp:
1973         (WebCore::FEGaussianBlur::calculateKernelSize): Make kernel calculations accessible for feDropShadow.
1974         * platform/graphics/filters/FEGaussianBlur.h:
1975         * svg/SVGAllInOne.cpp:
1976         * svg/SVGFEDropShadowElement.cpp: Added.
1977         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
1978         (WebCore::SVGFEDropShadowElement::create):
1979         (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
1980         (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
1981         (WebCore::SVGFEDropShadowElement::setStdDeviation):
1982         (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
1983         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
1984         (WebCore::SVGFEDropShadowElement::synchronizeProperty):
1985         (WebCore::SVGFEDropShadowElement::build):
1986         * svg/SVGFEDropShadowElement.h: Added.
1987         * svg/SVGFEDropShadowElement.idl: Added.
1988         * svg/svgtags.in:
1989
1990 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
1991
1992         Reviewed by Dimitri Glazkov.
1993
1994         Bug 58704 - Decide on node type for ShadowRoot
1995         https://bugs.webkit.org/show_bug.cgi?id=58704
1996
1997         Add a new node type SHADOW_ROOT_NODE.
1998         Adapt all calling sites of nodeType(). 
1999
2000         Test: fast/dom/shadow/nodetype.html
2001
2002         * bindings/js/JSNodeCustom.cpp:
2003         (WebCore::createWrapperInline):
2004         * bindings/objc/DOM.mm:
2005         (kitClass):
2006         * bindings/v8/custom/V8NodeCustom.cpp:
2007         (WebCore::toV8Slow):
2008         * dom/Document.cpp:
2009         (WebCore::Document::importNode):
2010         (WebCore::Document::childTypeAllowed):
2011         (WebCore::Document::canReplaceChild):
2012         * dom/Node.cpp:
2013         (WebCore::Node::dumpStatistics):
2014         (WebCore::Node::isDefaultNamespace):
2015         (WebCore::Node::lookupPrefix):
2016         (WebCore::Node::lookupNamespaceURI):
2017         (WebCore::appendTextContent):
2018         (WebCore::Node::setTextContent):
2019         * dom/Node.h:
2020         * dom/Range.cpp:
2021         (WebCore::lengthOfContentsInNode):
2022         (WebCore::Range::processContentsBetweenOffsets):
2023         (WebCore::Range::insertNode):
2024         (WebCore::Range::checkNodeWOffset):
2025         (WebCore::Range::checkNodeBA):
2026         (WebCore::Range::selectNode):
2027         (WebCore::Range::selectNodeContents):
2028         (WebCore::Range::surroundContents):
2029         * dom/ShadowRoot.cpp:
2030         (WebCore::ShadowRoot::nodeType):
2031         * dom/Traversal.cpp:
2032         (WebCore::Traversal::acceptNode):
2033         * editing/MarkupAccumulator.cpp:
2034         (WebCore::MarkupAccumulator::appendStartMarkup):
2035         * html/parser/HTMLElementStack.cpp:
2036         (WebCore::HTMLNames::isRootNode):
2037         (WebCore::HTMLElementStack::pushRootNode):
2038         * html/parser/HTMLElementStack.h:
2039         (WebCore::isInHTMLNamespace):
2040         * xml/XPathUtil.cpp:
2041         (WebCore::XPath::isValidContextNode):
2042
2043 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
2044
2045         Reviewed by Kent Tamura.
2046
2047         REGRESSION (r75543): Styles bleed into new shadow DOM (like slider and video)
2048         https://bugs.webkit.org/show_bug.cgi?id=52917
2049
2050         In order to determine whether a rule should apply inside of a shadow DOM subtree,
2051         we collect three pieces of information:
2052
2053         1) Are we parsing UA sheets?
2054         2) Does the current tree scope allows applying author sheets?
2055         3) Does the rule explicitly reach into shadow DOM (using pseudo-elements, for example)?
2056
2057         If the answer to all of these is no, we ignore the rule.
2058
2059         Test: fast/css/shadow-dom-scope.html
2060
2061         * css/CSSStyleSelector.cpp:
2062         (WebCore::MatchingUARulesScope::MatchingUARulesScope): Added a scope helper to
2063             track whether we are currently matching UA rules.
2064         (WebCore::CSSStyleSelector::matchRulesForList): Added the check for three
2065             conditions mentioned above.
2066         (WebCore::CSSStyleSelector::SelectorChecker::SelectorChecker): Added
2067             initializer for the flag, which helps us determine whether the rule
2068             explicitly reaches into shadow DOM.
2069         (WebCore::CSSStyleSelector::matchUARules): Started using the scope helper.
2070         (WebCore::CSSStyleSelector::checkSelector): Added initializing of the
2071             flag.
2072         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Added setting
2073             of the flag when we encounter unknown pseudo-elements.
2074         * css/CSSStyleSelector.h: Adjusted decls.
2075         * dom/ShadowRoot.cpp:
2076         (WebCore::ShadowRoot::applyAuthorSheets): Added.
2077         * dom/ShadowRoot.h: Adjusted decls.
2078         * dom/TreeScope.cpp:
2079         (WebCore::TreeScope::applyAuthorSheets): Added.
2080         * dom/TreeScope.h: Adjusted decls.
2081
2082 2011-04-21  Levi Weintraub  <leviw@chromium.org>
2083
2084         Reviewed by Simon Fraser.
2085
2086         position fixed element does not render properly when dynamically updated via javascript
2087         https://bugs.webkit.org/show_bug.cgi?id=54297
2088
2089         Disabling the LayoutState fast-path for fixed-position content.
2090
2091         Tests: fast/repaint/fixed-contents-changed-after-scroll.html
2092                fast/repaint/transformed-contents-changed-after-scroll.html
2093
2094         * rendering/RenderBox.cpp:
2095         (WebCore::RenderBox::computeRectForRepaint):
2096
2097 2011-04-20  Matthew Delaney  <mdelaney@apple.com>
2098
2099         Reviewed by Maciej Stachowiak.
2100
2101         arc() should add a circle to the path when start and end angles are far enough apart
2102         https://bugs.webkit.org/show_bug.cgi?id=58934
2103
2104         Test: fast/canvas/canvas_arc_largeangles.html
2105
2106         * html/canvas/CanvasRenderingContext2D.cpp:
2107         (WebCore::CanvasRenderingContext2D::arc):
2108
2109 2011-04-20  MORITA Hajime  <morrita@google.com>
2110
2111         Reviewed by Dimitri Glazkov.
2112
2113         Content of <summary> should be forwarded through the shadow DOM
2114         https://bugs.webkit.org/show_bug.cgi?id=58914
2115
2116         - Introduced ShadowContentElement which hosts forwarded children of <summary>
2117         - Encapsulated Node::parentNodeForRenderingAndStyle() and shouldCreateRendererFor()
2118           into NodeVisualParentLookupResult class.
2119         - The parent lookup is also aware of node forwarding. If the visual parent node has
2120           a shadow root, the node is possibly forwarded to ShadowContentElement
2121         - ShadowContentElement lookup is implemented inside ShadowRoot.
2122         
2123         Tests: fast/html/details-add-summary-child-1.html
2124                fast/html/details-add-summary-child-2.html
2125                fast/html/details-remove-summary-child-1.html
2126                fast/html/details-remove-summary-child-2.html
2127
2128         * GNUmakefile.list.am:
2129         * WebCore.gypi:
2130         * WebCore.vcproj/WebCore.vcproj:
2131         * WebCore.xcodeproj/project.pbxproj:
2132         * dom/Element.cpp:
2133         (WebCore::Element::childrenChanged):
2134         * dom/Node.cpp:
2135         (WebCore::NodeRenderParentDetector::NodeRenderParentDetector):
2136         (WebCore::NodeRenderParentDetector::parentNodeForRenderingAndStyle):
2137         (WebCore::NodeRenderParentDetector::findVisualParent):
2138         (WebCore::NodeRenderParentDetector::shouldCreateRenderer):
2139         (WebCore::Node::parentNodeForRenderingAndStyle):
2140         (WebCore::Node::createRendererAndStyle):
2141         * dom/ShadowRoot.cpp:
2142         (WebCore::ShadowRoot::contentContainerFor):
2143         (WebCore::ShadowRoot::hostChildrenChanged):
2144         (WebCore::ShadowRoot::firstContentElement):
2145         * dom/ShadowRoot.h:
2146         * html/HTMLSummaryElement.cpp:
2147         (WebCore::HTMLSummaryElement::createShadowSubtree):
2148         * html/HTMLSummaryElement.h:
2149         * html/shadow/ShadowContentElement.h: Copied from Source/WebCore/dom/ShadowRoot.h.
2150         (WebCore::ShadowContentElement::ShadowContentElement):
2151         (WebCore::ShadowContentElement::isShadowBoundary):
2152         (WebCore::ShadowContentElement::createRenderer):
2153         (WebCore::ShadowContentElement::create):
2154
2155 2011-04-21  Andrey Kosyakov  <caseq@chromium.org>
2156
2157         Reviewed by Pavel Feldman.
2158
2159         Web Inspector: fix calls to WebInspector.ObjectPropertiesSection constructor
2160         https://bugs.webkit.org/show_bug.cgi?id=59105
2161
2162         * inspector/front-end/ConsoleView.js:
2163         (WebInspector.ConsoleView.prototype._formatobject):
2164         * inspector/front-end/ExtensionPanel.js:
2165         (WebInspector.ExtensionSidebarPane.prototype._setObject):
2166         * inspector/front-end/ResourceJSONView.js:
2167         (WebInspector.ResourceJSONView.parseJSON.WebInspector.ResourceJSONView.prototype._initialize):
2168         * inspector/front-end/SourceFrame.js:
2169         (WebInspector.SourceFrame.prototype._showPopup.showObjectPopup):
2170         (WebInspector.SourceFrame.prototype._showPopup):
2171
2172 2011-04-21  Adam Barth  <abarth@webkit.org>
2173
2174         Remove support for CSP's frame-src.  This approach causes too many
2175         extra console messages to be logged.  I'm leaving in the test (which
2176         now shows failure).
2177
2178         * html/HTMLFrameElementBase.cpp:
2179         (WebCore::HTMLFrameElementBase::isURLAllowed):
2180
2181 2011-04-21  Eunsol Park  <eunsol47.park@samsung.com>
2182
2183         Reviewed by Antonio Gomes.
2184
2185         [EFL] Scroll doesn't work on tiled backing store.
2186         https://bugs.webkit.org/show_bug.cgi?id=55021
2187
2188         It was added from Changeset 72242, but it worked wrong in EFL port.
2189         The visible rect should not be returned as content rect for scrolling in EFL tiled backing store, 
2190         because it works differently from QT.
2191
2192         * platform/ScrollView.cpp:
2193         (WebCore::ScrollView::visibleContentRect):
2194
2195 2011-04-21  Simon Fraser  <simon.fraser@apple.com>
2196
2197         Reviewed by Eric Seidel.
2198
2199         Create RIAA class for GraphicsContext::save() and restore()
2200         https://bugs.webkit.org/show_bug.cgi?id=58807
2201
2202         Use GraphicsContextStateSaver in a lot more places.
2203
2204         * html/canvas/CanvasRenderingContext2D.cpp:
2205         (WebCore::CanvasRenderingContext2D::drawImage):
2206         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2207         * platform/ScrollView.cpp:
2208         (WebCore::ScrollView::wheelEvent):
2209         * platform/graphics/GeneratedImage.cpp:
2210         (WebCore::GeneratedImage::draw):
2211         * platform/graphics/GraphicsContext.h:
2212         (WebCore::GraphicsContextStateSaver::save):
2213         (WebCore::GraphicsContextStateSaver::restore):
2214         * platform/graphics/ShadowBlur.cpp:
2215         (WebCore::ShadowBlur::drawShadowBuffer):
2216         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
2217         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2218         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2219         (WebCore::ShadowBlur::drawRectShadowWithTiling):
2220         (WebCore::ShadowBlur::drawLayerPieces):
2221         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2222         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
2223         * platform/graphics/cg/ImageCG.cpp:
2224         (WebCore::BitmapImage::draw):
2225         (WebCore::Image::drawPattern):
2226         * platform/graphics/cg/PDFDocumentImage.cpp:
2227         (WebCore::PDFDocumentImage::draw):
2228         * platform/graphics/filters/FEComposite.cpp:
2229         (WebCore::FEComposite::apply):
2230         * platform/graphics/filters/SourceAlpha.cpp:
2231         (WebCore::SourceAlpha::apply):
2232         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2233         (WebCore::MediaPlayerPrivateQTKit::paint):
2234         * platform/mac/ScrollbarThemeMac.mm:
2235         (WebCore::ScrollbarThemeMac::paint):
2236         * platform/mac/ThemeMac.mm:
2237         (WebCore::paintCheckbox):
2238         (WebCore::paintRadio):
2239         (WebCore::paintStepper):
2240         * rendering/EllipsisBox.cpp:
2241         (WebCore::EllipsisBox::paintSelection):
2242         * rendering/InlineFlowBox.cpp:
2243         (WebCore::InlineFlowBox::paintFillLayer):
2244         (WebCore::InlineFlowBox::paintBoxDecorations):
2245         (WebCore::InlineFlowBox::paintMask):
2246         * rendering/InlineTextBox.cpp:
2247         (WebCore::InlineTextBox::paint):
2248         (WebCore::InlineTextBox::paintSelection):
2249         (WebCore::InlineTextBox::paintCompositionBackground):
2250         (WebCore::InlineTextBox::paintDecoration):
2251         (WebCore::InlineTextBox::paintTextMatchMarker):
2252         * rendering/RenderBlock.cpp:
2253         (WebCore::RenderBlock::paintColumnContents):
2254         (WebCore::RenderBlock::paintSelection):
2255         * rendering/RenderBox.cpp:
2256         (WebCore::RenderBox::paintBoxDecorationsWithSize):
2257         * rendering/RenderBoxModelObject.cpp:
2258         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2259         (WebCore::RenderBoxModelObject::paintBorder):
2260         * rendering/RenderEmbeddedObject.cpp:
2261         (WebCore::RenderEmbeddedObject::paintReplaced):
2262         * rendering/RenderFieldset.cpp:
2263         (WebCore::RenderFieldset::paintBoxDecorations):
2264         * rendering/RenderFileUploadControl.cpp:
2265         (WebCore::RenderFileUploadControl::paintObject):
2266         * rendering/RenderLayer.cpp:
2267         (WebCore::RenderLayer::paintResizer):
2268         (WebCore::RenderLayer::paintLayer):
2269         (WebCore::RenderLayer::paintChildLayerIntoColumns):
2270         * rendering/RenderListMarker.cpp:
2271         (WebCore::RenderListMarker::paint):
2272         * rendering/RenderMediaControls.cpp:
2273         (WebCore::RenderMediaControls::paintMediaControlsPart):
2274         * rendering/RenderTableCell.cpp:
2275         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2276         * rendering/RenderTextControl.cpp:
2277         (WebCore::RenderTextControl::paintPlaceholder):
2278         * rendering/RenderThemeMac.mm:
2279         (WebCore::RenderThemeMac::paintMenuList):
2280         (WebCore::RenderThemeMac::paintMeter):
2281         (WebCore::RenderThemeMac::paintProgressBar):
2282         (WebCore::RenderThemeMac::paintMenuListButtonGradients):
2283         (WebCore::RenderThemeMac::paintMenuListButton):
2284         (WebCore::RenderThemeMac::paintSliderTrack):
2285         (WebCore::RenderThemeMac::paintSliderThumb):
2286         (WebCore::RenderThemeMac::paintSearchField):
2287         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
2288         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
2289         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2290         (WebCore::RenderThemeMac::paintMediaCurrentTime):
2291         (WebCore::RenderThemeMac::paintMediaTimeRemaining):
2292         * rendering/mathml/RenderMathMLBlock.cpp:
2293         (WebCore::RenderMathMLBlock::paint):
2294         * rendering/mathml/RenderMathMLFraction.cpp:
2295         (WebCore::RenderMathMLFraction::paint):
2296         * rendering/mathml/RenderMathMLRoot.cpp:
2297         (WebCore::RenderMathMLRoot::paint):
2298         * rendering/mathml/RenderMathMLSquareRoot.cpp:
2299         (WebCore::RenderMathMLSquareRoot::paint):
2300         * rendering/svg/RenderSVGContainer.cpp:
2301         (WebCore::RenderSVGContainer::paint):
2302         * rendering/svg/RenderSVGForeignObject.cpp:
2303         (WebCore::RenderSVGForeignObject::paint):
2304         * rendering/svg/RenderSVGImage.cpp:
2305         (WebCore::RenderSVGImage::paint):
2306         * rendering/svg/RenderSVGPath.cpp:
2307         (WebCore::RenderSVGPath::fillAndStrokePath):
2308         (WebCore::RenderSVGPath::paint):
2309         * rendering/svg/RenderSVGResourceClipper.cpp:
2310         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2311         * rendering/svg/RenderSVGResourceMarker.cpp:
2312         (WebCore::RenderSVGResourceMarker::draw):
2313         * rendering/svg/RenderSVGText.cpp:
2314         (WebCore::RenderSVGText::paint):
2315         * rendering/svg/SVGInlineFlowBox.cpp:
2316         (WebCore::SVGInlineFlowBox::paint):
2317         * rendering/svg/SVGInlineTextBox.cpp:
2318         (WebCore::SVGInlineTextBox::paintSelectionBackground):
2319         (WebCore::SVGInlineTextBox::paint):
2320         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
2321         * rendering/svg/SVGRootInlineBox.cpp:
2322         (WebCore::SVGRootInlineBox::paint):
2323         * svg/SVGFont.cpp:
2324         (WebCore::Font::drawTextUsingSVGFont):
2325         * svg/graphics/SVGImage.cpp:
2326         (WebCore::SVGImage::draw):
2327
2328 2011-04-20  Andrey Kosyakov  <caseq@chromium.org>
2329
2330         Reviewed by Pavel Feldman.
2331
2332         Web Inspector: [Extensions API] console API is not exposed to code evaluated by sidebar.setExpression()
2333         https://bugs.webkit.org/show_bug.cgi?id=59006
2334
2335         * inspector/front-end/ExtensionPanel.js:
2336         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
2337
2338 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
2339
2340         Reviewed by Dirk Schulze.
2341
2342         Split SVGGlyphIdentifier class out of SVGGlyphElement.h
2343         https://bugs.webkit.org/show_bug.cgi?id=59101
2344
2345         Move SVGGlyphIdentifier class out of SVGGlyphElement.h, place it in platform/graphics/SVGGlyph.h
2346         and rename the contained struct to SVGGlyph. It will be used in follow-up patches that will integrate SVGGlyph & GlyphPage.
2347
2348         Several utility functions are moved from SVGFont.cpp to SVGGlyph.cpp, as that's the place where they really belong to.
2349         Renamed nameLength to unicodeStringLength in the SVGGlyph struct for clarity.
2350
2351         * Android.mk: Add SVGGlyph.cpp/h to build.
2352         * CMakeLists.txt: Ditto.
2353         * GNUmakefile.list.am: Ditto.
2354         * WebCore.gypi: Ditto.
2355         * WebCore.pro: Ditto.
2356         * WebCore.vcproj/WebCore.vcproj: Ditto.
2357         * WebCore.xcodeproj/project.pbxproj: Ditto.
2358         * platform/graphics/SVGGlyph.cpp: Copied from svg/SVGFont.cpp. Removed everything except the methods listed below, that belong here.
2359         (WebCore::processArabicFormDetection):
2360         (WebCore::charactersWithArabicForm):
2361         (WebCore::isCompatibleArabicForm):
2362         (WebCore::isCompatibleGlyph):
2363         * platform/graphics/SVGGlyph.h: Copied from svg/SVGGlyphElement.h. Renamed SVGGlyphIdentifier to SVGGlyph.
2364         (WebCore::SVGGlyph::SVGGlyph):
2365         (WebCore::SVGGlyph::operator==):
2366         * platform/graphics/SimpleFontData.cpp: Adapt for SVGGlyphIdentifier -> SVGGlyph and nameLength -> unicodeStringLength rename.
2367         (WebCore::SimpleFontData::SimpleFontData):
2368         * svg/SVGFont.cpp: Ditto. Remove helper functions that are now living in SVGGlyph.cpp
2369         (WebCore::SVGTextRunWalker::walk):
2370         (WebCore::floatWidthUsingSVGFontCallback):
2371         (WebCore::drawTextUsingSVGFontCallback):
2372         (WebCore::drawTextMissingGlyphCallback):
2373         (WebCore::Font::drawTextUsingSVGFont):
2374         * svg/SVGFontElement.cpp: Ditto.
2375         (WebCore::SVGFontElement::getGlyphIdentifiersForString):
2376         * svg/SVGFontElement.h: Ditto.
2377         * svg/SVGGlyphElement.cpp: Ditto.
2378         (WebCore::parseArabicForm):
2379         (WebCore::parseOrientation):
2380         (WebCore::SVGGlyphElement::inheritUnspecifiedAttributes):
2381         (WebCore::parseSVGGlyphAttribute):
2382         (WebCore::SVGGlyphElement::buildGenericGlyphIdentifier):
2383         (WebCore::SVGGlyphElement::buildGlyphIdentifier):
2384         * svg/SVGGlyphElement.h: Ditto.
2385         * svg/SVGGlyphMap.h: Ditto.
2386         (WebCore::SVGGlyphMap::add):
2387         (WebCore::SVGGlyphMap::compareGlyphPriority):
2388         (WebCore::SVGGlyphMap::get):
2389
2390 2011-04-21  Eric Carlson  <eric.carlson@apple.com>
2391
2392         Reviewed by Dan Bernstein.
2393
2394         Live streams won't play with AVFoundation backend
2395         https://bugs.webkit.org/show_bug.cgi?id=58961
2396         rdar://problem/9284748
2397
2398         Tested manually because we don't have any live streams to test in DRT.
2399
2400         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2401         (WebCore::MediaPlayerPrivateAVFoundation::seek): Do nothing when asked to seek to the
2402             current time.
2403         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): If the readyState is HaveEnoughData,
2404             don't revert when the new state is "ready to play" or "buffer full".
2405         (WebCore::MediaPlayerPrivateAVFoundation::movieLoadType): Use new convenience function isLiveStream.
2406         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2407         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream): New.
2408
2409         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2410         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Don't use AVAsset's
2411             tracksWithMediaCharacteristic because it doesn't give us what we need with live
2412             streams.
2413
2414 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2415
2416         Reviewed by Yury Semikhatsky.
2417
2418         Web Inspector: Cookies section in empty on page re-launch.
2419         https://bugs.webkit.org/show_bug.cgi?id=59095
2420
2421         * inspector/front-end/ResourcesPanel.js:
2422         (WebInspector.ResourcesPanel.prototype._reset):
2423         (WebInspector.ResourcesPanel.prototype._frameNavigated):
2424
2425 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2426
2427         Reviewed by Yury Semikhatsky.
2428
2429         Web Inspector: rename De-obfuscate to Pretty print.
2430         https://bugs.webkit.org/show_bug.cgi?id=59093
2431
2432         * English.lproj/localizedStrings.js:
2433         * inspector/front-end/SourceFrame.js:
2434         (WebInspector.SourceFrame.prototype._populateTextAreaContextMenu):
2435
2436 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2437
2438         Reviewed by Yury Semikhatsky.
2439
2440         Web Inspector: following Image URL link in the network panel does nothing.
2441         https://bugs.webkit.org/show_bug.cgi?id=59092
2442
2443         * inspector/front-end/ImageView.js:
2444         (WebInspector.ImageView.prototype._createContentIfNeeded.onImageLoad):
2445         (WebInspector.ImageView.prototype._createContentIfNeeded):
2446         * inspector/front-end/inspector.js:
2447         (WebInspector.linkifyURLAsNode):
2448
2449 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2450
2451         Reviewed by Yury Semikhatsky.
2452
2453         Web Inspector: implement Go To Line for network panel.
2454         https://bugs.webkit.org/show_bug.cgi?id=59090
2455
2456         * inspector/front-end/GoToLineDialog.js:
2457         (WebInspector.GoToLineDialog.prototype._highlightSelectedLine):
2458         * inspector/front-end/NetworkItemView.js:
2459         (WebInspector.NetworkItemView.prototype._tabSelected):
2460         (WebInspector.NetworkItemView.prototype._installHighlightSupport):
2461         * inspector/front-end/NetworkPanel.js:
2462         (WebInspector.NetworkPanel):
2463         * inspector/front-end/TabbedPane.js:
2464         (WebInspector.TabbedPane.prototype.appendTab):
2465         (WebInspector.TabbedPane.prototype.selectTab):
2466         * inspector/front-end/TextViewer.js:
2467         (WebInspector.TextViewer.prototype.highlightLine):
2468
2469 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
2470
2471         Reviewed by Dirk Schulze.
2472
2473         Split GlyphPage from GlyphPageTreeNode.h into its own header
2474         https://bugs.webkit.org/show_bug.cgi?id=59096
2475
2476         * GNUmakefile.list.am: Add GlyphPage.h to build.
2477         * WebCore.gypi: Ditto.
2478         * WebCore.vcproj/WebCore.vcproj: Ditto.
2479         * WebCore.xcodeproj/project.pbxproj: Ditto.
2480         * platform/graphics/GlyphPage.h: Copied from platform/graphics/GlyphPageTreeNode.h. Removed GlyphPageTreeNode class, leaving only GlyphPage.
2481         * platform/graphics/GlyphPageTreeNode.h: Removed GlyphPage class.
2482
2483 2011-04-21  Nikolas Zimmermann  <nzimmermann@rim.com>
2484
2485         Reviewed by Dirk Schulze.
2486
2487         Centralize typedef unsigned short Glyph in Glyph.h
2488         https://bugs.webkit.org/show_bug.cgi?id=59087
2489
2490         * GNUmakefile.list.am: Add Glyph.h to build.
2491         * WebCore.gypi: Ditto.
2492         * WebCore.vcproj/WebCore.vcproj: Ditto.
2493         * WebCore.xcodeproj/project.pbxproj: Ditto.
2494         * platform/graphics/Glyph.h: Added.
2495         * platform/graphics/GlyphBuffer.h: Include Glyph.h instead of duplicating the Glyph typedef.
2496         * platform/graphics/GlyphMetricsMap.h: Ditto.
2497         * platform/graphics/GlyphPageTreeNode.h: Ditto.
2498
2499 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2500
2501         Reviewed by Yury Semikhatsky.
2502
2503         Web Inspector: toolbar background is blank on Mac Chromium port.
2504         https://bugs.webkit.org/show_bug.cgi?id=59089
2505
2506         * inspector/front-end/inspector.css:
2507         (body.detached.platform-mac-snowleopard:not(.remote) #toolbar):
2508
2509 2011-04-21  Pavel Feldman  <pfeldman@chromium.org>
2510
2511         Reviewed by Yury Semikhatsky.
2512
2513         Web Inspector: add support for Go To Line in Resources panel.
2514         https://bugs.webkit.org/show_bug.cgi?id=59077
2515
2516         * inspector/front-end/CallStackSidebarPane.js:
2517         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
2518         * inspector/front-end/GoToLineDialog.js:
2519         (WebInspector.GoToLineDialog.show):
2520         (WebInspector.GoToLineDialog.createShortcut):
2521         (WebInspector.GoToLineDialog.prototype._onKeyDown):
2522         * inspector/front-end/NetworkPanel.js:
2523         (WebInspector.NetworkPanel.prototype.handleShortcut):
2524         * inspector/front-end/Panel.js:
2525         (WebInspector.Panel):
2526         (WebInspector.Panel.prototype._restoreScrollPositions):
2527         (WebInspector.Panel.prototype.handleShortcut):
2528         (WebInspector.Panel.prototype.registerShortcuts):
2529         (WebInspector.Panel.prototype._showGoToLineDialog):
2530         * inspector/front-end/ProfilesPanel.js:
2531         (WebInspector.ProfilesPanel.prototype.handleShortcut):
2532         * inspector/front-end/ResourcesPanel.js:
2533         (WebInspector.ResourcesPanel):
2534         * inspector/front-end/ScriptsPanel.js:
2535         (WebInspector.ScriptsPanel.prototype._registerShortcuts):
2536         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
2537         * inspector/front-end/inspector.js:
2538         (WebInspector._registerShortcuts):
2539         (WebInspector.documentKeyDown):
2540
2541 2011-04-21  Pavel Feldman  <pfeldman@google.com>
2542
2543         Reviewed by Yury Semikhatsky.
2544
2545         Web Inspector: persist local resource history between inspector / browser launches.
2546         https://bugs.webkit.org/show_bug.cgi?id=58993
2547
2548         * inspector/front-end/Resource.js:
2549         (WebInspector.Resource.prototype._restoreRevisions):
2550
2551 2011-04-20  Alexander Pavlov  <apavlov@chromium.org>
2552
2553         Reviewed by Pavel Feldman.
2554
2555         Web Inspector: Metrics pane editing and visual feedback improvements
2556         https://bugs.webkit.org/show_bug.cgi?id=58992
2557
2558         Added visual feedback when hovering over the box model components of the Metrics pane
2559         and handling of the [Page]Up/Down keys when editing the box model values.
2560
2561         * inspector/DOMNodeHighlighter.cpp:
2562         (WebCore::DOMNodeHighlighter::DrawNodeHighlight):
2563         * inspector/DOMNodeHighlighter.h:
2564         * inspector/Inspector.json:
2565         * inspector/InspectorDOMAgent.cpp:
2566         (WebCore::InspectorDOMAgent::mouseDidMoveOverElement):
2567         (WebCore::InspectorDOMAgent::highlight):
2568         (WebCore::InspectorDOMAgent::highlightDOMNode):
2569         (WebCore::InspectorDOMAgent::highlightFrame):
2570         (WebCore::InspectorDOMAgent::drawNodeHighlight):
2571         * inspector/InspectorDOMAgent.h:
2572         * inspector/front-end/CSSStyleModel.js:
2573         (WebInspector.CSSProperty.prototype.setText.callback):
2574         (WebInspector.CSSProperty.prototype.setText):
2575         (WebInspector.CSSProperty.prototype.setValue):
2576         (WebInspector.CSSProperty.prototype.setDisabled.callback):
2577         (WebInspector.CSSProperty.prototype.setDisabled):
2578         * inspector/front-end/ElementsPanel.js:
2579         (WebInspector.ElementsPanel.prototype.startEditingStyle):
2580         (WebInspector.ElementsPanel.prototype.endEditingStyle):
2581         (WebInspector.ElementsPanel.prototype._attributesUpdated):
2582         * inspector/front-end/MetricsSidebarPane.js:
2583         (WebInspector.MetricsSidebarPane):
2584         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode):
2585         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode.getBoxRectangleElement):
2586         (WebInspector.MetricsSidebarPane.prototype._update.createBoxPartElement):
2587         (WebInspector.MetricsSidebarPane.prototype._update):
2588         (WebInspector.MetricsSidebarPane.prototype.startEditing):
2589         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
2590         (WebInspector.MetricsSidebarPane.prototype.editingEnded):
2591         (WebInspector.MetricsSidebarPane.prototype.editingCancelled):
2592         (WebInspector.MetricsSidebarPane.prototype._applyUserInput.callback):
2593         (WebInspector.MetricsSidebarPane.prototype._applyUserInput):
2594         (WebInspector.MetricsSidebarPane.prototype.editingCommitted):
2595         * inspector/front-end/StylesSidebarPane.js:
2596         (WebInspector.StylesSidebarPane.alteredFloatNumber):
2597         (WebInspector.StylesSidebarPane.alteredHexNumber):
2598         (WebInspector.StylePropertyTreeElement.prototype):
2599         (WebInspector.StylePropertyTreeElement.prototype.element.userInput.previousContent.context.moveDirection):
2600         * inspector/front-end/inspector.css:
2601         (.metrics .hovered > .label):
2602         (.metrics .position):
2603         (.metrics .margin):
2604         (.metrics .margin.hovered):
2605         (.metrics .border):
2606         (.metrics .border.hovered):
2607         (.metrics .padding):
2608         (.metrics .padding.hovered):
2609         (.metrics .content):
2610         (.metrics .content.hovered):
2611         * inspector/front-end/inspector.js:
2612         (WebInspector.highlightDOMNode):
2613
2614 2011-04-21  Adam Barth  <abarth@webkit.org>
2615
2616         Reviewed by Eric Seidel.
2617
2618         CSP report-uri is missing
2619         https://bugs.webkit.org/show_bug.cgi?id=58639
2620
2621         Our implementation of report-uri differs from what's currently in the
2622         spec.  I sent the working group an email explaining why.  Generally,
2623         we're using normal form encoding instead of JSON and we're sending less
2624         information to a wider set of URLs.  Specifically, we send the current
2625         document's URL as well as the directive that was violated.  The spec
2626         (currently) tells us to send the raw HTTP headers and the URL that
2627         caused the violation, but both of these pieces of data could contain
2628         information that's sensitive, so we omit them for now.
2629
2630         Test: http/tests/security/contentSecurityPolicy/report-uri.html
2631
2632         * loader/PingLoader.cpp:
2633         (WebCore::PingLoader::reportContentSecurityPolicyViolation):
2634         * loader/PingLoader.h:
2635         * page/ContentSecurityPolicy.cpp:
2636         (WebCore::CSPDirective::CSPDirective):
2637         (WebCore::CSPDirective::text):
2638         (WebCore::ContentSecurityPolicy::reportViolation):
2639         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2640         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2641         (WebCore::ContentSecurityPolicy::allowInlineScript):
2642         (WebCore::ContentSecurityPolicy::allowEval):
2643         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
2644         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2645         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
2646         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2647         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2648         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2649         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
2650         (WebCore::ContentSecurityPolicy::parseReportURI):
2651         (WebCore::ContentSecurityPolicy::addDirective):
2652         * page/ContentSecurityPolicy.h:
2653
2654 2011-04-21  Jon Lee  <jonlee@apple.com>
2655
2656         Reviewed by Maciej Stachowiak.
2657
2658         remove unneeded function from graphicscontext3d.cpp (59076)
2659         https://bugs.webkit.org/show_bug.cgi?id=59076
2660         <rdar://problem/9315681>
2661
2662         * platform/graphics/GraphicsContext3D.cpp: removing unused function unpackOneRowOfRGBA8ToRGBA8
2663
2664 2011-04-21  Alexey Proskuryakov  <ap@apple.com>
2665
2666         Reviewed by Dan Bernstein.
2667
2668         REGRESSION: Korean encoding alias KSC5601 does not work
2669         https://bugs.webkit.org/show_bug.cgi?id=59075
2670         <rdar://problem/9303233>
2671
2672         * platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::registerEncodingNames): Added a
2673         KSC5601 alias for KSC_5601, which effectively makes it windows-949.
2674
2675 2011-04-20  Dominic Cooney  <dominicc@chromium.org>
2676
2677         Reviewed by Dimitri Glazkov.
2678
2679         layoutTestController can create and destroy shadow DOM
2680         https://bugs.webkit.org/show_bug.cgi?id=59058
2681
2682         Test: fast/dom/shadow/layout-tests-can-access-shadow.html
2683
2684         * WebCore.exp.in: Mac DRT needs to see Element::ensure/removeShadowRoot
2685
2686 2011-04-20  Pratik Solanki  <psolanki@apple.com>
2687
2688         Reviewed by Ryosuke Niwa.
2689
2690         Follow on fix for https://bugs.webkit.org/show_bug.cgi?id=58926
2691
2692         Fix assertions in Chromium builds.
2693
2694         * platform/graphics/Image.cpp:
2695         (WebCore::Image::drawTiled): Skia and Wx do not have proper implementations of
2696         BitmapImage::checkForSolidColor() so we shouldn't assert on those platforms.
2697
2698 2011-04-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2699
2700         Reviewed by Eric Seidel.
2701
2702         [EFL] Add timeline to mediaControlsEfl.css
2703         https://bugs.webkit.org/show_bug.cgi?id=58865
2704
2705         Add timeline to mediaControlsEfl.css in order to show playing time of media
2706         content.
2707
2708         * css/mediaControlsEfl.css:
2709         (audio):
2710         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2711         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2712         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2713         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2714         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2715         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2716         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
2717         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
2718         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2719         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
2720
2721 2011-04-20  Simon Fraser  <simon.fraser@apple.com>
2722
2723         Reviewed by Eric Seidel.
2724
2725         Create RIAA class for GraphicsContext::save() and restore()
2726         https://bugs.webkit.org/show_bug.cgi?id=58807
2727         
2728         Make a stack-based class that can be used to save and restore
2729         the graphics state. It has conditional behavior to deal with the many cases
2730         where we decide to save/restore based on some runtime condition.
2731
2732         Change RenderBoxModelObject to use it for now; it can be used more widely
2733         once committed.
2734
2735         * platform/graphics/GraphicsContext.h:
2736         (WebCore::GraphicsContextStateSaver::GraphicsContextStateSaver):
2737         (WebCore::GraphicsContextStateSaver::~GraphicsContextStateSaver):
2738         (WebCore::GraphicsContextStateSaver::saveState):
2739         * rendering/RenderBoxModelObject.cpp:
2740         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2741         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2742         (WebCore::RenderBoxModelObject::paintBorder):
2743         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
2744         (WebCore::RenderBoxModelObject::paintBoxShadow):
2745
2746 2011-04-20  Adam Barth  <abarth@webkit.org>
2747
2748         Reviewed by Eric Seidel.
2749
2750         CSP frame-src is missing
2751         https://bugs.webkit.org/show_bug.cgi?id=58643
2752
2753         This is a first cut at an implementation of frame-src.  There are a
2754         couple things that will need to be improved:
2755
2756           1) I don't think we're handling in-frame navigation properly.  This
2757              patch only covers setting the src attribute of the frame, but I
2758              think the intent of the spec is to cover navigation as well.
2759
2760           2) The console message is printed twice, once when we try to load the
2761              frame and again when we attach the frame to the render tree.
2762
2763         I'll file bugs about these issues (blocking
2764         https://bugs.webkit.org/show_bug.cgi?id=53572) once this patch lands.
2765
2766         Tests: http/tests/security/contentSecurityPolicy/frame-src-allowed.html
2767                http/tests/security/contentSecurityPolicy/frame-src-blocked.html
2768
2769         * html/HTMLFrameElementBase.cpp:
2770         (WebCore::HTMLFrameElementBase::isURLAllowed):
2771         * page/ContentSecurityPolicy.cpp:
2772         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource):
2773         (WebCore::ContentSecurityPolicy::addDirective):
2774         * page/ContentSecurityPolicy.h:
2775
2776 2011-04-20  Jia Pu  <jpu@apple.com>
2777
2778         Reviewed by Maciej Stachowiak.
2779
2780         [Mac] Correction panel shows up at incorrect location after webpage is scrolled.
2781         https://bugs.webkit.org/show_bug.cgi?id=59052
2782         <rdar://problem/9312513>
2783         
2784         Fixed a regression caused by interaction between patch for bug 57353 and patch for bug 55571.
2785         See bug webpage for detail.
2786
2787         * editing/Editor.cpp:
2788         (WebCore::Editor::selectionStartHasMarkerFor):
2789         * editing/SpellingCorrectionController.cpp:
2790         (WebCore::SpellingCorrectionController::windowRectForRange):
2791
2792 2011-04-20  Adam Barth  <abarth@webkit.org>
2793
2794         Reviewed by Eric Seidel.
2795
2796         CSP policy violations should log to the console
2797         https://bugs.webkit.org/show_bug.cgi?id=58646
2798
2799         We now log policy violations to the JavaScript console to help
2800         developers debug what's going on with their Content-Security-Policy.
2801
2802         Tests: http/tests/security/contentSecurityPolicy/inline-script-blocked-javascript-url.html
2803                http/tests/security/contentSecurityPolicy/javascript-url-allowed.html
2804                http/tests/security/contentSecurityPolicy/javascript-url-blocked.html
2805                http/tests/security/contentSecurityPolicy/object-src-none-allowed.html
2806                http/tests/security/contentSecurityPolicy/object-src-none-blocked.html
2807                http/tests/security/contentSecurityPolicy/script-src-self-blocked-01.html
2808                http/tests/security/contentSecurityPolicy/script-src-self-blocked-02.html
2809                http/tests/security/contentSecurityPolicy/script-src-self-blocked-03.html
2810
2811         * dom/Document.cpp:
2812         (WebCore::Document::initSecurityContext):
2813         * page/ContentSecurityPolicy.cpp:
2814         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
2815         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2816         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2817         (WebCore::ContentSecurityPolicy::allowInlineScript):
2818         (WebCore::ContentSecurityPolicy::allowEval):
2819         (WebCore::ContentSecurityPolicy::allowScriptFromSource):
2820         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2821         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2822         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2823         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2824         (WebCore::ContentSecurityPolicy::allowMediaFromSource):
2825         (WebCore::ContentSecurityPolicy::addDirective):
2826         * page/ContentSecurityPolicy.h:
2827         (WebCore::ContentSecurityPolicy::create):
2828
2829 2011-04-20  Dan Bernstein  <mitz@apple.com>
2830
2831         Reviewed by Maciej Stachowiak.
2832
2833         <rdar://problem/9095366> With a non-1 page scale, scrolling to reveal selection fails
2834         https://bugs.webkit.org/show_bug.cgi?id=59046
2835
2836         Test: fast/transforms/selection-bounds-in-transformed-view.html
2837
2838         * rendering/RenderObject.cpp:
2839         (WebCore::RenderObject::repaintUsingContainer): If the repaint container is the RenderView, and
2840         it has a composited layer that paints straight to the window, then translate from view coordinates
2841         to window coordinates here.
2842         * rendering/RenderView.cpp:
2843         (WebCore::RenderView::mapLocalToContainer): Do not apply our transform if we are the painting root.
2844         (WebCore::RenderView::computeRectForRepaint): Ditto. Applying the transform here was compensating
2845         for not applying it in RenderObject::repaintUsingContainer(), but for purposes other than repainting,
2846         such as computing selection bounds, this function was returning the wrong results.
2847
2848 2011-04-20  Dan Bernstein  <mitz@apple.com>
2849
2850         Reviewed by Eric Carlson.
2851
2852         <rdar://problem/9304956> media/broken-video.html crashes
2853
2854         * platform/graphics/MediaPlayer.cpp:
2855         (WebCore::nextMediaEngine): Fixed an off-by-one error.
2856
2857 2011-04-20  Eric Seidel  <eric@webkit.org>
2858
2859         Reviewed by Adam Barth.
2860
2861         Split out isIteratorTarget from bidiNext and bidiFirst
2862         https://bugs.webkit.org/show_bug.cgi?id=59033
2863
2864         This is the first (tiny) step of many.  When I tried to
2865         make larger changes to this function I broke stuff, so
2866         doing this in tiny pieces so we know it's right.
2867
2868         * rendering/InlineIterator.h:
2869         (WebCore::isIteratorTarget):
2870         (WebCore::bidiNext):
2871         (WebCore::bidiFirstSkippingInlines):
2872         (WebCore::bidiFirstNotSkippingInlines):
2873
2874 2011-04-20  Alexey Marinichev  <amarinichev@chromium.org>
2875
2876         Reviewed by Kenneth Russell.
2877
2878         Check for null m_context in WebGLLayerChromium and add resetting platform layer's context in the destructor of GraphicsContext3D.
2879         https://bugs.webkit.org/show_bug.cgi?id=59045
2880
2881         Lose context extension test might not catch this bug, more reliable
2882         way is forcing the crash of the GPU process, which is done by Chromium
2883         browser tests.
2884
2885         * platform/graphics/chromium/WebGLLayerChromium.cpp:
2886         (WebCore::WebGLLayerChromium::updateCompositorResources):
2887         (WebCore::WebGLLayerChromium::setContext):
2888         * platform/graphics/chromium/WebGLLayerChromium.h:
2889
2890 2011-04-20  Jia Pu  <jpu@apple.com>
2891
2892         Reviewed by Maciej Stachowiak.
2893
2894         [Mac]Regression: extending word that is already marked misspelled doesn't remove misspelling underline.
2895         https://bugs.webkit.org/show_bug.cgi?id=59032
2896         <rdar://problem/9312444>
2897
2898         This fixes a regression introduced in recent refactoring work in Editor. See bug webpage for detail.
2899
2900         manual test: Source/WebCore/manual-tests/autocorrection/remove-misspelling-marker-after-appending-letter.html
2901
2902         * editing/Editor.cpp:
2903         (WebCore::Editor::insertTextWithoutSendingTextEvent):
2904         * manual-tests/autocorrection/remove-misspelling-marker-after-appending-letter.html: Added.
2905
2906 2011-04-20  Chris Fleizach  <cfleizach@apple.com>
2907
2908         Reviewed by Beth Dakin.
2909
2910         CrashTracer: 301 crashes in Safari at com.apple.WebCore: WebCore::AccessibilityRenderObject::visiblePositionForPoint const + 297
2911         https://bugs.webkit.org/show_bug.cgi?id=57405
2912
2913         The offending line in this crash was a null pointer access in
2914            m_renderer->document()->topDocument()->renderer()->view()->frameView();
2915         It seems likely that one of those calls was invalid. I could not reproduce and there was no
2916         information on reproducible steps, hence the absence of a layout test.
2917
2918         * accessibility/AccessibilityRenderObject.cpp:
2919         (WebCore::AccessibilityRenderObject::topRenderer):
2920         (WebCore::AccessibilityRenderObject::topDocument):
2921         (WebCore::AccessibilityRenderObject::topDocumentFrameView):
2922         (WebCore::AccessibilityRenderObject::visiblePositionForPoint):
2923         * accessibility/AccessibilityRenderObject.h:
2924
2925 2011-04-20  Andy Estes  <aestes@apple.com>
2926
2927         Reviewed by Maciej Stachowiak.
2928
2929         REGRESSION (WK2): Animated GIF stops when navigating forward, back
2930         https://bugs.webkit.org/show_bug.cgi?id=59042
2931         
2932         When loading the page from the b/f cache,
2933         document()->view()->isOffscreen() returns true in
2934         RenderObject::willRenderImage(), so BitmapImage::startAnimation()
2935         returns without actually kicking off the animation.
2936         
2937         In WebKit1, the ScrollView is a platform widget, so
2938         ScrollView::isOffscreen() calls [NSWindow isVisible]. In WebKit2, the
2939         ScrollView isn't a platform widget so it asks the WebCore Widget
2940         whether or not it is visible. It always returns false since
2941         setParentVisible(false) was called on the old ScrollView before
2942         navigating to a new page, but setParentVisible(true) is never called
2943         when restoring it from the back/forward cache. This is probably a
2944         long-standing bug.
2945         
2946         Fix this by calling setParentVisible(true) when a cached main frame is
2947         being restored.
2948
2949         Test: fast/images/animated-gif-restored-from-bfcache.html
2950
2951         * history/CachedFrame.cpp:
2952         (WebCore::CachedFrameBase::restore): If the cached frame is the main
2953         frame, call setParentVisible(true) on the frame's view.
2954
2955 2011-04-20  Sam Weinig  <sam@webkit.org>
2956
2957         Reviewed by Anders Carlsson.
2958
2959         WebKit2: Can't scroll page after printing on Yahoo.com and other sites
2960         <rdar://problem/9233291>
2961         https://bugs.webkit.org/show_bug.cgi?id=59049
2962
2963         * page/Frame.cpp:
2964         (WebCore::Frame::setPrinting): Match Mac WebKit1 code when ending printing,
2965         and call forceLayout() instead of forceLayoutForPagination().
2966
2967 2011-04-20  Kenneth Russell  <kbr@google.com>
2968
2969         Reviewed by James Robinson.
2970
2971         Reduce size of GraphicsContext3D's compiled code
2972         https://bugs.webkit.org/show_bug.cgi?id=59029
2973
2974         Changed format conversion operations to work line-by-line instead
2975         of pixel-by-pixel, and passed them as function pointers rather
2976         than template parameters. Simplified computation of source
2977         increment, since elements per row is now all that is needed.
2978
2979         These changes reduce the size of GraphicsContext3D.o in release
2980         mode on Linux from 299 KB to 53 KB.
2981
2982         No new tests. Existing layout tests cover these format conversions
2983         well, and caught one typo in the restructuring. Also ran WebGL
2984         conformance suite and other demos.
2985
2986         * platform/graphics/GraphicsContext3D.cpp:
2987         (WebCore::doUnpackingAndPacking):
2988         (WebCore::computeSourceElementsPerRow):
2989         (WebCore::doPacking):
2990         (WebCore::doFloatingPointPacking):
2991         (WebCore::GraphicsContext3D::packPixels):
2992
2993 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
2994
2995         Reviewed by Kent Tamura.
2996
2997         REGRESSION(r82376): Clicking on a label, associated with a disabled input element changes state of the element.
2998         https://bugs.webkit.org/show_bug.cgi?id=59037
2999
3000         Test: fast/events/simulated-click-disabled.html
3001
3002         * dom/EventDispatcher.cpp:
3003         (WebCore::EventDispatcher::dispatchSimulatedClick): Added check for disabled element.
3004
3005 2011-04-20  Eric Seidel  <eric@webkit.org>
3006
3007         Reviewed by Ryosuke Niwa.
3008
3009         Split bidiFirst into two functions
3010         https://bugs.webkit.org/show_bug.cgi?id=59025
3011
3012         I don't have a full understanding of the skipInlines case yet
3013         (hence it's not as pretty as the non-skipping case), but
3014         this is clearly a win, as both functions are much simpler
3015         than their combined version.
3016
3017         Both of these functions still have bad names.  However the
3018         bidiNext/bidiFirst names date all the way back to revision 1
3019         of the WebKit repository. :)  So I don't feel too bad keeping
3020         them for the moment.
3021
3022         * rendering/InlineIterator.h:
3023         (WebCore::bidiNext):
3024         (WebCore::bidiFirstSkippingInlines):
3025         (WebCore::bidiFirstNotSkippingInlines):
3026         * rendering/RenderBlock.cpp:
3027         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
3028         * rendering/RenderBlockLineLayout.cpp:
3029         (WebCore::RenderBlock::layoutInlineChildren):
3030         (WebCore::RenderBlock::determineStartPosition):
3031
3032 2011-04-20  Jia Pu  <jpu@apple.com>
3033
3034         Reviewed by Adele Peterson.
3035     
3036         [Mac] Like autocorrection, other types of substitution need to respect undo.
3037         https://bugs.webkit.org/show_bug.cgi?id=59009
3038         <rdar://problem/8601537>
3039
3040         Similar to autocorrection, we use SpellingCorrectionCommand to carry out other types of text substitution, so that
3041         if user undoes the substitution, it will not be applied again. For CreateLinkCommand,  we add marker when it's undone
3042         so that we won't automatically add link again.
3043
3044         * editing/CreateLinkCommand.h:
3045         (WebCore::CreateLinkCommand::isCreateLinkCommand):
3046         * editing/EditCommand.cpp:
3047         (WebCore::EditCommand::isCreateLinkCommand):
3048         * editing/EditCommand.h:
3049         * editing/Editor.cpp:
3050         (WebCore::Editor::unappliedEditing):
3051         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3052         * editing/SpellingCorrectionController.cpp:
3053         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
3054         (WebCore::SpellingCorrectionController::respondToUnappliedEditing):
3055         * editing/SpellingCorrectionController.h:
3056         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
3057
3058 2011-04-20  Steve Lacey  <sjl@chromium.org>
3059
3060         Reviewed by Eric Carlson.
3061
3062         [chromium] Move Chromium media controls into own root element.
3063         https://bugs.webkit.org/show_bug.cgi?id=59018
3064
3065         No new tests as there is no functional change
3066
3067         * WebCore.gypi:
3068         * css/mediaControlsChromium.css:
3069         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
3070         * html/shadow/MediaControlRootElementChromium.cpp: Added.
3071         Clone of html/shadow/MediaControlRootElement.cpp with all unused code removed.
3072         * html/shadow/MediaControlRootElementChromium.h: Added.
3073
3074 2011-04-20  Charlie Lee  <chocobo@chromium.org>
3075
3076         Reviewed by Dirk Schulze.
3077
3078         LEFilter change doesn't compile on ARM neon targets
3079         https://bugs.webkit.org/show_bug.cgi?id=58671
3080
3081         Build fix for Chromium ARM/NEON platform. Added platform/graphics/filters/arm directory to build system.
3082
3083         * WebCore.gyp/WebCore.gyp:
3084
3085 2011-04-20  Xiaomei Ji  <xji@chromium.org>
3086
3087         Reviewed by Ryosuke Niwa.
3088
3089         Continue (3rd) experiment with moving caret by word in visual order.
3090         https://bugs.webkit.org/show_bug.cgi?id=58294
3091
3092         This patch along with r82588 and r83483 implements moving caret by
3093         word in visual order.
3094         
3095         The overall algorithm is:
3096         1. First get the InlineBox and offset of the pass-in VisiblePosition.
3097         2. Based on the position (left boundary, middle, right boundary) of the offset and the
3098            direction of the movement, look for visually adjacent word breaks.
3099         2.1 If the offset is the minimum offset of the box,
3100             return the rightmost word boundary in previous boxes if moving left.
3101             return the leftmost word boundary in box and next boxes if moving right.
3102         2.2 Similar for the case when offset is at the maximum offset of the box.
3103         2.3 When offset is inside the box (not at boundaries), first find the previousWordPosition 
3104             or nextWordPosition based on the directionality of the box. If this word break position 
3105             is also inside the same box, return it. Otherwise (the nextWordPosition or 
3106             previousWordPosition is not in the same box or is at the box boundary), collect all the 
3107             word breaks in the box and search for the one closest to the input "offset" based on 
3108             box directionality, block directionality, and movement direction. Continue search in 
3109             adjacent boxes if needed.
3110
3111         Notes:
3112         1. Word boundaries are collected one box at a time. Only when a boundary that is closest to 
3113            the input position (in the moving direction) is not available in current box, word 
3114            boundaries in adjacent box will be collected. So, there is no need to save InlineBox in 
3115            word boundaries. Instead, the word boundaries are saved as a pair 
3116            (VisiblePosition, offset) to avoid recomputing VisiblePosition.
3117  
3118         2. We only collect boundaries of the right kind (i.e. left boundary of a word in LTR block
3119            and right boundary of a word in RTL block). And word boundaries are collected using 
3120            previousWordPosition() and nextWordPosition(). So when box directionality is the same as 
3121            block directionality, word boundaries are collected from right to left visually in a LTR 
3122            box, and word boundaries are collected from left to right visually in a RTL box. It is
3123            the other way around when box directionality is different from block directionality.
3124
3125         3. To find the right kinds of word boundaries, we must move back and forth between words
3126            in some situations. For example, if we're moving to the right in a LTR box in LTR block,
3127            we cannot simply return nextWordPosition() because it would return the right boundary
3128            of a word. Instead, we return nextWordPosition()'s nextWordPosition()'s previousWordPosition().
3129
3130         4. When collecting word breaks inside a box, it first computes a start position, then
3131            collect the right kind of word breaks until it reaches the end of (or beyond) the box.
3132            In the meanwhile, it might need special handling on the rightmost or leftmost position 
3133            based on the directionality of the box and block. These computations do not consider the 
3134            box's bidi level.
3135
3136         * editing/visible_units.cpp:
3137         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
3138         (WebCore::collectWordBreaksInBox):
3139         (WebCore::previousWordBoundaryInBox):
3140         (WebCore::nextWordBoundaryInBox):
3141         (WebCore::visuallyLastWordBoundaryInBox):
3142         (WebCore::leftWordBoundary):
3143         (WebCore::rightWordBoundary):
3144         (WebCore::leftWordPosition):
3145         (WebCore::rightWordPosition):
3146
3147 2011-04-20  Cris Neckar  <cdn@chromium.org>
3148
3149         Reviewed by Dirk Schulze.
3150
3151         Return early when the paint rect and the source rect do not overlap as no bytes need to be copied.
3152         https://bugs.webkit.org/show_bug.cgi?id=57885
3153
3154         Test: svg/filters/svg-transform-blur-crash.xhtml
3155
3156         * platform/graphics/filters/FilterEffect.cpp:
3157         (WebCore::FilterEffect::copyImageBytes):
3158
3159 2011-04-20  Jian Li  <jianli@chromium.org>
3160
3161         Reviewed by Kenneth Russell.
3162
3163         Support DataView in workers
3164         https://bugs.webkit.org/show_bug.cgi?id=59014
3165
3166         Test: fast/canvas/webgl/worker-data-view-test.html
3167
3168         * workers/WorkerContext.idl: Expose DataView constructor.
3169
3170 2011-04-20  Chris Marrin  <cmarrin@apple.com>
3171
3172         Reviewed by Adam Roben.
3173
3174         REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
3175         https://bugs.webkit.org/show_bug.cgi?id=57868
3176         
3177         Running CACFAnimations aren't remembered when layer tree is unparented and 
3178         then reparented. Added a new ensureAnimationsSubmitted function to 
3179         PlatformCALayer to traverse the tree and resubmit animations, setting the 
3180         beginTime to the original start time of the animation. This is called in WK2
3181         when layer tree is newly parented.
3182         
3183         I also consolidated currentTimeToMediaTime into PlatformCALayer so it can be shared
3184         between PlatformCALayer and GraphicsLayerCA.
3185
3186         * platform/graphics/ca/GraphicsLayerCA.cpp:
3187         * platform/graphics/ca/PlatformCAAnimation.h:
3188             Remember actual animation start time in CACFAnimation beginTime property
3189         * platform/graphics/ca/PlatformCALayer.h:
3190             New ensureAnimationsSubmitted function which traverses layers and resubmits all animations
3191         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3192         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3193
3194 2011-04-20  Eric Carlson  <eric.carlson@apple.com>
3195
3196         Reviewed by Dan Bernstein.
3197
3198         Adopt QTKit API for listing and deleting file in its media cache.
3199         <rdar://problem/9130029> 
3200         https://bugs.webkit.org/show_bug.cgi?id=58795
3201
3202         Not possible to test automatically, verified manually.
3203
3204         * WebCore.exp.in: Export new media download cache functions.
3205
3206         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3207         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3208         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): Register cache management functions.
3209         (WebCore::MediaPlayerPrivateQTKit::getSitesInMediaCache): New, return cache origins.
3210         (WebCore::MediaPlayerPrivateQTKit::clearMediaCache): New, empty the media cache.
3211         (WebCore::MediaPlayerPrivateQTKit::clearMediaCacheForSite): New, delete files in the media
3212             cache for one origin.
3213
3214         * platform/mac/WebCoreSystemInterface.h: Add new WKSI functions.
3215         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3216
3217 2011-04-20  Dirk Schulze  <krit@webkit.org>
3218
3219         Reviewed by Simon Fraser.
3220
3221         SVG feDropShadow implementation of SVG Filters 1.2
3222         https://bugs.webkit.org/show_bug.cgi?id=52513
3223
3224         Support different radii for horizontal and vertical blurring in ShadowBlur. This is a preperation for feDropShadow.
3225         feDropShadow is a new shorthand filter effect for the up-comming Filter 1.0 specification and will use ShadowBlur.
3226         feGaussianBlur might make use of ShadowBlur as well later (on SourceAlpha input).
3227         Added ShadowBlur to remaining platforms.
3228
3229         The changes can't be tested before the changes in feGaussianBlur or feDropShadow. Current behavior is not affected.
3230
3231         * Android.mk:
3232         * CMakeLists.txt:
3233         * GNUmakefile.list.am:
3234         * WebCore.pro:
3235         * platform/graphics/FloatSize.h:
3236         (WebCore::FloatSize::scale):
3237         * platform/graphics/ShadowBlur.cpp:
3238         (WebCore::ScratchBuffer::ScratchBuffer):
3239         (WebCore::ScratchBuffer::setLastShadowValues):
3240         (WebCore::ScratchBuffer::setLastInsetShadowValues):
3241         (WebCore::ScratchBuffer::matchesLastShadow):
3242         (WebCore::ScratchBuffer::matchesLastInsetShadow):
3243         (WebCore::ScratchBuffer::clearScratchBuffer):
3244         (WebCore::ShadowBlur::ShadowBlur):
3245         (WebCore::calculateLobes):
3246         (WebCore::ShadowBlur::blurLayerImage):
3247         (WebCore::ShadowBlur::adjustBlurRadius):
3248         (WebCore::ShadowBlur::calculateLayerBoundingRect):
3249         (WebCore::computeSliceSizesFromRadii):
3250         (WebCore::ShadowBlur::templateSize):
3251         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
3252         (WebCore::ShadowBlur::drawRectShadowWithTiling):
3253         (WebCore::ShadowBlur::drawLayerPieces):
3254         * platform/graphics/ShadowBlur.h:
3255         * platform/graphics/cg/GraphicsContextCG.cpp:
3256         (WebCore::GraphicsContext::fillRect):
3257         (WebCore::GraphicsContext::fillRoundedRect):
3258         (WebCore::GraphicsContext::fillRectWithRoundedHole):
3259
3260 2011-04-19  Roland Steiner  <rolandsteiner@chromium.org>
3261
3262         Reviewed by Dimitri Glazkov.
3263
3264         Bug 52963 - Enable O(1) access to root from any node in shadow DOM subtree
3265         https://bugs.webkit.org/show_bug.cgi?id=52963
3266
3267         .) Change base class of ShadowRoot from DocumentFragment to TreeScope.
3268         .) Re-enable tree scope handling in Node (had ASSERT_NOT_REACHED, etc.).
3269         .) Merged setTreeScope() with setTreeScopeRecursively()
3270         .) Call setTreeScopeRecursively in DOM manipulation functions where applicable.
3271         .) Adapt JavaScript Node wrappers (temporary code - see https://bugs.webkit.org/show_bug.cgi?id=58704).
3272
3273         No new tests. (refactoring)
3274
3275         * bindings/js/JSNodeCustom.cpp:
3276         (WebCore::createWrapperInline):
3277         * bindings/v8/custom/V8NodeCustom.cpp:
3278         (WebCore::toV8Slow):
3279         * dom/ContainerNode.cpp:
3280         (WebCore::ContainerNode::takeAllChildrenFrom):
3281         (WebCore::ContainerNode::removeBetween):
3282         (WebCore::ContainerNode::removeChildren):
3283         (WebCore::ContainerNode::parserAddChild):
3284         * dom/Document.cpp:
3285         (WebCore::Document::Document):
3286         (WebCore::Document::~Document):
3287         (WebCore::Document::setDocType):
3288         * dom/Element.h:
3289         * dom/Node.cpp:
3290         (WebCore::Node::treeScope):
3291         (WebCore::Node::setTreeScopeRecursively):
3292         * dom/Node.h:
3293         (WebCore::Node::document):
3294         * dom/ShadowRoot.cpp:
3295         (WebCore::ShadowRoot::ShadowRoot):
3296         (WebCore::ShadowRoot::~ShadowRoot):
3297         (WebCore::ShadowRoot::nodeType):
3298         (WebCore::ShadowRoot::cloneNode):
3299         (WebCore::ShadowRoot::childTypeAllowed):
3300         * dom/ShadowRoot.h:
3301         (WebCore::toShadowRoot):
3302         * dom/TreeScope.cpp:
3303         (WebCore::TreeScope::TreeScope):
3304         (WebCore::TreeScope::setParentTreeScope):
3305         * dom/TreeScope.h:
3306         * rendering/RenderSlider.cpp:
3307
3308 2011-04-20  Vsevolod Vlasov  <vsevik@chromium.org>
3309
3310         Reviewed by Pavel Feldman.
3311
3312         Web Inspector: Update front-end files list in WebCore.vcproj
3313         https://bugs.webkit.org/show_bug.cgi?id=58896
3314
3315         * WebCore.vcproj/WebCore.vcproj:
3316
3317 2011-04-20  Dimitri Glazkov  <dglazkov@chromium.org>
3318
3319         Qt build fix after r84380.
3320
3321         * css/CSSPrimitiveValueMappings.h: Moved EBorderCollapse-related casts from under ENABLE(SVG) guard.
3322
3323 2011-04-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3324
3325         Reviewed by Martin Robinson.
3326
3327         [GTK] Build libWebCore with the gtk sources too
3328         https://bugs.webkit.org/show_bug.cgi?id=58968
3329
3330         In some cases webcore files are compiled twice, so it improves the
3331         build time.
3332
3333         * GNUmakefile.am: Add webcore gtk sources to libWebCore sources.
3334
3335 2011-04-20  Luke Macpherson   <macpherson@chromium.org>
3336
3337         Reviewed by Dimitri Glazkov.
3338
3339         Allow casting between CSSPrimitiveValue and EBorderCollapse to remove special-case logic from CSSStyleSelector.
3340         https://bugs.webkit.org/show_bug.cgi?id=58964
3341
3342         No new tests as no new functionality added.
3343
3344         * css/CSSPrimitiveValueMappings.h:
3345         Support casting to/from EBorderCollapse.
3346         * css/CSSStyleSelector.cpp:
3347         Use new casting ability to simplify code.
3348         * rendering/style/RenderStyle.h:
3349         Use EBorderCollapse instead of a bool for representing border collapse member variable.
3350         * rendering/style/RenderStyleConstants.h:
3351         Added EBorderCollapse enum.
3352
3353 2011-04-19  Stephen White  <senorblanco@chromium.org>
3354
3355         Reviewed by Kenneth Russell.
3356
3357         Move and rename GLES2Canvas.
3358         https://bugs.webkit.org/show_bug.cgi?id=58927
3359
3360         Move GLES2Canvas to platform/graphcs/gpu, where all the other
3361         gpu-related files live, and rename it to GraphicsContextGPU to better
3362         reflect its purpose.
3363
3364         Covered by existing tests.
3365
3366         * WebCore.gypi:
3367         * platform/graphics/chromium/GLES2Canvas.cpp:
3368         * platform/graphics/chromium/GLES2Canvas.h:
3369         * platform/graphics/skia/GraphicsContextSkia.cpp:
3370         (WebCore::GraphicsContext::fillPath):
3371         (WebCore::GraphicsContext::setPlatformShadow):
3372         * platform/graphics/skia/ImageBufferSkia.cpp:
3373         * platform/graphics/skia/ImageSkia.cpp:
3374         (WebCore::drawBitmapGLES2):
3375         * platform/graphics/skia/PlatformContextSkia.cpp:
3376         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
3377         * platform/graphics/skia/PlatformContextSkia.h:
3378         (WebCore::PlatformContextSkia::gpuCanvas):
3379
3380 2011-04-20  Benjamin Poulain  <benjamin.poulain@nokia.com>
3381
3382         Reviewed by Andreas Kling.
3383
3384         [Qt] Clean the style of our cookie methods
3385         https://bugs.webkit.org/show_bug.cgi?id=58987
3386
3387         Got rid of the variables named "u" in favor just converting the url when needed.
3388
3389         * platform/qt/CookieJarQt.cpp:
3390         (WebCore::setCookies): The variable p was unused.
3391         The ::toAscii() depends on the default codec, use toLatin1() instead.
3392         (WebCore::cookies): foreach() should use const reference.
3393         (WebCore::cookieRequestHeaderFieldValue):
3394
3395 2011-04-19  Mihai Parparita  <mihaip@chromium.org>
3396
3397         Reviewed by Adam Barth.
3398
3399         ScriptController.h is included in too many places
3400         https://bugs.webkit.org/show_bug.cgi?id=58963
3401
3402         Remove ScriptController.h #includes from a bunch of .cpp files where it
3403         doesn't appear to be necessary.
3404
3405         * bindings/js/JSCustomPositionCallback.cpp:
3406         * bindings/js/JSCustomPositionErrorCallback.cpp:
3407         * bindings/js/JSCustomVoidCallback.cpp:
3408         * bindings/js/JSCustomXPathNSResolver.cpp:
3409         * bindings/js/JSDOMWindowBase.cpp:
3410         * bindings/js/JSDOMWindowShell.cpp:
3411         * bindings/js/JSDocumentCustom.cpp:
3412         * bindings/js/ScriptDebugServer.cpp:
3413         * bindings/v8/NPV8Object.cpp:
3414         * bindings/v8/ScriptCachedFrameData.cpp:
3415         * bindings/v8/V8DOMWindowShell.cpp:
3416         * bindings/v8/V8DOMWrapper.cpp:
3417         * bindings/v8/V8IsolatedContext.cpp:
3418         * bindings/v8/V8Proxy.cpp:
3419         * bindings/v8/custom/V8LocationCustom.cpp:
3420         * dom/Node.cpp:
3421         * dom/ScriptElement.cpp:
3422         * dom/XMLDocumentParser.cpp:
3423         * dom/XMLDocumentParserQt.cpp:
3424         * html/HTMLEmbedElement.cpp:
3425         * html/HTMLObjectElement.cpp:
3426         * html/HTMLPlugInElement.cpp:
3427         * html/parser/HTMLConstructionSite.cpp:
3428         * html/parser/HTMLTreeBuilder.cpp:
3429         * inspector/InspectorProfilerAgent.cpp:
3430         * loader/icon/IconDatabase.cpp:
3431         * page/Chrome.cpp:
3432         * page/Navigator.cpp:
3433         * page/Page.cpp:
3434         * plugins/PluginView.cpp:
3435         * plugins/gtk/PluginViewGtk.cpp:
3436         * plugins/qt/PluginViewQt.cpp:
3437         * plugins/symbian/PluginViewSymbian.cpp:
3438         * plugins/win/PluginViewWin.cpp:
3439         * svg/SVGDocumentExtensions.cpp:
3440         * xml/XMLTreeViewer.cpp:
3441
3442 2011-04-20  Pavel Feldman  <pfeldman@google.com>
3443
3444         Reviewed by Yury Semikhatsky.
3445
3446         Web Inspector: add Save As to the Resources panel context menu.
3447         https://bugs.webkit.org/show_bug.cgi?id=58983
3448