https://bugs.webkit.org/show_bug.cgi?id=77383
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-02-01  Beth Dakin  <bdakin@apple.com>
2
3         https://bugs.webkit.org/show_bug.cgi?id=77383
4         Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
5         -and corresponding-
6         <rdar://problem/10709560>
7
8         Reviewed by Sam Weinig.
9
10         The goal is to re-vamp didFirstVisuallyNonEmptyLayout to be more accurate. 
11         This patch adds a new heuristic called didNewFirstVisuallNonEmptyLayout and 
12         leaves the old one for the time being. That is temporary.
13
14         The heuristic for didNewFirstVisuallNonEmptyLayout is to count relevant 
15         painted RenderObjects on Page.
16         * page/Page.cpp:
17         (WebCore::Page::Page):
18         (WebCore::Page::setPaintedObjectsCounterThreshold):
19         (WebCore::Page::addRelevantRepaintedObject):
20         * page/Page.h:
21         (WebCore):
22         (Page):
23         (WebCore::Page::startCountingRepaintedObjects):
24         * WebCore.exp.in:
25
26         Start counting relevant painted RenderObjects on the page once the first 
27         layout is complete.
28         * page/FrameView.cpp:
29         (WebCore::FrameView::performPostLayoutTasks):
30
31         Machinery for firing didNewFirstVisuallNonEmptyLayout.
32         * loader/EmptyClients.h:
33         (WebCore::EmptyFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
34         * loader/FrameLoader.cpp:
35         (WebCore::FrameLoader::didNewFirstVisuallyNonEmptyLayout):
36         (WebCore):
37         * loader/FrameLoader.h:
38         (FrameLoader):
39         * loader/FrameLoaderClient.h:
40         (WebCore::FrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
41
42         These RenderObjects are the ones that this api currently consider to be 
43         relevant. If their repaint rects intersect with the viewRect, then they are 
44         added to the relevant objects set on the Page.
45         * rendering/InlineBox.cpp:
46         (WebCore::InlineBox::paint):
47         * rendering/InlineTextBox.cpp:
48         (WebCore::InlineTextBox::paint):
49         * rendering/RenderEmbeddedObject.cpp:
50         (WebCore::RenderEmbeddedObject::paintReplaced):
51         * rendering/RenderHTMLCanvas.cpp:
52         (WebCore::RenderHTMLCanvas::paintReplaced):
53         * rendering/RenderImage.cpp:
54         (WebCore::RenderImage::paintReplaced):
55         * rendering/RenderRegion.cpp:
56         (WebCore::RenderRegion::paintReplaced):
57         * rendering/RenderReplaced.cpp:
58         (WebCore::RenderReplaced::paint):
59         * rendering/RenderVideo.cpp:
60         (WebCore::RenderVideo::paintReplaced):
61         * rendering/svg/RenderSVGRoot.cpp:
62         (WebCore::RenderSVGRoot::paintReplaced):
63
64 2012-02-01  Alexis Menard  <alexis.menard@openbossa.org>
65
66         CSSStyleDeclaration.getPropertyPriority() fails for CSS shorthand properties with 'important' priority
67         https://bugs.webkit.org/show_bug.cgi?id=49058
68
69         Reviewed by Andreas Kling.
70
71         CSSMutableStyleDeclaration::getPropertyPriority was not handling shorthands properly. Shorthands are
72         not part of the property list of the style so we need to query the longhands which are the one added
73         in the list. Only if the longhands have equal priority the shorthand priority is known. I also renamed
74         getPropertyPriority (not the CSSOM exposed method) to something more consistent with WebKit naming guidelines.
75
76         Test: fast/css/shorthand-priority.html
77
78         * css/CSSMutableStyleDeclaration.cpp:
79         (WebCore::CSSMutableStyleDeclaration::propertyIsImportant):
80         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
81         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
82         * css/CSSMutableStyleDeclaration.h:
83         (CSSMutableStyleDeclaration):
84         * editing/EditingStyle.cpp:
85         (WebCore::EditingStyle::extractAndRemoveTextDirection):
86         (WebCore::EditingStyle::collapseTextDecorationProperties):
87         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
88         (WebCore::setTextDecorationProperty):
89         * editing/RemoveCSSPropertyCommand.cpp:
90         (WebCore::RemoveCSSPropertyCommand::doApply):
91
92 2012-02-01  Ryosuke Niwa  <rniwa@webkit.org>
93
94         Crash in EventHandler::updateDragAndDrop
95         https://bugs.webkit.org/show_bug.cgi?id=77569
96
97         Reviewed by Alexey Proskuryakov.
98
99         Test: fast/events/remove-target-with-shadow-in-drag.html
100
101         * page/EventHandler.cpp:
102         (WebCore::EventHandler::updateDragAndDrop):
103
104 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
105
106         Unreviewed, rolling out r106382.
107         http://trac.webkit.org/changeset/106382
108         https://bugs.webkit.org/show_bug.cgi?id=77571
109
110         Causing chromium crashes in PNGImageDecoder (Requested by
111         japhet on #webkit).
112
113         * bindings/v8/V8Proxy.cpp:
114         (WebCore::V8Proxy::evaluate):
115         * page/Console.cpp:
116         (WebCore::Console::time):
117         (WebCore::Console::timeEnd):
118         * platform/chromium/PlatformSupport.h:
119         * platform/chromium/TraceEvent.h:
120         (internal):
121         (ScopeTracer):
122         (WebCore::internal::ScopeTracer::ScopeTracer):
123         (WebCore::internal::ScopeTracer::~ScopeTracer):
124
125 2012-02-01  Anders Carlsson  <andersca@apple.com>
126
127         Reviewed by Darin Adler.
128
129         Simplify the code that creates a new tile layer by getting a reference to the RetainPtr<WebTileLayer>&
130         slot in the hash map and assign directly into it.
131
132         * platform/graphics/ca/mac/TileCache.mm:
133         (WebCore::TileCache::revalidateTiles):
134
135 2012-02-01  Anders Carlsson  <andersca@apple.com>
136
137         Tile cache doesn't have an upper limit
138         https://bugs.webkit.org/show_bug.cgi?id=77564
139         <rdar://problem/10710744>
140
141         Reviewed by Darin Adler.
142
143         Cache enough tiles to cover 3x the visible height and 2x the visible width of the page,
144         and drop tiles that are outside that area.
145
146         * platform/graphics/ca/GraphicsLayerCA.cpp:
147         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
148         Call GraphicsLayerClient::notifySyncRequired here, which will schedule a layer flush and ensure that
149         the page layout is up to date before the new tiles are painted.
150
151         * platform/graphics/ca/PlatformCALayerClient.h:
152         Add platformCALayerDidCreateTiles member function.
153
154         * platform/graphics/ca/mac/TileCache.h:
155         Update for new/removed member functions and member variables.
156
157         * platform/graphics/ca/mac/TileCache.mm:
158         (WebCore::TileCache::TileCache):
159         Initialize the tile revalidation timer.
160
161         (WebCore::TileCache::tileCacheLayerBoundsChanged):
162         If we don't have any tiles at all right now, revalidate the tiles immediately. Otherwise,
163         schedule the revalidation timer.
164
165         (WebCore::TileCache::setNeedsDisplayInRect):
166         Return early if we have no tiles.
167
168         (WebCore::TileCache::visibleRectChanged):
169         Schedule tile revalidation.
170
171         (WebCore::TileCache::rectForTileIndex):
172         New helper function that returns the bounds rect of a tile given its tile index.
173
174         (WebCore::TileCache::getTileIndexRangeForRect):
175         Clamp the rect to the bounds of the tile cache layer.
176
177         (WebCore::TileCache::scheduleTileRevalidation):
178         Schedule the revalidation timer if it hasn't already been scheduled.
179
180         (WebCore::TileCache::tileRevalidationTimerFired):
181         Call revalidateTiles.
182
183         (WebCore::TileCache::revalidateTiles):
184         Compute the tile coverage rect and remove all tiles that are outside. Create new tiles for any
185         parts of the tile coverage rect that don't have tiles already.
186
187         (WebCore::TileCache::tileLayerAtIndex):
188         Remove invalid assertions.
189
190 2012-02-01  Max Vujovic  <mvujovic@adobe.com>
191
192         Add support for fixed and percent min-width on the table element for table-layout: auto to
193         match Firefox and Opera's behavior.
194
195         In FixedTableLayout.cpp, the computePreferredLogicalWidths method looks like it has
196         issues based on the comment: "FIXME: This entire calculation is incorrect for both
197         minwidth and maxwidth." (minwidth and maxwidth refer to the preferred widths, not the
198         min-width and max-width styles). I have not implemented min-width for FixedTableLayout
199         in this patch since it requires some more research around that comment.
200
201         min-width and max-width on the table element was discussed on the www-style list:
202         http://lists.w3.org/Archives/Public/www-style/2012Jan/0684.html
203
204         min-width is not implemented on <table> for table-layout: auto
205         https://bugs.webkit.org/show_bug.cgi?id=76553
206
207         Reviewed by Julien Chaffraix.
208
209         Test: fast/table/min-width.html
210
211         * rendering/AutoTableLayout.cpp:
212         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
213
214             If the min or max preferred logical width is less than a fixed min width style, it is
215             set to the fixed min width style. Like a percent width style, a percent min-width style
216             does not affect the min or max preferred logical widths computed by the table layout
217             algorithm. RenderTable's computeLogicalWidth method handles percent min-width styles.
218
219             min-width for the table-layout: fixed case has been split out into this bug:
220             https://bugs.webkit.org/show_bug.cgi?id=76948
221
222         * rendering/RenderTable.cpp:
223         (WebCore::RenderTable::computeLogicalWidth):
224
225             If the RenderStyle's logical min width is defined and greater than the logical width
226             calculation, this method sets the logical width to the logical min width.
227
228         (WebCore::RenderTable::convertStyleWidthToComputedWidth):
229
230             This new method generalizes and factors out logic from RenderTable::computeLogicalWidth
231             that converted the width style to a computed value in the fixed and percent case.
232             RenderTable::computeLogicalWidth now calls this method to determine the computed values
233             for both the width style and the min-width style. In the future, it can also be used for
234             the max-width style.
235
236             Note that this method handles the special CSS table case, which requires borders and
237             paddings to be included in the computed width calculation. This applies to all width
238             styles, including width, min-width, and max-width. Before, this special case was handled
239             in RenderTable::computeLogicalWidth.
240
241         * rendering/RenderTable.h:
242
243 2012-02-01  Brian Salomon  <bsalomon@google.com>
244
245         [SKIA/CHROMIUM] Perform getImageData format conversions using Skia
246         https://bugs.webkit.org/show_bug.cgi?id=77553
247
248         Reviewed by Stephen White.
249
250         Many existing canvas tests exercise this functionality.
251
252         * platform/graphics/skia/ImageBufferSkia.cpp:
253         (WebCore::getImageData):
254
255 2012-02-01  Nate Chapin  <japhet@chromium.org>
256
257         preventDefault() in a mousedown in a subframe should not
258         prevent the scrollbar from handling mouse movements if the
259         cursor leaves the subframe.
260         https://bugs.webkit.org/show_bug.cgi?id=73097
261
262         Reviewed by Darin Adler.
263
264         Test: fast/events/scroll-div-with-prevent-default-in-subframe.html
265
266         * page/EventHandler.cpp:
267         (WebCore::EventHandler::handleMousePressEvent):
268
269 2012-02-01  Mario Sanchez Prada  <msanchez@igalia.com>
270
271         [GTK] editing/inserting/4960120-2.html flaky crash
272         https://bugs.webkit.org/show_bug.cgi?id=76815
273
274         Reviewed by Martin Robinson.
275
276         Check if the node for the first parent object not ignoring
277         accessibility is null before using it. This might happen with
278         certain kind of accessibility objects, such as the root one (the
279         scroller containing the webArea object as its only child).
280
281         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
282         (objectFocusedAndCaretOffsetUnignored): Add missing null check.
283
284 2012-02-01  Antti Koivisto  <antti@apple.com>
285
286         Make CSSMappedAttributeDeclaration have CSSMutableStyleDeclaration instead of being one
287         https://bugs.webkit.org/show_bug.cgi?id=77545
288
289         Reviewed by Andreas Kling.
290
291         This is the easiest path for eliminating the last remaining subclass of CSSMutableStyleDeclaration.
292         
293         On negative side this increases memory use of CSSMappedAttributeDeclaration by one ptr and refcount
294         (it loses the vptr) in total.
295         
296         This is not meant to be the end state, just an intermediate refactoring step. CSSMappedAttributeDeclaration
297         should clearly be renamed too but this patch doesn't do that. It might not exist in its current form
298         much longer.
299
300         * css/CSSMutableStyleDeclaration.cpp:
301         (WebCore::CSSMutableStyleDeclaration::setProperty):
302         (WebCore::CSSMutableStyleDeclaration::merge):
303         * css/CSSMutableStyleDeclaration.h:
304
305             Remove protected section. No subclasses remain.        
306             Rename setPropertyInternal() to setProperty(). All public methods here are internal.
307         
308         (CSSMutableStyleDeclaration):
309         * css/CSSParser.cpp:
310         (WebCore::CSSParser::parseMappedAttributeValue):
311         * dom/Attribute.cpp:
312         (WebCore::Attribute::clone):
313         * dom/Attribute.h:
314         (Attribute):
315         (WebCore::Attribute::decl):
316         (WebCore::Attribute::mappedAttributeDeclaration):
317         (WebCore::Attribute::setMappedAttributeDeclaration):
318         (WebCore::Attribute::Attribute):
319         * dom/CSSMappedAttributeDeclaration.cpp:
320         (WebCore::CSSMappedAttributeDeclaration::setMappedImageProperty):
321         (WebCore::CSSMappedAttributeDeclaration::setMappedProperty):
322         (WebCore::CSSMappedAttributeDeclaration::removeMappedProperty):
323         * dom/CSSMappedAttributeDeclaration.h:
324         (CSSMappedAttributeDeclaration):
325         (WebCore::CSSMappedAttributeDeclaration::declaration):
326         (WebCore::CSSMappedAttributeDeclaration::CSSMappedAttributeDeclaration):
327         
328             Make CSSMutableStyleDeclaration a member instead of the base class.
329         
330         * dom/StyledElement.cpp:
331         (WebCore::StyledElement::attributeChanged):
332         (WebCore::StyledElement::removeCSSProperty):
333         (WebCore::StyledElement::addCSSProperty):
334         (WebCore::StyledElement::addCSSImageProperty):
335         (WebCore::StyledElement::addCSSLength):
336         (WebCore::StyledElement::addCSSColor):
337         (WebCore::StyledElement::createMappedDecl):
338         * svg/SVGStyledElement.cpp:
339         (WebCore::SVGStyledElement::getPresentationAttribute):
340
341 2012-02-01  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
342
343         [Qt] Set all PlatformTouchPoint values possible from a QTouch event.
344         https://bugs.webkit.org/show_bug.cgi?id=77442
345
346         Reviewed by Kenneth Rohde Christiansen.
347
348         * platform/qt/PlatformTouchPointQt.cpp:
349         (WebCore::PlatformTouchPoint::PlatformTouchPoint):
350
351 2012-02-01  Peter Rybin  <peter.rybin@gmail.com>
352
353         Web Inspector: CodeGeneratorInspector.py: move type builder code to dedicated InspectorTypeBuilder .h/.cpp
354         https://bugs.webkit.org/show_bug.cgi?id=77471
355
356         Reviewed by Yury Semikhatsky.
357
358         Code is moved physically to other file -- generator is changed accrodingly.
359
360         * inspector/CodeGeneratorInspector.py:
361         (String):
362         (provides):
363         (typename):
364         (Array):
365
366 2012-02-01  Yury Semikhatsky  <yurys@chromium.org>
367
368         Web Inspector: debugger reports wrong sources when paused in inline script on page reload
369         https://bugs.webkit.org/show_bug.cgi?id=77548
370
371         V8 returns treats each script source as ending with \n, now we take
372         this into account when reporting script line count to the inspector
373         front-end.
374
375         Reviewed by Vsevolod Vlasov.
376
377         Test: inspector/debugger/pause-in-inline-script.html
378
379         * bindings/js/ScriptDebugServer.cpp:
380         (WebCore::ScriptDebugServer::dispatchDidParseSource):
381         * bindings/v8/DebuggerScript.js:
382
383 2012-02-01  Shinya Kawanaka  <shinyak@google.com>
384
385         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
386         https://bugs.webkit.org/show_bug.cgi?id=76611
387
388         Reviewed by Hajime Morita
389
390         When a content element is added/removed/replaced in a shadow tree, we have to recreate
391         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
392         when content element is removed. (When added, it is recalculated.)
393         This patch enables us to recalcurate the shadow tree when content element is removed.
394
395         Test: fast/dom/shadow/content-element-move.html
396
397         * dom/Element.cpp:
398         (WebCore::Element::attach):
399           If a shadow root exists, attaches shadow tree before attaching child elements.
400         * dom/ShadowRoot.cpp:
401           Added a flag to recalculate shadow tree.
402         (WebCore::ShadowRoot::ShadowRoot):
403         (WebCore::ShadowRoot::recalcShadowTreeStyle):
404           Recalculates light children and shadow tree.
405         (WebCore::ShadowRoot::setNeedsReattachHostChildrenAndShadow):
406         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
407           Detaches shadow tree and host light children, and attaches them again.
408         * dom/ShadowRoot.h:
409         (WebCore::ShadowRoot::clearNeedsReattachHostChildrenAndShadow):
410         (WebCore::ShadowRoot::needsReattachHostChildrenAndShadow):
411         * html/shadow/HTMLContentElement.cpp:
412         (WebCore::HTMLContentElement::attach):
413           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
414         (WebCore::HTMLContentElement::detach):
415           When a content element detached, reattaches a shadow tree.
416
417 2012-02-01  Peter Beverloo  <peter@chromium.org>
418
419         getIntersectionList causes transforms to be recalculated in SVG
420         https://bugs.webkit.org/show_bug.cgi?id=77179
421
422         Reviewed by Nikolas Zimmermann.
423
424         Introduce a local variable to store the element's local-to-parent
425         transformation matrix in, removing the need for the const_cast and
426         stopping us from modifying any matrices elsewhere.
427
428         Test: svg/custom/intersection-list-transforms.svg
429
430         * rendering/svg/RenderSVGModelObject.cpp:
431         (WebCore::getElementCTM):
432
433 2012-02-01  Vsevolod Vlasov  <vsevik@chromium.org>
434
435         Web Inspector: [InspectorIndexedDB] Add tests for database names and database structure requests.
436         https://bugs.webkit.org/show_bug.cgi?id=77439
437
438         Reviewed by Pavel Feldman.
439
440         Tests: http/tests/inspector/indexeddb/database-names.html
441                http/tests/inspector/indexeddb/database-structure.html
442
443         * inspector/front-end/IndexedDBModel.js:
444         (WebInspector.IndexedDBModel.prototype.refreshDatabase):
445
446 2012-01-31  Vsevolod Vlasov  <vsevik@chromium.org>
447
448         Web Inspector: Scripts navigator becomes empty after "show folders" settings change.
449         https://bugs.webkit.org/show_bug.cgi?id=77441
450
451         Reviewed by Pavel Feldman.
452
453         * inspector/front-end/ScriptsNavigator.js:
454         (WebInspector.ScriptsNavigator.prototype._reset):
455         * inspector/front-end/utilities.js:
456
457 2012-02-01  Shawn Singh  <shawnsingh@chromium.org>
458
459         Fix the semantics of passing contentsVisible flag to GraphicsLayers
460         https://bugs.webkit.org/show_bug.cgi?id=76975
461
462         Reviewed by Simon Fraser.
463
464         This patch is covered by existing tests, in particular
465         compositing/visibility/layer-visible-content.html; its
466         expectations are rebaselined.
467
468         * rendering/RenderLayerBacking.cpp:
469         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
470
471 2012-02-01  Philippe Normand  <pnormand@igalia.com>
472
473         Unreviewed, another GTK build fix after r106446.
474
475         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
476         Restore webKitWebSrcGetProtocols as it was before r106446.
477
478 2012-02-01  Philippe Normand  <pnormand@igalia.com>
479
480         Unreviewed, GTK build fix after r106446.
481
482         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
483
484 2012-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
485
486         Unreviewed, rolling out r106432.
487         http://trac.webkit.org/changeset/106432
488         https://bugs.webkit.org/show_bug.cgi?id=77529
489
490         it breaks tests (Requested by shinyak on #webkit).
491
492         * dom/Element.cpp:
493         (WebCore::Element::attach):
494         * dom/ShadowRoot.cpp:
495         (WebCore::ShadowRoot::recalcShadowTreeStyle):
496         * dom/ShadowRoot.h:
497         (ShadowRoot):
498         * html/shadow/HTMLContentElement.cpp:
499         (WebCore::HTMLContentElement::attach):
500         (WebCore::HTMLContentElement::detach):
501
502 2012-02-01  Hayato Ito  <hayato@chromium.org>
503
504         Remove unnecessary [OldStyleObjC] from ShadowRoot.idl.
505         https://bugs.webkit.org/show_bug.cgi?id=77516
506
507         Reviewed by Kentaro Hara.
508
509         No new tests. No change in behavior.
510
511         * dom/ShadowRoot.idl:
512
513 2012-01-26  Philippe Normand  <pnormand@igalia.com>
514
515         [GStreamer] 0.11 webkitwebsrc
516         https://bugs.webkit.org/show_bug.cgi?id=77086
517
518         Port the webkitwebsrc element to GStreamer 0.11 APIs.
519
520         Reviewed by Gustavo Noronha Silva.
521
522         No new tests, existing http media layout tests should cover this.
523
524         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
525         (webkit_web_src_class_init):
526
527 2012-01-31  Hans Wennborg  <hans@chromium.org>
528
529         Speech Input: Report speech element rect relative to window rather than frame
530         https://bugs.webkit.org/show_bug.cgi?id=76443
531
532         Reviewed by Darin Fisher.
533
534         When requesting speech input, report the speech element rect relative
535         to the window rather than the frame. The embedder will typically use
536         this position to show a bubble indicating that speech recognition is
537         in progress.
538
539         Test: fast/speech/bubble-position.html
540
541         * html/shadow/TextControlInnerElements.cpp:
542         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
543
544 2012-01-31  Andreas Kling  <awesomekling@apple.com>
545
546         Make elements that don't have attributes smaller.
547         <http://webkit.org/b/76876>
548
549         Reviewed by Sam Weinig and Antti Koivisto.
550
551         Move the inline style declaration from StyledElement to ElementAttributeData, since having
552         an inline style declaration also implies having a style attribute on the element.
553         This saves one CPU word per element that has no attributes.
554
555         This reduces memory consumption by 412 kB (on 64-bit) when viewing the full
556         HTML5 spec at <http://whatwg.org/c>.
557
558         This was rolled out once because of a performance regression which has been averted this
559         time around by adding an Element::ensureAttributeMap() so we can force creation of the
560         NamedNodeMap without also serializing the inline style for the "style" attribute.
561
562         * dom/Element.h:
563         (Element):
564         (WebCore::Element::ensureAttributeMap):
565         (WebCore):
566         * dom/ElementAttributeData.h:
567         (ElementAttributeData):
568         * dom/NamedNodeMap.cpp:
569         (WebCore::NamedNodeMap::ensureInlineStyleDecl):
570         (WebCore):
571         (WebCore::NamedNodeMap::destroyInlineStyleDecl):
572         * dom/NamedNodeMap.h:
573         (WebCore::NamedNodeMap::inlineStyleDecl):
574         (NamedNodeMap):
575         * dom/StyledElement.cpp:
576         (WebCore::StyledElement::addSubresourceAttributeURLs):
577         * dom/StyledElement.h:
578         (WebCore::StyledElement::inlineStyleDecl):
579         (WebCore::StyledElement::ensureInlineStyleDecl):
580         (StyledElement):
581         (WebCore::StyledElement::destroyInlineStyleDecl):
582
583 2012-01-31  Hayato Ito  <hayato@chromium.org>
584
585         Add APIs, getElementsByXXX family, to ShadowRoot IDL.
586         https://bugs.webkit.org/show_bug.cgi?id=77323
587
588         Reviewed by Dimitri Glazkov.
589
590         Add APIs (getElementById, getElemesntByTagName, getElementsByClassName and getElementsByTagNameNS)
591         to ShadowRoot IDL.
592
593         * dom/ShadowRoot.idl:
594
595 2012-01-31  Shinya Kawanaka  <shinyak@google.com>
596
597         Content element should be able to be dynamically added/removed/replaced in a shadow tree.
598         https://bugs.webkit.org/show_bug.cgi?id=76611
599
600         Reviewed by Hajime Morita.
601
602         When a content element is added/removed/replaced in a shadow tree, we have to recreate
603         the shadow tree to recalculate inclusions of content elements. Currently we didn't recalculate it
604         when content element is removed. (When added, it is recalculated.)
605         This patch enables us to recalcurate the shadow tree when content element is removed.
606
607         Test: fast/dom/shadow/content-element-move.html
608
609         * dom/Element.cpp:
610         (WebCore::Element::attach):
611           If a shadow root exists, attaches shadow tree before attaching child elements.
612         * dom/ShadowRoot.cpp:
613         (WebCore::ShadowRoot::recalcShadowTreeStyle):
614           Recalculates light children and shadow tree.
615         (WebCore::ShadowRoot::reattachHostChildrenAndShadow):
616           Detaches shadow tree and host light children, and attaches them again.
617         * dom/ShadowRoot.h:
618           Added a flag to recalculate shadow tree.
619         (WebCore::ShadowRoot::setNeedsShadowTreeStyleRecalc):
620         (WebCore::ShadowRoot::clearNeedsShadowTreeStyleRecalc):
621         (WebCore::ShadowRoot::needsShadowTreeStyleRecalc):
622         * html/shadow/HTMLContentElement.cpp:
623         (WebCore::HTMLContentElement::attach):
624           Does not need to detach included elements, because they are not attached in ContainerNode anymore.
625         (WebCore::HTMLContentElement::detach):
626           When a content element detached, reattaches a shadow tree.
627
628 2012-01-31  Joe Thomas  <joethomas@motorola.com>
629
630         https://bugs.webkit.org/show_bug.cgi?id=76801
631         Listboxes incorrectly display contents when cleared and then re-populated.
632
633         Whenever the number of items in the listbox is less than the size of listbox (number of visible items the listbox can accomodate),
634         we set the listbox scroll-offset to zero. The scroll-offset of the Scrollbar should also be set to 0 so that when the listbox is re-populated,
635         scrollbar position and the content inside the listbox are in sync.
636
637         Reviewed by Andreas Kling.
638
639         Tests: fast/forms/listbox-clear-restore.html
640
641         * rendering/RenderListBox.cpp:
642         (WebCore::RenderListBox::computeLogicalHeight): Setting the scroll-offset of the Scrollbar to 0 when scrollbar is not needed.
643
644 2012-01-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
645
646         Unreviewed. Fix build break after r106373.
647
648         * CMakeLists.txt:
649
650 2012-01-31  Adam Barth  <abarth@webkit.org>
651
652         HTMLPreloadScanner should understand the <base> element
653         https://bugs.webkit.org/show_bug.cgi?id=77231
654
655         Reviewed by Eric Seidel.
656
657         Previously, the HTMLPreloadScanner would ignore the <base> element when
658         preloading resources.  If there was a <base> tag, this could cause the
659         preload scanner to make a bunch of useless requests.
660
661         This patch teaches the preload scanner to use <base> tags to better
662         predict which URLs will be used by the document.
663
664         Tests: fast/preloader/first-base-tag-scanned-wins.html
665                fast/preloader/first-base-tag-wins.html
666                fast/preloader/understands-base-tag.html
667
668         * dom/Document.cpp:
669         (WebCore::Document::completeURL):
670         (WebCore):
671         * dom/Document.h:
672         (Document):
673         (WebCore::Document::baseElementURL):
674         * html/parser/HTMLPreloadScanner.cpp:
675         (WebCore::HTMLNames::PreloadTask::PreloadTask):
676         (WebCore::HTMLNames::PreloadTask::processAttributes):
677         (WebCore::HTMLNames::PreloadTask::preload):
678         (WebCore::HTMLNames::PreloadTask::baseElementHref):
679         (PreloadTask):
680         (WebCore::HTMLPreloadScanner::scan):
681         (WebCore::HTMLPreloadScanner::processToken):
682         (WebCore::HTMLPreloadScanner::updatePredictedBaseElementURL):
683         (WebCore):
684         * html/parser/HTMLPreloadScanner.h:
685         (HTMLPreloadScanner):
686
687 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
688
689         Dynamic allocate AudioBus with required number of channels for AudioNodeInput
690         https://bugs.webkit.org/show_bug.cgi?id=76516
691
692         Reviewed by Kenneth Russell.
693
694         No new tests required.
695
696         * webaudio/AudioBasicProcessorNode.cpp:
697         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
698         * webaudio/AudioChannelMerger.cpp:
699         (WebCore::AudioChannelMerger::checkNumberOfChannelsForInput):
700         * webaudio/AudioGainNode.cpp:
701         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
702         * webaudio/AudioNode.cpp:
703         (WebCore::AudioNode::checkNumberOfChannelsForInput):
704         * webaudio/AudioNode.h:
705         * webaudio/AudioNodeInput.cpp:
706         (WebCore::AudioNodeInput::AudioNodeInput):
707         (WebCore::AudioNodeInput::updateInternalBus):
708         (WebCore::AudioNodeInput::internalSummingBus):
709         * webaudio/AudioNodeInput.h:
710
711 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
712
713         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
714         https://bugs.webkit.org/show_bug.cgi?id=77473
715         <rdar://problem/10751357>
716
717         Reviewed by Darin Adler.
718
719         Test: platform/mac/fast/events/non-roman-key-code.html
720
721         * WebCore.exp.in:
722         * platform/mac/PlatformEventFactoryMac.h:
723         * platform/mac/PlatformEventFactoryMac.mm:
724         (WebCore::keyIdentifierForKeyEvent):
725         (WebCore::windowsKeyCodeForKeyEvent):
726         Export functions for reuse in WebKit2. I did not attempt any larger refactoring at this time.
727
728 2012-01-31  Gregg Tavares  <gman@google.com>
729
730         Make WebGL put synthesized errors in the JS console
731         https://bugs.webkit.org/show_bug.cgi?id=77267
732
733         Reviewed by Kenneth Russell.
734
735         No new functionality so no new tests.
736
737         * html/canvas/WebGLCompressedTextures.cpp:
738         (WebCore::WebGLCompressedTextures::validateCompressedTexFuncData):
739         (WebCore::WebGLCompressedTextures::compressedTexImage2D):
740         (WebCore::WebGLCompressedTextures::compressedTexSubImage2D):
741         * html/canvas/WebGLCompressedTextures.h:
742         (WebGLCompressedTextures):
743         * html/canvas/WebGLDebugShaders.cpp:
744         (WebCore::WebGLDebugShaders::getTranslatedShaderSource):
745         * html/canvas/WebGLRenderingContext.cpp:
746         (WebCore::WebGLRenderingContext::activeTexture):
747         (WebCore::WebGLRenderingContext::attachShader):
748         (WebCore::WebGLRenderingContext::bindAttribLocation):
749         (WebCore::WebGLRenderingContext::checkObjectToBeBound):
750         (WebCore::WebGLRenderingContext::bindBuffer):
751         (WebCore::WebGLRenderingContext::bindFramebuffer):
752         (WebCore::WebGLRenderingContext::bindRenderbuffer):
753         (WebCore::WebGLRenderingContext::bindTexture):
754         (WebCore::WebGLRenderingContext::blendEquation):
755         (WebCore::WebGLRenderingContext::blendEquationSeparate):
756         (WebCore::WebGLRenderingContext::blendFunc):
757         (WebCore::WebGLRenderingContext::blendFuncSeparate):
758         (WebCore::WebGLRenderingContext::bufferData):
759         (WebCore::WebGLRenderingContext::bufferSubData):
760         (WebCore::WebGLRenderingContext::checkFramebufferStatus):
761         (WebCore::WebGLRenderingContext::clear):
762         (WebCore::WebGLRenderingContext::compileShader):
763         (WebCore::WebGLRenderingContext::compressedTexImage2D):
764         (WebCore::WebGLRenderingContext::compressedTexSubImage2D):
765         (WebCore::WebGLRenderingContext::copyTexImage2D):
766         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
767         (WebCore::WebGLRenderingContext::createShader):
768         (WebCore::WebGLRenderingContext::deleteObject):
769         (WebCore::WebGLRenderingContext::depthRange):
770         (WebCore::WebGLRenderingContext::detachShader):
771         (WebCore::WebGLRenderingContext::disable):
772         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
773         (WebCore::WebGLRenderingContext::validateWebGLObject):
774         (WebCore::WebGLRenderingContext::drawArrays):
775         (WebCore::WebGLRenderingContext::drawElements):
776         (WebCore::WebGLRenderingContext::enable):
777         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
778         (WebCore::WebGLRenderingContext::framebufferRenderbuffer):
779         (WebCore::WebGLRenderingContext::framebufferTexture2D):
780         (WebCore::WebGLRenderingContext::generateMipmap):
781         (WebCore::WebGLRenderingContext::getActiveAttrib):
782         (WebCore::WebGLRenderingContext::getActiveUniform):
783         (WebCore::WebGLRenderingContext::getAttachedShaders):
784         (WebCore::WebGLRenderingContext::getAttribLocation):
785         (WebCore::WebGLRenderingContext::getBufferParameter):
786         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
787         (WebCore::WebGLRenderingContext::getParameter):
788         (WebCore::WebGLRenderingContext::getProgramParameter):
789         (WebCore::WebGLRenderingContext::getProgramInfoLog):
790         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
791         (WebCore::WebGLRenderingContext::getShaderParameter):
792         (WebCore::WebGLRenderingContext::getShaderInfoLog):
793         (WebCore::WebGLRenderingContext::getShaderSource):
794         (WebCore::WebGLRenderingContext::getTexParameter):
795         (WebCore::WebGLRenderingContext::getUniform):
796         (WebCore::WebGLRenderingContext::getUniformLocation):
797         (WebCore::WebGLRenderingContext::getVertexAttrib):
798         (WebCore::WebGLRenderingContext::hint):
799         (WebCore::WebGLRenderingContext::isEnabled):
800         (WebCore::WebGLRenderingContext::linkProgram):
801         (WebCore::WebGLRenderingContext::pixelStorei):
802         (WebCore::WebGLRenderingContext::readPixels):
803         (WebCore::WebGLRenderingContext::renderbufferStorage):
804         (WebCore::WebGLRenderingContext::scissor):
805         (WebCore::WebGLRenderingContext::shaderSource):
806         (WebCore::WebGLRenderingContext::stencilFunc):
807         (WebCore::WebGLRenderingContext::stencilFuncSeparate):
808         (WebCore::WebGLRenderingContext::stencilMaskSeparate):
809         (WebCore::WebGLRenderingContext::texImage2DBase):
810         (WebCore::WebGLRenderingContext::texImage2DImpl):
811         (WebCore::WebGLRenderingContext::texImage2D):
812         (WebCore::WebGLRenderingContext::videoFrameToImage):
813         (WebCore::WebGLRenderingContext::texParameter):
814         (WebCore::WebGLRenderingContext::texSubImage2DBase):
815         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
816         (WebCore::WebGLRenderingContext::texSubImage2D):
817         (WebCore::WebGLRenderingContext::uniform1f):
818         (WebCore::WebGLRenderingContext::uniform1fv):
819         (WebCore::WebGLRenderingContext::uniform1i):
820         (WebCore::WebGLRenderingContext::uniform1iv):
821         (WebCore::WebGLRenderingContext::uniform2f):
822         (WebCore::WebGLRenderingContext::uniform2fv):
823         (WebCore::WebGLRenderingContext::uniform2i):
824         (WebCore::WebGLRenderingContext::uniform2iv):
825         (WebCore::WebGLRenderingContext::uniform3f):
826         (WebCore::WebGLRenderingContext::uniform3fv):
827         (WebCore::WebGLRenderingContext::uniform3i):
828         (WebCore::WebGLRenderingContext::uniform3iv):
829         (WebCore::WebGLRenderingContext::uniform4f):
830         (WebCore::WebGLRenderingContext::uniform4fv):
831         (WebCore::WebGLRenderingContext::uniform4i):
832         (WebCore::WebGLRenderingContext::uniform4iv):
833         (WebCore::WebGLRenderingContext::uniformMatrix2fv):
834         (WebCore::WebGLRenderingContext::uniformMatrix3fv):
835         (WebCore::WebGLRenderingContext::uniformMatrix4fv):
836         (WebCore::WebGLRenderingContext::useProgram):
837         (WebCore::WebGLRenderingContext::validateProgram):
838         (WebCore::WebGLRenderingContext::vertexAttrib1f):
839         (WebCore::WebGLRenderingContext::vertexAttrib1fv):
840         (WebCore::WebGLRenderingContext::vertexAttrib2f):
841         (WebCore::WebGLRenderingContext::vertexAttrib2fv):
842         (WebCore::WebGLRenderingContext::vertexAttrib3f):
843         (WebCore::WebGLRenderingContext::vertexAttrib3fv):
844         (WebCore::WebGLRenderingContext::vertexAttrib4f):
845         (WebCore::WebGLRenderingContext::vertexAttrib4fv):
846         (WebCore::WebGLRenderingContext::vertexAttribPointer):
847         (WebCore::WebGLRenderingContext::viewport):
848         (WebCore::WebGLRenderingContext::forceLostContext):
849         (WebCore::WebGLRenderingContext::loseContextImpl):
850         (WebCore::WebGLRenderingContext::forceRestoreContext):
851         (WebCore::WebGLRenderingContext::validateTextureBinding):
852         (WebCore::WebGLRenderingContext::validateLocationLength):
853         (WebCore::WebGLRenderingContext::validateSize):
854         (WebCore::WebGLRenderingContext::validateString):
855         (WebCore::WebGLRenderingContext::validateTexFuncFormatAndType):
856         (WebCore::WebGLRenderingContext::validateTexFuncLevel):
857         (WebCore::WebGLRenderingContext::validateTexFuncParameters):
858         (WebCore::WebGLRenderingContext::validateTexFuncData):
859         (WebCore::WebGLRenderingContext::validateDrawMode):
860         (WebCore::WebGLRenderingContext::validateStencilSettings):
861         (WebCore::WebGLRenderingContext::validateStencilFunc):
862         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
863         (WebCore::WebGLRenderingContext::validateBlendEquation):
864         (WebCore::WebGLRenderingContext::validateBlendFuncFactors):
865         (WebCore::WebGLRenderingContext::validateCapability):
866         (WebCore::WebGLRenderingContext::validateUniformParameters):
867         (WebCore::WebGLRenderingContext::validateUniformMatrixParameters):
868         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
869         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
870         (WebCore::WebGLRenderingContext::vertexAttribfImpl):
871         (WebCore::WebGLRenderingContext::vertexAttribfvImpl):
872         (WebCore::WebGLRenderingContext::maybeRestoreContext):
873         (WebCore):
874         (WebCore::WebGLRenderingContext::synthesizeGLError):
875         * html/canvas/WebGLRenderingContext.h:
876         (WebGLRenderingContext):
877
878 2012-01-31  Raymond Liu  <raymond.liu@intel.com>
879
880         Clean up m_processLock logic in AudioBasicProcessorNode and AudioGainNode
881         https://bugs.webkit.org/show_bug.cgi?id=76772
882
883         Reviewed by Kenneth Russell.
884
885         No new tests required.
886
887         * webaudio/AudioBasicProcessorNode.cpp:
888         (WebCore::AudioBasicProcessorNode::process):
889         (WebCore::AudioBasicProcessorNode::checkNumberOfChannelsForInput):
890         * webaudio/AudioBasicProcessorNode.h:
891         * webaudio/AudioGainNode.cpp:
892         (WebCore::AudioGainNode::process):
893         (WebCore::AudioGainNode::checkNumberOfChannelsForInput):
894         * webaudio/AudioGainNode.h:
895         (AudioGainNode):
896
897 2012-01-31  Adam Klein  <adamk@chromium.org>
898
899         ProcessingInstruction should not be a ContainerNode
900         https://bugs.webkit.org/show_bug.cgi?id=75141
901
902         Reviewed by Darin Adler.
903
904         Per the DOM spec, ProcessingInstruction can't have any children.
905         And the WebCore behavior already matches the spec by always returning
906         false for childTypeAllowed(). This change simplifies
907         ProcessingInstruction's implementation by making it subclass Node
908         instead of ContainerNode.
909
910         Test: fast/dom/processing-instruction-appendChild-exceptions.xhtml
911
912         * dom/ContainerNode.cpp: Moved dispatchBeforeLoadEvent up to Node.
913         * dom/ContainerNode.h:
914         * dom/Node.cpp:
915         (WebCore::Node::dispatchBeforeLoadEvent): Moved up from ContainerNode
916         since it's used both by ProcessingInstruction and various Element
917         subclasses.
918         * dom/Node.h:
919         * dom/ProcessingInstruction.cpp:
920         (WebCore::ProcessingInstruction::ProcessingInstruction): Call Node constructor.
921         (WebCore::ProcessingInstruction::insertedIntoDocument): Call Node impl.
922         (WebCore::ProcessingInstruction::removedFromDocument): ditto.
923         (WebCore::ProcessingInstruction::finishParsingChildren): ditto.
924         * dom/ProcessingInstruction.h:
925
926 2012-01-31  Matthew Delaney  <mdelaney@apple.com>
927
928         Failing 2d.shadow.enable.off.2.html on Lion
929         https://bugs.webkit.org/show_bug.cgi?id=77489
930
931         Reviewed by Dan Bernstein.
932
933         The canvas spec requires that shadows not be drawn under certain
934         circumstances outlined here: http://www.whatwg.org/specs/web-apps/current-work/#shadows
935         This patch adds in those checks which allows us to pass now (on Lion)
936         the philip canvas test that was checking that constraint.
937
938         No new tests. Unskipping the test on Lion that this patch fixes.
939
940         * html/canvas/CanvasRenderingContext2D.cpp:
941         (WebCore::CanvasRenderingContext2D::setAllAttributesToDefault):
942         (WebCore::CanvasRenderingContext2D::setShadow):
943         (WebCore::CanvasRenderingContext2D::applyShadow):
944         (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
945         * html/canvas/CanvasRenderingContext2D.h:
946         (CanvasRenderingContext2D):
947
948 2012-01-31  Anders Carlsson  <andersca@apple.com>
949
950         TileCache::setNeedsDisplayInRect cleanup
951         https://bugs.webkit.org/show_bug.cgi?id=77486
952
953         Reviewed by Andreas Kling.
954
955         * platform/graphics/ca/mac/TileCache.h:
956         * platform/graphics/ca/mac/TileCache.mm:
957         (WebCore::TileCache::setNeedsDisplayInRect):
958         TileCache::tileLayerAtIndex can in the future return nil, so cope with that. Also, replace
959         nested if statements with continue statements.
960
961         (WebCore::TileCache::getTileIndexRangeForRect):
962         Rename this to better indicate that it returns a range of indices.
963
964 2012-01-31  Dana Jansens  <danakj@chromium.org>
965
966         Add contains() test to Region
967         https://bugs.webkit.org/show_bug.cgi?id=72294
968
969         Reviewed by Anders Carlsson.
970
971         * platform/graphics/Region.cpp:
972         (WebCore::Region::contains):
973         (WebCore):
974         * platform/graphics/Region.h:
975         (Region):
976         (Shape):
977         (WebCore::operator==):
978         (WebCore):
979
980 2012-01-31  Sami Kyostila  <skyostil@chromium.org>
981
982         [chromium] Compositor debug borders are not scaled correctly
983         https://bugs.webkit.org/show_bug.cgi?id=77468
984
985         Use CCLayerImpl::contentBounds() instead of CCLayerImpl::bounds() to calculate debug
986         border geometry so that the borders are properly scaled.
987
988         Reviewed by James Robinson.
989
990         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
991         (WebCore::CCLayerImpl::appendDebugBorderQuad):
992
993 2012-01-31  Sheriff Bot  <webkit.review.bot@gmail.com>
994
995         Unreviewed, rolling out r106376.
996         http://trac.webkit.org/changeset/106376
997         https://bugs.webkit.org/show_bug.cgi?id=77481
998
999         Broke WebGLLayerChromiumTest in webkit_unit_tests (Requested
1000         by kbr_google on #webkit).
1001
1002         * platform/graphics/gpu/DrawingBuffer.cpp:
1003         (WebCore):
1004         (WebCore::DrawingBuffer::reset):
1005
1006 2012-01-31  Mihnea Ovidenie  <mihnea@adobe.com>
1007
1008         [CSSRegions]Reduce the cases when the box style in region is computed
1009         https://bugs.webkit.org/show_bug.cgi?id=77446
1010
1011         Reviewed by David Hyatt.
1012
1013         Covered by existing region style tests.
1014
1015         * rendering/RenderRegion.cpp:
1016         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
1017         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
1018
1019 2012-01-31  Anders Carlsson  <andersca@apple.com>
1020
1021         Put tiles in a HashMap
1022         https://bugs.webkit.org/show_bug.cgi?id=77480
1023
1024         Reviewed by Antti Koivisto.
1025
1026         Put tiles in a hash map keyed off the tile index.
1027
1028         * platform/graphics/ca/mac/TileCache.h:
1029         Shuffle member variables around so the order makes more sense.
1030         Add the tile map.
1031
1032         * platform/graphics/ca/mac/TileCache.mm:
1033         (WebCore::TileCache::TileCache):
1034         Update member initializers.
1035
1036         (WebCore::TileCache::setNeedsDisplayInRect):
1037         Call tileLayerAtIndex instead of tileLayerAtPosition.
1038
1039         (WebCore::TileCache::setAcceleratesDrawing):
1040         (WebCore::TileCache::setTileDebugBorderWidth):
1041         (WebCore::TileCache::setTileDebugBorderColor):
1042         Iterate over the hash map instead of the sublayers.
1043
1044         (WebCore::TileCache::resizeTileGrid):
1045         Add the created layers to the map.
1046
1047         (WebCore::TileCache::tileLayerAtIndex):
1048         Rename from tileLayerAtPoint to better reflect that this member function
1049         returns a tile layer at the given index and not the given point.
1050
1051 2012-01-31  Antti Koivisto  <antti@apple.com>
1052
1053         Make CSSOM style() return CSSStyleDeclaration*
1054         https://bugs.webkit.org/show_bug.cgi?id=77475
1055
1056         Reviewed by Anders Carlsson
1057
1058         CSSStyleRule::style() and some other places return CSSMutableStyleDeclaration. 
1059         They should return the plain CSSOM type instead.
1060         
1061         CSSMutableStyleDeclaration* should be available through non-CSSOM function.
1062
1063         * css/CSSFontFaceRule.h:
1064         (WebCore::CSSFontFaceRule::style):
1065         (WebCore::CSSFontFaceRule::declaration):
1066         * css/CSSFontSelector.cpp:
1067         (WebCore::CSSFontSelector::addFontFaceRule):
1068         * css/CSSStyleRule.h:
1069         (WebCore::CSSStyleRule::style):
1070         (WebCore::CSSStyleRule::declaration):
1071         * css/CSSStyleSelector.cpp:
1072         (WebCore::CSSStyleSelector::styleForKeyframe):
1073         * css/WebKitCSSKeyframeRule.h:
1074         (WebCore):
1075         (WebCore::WebKitCSSKeyframeRule::style):
1076         (WebCore::WebKitCSSKeyframeRule::declaration):
1077         (WebKitCSSKeyframeRule):
1078         * editing/EditingStyle.cpp:
1079         (WebCore::styleFromMatchedRulesForElement):
1080         * inspector/InspectorStyleSheet.cpp:
1081         (WebCore::InspectorStyleSheet::revalidateStyle):
1082         * page/PageSerializer.cpp:
1083         (WebCore::PageSerializer::retrieveResourcesForCSSRule):
1084         * svg/SVGFontFaceElement.cpp:
1085         (WebCore::SVGFontFaceElement::parseMappedAttribute):
1086         (WebCore::SVGFontFaceElement::fontFamily):
1087         (WebCore::SVGFontFaceElement::rebuildFontFace):
1088
1089 2012-01-31  Scott Graham  <scottmg@chromium.org>
1090
1091         [Chromium] Remove references to gyp cygwin build target
1092         https://bugs.webkit.org/show_bug.cgi?id=77253
1093
1094         Reviewed by Julien Chaffraix.
1095
1096         Target dependency is no longer required, it's done earlier in the
1097         build process.
1098
1099         * WebCore.gyp/WebCore.gyp:
1100
1101 2012-01-31  Jon Lee  <jonlee@apple.com>
1102
1103         Hidden form elements do not save their state prior to form submission
1104         https://bugs.webkit.org/show_bug.cgi?id=77391
1105         <rdar://problem/10563108>
1106
1107         Reviewed by Brady Eidson.
1108
1109         Test: fast/forms/state-restore-hidden.html
1110
1111         * html/HiddenInputType.cpp: Teach hidden inputs to save and restore their state.
1112         (WebCore::HiddenInputType::saveFormControlState):
1113         (WebCore::HiddenInputType::restoreFormControlState):
1114         * html/HiddenInputType.h:
1115         (HiddenInputType):
1116
1117 2012-01-31  Joshua Bell  <jsbell@chromium.org>
1118
1119         IndexedDB: IDBCursor.update() should raise exception if key changed
1120         https://bugs.webkit.org/show_bug.cgi?id=76952
1121
1122         Move the test from the async task to the synchronous call, per spec. Also re-ordered the tests
1123         done during the synchronous call and the asynchronous task to follow the spec order.
1124
1125         Reviewed by Tony Chang.
1126
1127         Tests: storage/indexeddb/cursor-update.html
1128
1129         * storage/IDBObjectStoreBackendImpl.cpp:
1130         (WebCore::IDBObjectStoreBackendImpl::put): Added check during update() call, order checks per spec.
1131         (WebCore::IDBObjectStoreBackendImpl::putInternal): Move effective key calculation inline.
1132         * storage/IDBObjectStoreBackendImpl.h: Removed selectKeyForPut method.
1133
1134 2012-01-31  Anders Carlsson  <andersca@apple.com>
1135
1136         Inform the tile cache whenever the visible rect changes
1137         https://bugs.webkit.org/show_bug.cgi?id=77470
1138
1139         Reviewed by Andreas Kling.
1140
1141         * platform/graphics/GraphicsLayer.h:
1142         (WebCore::GraphicsLayer::visibleRectChanged):
1143         Add empty function.
1144
1145         * platform/graphics/ca/GraphicsLayerCA.cpp:
1146         (WebCore::GraphicsLayerCA::visibleRectChanged):
1147         Call through to the PlatformCALayer.
1148
1149         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1150         (PlatformCALayer::visibleRectChanged):
1151         Call through to the underlying WebTileCacheLayer.
1152
1153         * platform/graphics/ca/mac/TileCache.mm:
1154         (WebCore::TileCache::visibleRectChanged):
1155         Add empty stub.
1156
1157         (WebCore::TileCache::visibleRect):
1158         Add new (currently unused) helper function that returns the visible rect of the
1159         tile cache layer.
1160
1161         * platform/graphics/ca/mac/WebTileCacheLayer.h:
1162         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
1163         (-[WebTileCacheLayer visibleRectChanged]):
1164         Call through to the TielCache object.
1165
1166         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1167         (PlatformCALayer::visibleRectChanged):
1168         Add stub.
1169
1170         * rendering/RenderLayerCompositor.cpp:
1171         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1172         Call GraphicsLayer::visibleRectChanged.
1173
1174 2012-01-31  Antti Koivisto  <antti@apple.com>
1175
1176         Remove CSSStyleDeclaration isElementStyleDeclaration bit
1177         https://bugs.webkit.org/show_bug.cgi?id=77460
1178
1179         Reviewed by Andreas Kling.
1180
1181         Inline style declaration is now the only type of style declaration with element parent.
1182         We can remove the bit and the associated logic.
1183
1184         * bindings/js/JSDOMBinding.h:
1185         (WebCore::root):
1186         * css/CSSMutableStyleDeclaration.cpp:
1187         (WebCore::CSSMutableStyleDeclaration::CSSMutableStyleDeclaration):
1188         (WebCore::CSSMutableStyleDeclaration::setNeedsStyleRecalc):
1189         * css/CSSMutableStyleDeclaration.h:
1190         (WebCore::CSSMutableStyleDeclaration::createInline):
1191         (CSSMutableStyleDeclaration):
1192         * css/CSSStyleDeclaration.cpp:
1193         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
1194         (WebCore):
1195         (WebCore::CSSStyleDeclaration::parentStyleSheet):
1196         * css/CSSStyleDeclaration.h:
1197         (WebCore::CSSStyleDeclaration::parentRule):
1198         (WebCore::CSSStyleDeclaration::clearParentRule):
1199         (WebCore::CSSStyleDeclaration::parentElement):
1200         (WebCore::CSSStyleDeclaration::clearParentElement):
1201         (CSSStyleDeclaration):
1202
1203 2012-01-31  Dana Jansens  <danakj@chromium.org>
1204
1205         [chromium] Compute occlusion during paint loop
1206         https://bugs.webkit.org/show_bug.cgi?id=76858
1207
1208         Reviewed by James Robinson.
1209
1210         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
1211
1212         * platform/graphics/FloatRect.cpp:
1213         (WebCore::enclosedIntRect):
1214         (WebCore):
1215         * platform/graphics/FloatRect.h:
1216         (WebCore):
1217         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1218         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1219         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1220         (Canvas2DLayerChromium):
1221         * platform/graphics/chromium/ContentLayerChromium.cpp:
1222         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1223         * platform/graphics/chromium/ContentLayerChromium.h:
1224         (ContentLayerChromium):
1225         * platform/graphics/chromium/ImageLayerChromium.cpp:
1226         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1227         * platform/graphics/chromium/ImageLayerChromium.h:
1228         (ImageLayerChromium):
1229         * platform/graphics/chromium/LayerChromium.cpp:
1230         (WebCore::LayerChromium::contentToScreenSpaceTransform):
1231         (WebCore):
1232         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
1233         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
1234         * platform/graphics/chromium/LayerChromium.h:
1235         (WebCore):
1236         (WebCore::LayerChromium::paintContentsIfDirty):
1237         (LayerChromium):
1238         * platform/graphics/chromium/RenderSurfaceChromium.h:
1239         (RenderSurfaceChromium):
1240         * platform/graphics/chromium/TiledLayerChromium.cpp:
1241         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
1242         * platform/graphics/chromium/TiledLayerChromium.h:
1243         (WebCore):
1244         ():
1245         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1246         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
1247         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1248         (RenderSurfaceRegion):
1249         (WebCore):
1250         (WebCore::pushTargetRenderSurfaceRegion):
1251         (WebCore::popAndPushTargetRenderSurfaceRegion):
1252         (WebCore::CCLayerTreeHost::paintLayerContents):
1253         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1254         (WebCore):
1255         ():
1256         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1257
1258 2012-01-31  John Bates  <jbates@google.com>
1259
1260         [Chromium] Add chromium-style tracing support
1261         https://bugs.webkit.org/show_bug.cgi?id=76885
1262
1263         Reviewed by Darin Fisher.
1264
1265         This code enables WebKit trace events to pass through more data to the
1266         chromium platform tracing API and generally to use the full tracing
1267         API provided by chromium.
1268
1269         * bindings/v8/V8Proxy.cpp:
1270         (WebCore::V8Proxy::evaluate): Replace old tracing API.
1271         * page/Console.cpp:
1272         (WebCore::Console::time): Replace old tracing API.
1273         (WebCore::Console::timeEnd): Replace old tracing API.
1274         * platform/chromium/PlatformSupport.h:
1275         * platform/chromium/TraceEvent.h:
1276         (WebCore::TraceEvent::TraceID::TraceID):
1277         (WebCore::TraceEvent::TraceID::data):
1278         (WebCore::TraceEvent::TraceStringWithCopy::TraceStringWithCopy):
1279         (WebCore::TraceEvent::TraceStringWithCopy::operator const char* ):
1280         (WebCore::TraceEvent::setTraceValue):
1281         (WebCore::TraceEvent::addTraceEvent):
1282         (WebCore::TraceEvent::TraceEndOnScopeClose::TraceEndOnScopeClose):
1283         (WebCore::TraceEvent::TraceEndOnScopeClose::~TraceEndOnScopeClose):
1284         (WebCore::TraceEvent::TraceEndOnScopeClose::initialize):
1285         (WebCore::TraceEvent::TraceEndOnScopeClose::addEventIfEnabled):
1286         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::TraceEndOnScopeCloseThreshold):
1287         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::~TraceEndOnScopeCloseThreshold):
1288         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::initialize):
1289         (WebCore::TraceEvent::TraceEndOnScopeCloseThreshold::addEventIfEnabled):
1290
1291 2012-01-31  Ryosuke Niwa  <rniwa@webkit.org>
1292
1293         Crash in DeleteSelectionCommand::handleGeneralDelete when attempting to delete the start block
1294         https://bugs.webkit.org/show_bug.cgi?id=77077
1295
1296         Reviewed by Enrica Casucci.
1297
1298         The crash was caused by a missing null check after removing the position out of the start block.
1299         Fixed the bug by adding an early return.
1300
1301         Tests: editing/deleting/delete-start-block.html
1302                editing/selection/move-into-empty-root-inline-box.html
1303
1304         * editing/DeleteSelectionCommand.cpp:
1305         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1306
1307 2012-01-31  Rafael Brandao  <rafael.lobo@openbossa.org>
1308
1309         HTMLIsIndexElement should not expose HTMLInputElement properties
1310         https://bugs.webkit.org/show_bug.cgi?id=76095
1311
1312         Reviewed by Eric Seidel.
1313
1314         This is a buildfix for r106373.
1315
1316         * DerivedSources.pri: Removed reference to HTMLIsIndexElement.idl
1317
1318 2012-01-31  Yongsheng Zhu  <yongsheng.zhu@intel.com>
1319
1320         WebGL must allocate smaller drawing buffer when the allocation fails. 
1321         https://bugs.webkit.org/show_bug.cgi?id=76654
1322
1323         Reviewed by Kenneth Russell.
1324
1325         Test: fast/canvas/webgl/drawingbuffer-test.html
1326
1327         * platform/graphics/gpu/DrawingBuffer.cpp:
1328         (WebCore):
1329         (WebCore::DrawingBuffer::create):
1330         (WebCore::DrawingBuffer::reset):
1331
1332 2012-01-25  Eric Seidel  <eric@webkit.org>
1333
1334         HTMLIsIndexElement should not expose HTMLInputElement properties
1335         https://bugs.webkit.org/show_bug.cgi?id=76095
1336
1337         Reviewed by Adam Barth.
1338
1339         document.createElement("isindex") should produce an HTMLUnknownElement
1340         per the HTML5 spec.  The parser automagically translates <isindex> into
1341         a whole dom tree roughly representing what <isindex> used to do 15 years ago. :)
1342
1343         This patch just removes our support for HTMLIsIndexElement.  The parser
1344         support was already in.  Having support for HTMLIsIndexElement was causing
1345         one of the IE TestCenter tests to fail.
1346
1347         Test: fast/dom/HTMLIsIndexElement/prototype-chain.html
1348
1349         * DerivedSources.cpp:
1350         * DerivedSources.make:
1351         * DerivedSources.pri:
1352         * GNUmakefile.list.am:
1353         * Target.pri:
1354         * WebCore.exp.in:
1355         * WebCore.gypi:
1356         * WebCore.order:
1357         * WebCore.vcproj/WebCore.vcproj:
1358         * WebCore.xcodeproj/project.pbxproj:
1359         * bindings/gobject/GNUmakefile.am:
1360         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp:
1361         (WebKit::createHTMLElementWrapper):
1362         * bindings/objc/DOM.mm:
1363         (WebCore::createElementClassMap):
1364         * bindings/objc/DOMHTML.h:
1365         * bindings/objc/PublicDOMInterfaces.h:
1366         * html/HTMLElementsAllInOne.cpp:
1367         * html/HTMLIsIndexElement.cpp: Removed.
1368         * html/HTMLIsIndexElement.h: Removed.
1369         * html/HTMLIsIndexElement.idl: Removed.
1370         * html/HTMLTagNames.in:
1371         * page/DOMWindow.idl:
1372
1373 2012-01-31  Alexis Menard  <alexis.menard@openbossa.org>
1374
1375         Unreviewed include cleanup.
1376
1377         Tested locally on Qt and Chromium port.
1378
1379         * dom/Node.cpp:
1380
1381 2012-01-31  Arko Saha  <arko@motorola.com>
1382
1383         The spec renamed addTrack() to addTextTrack().
1384         https://bugs.webkit.org/show_bug.cgi?id=77381
1385
1386         Reviewed by Eric Carlson.
1387
1388         Renamed addTrack() to addTextTrack().
1389         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#media-elements
1390
1391         * html/HTMLMediaElement.cpp:
1392         (WebCore::HTMLMediaElement::addTextTrack):
1393         * html/HTMLMediaElement.h:
1394         (WebCore::HTMLMediaElement::addTextTrack):
1395         * html/HTMLMediaElement.idl:
1396
1397 2012-01-31  Peter Rybin  <peter.rybin@gmail.com>
1398
1399         Web Inspector: CodeGeneratorInspector.py: reimplement generated array types
1400         https://bugs.webkit.org/show_bug.cgi?id=77289
1401
1402         Reviewed by Vsevolod Vlasov.
1403
1404         Arrays are now rendered as a single template class. Its type-specific
1405         details are provided by an additional ArrayItemHelper class that is
1406         defined using C++ specialization technique.
1407
1408         * inspector/CodeGeneratorInspector.py:
1409         (RawTypes.String):
1410         (RawTypes.String.get_array_item_raw_c_type_text):
1411         (RawTypes.Int):
1412         (RawTypes.Int.get_array_item_raw_c_type_text):
1413         (RawTypes.Number):
1414         (RawTypes.Number.get_array_item_raw_c_type_text):
1415         (RawTypes.Bool):
1416         (RawTypes.Bool.get_array_item_raw_c_type_text):
1417         (RawTypes.Object):
1418         (RawTypes.Object.get_array_item_raw_c_type_text):
1419         (RawTypes.Any):
1420         (RawTypes.Any.get_array_item_raw_c_type_text):
1421         (RawTypes.Array):
1422         (RawTypes.Array.get_array_item_raw_c_type_text):
1423         (RawTypes):
1424         (TypeBindings.create_type_declaration_.EnumBinding):
1425         (TypeBindings.create_type_declaration_.EnumBinding.get_array_item_c_type_text):
1426         (TypeBindings.create_type_declaration_.PlainString):
1427         (TypeBindings.create_type_declaration_.PlainString.get_array_item_c_type_text):
1428         (TypeBindings.create_type_declaration_.TypedefString):
1429         (TypeBindings.create_type_declaration_.TypedefString.get_array_item_c_type_text):
1430         (StructItemTraits):
1431         (get_array_item_c_type_text):
1432         (PlainObjectBinding):
1433         (PlainObjectBinding.get_array_item_c_type_text):
1434         (AdHocTypeContext):
1435         (AdHocTypeContext.get_type_name_fix):
1436         (AdHocTypeContext.add_type):
1437         (ArrayBinding):
1438         (ArrayBinding.resolve_inner):
1439         (ArrayBinding.resolve_inner.ResolveData):
1440         (ArrayBinding.request_user_runtime_cast):
1441         (ArrayBinding.request_internal_runtime_cast):
1442         (ArrayBinding.get_code_generator):
1443         (ArrayBinding.get_code_generator.CodeGenerator):
1444         (ArrayBinding.get_code_generator.CodeGenerator.generate_type_builder):
1445         (ArrayBinding.get_code_generator.CodeGenerator.generate_forward_declaration):
1446         (ArrayBinding.get_code_generator.CodeGenerator.register_use):
1447         (ArrayBinding.get_code_generator.CodeGenerator.get_generate_pass_id):
1448         (ArrayBinding.get_validator_call_text):
1449         (ArrayBinding.get_in_c_type_text):
1450         (ArrayBinding.get_array_item_c_type_text):
1451         (ArrayBinding.get_setter_value_expression_pattern):
1452         (ArrayBinding.reduce_to_raw_type):
1453         (RawTypeBinding.get_array_item_c_type_text):
1454         (ArrayItemHelper):
1455         (typename):
1456         (ArrayOf):
1457         (Traits):
1458
1459 2012-01-31  Antti Koivisto  <antti@apple.com>
1460
1461         Parent SVGFontFaceElements style declaration to the rule
1462         https://bugs.webkit.org/show_bug.cgi?id=77421
1463
1464         Reviewed by Adam Roben.
1465
1466         For some reason the declaration is parented to the element which adds a bunch of unnecessary special case code.
1467         The invalidation on mutation is done explicitly by SVGFontFaceElement so that is not affected. The declaration
1468         is not exposed so the change is not observable with a test.
1469
1470         * css/CSSFontFaceRule.cpp:
1471         (WebCore::CSSFontFaceRule::~CSSFontFaceRule):
1472         * css/CSSMutableStyleDeclaration.h:
1473         (WebCore::CSSMutableStyleDeclaration::createInline):
1474         * svg/SVGFontFaceElement.cpp:
1475         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
1476         (WebCore::SVGFontFaceElement::parseMappedAttribute):
1477         (WebCore::SVGFontFaceElement::fontFamily):
1478         (WebCore::SVGFontFaceElement::rebuildFontFace):
1479         * svg/SVGFontFaceElement.h:
1480         
1481             Remove the unnecessary m_styleDeclaration field, access through m_fontFaceRule instead.
1482
1483 2012-01-31  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1484
1485         Tap highlighting: Support better outlines for multiline inlines
1486         https://bugs.webkit.org/show_bug.cgi?id=77428
1487
1488         Reviewed by Simon Hausmann.
1489
1490         Covered by manual tests.
1491
1492         Do not use the linesBoundingBox anymore but draw a custom path
1493         with rounded corners. Inlines are drawn as max 3 rects, first
1494         line rect, joined middle rect and the rect for the last line.
1495
1496         * page/GestureTapHighlighter.cpp:
1497         * platform/graphics/Path.h: Make addBeziersForRoundedRect public.
1498
1499 2012-01-31  Alexei Filippov  <alexeif@chromium.org>
1500
1501         Web Inspector: show sizes in bytes instead of KB, MB in heap profiler.
1502         https://bugs.webkit.org/show_bug.cgi?id=77199
1503
1504         Reviewed by Pavel Feldman.
1505
1506         * inspector/front-end/DetailedHeapshotGridNodes.js:
1507         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
1508         (WebInspector.HeapSnapshotInstanceNode.prototype._enhanceData):
1509         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
1510         (WebInspector.HeapSnapshotDiffNode.prototype.get data):
1511         * inspector/front-end/UIUtils.js:
1512         (Number.withThousandsSeparator):
1513
1514 2012-01-26  Hans Wennborg  <hans@chromium.org>
1515
1516         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
1517         https://bugs.webkit.org/show_bug.cgi?id=77083
1518
1519         Reviewed by Darin Fisher.
1520
1521         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
1522         implementation.
1523
1524         No new tests, just refactoring.
1525
1526         * GNUmakefile.list.am:
1527         * Target.pri:
1528         * WebCore.gypi:
1529         * WebCore.vcproj/WebCore.vcproj:
1530         * WebCore.xcodeproj/project.pbxproj:
1531         * platform/mock/SpeechInputClientMock.cpp: Removed.
1532         * platform/mock/SpeechInputClientMock.h: Removed.
1533
1534 2012-01-31  Pavel Feldman  <pfeldman@google.com>
1535
1536         Web Inspector: boost protocol version to 1.0
1537         https://bugs.webkit.org/show_bug.cgi?id=77408
1538
1539         Reviewed by Yury Semikhatsky.
1540
1541         * inspector/Inspector-1.0.json: Copied from Source/WebCore/inspector/Inspector.json.
1542         * inspector/Inspector.json:
1543
1544 2012-01-31  Roland Steiner  <rolandsteiner@chromium.org>
1545
1546         <style scoped>: Improve shortcut code for cases where <style scoped> isn't used
1547         https://bugs.webkit.org/show_bug.cgi?id=77410
1548
1549         Move shortcut from setupScopingElementStack(), do it at the calling sites instead
1550         (where a larger chunk of work can be skipped).
1551
1552         Reviewed by Antti Koivisto.
1553
1554         No new tests. (refactoring)
1555
1556         * css/CSSStyleSelector.cpp:
1557         (WebCore::CSSStyleSelector::setupScopingElementStack): remove shortcut code
1558         (WebCore::CSSStyleSelector::pushParent): add shortcut code
1559         (WebCore::CSSStyleSelector::matchScopedAuthorRules): factor matching scoped rules out from matchAuthorRules
1560         (WebCore::CSSStyleSelector::matchAuthorRules): add shortcut code
1561         * css/CSSStyleSelector.h:
1562         (CSSStyleSelector): add matchScopedAuthorRules
1563
1564 2012-01-31  Pavel Feldman  <pfeldman@google.com>
1565
1566         Web Inspector: DOMDebugger.setEventListenerBreakpoint should accept regular DOM event names.
1567         https://bugs.webkit.org/show_bug.cgi?id=77409
1568
1569         Reviewed by Yury Semikhatsky.
1570
1571         * inspector/Inspector.json:
1572         * inspector/InspectorDOMDebuggerAgent.cpp:
1573         (WebCore::InspectorDOMDebuggerAgent::setEventListenerBreakpoint):
1574         (WebCore):
1575         (WebCore::InspectorDOMDebuggerAgent::setInstrumentationBreakpoint):
1576         (WebCore::InspectorDOMDebuggerAgent::setBreakpoint):
1577         (WebCore::InspectorDOMDebuggerAgent::removeEventListenerBreakpoint):
1578         (WebCore::InspectorDOMDebuggerAgent::removeInstrumentationBreakpoint):
1579         (WebCore::InspectorDOMDebuggerAgent::removeBreakpoint):
1580         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
1581         * inspector/InspectorDOMDebuggerAgent.h:
1582         (InspectorDOMDebuggerAgent):
1583         * inspector/InspectorInstrumentation.cpp:
1584         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
1585         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
1586         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1587         (WebCore::InspectorInstrumentation::willFireTimerImpl):
1588         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
1589         * inspector/InspectorInstrumentation.h:
1590         (InspectorInstrumentation):
1591         * inspector/front-end/BreakpointsSidebarPane.js:
1592         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._setBreakpoint):
1593         (WebInspector.EventListenerBreakpointsSidebarPane.prototype._removeBreakpoint):
1594
1595 2012-01-31  Pablo Flouret  <pablof@motorola.com>
1596
1597         Fix compilation errors on build-webkit --debug --no-workers on mac.
1598         https://bugs.webkit.org/show_bug.cgi?id=75869
1599
1600         Reviewed by Adam Barth.
1601
1602         * WebCore.exp.in:
1603
1604 2012-01-30  Konrad Piascik  <kpiascik@rim.com>
1605
1606         Web Inspector: [BlackBerry] Add BlackBerry UA Strings to the Inspector's UA switcher
1607         https://bugs.webkit.org/show_bug.cgi?id=77343
1608
1609         Reviewed by Yury Semikhatsky.
1610
1611         * inspector/front-end/SettingsScreen.js:
1612         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
1613
1614 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
1615
1616         Web Inspector: should be possible to step through all event listeners when event listener breakpoint is hit
1617         https://bugs.webkit.org/show_bug.cgi?id=77331
1618
1619         Inspector instrumentation is called before and after each event handler invokation.
1620         In case inspector front-end is closed it is no-op, otherwise it may stop execution
1621         on an event listener breakpoint.
1622
1623         Reviewed by Pavel Feldman.
1624
1625         Test: inspector/debugger/step-through-event-listeners.html
1626
1627         * dom/EventTarget.cpp:
1628         (WebCore::EventTarget::fireEventListeners):
1629         * inspector/InspectorInstrumentation.cpp:
1630         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
1631         (WebCore::InspectorInstrumentation::willHandleEventImpl):
1632         (WebCore):
1633         (WebCore::InspectorInstrumentation::didHandleEventImpl):
1634         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
1635         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
1636         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
1637         * inspector/InspectorInstrumentation.h:
1638         (InspectorInstrumentation):
1639         (WebCore::InspectorInstrumentation::willHandleEvent):
1640         (WebCore):
1641         (WebCore::InspectorInstrumentation::didHandleEvent):
1642
1643 2011-01-30  Hayato Ito  <hayato@chromium.org>
1644
1645         Attach light children after removing a shadow root.
1646         https://bugs.webkit.org/show_bug.cgi?id=74267
1647
1648         Reviewed by Ryosuke Niwa.
1649
1650         Tests: fast/dom/shadow/dynamically-created-shadow-root-expected.html
1651                fast/dom/shadow/dynamically-created-shadow-root.html:
1652
1653         * dom/Element.cpp:
1654         (WebCore::Element::removeShadowRoot):
1655
1656 2012-01-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1657
1658         Unreviewed, rolling out r106324.
1659         http://trac.webkit.org/changeset/106324
1660         https://bugs.webkit.org/show_bug.cgi?id=77406
1661
1662         Broke CCLayerTreeHostTestLayerOcclusion.runMultiThread and
1663         runSingleThread (Requested by yuzo1 on #webkit).
1664
1665         * platform/graphics/FloatRect.cpp:
1666         * platform/graphics/FloatRect.h:
1667         (WebCore):
1668         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1669         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1670         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1671         (WebCore):
1672         (Canvas2DLayerChromium):
1673         * platform/graphics/chromium/ContentLayerChromium.cpp:
1674         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1675         * platform/graphics/chromium/ContentLayerChromium.h:
1676         (WebCore):
1677         (ContentLayerChromium):
1678         * platform/graphics/chromium/ImageLayerChromium.cpp:
1679         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1680         * platform/graphics/chromium/ImageLayerChromium.h:
1681         (WebCore):
1682         (ImageLayerChromium):
1683         * platform/graphics/chromium/LayerChromium.cpp:
1684         * platform/graphics/chromium/LayerChromium.h:
1685         (WebCore):
1686         (WebCore::LayerChromium::paintContentsIfDirty):
1687         (LayerChromium):
1688         * platform/graphics/chromium/RenderSurfaceChromium.h:
1689         * platform/graphics/chromium/TiledLayerChromium.cpp:
1690         * platform/graphics/chromium/TiledLayerChromium.h:
1691         (WebCore):
1692         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1693         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
1694         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1695         (WebCore::CCLayerTreeHost::paintLayerContents):
1696         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1697         (WebCore):
1698         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1699         (WebCore::enclosedIntRect):
1700         (WebCore):
1701
1702 2012-01-30  Raymond Liu  <raymond.liu@intel.com>
1703
1704         Fix ASSERT fail within AudioBus::processWithGainFrom()
1705         https://bugs.webkit.org/show_bug.cgi?id=76685
1706
1707         Reviewed by Daniel Bates.
1708
1709         Test: webaudio/audionode-connect-order.html
1710
1711         * webaudio/AudioBasicProcessorNode.cpp:
1712         (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode):
1713
1714 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
1715
1716         <style scoped>: Implement scoped stylesheets and basic application
1717         https://bugs.webkit.org/show_bug.cgi?id=73190
1718
1719         Implementing support for <style scoped>:
1720         Add a vector stack to CSSStyleSelector that keeps track of encountered scoping elements. This is
1721         used for O(1) access to all relevant style sheets for a given element.
1722         Adapt matching of author style sheets to also consult appropriate scoped sheets.
1723         Finally, prevent style sharing from crossing into/out of scoped style boundaries.
1724
1725         Reviewed by Antti Koivisto.
1726
1727         Tests: fast/css/style-scoped/style-scoped-attach.html
1728                fast/css/style-scoped/style-scoped-basic.html
1729                fast/css/style-scoped/style-scoped-detach.html
1730                fast/css/style-scoped/style-scoped-remove-scoped.html
1731                fast/css/style-scoped/style-scoped-set-scoped.html
1732
1733         * css/CSSStyleSelector.cpp:
1734         (RuleSet):
1735         (WebCore::CSSStyleSelector::CSSStyleSelector): add code for scoped style sheets
1736         (WebCore::CSSStyleSelector::collectFeatures): ditto
1737         (WebCore):
1738         (WebCore::CSSStyleSelector::determineScopingElement): determine whether an author sheet is scoped (and to which scope), or global
1739         (WebCore::CSSStyleSelector::scopedRuleSetForElement): returns the RuleSet for the <style scoped> contained by the passed-in element (if any), or 0
1740         (WebCore::CSSStyleSelector::appendAuthorStylesheets): add code for scoped style sheets
1741         (WebCore::CSSStyleSelector::setupScopingElementStack): determine scoping element ancestors of the given element
1742         (WebCore::CSSStyleSelector::pushParent): simplify and refactor SelectorChecker::pushParent, as code in CSStyleSelector needs partial access
1743         (WebCore::CSSStyleSelector::popParent): ditto
1744         (WebCore::CSSStyleSelector::sortAndTransferMatchedRules): helper function
1745         (WebCore::CSSStyleSelector::matchAuthorRules): use AuthorRuleSetIterator to iterate over all relevant RuleSets
1746         (WebCore::CSSStyleSelector::matchRules): adapt for scoped style rules
1747         (WebCore::CSSStyleSelector::matchAllRules): ditto
1748         (WebCore::CSSStyleSelector::locateCousinList): prevent style sharing across scope boundaries
1749         (WebCore::CSSStyleSelector::canShareStyleWithElement): ditto
1750         (WebCore::CSSStyleSelector::locateSharedStyle): ditto
1751         (WebCore::CSSStyleSelector::pseudoStyleForElement): changed call to matchAuthorRules
1752         (WebCore::CSSStyleSelector::styleForPage): add comment
1753         (WebCore::CSSStyleSelector::checkRegionStyle): add global scope parameter
1754         (WebCore::CSSStyleSelector::pseudoStyleRulesForElement): changed call to matchAuthorRules
1755         (WebCore::RuleSet::addRulesFromSheet): adapt for scoped style rules
1756         * css/CSSStyleSelector.h:
1757         (CSSStyleSelector):
1758         (WebCore::CSSStyleSelector::ScopeStackFrame::ScopeStackFrame): struct holding an Element pointer and a RuleSet pointer, to be used in a Vector
1759         (WebCore::CSSStyleSelector::scopingElementStackIsConsistent): returns if the last seen parent matches the passed-in element
1760         * css/SelectorChecker.cpp:
1761         (WebCore::SelectorChecker::setupParentStack): set up the parent stack (refactoring)
1762         (WebCore::SelectorChecker::pushParent): simplify and refactor
1763         * css/SelectorChecker.h:
1764         (WebCore::SelectorChecker::popParent): ditto
1765         (WebCore::SelectorChecker::parentStackIsEmpty): ditto
1766         (WebCore::SelectorChecker::parentStackIsConsistent): make parameter const
1767
1768 2012-01-30  Dana Jansens  <danakj@chromium.org>
1769
1770         [chromium] Compute occlusion during paint loop
1771         https://bugs.webkit.org/show_bug.cgi?id=76858
1772
1773         Reviewed by James Robinson.
1774
1775         New unit tests in TiledLayerChromiumTest.cpp, CCLayerTreeHostCommonTest.cpp, CCLayerTreeHostTest.cpp
1776
1777         * platform/graphics/FloatRect.cpp:
1778         (WebCore::enclosedIntRect):
1779         (WebCore):
1780         * platform/graphics/FloatRect.h:
1781         (WebCore):
1782         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1783         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1784         * platform/graphics/chromium/Canvas2DLayerChromium.h:
1785         (Canvas2DLayerChromium):
1786         * platform/graphics/chromium/ContentLayerChromium.cpp:
1787         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1788         * platform/graphics/chromium/ContentLayerChromium.h:
1789         (ContentLayerChromium):
1790         * platform/graphics/chromium/ImageLayerChromium.cpp:
1791         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1792         * platform/graphics/chromium/ImageLayerChromium.h:
1793         (ImageLayerChromium):
1794         * platform/graphics/chromium/LayerChromium.cpp:
1795         (WebCore::LayerChromium::contentToScreenSpaceTransform):
1796         (WebCore):
1797         (WebCore::LayerChromium::addSelfToOccludedScreenSpace):
1798         (WebCore::LayerChromium::isPaintedAxisAlignedInScreen):
1799         * platform/graphics/chromium/LayerChromium.h:
1800         (WebCore):
1801         (WebCore::LayerChromium::paintContentsIfDirty):
1802         (LayerChromium):
1803         * platform/graphics/chromium/RenderSurfaceChromium.h:
1804         (RenderSurfaceChromium):
1805         * platform/graphics/chromium/TiledLayerChromium.cpp:
1806         (WebCore::TiledLayerChromium::addSelfToOccludedScreenSpace):
1807         * platform/graphics/chromium/TiledLayerChromium.h:
1808         (WebCore):
1809         ():
1810         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1811         (WebCore::CCLayerTreeHost::paintContentsIfDirty):
1812         (WebCore::CCLayerTreeHost::paintMaskAndReplicaForRenderSurface):
1813         (RenderSurfaceRegion):
1814         (WebCore):
1815         (WebCore::pushTargetRenderSurfaceRegion):
1816         (WebCore::popAndPushTargetRenderSurfaceRegion):
1817         (WebCore::CCLayerTreeHost::paintLayerContents):
1818         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1819         (WebCore):
1820         ():
1821         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1822
1823 2012-01-30  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1824
1825         Add ElementAttributeData class to replace internal uses of NamedNodeMap
1826         https://bugs.webkit.org/show_bug.cgi?id=77233
1827
1828         Reviewed by Andreas Kling.
1829
1830         Move part of non-DOM functionality of NamedNodeMap into a separate class. This is
1831         the first step toward the goal of separating NamedNodeMap from internal attribute
1832         storage, as described in https://bugs.webkit.org/show_bug.cgi?id=75069.
1833
1834         The internal attribute storage is exposed as attributeData() in Element, and when
1835         necessary (because it has no back pointer to Element) via methods in Element.
1836
1837         No new tests. Except from setClass() change this is just moving the code, no new
1838         feature was added.
1839
1840         * CMakeLists.txt:
1841         * GNUmakefile.list.am:
1842         * Target.pri:
1843         * WebCore.gypi:
1844         * WebCore.xcodeproj/project.pbxproj:
1845         * dom/DOMAllInOne.cpp:
1846         * dom/Element.cpp:
1847         (WebCore::Element::idAttributeChanged):
1848         * dom/Element.h:
1849         (WebCore::Element::attributeData):
1850         (WebCore::Element::ensureAttributeData):
1851         (Element):
1852         (WebCore::Element::idForStyleResolution):
1853         * dom/ElementAttributeData.cpp: Added.
1854         (WebCore):
1855         (WebCore::ElementAttributeData::setClass): the only caller of this function
1856         already deal with the case when the element has no class, so don't do it here.
1857         * dom/ElementAttributeData.h: Added.
1858         (WebCore):
1859         (ElementAttributeData):
1860         (WebCore::ElementAttributeData::clearClass):
1861         (WebCore::ElementAttributeData::classNames):
1862         (WebCore::ElementAttributeData::idForStyleResolution):
1863         (WebCore::ElementAttributeData::setIdForStyleResolution):
1864         (WebCore::ElementAttributeData::ElementAttributeData):
1865         * dom/NamedNodeMap.cpp:
1866         (WebCore::NamedNodeMap::clearAttributes):
1867         * dom/NamedNodeMap.h:
1868         (WebCore::NamedNodeMap::attributeData):
1869         (NamedNodeMap):
1870         * dom/StyledElement.cpp:
1871         (WebCore::StyledElement::classAttributeChanged):
1872         * dom/StyledElement.h:
1873         (WebCore::StyledElement::classNames):
1874         * html/ClassList.cpp:
1875         (WebCore::ClassList::classNames):
1876
1877 2012-01-30  Gregg Tavares  <gman@chromium.org>
1878
1879         Add Plumming to get graphics error messages to JS Console
1880         https://bugs.webkit.org/show_bug.cgi?id=77238
1881
1882         Reviewed by Kenneth Russell.
1883
1884         No new tests. No change in behavior.
1885
1886         * html/canvas/WebGLRenderingContext.cpp:
1887         (WebGLRenderingContextErrorMessageCallback):
1888         (WebCore::WebGLRenderingContextErrorMessageCallback::WebGLRenderingContextErrorMessageCallback):
1889         (WebCore::WebGLRenderingContextErrorMessageCallback::onErrorMessage):
1890         (WebCore::WebGLRenderingContextErrorMessageCallback::~WebGLRenderingContextErrorMessageCallback):
1891         (WebCore):
1892         (WebCore::WebGLRenderingContext::create):
1893         (WebCore::WebGLRenderingContext::initializeNewContext):
1894         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
1895         * html/canvas/WebGLRenderingContext.h:
1896         (WebGLRenderingContext):
1897         * platform/graphics/GraphicsContext3D.h:
1898         (ErrorMessageCallback):
1899         (WebCore::GraphicsContext3D::ErrorMessageCallback::~ErrorMessageCallback):
1900         (GraphicsContext3D):
1901         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1902         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1903         (WebCore):
1904         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1905         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1906         (WebCore):
1907         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1908         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1909         (WebCore):
1910
1911 2012-01-30  Anders Carlsson  <andersca@apple.com>
1912
1913         Simplify RenderLayerCompositor::frameViewDidScroll
1914         https://bugs.webkit.org/show_bug.cgi?id=77398
1915
1916         Reviewed by Sam Weinig.
1917
1918         Remove the scrollPosition parameter from RenderLayerCompositor::frameViewDidScroll; we can just get it
1919         from the associated FrameView object.
1920
1921         * page/FrameView.cpp:
1922         (WebCore::FrameView::scrollPositionChanged):
1923         * rendering/RenderLayerCompositor.cpp:
1924         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1925         Call frameViewDidScroll() here instead of setting the scroll layer position explicitly.
1926
1927         (WebCore::RenderLayerCompositor::frameViewDidScroll):
1928         (WebCore::RenderLayerCompositor::ensureRootLayer):
1929         * rendering/RenderLayerCompositor.h:
1930         (RenderLayerCompositor):
1931
1932 2012-01-30  Pablo Flouret  <pablof@motorola.com>
1933
1934         Don't select the next selectable index when deselecting an option in select elements with size set to a value greater than one.
1935         https://bugs.webkit.org/show_bug.cgi?id=76389
1936
1937         Reviewed by Kent Tamura.
1938
1939         This behavior matches the rest of the browsers.
1940
1941         Test: fast/forms/select/option-selecting.html
1942
1943         * html/HTMLSelectElement.cpp:
1944         (WebCore::HTMLSelectElement::optionSelectionStateChanged):
1945
1946 2012-01-30  Anders Carlsson  <andersca@apple.com>
1947
1948         Scrollbars don't show when scrolling on the scrolling thread
1949         https://bugs.webkit.org/show_bug.cgi?id=77396
1950         <rdar://problem/10710736>
1951
1952         Reviewed by Sam Weinig.
1953
1954         Use ScrollAnimator::scrollToOffsetWithoutAnimation when updating the frame view scroll offset,
1955         since that function will end up invalidating the scrollbars correctly.
1956
1957         * page/ScrollingCoordinator.cpp:
1958         (WebCore::ScrollingCoordinator::didUpdateMainFrameScrollPosition):
1959
1960 2012-01-30  Anders Carlsson  <andersca@apple.com>
1961
1962         Show repaint counters in individual tiles
1963         https://bugs.webkit.org/show_bug.cgi?id=77390
1964         <rdar://problem/10767967>
1965
1966         Reviewed by Darin Adler.
1967
1968         * platform/graphics/ca/mac/TileCache.h:
1969         * platform/graphics/ca/mac/TileCache.mm:
1970         (WebCore::TileCache::setNeedsDisplayInRect):
1971         Make sure to invalidate the repaint counter rect if necessary.
1972
1973         (WebCore::TileCache::drawLayer):
1974         Draw the repaint counter.
1975
1976         (WebCore::TileCache::showRepaintCounter):
1977         New function that determines whether we should show repaint counters for the given tile cache.
1978
1979         * platform/graphics/ca/mac/WebTileLayer.h:
1980         * platform/graphics/ca/mac/WebTileLayer.mm:
1981         (-[WebTileLayer incrementRepaintCount]):
1982         Add method for getting the repaint count.
1983
1984 2012-01-30  Dan Bernstein  <mitz@apple.com>
1985
1986         <rdar://problem/10778045> REGRESSION (r91935): text-combine fails
1987         https://bugs.webkit.org/show_bug.cgi?id=77373
1988
1989         Reviewed by Darin Adler.
1990
1991         Removed tests that were failing because of this bug from the Lion skipped
1992         list.
1993
1994         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1995         (WebCore::GlyphPage::fill): Changed to use CTFontGetGlyphsForCharacters,
1996         rather than wkGetVerticalGlyphsForCharacters, for non-fullwidth fonts.
1997
1998 2012-01-30  Christopher Hutten-Czapski  <chutten@rim.com>
1999
2000         BlackBerry - Support Proxy-Authenticate headers when a proxy is configured
2001         https://bugs.webkit.org/show_bug.cgi?id=77361
2002
2003         Though we have a proxy configured, we might not have the auth
2004         credentials it requires. Support Proxy-Authenticate for that case.
2005
2006         Reviewed by George Staikos.
2007
2008         * platform/network/blackberry/NetworkJob.cpp:
2009         (WebCore::NetworkJob::handleNotifyHeaderReceived):
2010         (WebCore::NetworkJob::handleAuthHeader):
2011         (WebCore::NetworkJob::sendRequestWithCredentials):
2012         * platform/network/blackberry/NetworkJob.h:
2013         * platform/network/blackberry/NetworkManager.cpp:
2014         (WebCore::NetworkManager::startJob):
2015
2016 2012-01-27  James Robinson  <jamesr@chromium.org>
2017
2018         [chromium] Remove unnecessary retry logic in LayerRendererChromium initialization for accelerated painting
2019         https://bugs.webkit.org/show_bug.cgi?id=77247
2020
2021         Reviewed by Kenneth Russell.
2022
2023         The accelerate painting setting is done differently from other capability-dependent settings for no good reason,
2024         requiring that we retry initialization with different settings. For all other settings we set the capabilities
2025         bit to true if the setting is requested and if the required capabilities exist on the underlying context.
2026
2027         * platform/graphics/chromium/LayerRendererChromium.cpp:
2028         (WebCore::LayerRendererChromium::create):
2029         (WebCore::LayerRendererChromium::initialize):
2030         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2031         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2032
2033 2012-01-30  Brady Eidson  <beidson@apple.com>
2034
2035         <rdar://problem/10707072>
2036         Crashes in WebProcess at WebCore::Node::rendererIsNeeded
2037
2038         Reviewed by Darin Adler.
2039
2040         In specific circumstances a plugin element can be without a render style at the point in time where
2041         the page navigated and enters the page cache.
2042
2043         When this is the cash, the element should not enter into the "custom style for renderer" mode and should
2044         instead use the default render style machinery.
2045
2046         Test: plugins/crash-restoring-pluging-page-from-page-cache.html
2047
2048         * html/HTMLPlugInImageElement.cpp:
2049         (WebCore::HTMLPlugInImageElement::documentWillSuspendForPageCache): Only setHasCustomStyleForRenderer and 
2050           forceRecalc if there actually is a custom style to be used.
2051         (WebCore::HTMLPlugInImageElement::documentDidResumeFromPageCache): Only clearHasCustomStyleForRenderer if there
2052           actually was a custom style to be cleared.
2053         (WebCore::HTMLPlugInImageElement::customStyleForRenderer): This should only be called if there actually is a 
2054           custom style to be used. Otherwise the element would have to fallback to the "normal" RenderStyle which might
2055           not exist.
2056
2057 2012-01-30  Anders Carlsson  <andersca@apple.com>
2058
2059         Show debug borders for individual tile cache tiles
2060         https://bugs.webkit.org/show_bug.cgi?id=77388
2061
2062         Reviewed by Sam Weinig.
2063
2064         * platform/graphics/GraphicsLayer.cpp:
2065         (WebCore::GraphicsLayer::updateDebugIndicators):
2066         Give tile cache tiles a thin dark blue border.
2067
2068         * platform/graphics/ca/mac/TileCache.h:
2069         (WebCore::TileCache::tileDebugBorderWidth):
2070         (WebCore::TileCache::tileDebugBorderColor):
2071         Add getters and member variables for the tile debug border width and color.
2072
2073         * platform/graphics/ca/mac/TileCache.mm:
2074         (WebCore::TileCache::TileCache):
2075         Initialize m_tileDebugBorderWidth.
2076
2077         (WebCore::TileCache::setTileDebugBorderWidth):
2078         Update the border width of each tile layer.
2079
2080         (WebCore::TileCache::setTileDebugBorderColor):
2081         Update the border color of each tile layer.
2082
2083         (WebCore::TileCache::createTileLayer):
2084         Set the border color and border width.
2085
2086         * platform/graphics/ca/mac/WebTileCacheLayer.h:
2087         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
2088         (-[WebTileCacheLayer borderColor]):
2089         (-[WebTileCacheLayer setBorderColor:]):
2090         (-[WebTileCacheLayer borderWidth]):
2091         (-[WebTileCacheLayer setBorderWidth:]):
2092         Call through to the TileCache.
2093
2094         * platform/graphics/mac/WebLayer.mm:
2095         (drawLayerContents):
2096         Don't draw the repaint counter for tile cache layers, each tile will maintain its own repaint counter.
2097
2098 2012-01-30  Rakesh KN  <rakesh.kn@motorola.com>
2099
2100         single-file input elements should refuse multi-file drags
2101         https://bugs.webkit.org/show_bug.cgi?id=25913
2102
2103         Reviewed by Eric Seidel.
2104
2105         Refuse the multiple file drags onto a single file input element.
2106
2107         No new tests: Covered by existing tests, updated the expected results.
2108
2109         * page/DragController.cpp:
2110         (WebCore::DragController::tryDocumentDrag):
2111         Setting the dragSession.numberOfItemsToBeAccepted to 0 so that drag operation is none if the
2112         file input element under mouse is single input type and number of files dragged onto that
2113         input element are more than 1.
2114
2115 2012-01-30  Dana Jansens  <danakj@chromium.org>
2116
2117         [chromium] Use region reported painted opaque for draw culling
2118         https://bugs.webkit.org/show_bug.cgi?id=76015
2119
2120         Reviewed by James Robinson.
2121
2122         New unit tests in CCTiledLayerImplTest.cpp, CCQuadCullerTest.cpp, CCLayerTreeHostImplTest.cpp
2123
2124         * platform/graphics/chromium/LayerChromium.cpp:
2125         (WebCore::LayerChromium::setOpaque):
2126         * platform/graphics/chromium/TiledLayerChromium.cpp:
2127         (UpdatableTile):
2128         (WebCore::TiledLayerChromium::pushPropertiesTo):
2129         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2130         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
2131         (WebCore::CCDrawQuad::opaqueRect):
2132         (WebCore):
2133         * platform/graphics/chromium/cc/CCDrawQuad.h:
2134         (CCDrawQuad):
2135         (WebCore::CCDrawQuad::needsBlending):
2136         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2137         (WebCore::CCQuadCuller::cullOccludedQuads):
2138         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
2139         (WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
2140         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
2141         (WebCore::CCTileDrawQuad::create):
2142         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
2143         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
2144         (CCTileDrawQuad):
2145         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2146         (DrawableTile):
2147         (WebCore::DrawableTile::opaqueRect):
2148         (WebCore::DrawableTile::setOpaqueRect):
2149         (WebCore::CCTiledLayerImpl::appendQuads):
2150         (WebCore::CCTiledLayerImpl::pushTileProperties):
2151         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2152         (CCTiledLayerImpl):
2153
2154 2012-01-30  Ryosuke Niwa  <rniwa@webkit.org>
2155
2156         Crash in previousLinePosition when moving into a root inline box without leaves
2157         https://bugs.webkit.org/show_bug.cgi?id=76812
2158
2159         Reviewed by Enrica Casucci.
2160
2161         The crash was caused by us assuming that every root inline box has at least one leaf,
2162         which isn't true when we create inline boxes for an empty text run with margin, border, etc...
2163
2164         Test: editing/selection/move-into-empty-root-inline-box.html
2165
2166         * editing/visible_units.cpp:
2167         (WebCore::previousLinePosition):
2168         (WebCore::nextLinePosition):
2169
2170 2012-01-30  Levi Weintraub  <leviw@chromium.org>
2171
2172         !m_insideRegionPaint assertion in RenderRegion.cpp is invalid
2173         https://bugs.webkit.org/show_bug.cgi?id=77372
2174
2175         Reviewed by David Hyatt.
2176
2177         Removing the !m_insideRegionPaint assertion that's in three functions in
2178         RenderRegion. It's triggering in numerous layout tests and isn't valid.
2179
2180         No new tests as this just removes assertions.
2181
2182         * rendering/RenderRegion.cpp:
2183         (WebCore::RenderRegion::setRenderBoxRegionInfo):
2184         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
2185         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
2186
2187 2012-01-30  Adrienne Walker  <enne@google.com>
2188
2189         [chromium] Always pre-reserve scrollbar and scroll corner textures
2190         https://bugs.webkit.org/show_bug.cgi?id=77251
2191
2192         Reviewed by James Robinson.
2193
2194         Add a flag to LayerChromium that says that a layer's textures should
2195         always be reserved. Prior to painting layers, find all layers marked
2196         as such and reserve their textures. This will prevent texture memory
2197         limits from being hit before the root layer's scrollbars are reserved
2198         and painted.
2199
2200         * platform/graphics/chromium/LayerChromium.cpp:
2201         (WebCore::LayerChromium::LayerChromium):
2202         * platform/graphics/chromium/LayerChromium.h:
2203         (LayerChromium):
2204         (WebCore::LayerChromium::reserveTextures):
2205         (WebCore::LayerChromium::setAlwaysReserveTextures):
2206         (WebCore::LayerChromium::alwaysReserveTextures):
2207         * platform/graphics/chromium/TiledLayerChromium.cpp:
2208         (WebCore::TiledLayerChromium::reserveTextures):
2209         * platform/graphics/chromium/TiledLayerChromium.h:
2210         ():
2211         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2212         (WebCore::CCLayerTreeHost::updateLayers):
2213         (WebCore::CCLayerTreeHost::reserveTextures):
2214         (WebCore):
2215         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2216         ():
2217
2218 2012-01-30  Beth Dakin  <bdakin@apple.com>
2219
2220         Speculative 32-bit build-fix.
2221
2222         * WebCore.exp.in:
2223
2224 2012-01-30  Mihnea Ovidenie  <mihnea@adobe.com>
2225
2226         [CSSRegions]Add support for background-color in region styling
2227         https://bugs.webkit.org/show_bug.cgi?id=71488
2228
2229         Reviewed by David Hyatt.
2230
2231         Based on work by Alexandru Chiculita (achicu@adobe.com).
2232         Previous patches for region styling were touching RenderObject::style() method. After several attempts to avoid regressions
2233         (including caching of RenderObject::style() pointer in most used methods), we decided to attempt a different approach:
2234         Step1: before each region is repainted, we compute the style for each box that falls into the region
2235         Step2: before paint, we store the box original style
2236         Step3: paint the region contents using the style in region
2237         Step4: after paint is finished, we restore the box original style (and store the box style in region for future region paint)
2238
2239         Tests for region styling are also enabled with this patch.
2240
2241         * WebCore.exp.in:
2242         * rendering/RenderFlowThread.cpp:
2243         (WebCore::RenderFlowThread::clearRenderBoxCustomStyle):
2244         (WebCore::RenderFlowThread::setRegionRangeForBox):
2245         * rendering/RenderFlowThread.h:
2246         ():
2247         * rendering/RenderLayer.cpp:
2248         (WebCore::RenderLayer::paint):
2249         (WebCore::RenderLayer::hitTest):
2250         * rendering/RenderObject.cpp:
2251         * rendering/RenderObject.h:
2252         (WebCore::RenderObject::style):
2253         (RenderObject):
2254         * rendering/RenderObjectChildList.cpp:
2255         (WebCore::RenderObjectChildList::removeChildNode):
2256         * rendering/RenderRegion.cpp:
2257         (WebCore::RenderRegion::RenderRegion):
2258         (WebCore::RenderRegion::setRegionBoxesRegionStyle):
2259         (WebCore):
2260         (WebCore::RenderRegion::restoreRegionBoxesOriginalStyle):
2261         (WebCore::RenderRegion::paintReplaced):
2262         (WebCore::RenderRegion::setRenderBoxRegionInfo):
2263         (WebCore::RenderRegion::takeRenderBoxRegionInfo):
2264         (WebCore::RenderRegion::removeRenderBoxRegionInfo):
2265         (WebCore::RenderRegion::renderBoxRegionStyle):
2266         (WebCore::RenderRegion::computeStyleInRegion):
2267         (WebCore::RenderRegion::clearBoxStyleInRegion):
2268         * rendering/RenderRegion.h:
2269         (RenderRegion):
2270         * rendering/RenderView.cpp:
2271         (WebCore::RenderView::RenderView):
2272         * rendering/RenderView.h:
2273         (WebCore):
2274         (RenderView):
2275
2276 2012-01-30  Jessie Berlin  <jberlin@apple.com>
2277
2278         WebCore build exceeds address space on 32-bit Windows builders (again).
2279         https://bugs.webkit.org/show_bug.cgi?id=77357
2280
2281         Reviewed by Adam Roben.
2282
2283         Add an Inspector All-In-One file, but only use it in Release and Production builds.
2284         This differs from our other All-In-One files, but it is a better approach because it makes
2285         debugging possible in the Debug configuration (the symbols will be in the correct .obj file
2286         for the original .cpp files).
2287
2288         * WebCore.vcproj/WebCore.vcproj:
2289         Also, let VS have its way with the vcproj file.
2290         * inspector/InspectorAllInOne.cpp: Added.
2291
2292 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
2293
2294         Limit periodic flushing inside ImageBufferCG to just Lion
2295         https://bugs.webkit.org/show_bug.cgi?id=77353
2296         <rdar://problem/10328309>
2297
2298         Reviewed by Chris Marrin.
2299
2300         * platform/graphics/cg/ImageBufferCG.cpp:
2301         * platform/graphics/cg/ImageBufferDataCG.h:
2302
2303 2012-01-30  Tommy Widenflycht  <tommyw@google.com>
2304
2305         Memory leak caused by PeerConnection add a NULL media stream
2306         https://bugs.webkit.org/show_bug.cgi?id=76150
2307
2308         It was my missunderstanding that the IDL keyword [StrictTypeChecking] also protects against
2309         null or undefined arguments, it doesn't. Added checks for null pointers.
2310
2311         Reviewed by Adam Barth.
2312
2313         Test: fast/mediastream/peerconnection-addstream.html
2314
2315         * mediastream/PeerConnection.cpp:
2316         (WebCore::PeerConnection::addStream):
2317         (WebCore::PeerConnection::removeStream):
2318
2319 2012-01-26  Andy Estes  <aestes@apple.com>
2320
2321         [Windows] Optionally invert colors when drawing to a WebView's backing store.
2322         https://bugs.webkit.org/show_bug.cgi?id=77168
2323
2324         Reviewed by Sam Weinig.
2325
2326         * css/CSSPrimitiveValueMappings.h: Assert that CompositeDifference is
2327         not converted to a CSS value. Exposing a new compositing operation to
2328         CSS is outside the scope of this patch.
2329         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2330         * platform/graphics/GraphicsTypes.h: Add CompositeDifference as a
2331         CompositeOperator. Also, remove an outdated comment.
2332         * platform/graphics/cg/GraphicsContextCG.cpp:
2333         (WebCore::GraphicsContext::setPlatformCompositeOperation): Map
2334         CompositeDifference to kCGBlendModeDifference.
2335
2336 2012-01-28  Matthew Delaney  <mdelaney@apple.com>
2337
2338         Limit the shadow offset CG hack to just SL and Lion
2339         https://bugs.webkit.org/show_bug.cgi?id=77348
2340         <rdar://problem/10158016>
2341
2342         Reviewed by Chris Marrin.
2343
2344         No new tests, current tests cover this.
2345
2346         * platform/graphics/cg/GraphicsContextCG.cpp:
2347         (WebCore::GraphicsContext::setPlatformShadow):
2348
2349 2012-01-30  Beth Dakin  <bdakin@apple.com>
2350
2351         https://bugs.webkit.org/show_bug.cgi?id=77263
2352         PlatformScreenMac should not rely on NSWindow for important bits of data
2353
2354         Reviewed by Geoff Garen.
2355
2356         The main problem is that we cannot rely on the NSWindow for information about 
2357         the deviceScaleFactor because we cannot access an NSWindow from within 
2358         WebCore for WebKit2 windows. Instead, we can fetch it from 
2359         WebCore::deviceScaleFactor(), but we need a Frame to call that. So 
2360         screenAvailableRect and screenRect both now take a FrameView* instead of a 
2361         Widget*. All existing call sites actually sent a FrameView in anyway, so this 
2362         is not a big change, but it does require touching a lot of platforms.
2363         * WebCore.exp.in:
2364         * platform/PlatformScreen.h:
2365         (WebCore):
2366         * platform/blackberry/PlatformScreenBlackBerry.cpp:
2367         (WebCore::screenAvailableRect):
2368         (WebCore::screenRect):
2369         * platform/chromium/PlatformScreenChromium.cpp:
2370         (WebCore::screenRect):
2371         (WebCore::screenAvailableRect):
2372         * platform/chromium/PlatformSupport.h:
2373         (WebCore):
2374         (PlatformSupport):
2375         ():
2376         * platform/efl/PlatformScreenEfl.cpp:
2377         (WebCore::screenRect):
2378         (WebCore::screenAvailableRect):
2379         * platform/gtk/PlatformScreenGtk.cpp:
2380         (WebCore::screenRect):
2381         (WebCore::screenAvailableRect):
2382         * platform/qt/PlatformScreenQt.cpp:
2383         (WebCore::screenRect):
2384         (WebCore::screenAvailableRect):
2385         * platform/win/PlatformScreenWin.cpp:
2386         (WebCore::screenRect):
2387         (WebCore::screenAvailableRect):
2388         * platform/wx/ScreenWx.cpp:
2389         (WebCore::screenRect):
2390         (WebCore::screenAvailableRect):
2391
2392         The Mac-only functions toUserSpace() and toDeviceSpace() were also updated to 
2393         take a parameter for the deviceScaleFactor.
2394         * platform/mac/PlatformScreenMac.mm:
2395         (WebCore::screenRect):
2396         (WebCore::screenAvailableRect):
2397         (WebCore::toUserSpace):
2398         (WebCore::toDeviceSpace):
2399
2400 2012-01-30  Antti Koivisto  <antti@apple.com>
2401
2402         Kill CSSMutableStyleDeclarationConstIterator
2403         https://bugs.webkit.org/show_bug.cgi?id=77342
2404
2405         Reviewed by Sam Weinig.
2406
2407         CSSMutableStyleDeclaration is an array and should be iterated using an index. This simplifies the code.
2408
2409         * css/CSSMutableStyleDeclaration.cpp:
2410         (WebCore::CSSMutableStyleDeclaration::copyPropertiesFrom):
2411         (WebCore::CSSMutableStyleDeclaration::removeProperty):
2412         (WebCore::CSSMutableStyleDeclaration::setProperty):
2413         (WebCore::CSSMutableStyleDeclaration::setPropertyInternal):
2414         (WebCore::CSSMutableStyleDeclaration::parseDeclaration):
2415         (WebCore::CSSMutableStyleDeclaration::addParsedProperties):
2416         (WebCore::CSSMutableStyleDeclaration::addParsedProperty):
2417         (WebCore::CSSMutableStyleDeclaration::merge):
2418         (WebCore::CSSMutableStyleDeclaration::removePropertiesInSet):
2419         * css/CSSMutableStyleDeclaration.h:
2420         (WebCore):
2421         (WebCore::CSSMutableStyleDeclaration::createForSVGFontFaceElement):
2422         (CSSMutableStyleDeclaration):
2423         * css/CSSStyleDeclaration.cpp:
2424         (WebCore::CSSStyleDeclaration::CSSStyleDeclaration):
2425         * css/CSSStyleDeclaration.h:
2426         (CSSStyleDeclaration):
2427         ():
2428         * css/CSSStyleSelector.cpp:
2429         (WebCore::CSSStyleSelector::styleForKeyframe):
2430         (WebCore::CSSStyleSelector::applyDeclaration):
2431         * editing/EditingStyle.cpp:
2432
2433 2012-01-30  Michael Saboff  <msaboff@apple.com>
2434
2435         Dromaeo tests call parseSimpleLengthValue() on 8 bit strings
2436         https://bugs.webkit.org/show_bug.cgi?id=76649
2437
2438         Reviewed by Geoffrey Garen.
2439
2440         No functionality change, therefore no new tests.
2441
2442         Added 8 bit patch for parseSimpleLengthValue().
2443
2444         * css/CSSParser.cpp:
2445         (WebCore::parseSimpleLengthValue):
2446
2447 2012-01-30  Michael Saboff  <msaboff@apple.com>
2448
2449         WebCore decodeEscapeSequences unnecessarily converts 8 bit strings to 16 bit when decoding.
2450         https://bugs.webkit.org/show_bug.cgi?id=76648
2451
2452         Reviewed by Geoffrey Garen.
2453
2454         Using new overloaded append(String&, offset, length)  member to build result string.
2455         The new member properly handles 8/16 bit-ness of strings.
2456
2457         Functionality not changed, therefore no new tests.
2458
2459         * platform/text/DecodeEscapeSequences.h:
2460         (WebCore::decodeEscapeSequences):
2461
2462 2012-01-30  Pavel Feldman  <pfeldman@google.com>
2463
2464         Not reviewed: follow up to r105625, use proper event categoty in inspector frontend.
2465
2466         * inspector/front-end/BreakpointsSidebarPane.js:
2467         (WebInspector.EventListenerBreakpointsSidebarPane):
2468
2469 2012-01-30  Parag Radke  <nrqv63@motorola.com>
2470
2471         REGRESSION (r82580): Reproducible crash in CSSPrimitiveValue::computeLengthDouble
2472         https://bugs.webkit.org/show_bug.cgi?id=61989
2473
2474         Reviewed by Simon Fraser.
2475
2476         According to css3 specs when font-size is specified in 'rems' for an element implies the font-size
2477         of the root element. In this case as HTML element has a property 'display:none' and hence renderer 
2478         is NULL causes this crash.
2479
2480         Test: fast/css/fontsize-unit-rems-crash.html
2481
2482         * css/CSSPrimitiveValue.cpp:
2483         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2484         Added a null check for the root element's RenderStyle as it can be null in case of html has a property
2485         hidden or display:none.
2486
2487 2012-01-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2488
2489         [Qt] WKTR: Use a software rendering pipiline when running tests.
2490         https://bugs.webkit.org/show_bug.cgi?id=76708
2491
2492         Reviewed by Kenneth Rohde Christiansen.
2493
2494         * platform/graphics/qt/TextureMapperQt.cpp: Allow setting the context to null.
2495         (WebCore::TextureMapperQt::setGraphicsContext):
2496         * platform/graphics/qt/TextureMapperQt.h:
2497         (WebCore::TextureMapperQt::initialize):
2498
2499 2012-01-27  Enrica Casucci  <enrica@apple.com>
2500
2501         Remove all references to NSPasteboard objects from the Pasteboard
2502         class interface on Mac.
2503         https://bugs.webkit.org/show_bug.cgi?id=77261
2504         
2505         This is cleanup work needed as first step in the direction of
2506         removing access to NSPasteboard from the WebProcess.
2507         This way all access to the NSPasteboard object are internal to
2508         the class.
2509         Removed static methods taking NSPasteboard as paramenter and changed
2510         the constructor of the class to take the pasteboard name instead of
2511         the NSPasteboard object.
2512
2513         Reviewed by Alexey Proskuryakov.
2514
2515         No new tests. There is no change in behavior.
2516
2517         * editing/Editor.cpp: Removed ununsed private method writeSelectionToPasteboard.
2518         (WebCore):
2519         * editing/Editor.h: Ditto.
2520         (Editor):
2521         ():
2522         * editing/mac/EditorMac.mm:
2523         (WebCore::Editor::writeSelectionToPasteboard):
2524         (WebCore::Editor::readSelectionFromPasteboard):
2525         * platform/Pasteboard.h:
2526         (Pasteboard):
2527         * platform/mac/ClipboardMac.mm:
2528         (WebCore::ClipboardMac::writeRange):
2529         (WebCore::ClipboardMac::writePlainText):
2530         (WebCore::ClipboardMac::writeURL):
2531         * platform/mac/DragDataMac.mm:
2532         (WebCore::DragData::asPlainText):
2533         (WebCore::DragData::asURL):
2534         (WebCore::DragData::asFragment):
2535         * platform/mac/PasteboardMac.mm:
2536         (WebCore::Pasteboard::generalPasteboard):
2537         (WebCore::Pasteboard::Pasteboard):
2538         (WebCore::Pasteboard::writeSelectionForTypes): Added.
2539         (WebCore::Pasteboard::writePlainText):
2540         (WebCore::Pasteboard::writeSelection):
2541         (WebCore::Pasteboard::writeURLForTypes): Added.
2542         (WebCore::Pasteboard::writeURL):
2543         (WebCore::Pasteboard::writeImage):
2544
2545 2012-01-29  Antti Koivisto  <antti@apple.com>
2546
2547         Reduce non-CSSOM API of CSSStyleDeclaration
2548         https://bugs.webkit.org/show_bug.cgi?id=77299
2549
2550         Reviewed by Andreas Kling.
2551
2552         CSSStyleDeclaration should expose the CSSOM API only. Subclasses should expose the internal API only. 
2553         This will move us closer to being able to split the CSSOM API from the internal implementation.
2554         
2555         - Make CSSStyleDeclaration CSSOM functions virtual, internal functions non-virtual.
2556         - Move implementations to subclasses (CSSComputedStyleDeclaration, CSSMutableStyleDeclaration).
2557         - Make CSSOM functions in the subclasses private (making it harder to invoke them internally).
2558         - Switch a bunch of places to use internal API instead of CSSOM.
2559
2560         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2561         (WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
2562         (WebCore::V8CSSStyleDeclaration::namedPropertySetter):
2563         
2564             Switch to *Internal versions of the CSSOM functions.
2565         
2566         * css/CSSComputedStyleDeclaration.cpp:
2567         (WebCore):
2568         (WebCore::CSSComputedStyleDeclaration::length):
2569         (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
2570         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
2571         
2572             Move copyPropertiesInSet to subclasses, devirtualize.
2573             
2574         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2575         (WebCore::CSSComputedStyleDeclaration::getPropertyValue):
2576         (WebCore::CSSComputedStyleDeclaration::getPropertyPriority):
2577         (WebCore::CSSComputedStyleDeclaration::getPropertyShorthand):
2578         (WebCore::CSSComputedStyleDeclaration::isPropertyImplicit):
2579         (WebCore::CSSComputedStyleDeclaration::setProperty):
2580         (WebCore::CSSComputedStyleDeclaration::removeProperty):
2581         * css/CSSComputedStyleDeclaration.h:
2582         (CSSComputedStyleDeclaration):
2583         * css/CSSFontFaceRule.cpp:
2584         (WebCore::CSSFontFaceRule::cssText):
2585         * css/CSSMutableStyleDeclaration.cpp:
2586         (WebCore::CSSMutableStyleDeclaration::length):
2587         (WebCore::CSSMutableStyleDeclaration::asText):
2588         (WebCore::CSSMutableStyleDeclaration::cssText):
2589         (WebCore):
2590         (WebCore::CSSMutableStyleDeclaration::getPropertyCSSValue):
2591         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
2592         (WebCore::CSSMutableStyleDeclaration::getPropertyPriority):
2593         (WebCore::CSSMutableStyleDeclaration::getPropertyShorthand):
2594         (WebCore::CSSMutableStyleDeclaration::isPropertyImplicit):
2595         (WebCore::CSSMutableStyleDeclaration::setProperty):
2596         (WebCore::CSSMutableStyleDeclaration::removeProperty):
2597         (WebCore::CSSMutableStyleDeclaration::copyPropertiesInSet):
2598         
2599             Move copyPropertiesInSet to subclasses, devirtualize.
2600         
2601         (WebCore::CSSMutableStyleDeclaration::cssPropertyMatches):
2602         (WebCore::CSSMutableStyleDeclaration::removeEquivalentProperties):
2603         
2604             Move diff() to CSSMutableStyleDeclaration, rename to removeEquivalentProperties, switch to mutate
2605             this object instead of the argument object.
2606     
2607         * css/CSSMutableStyleDeclaration.h:
2608         (CSSMutableStyleDeclaration):
2609         (WebCore::CSSMutableStyleDeclaration::propertyCount):
2610         (WebCore::CSSMutableStyleDeclaration::isEmpty):
2611         (WebCore::CSSMutableStyleDeclaration::propertyAt):
2612         
2613             Expose properties and property count internally (iterator should be removed in favor of these).
2614         
2615         * css/CSSStyleDeclaration.cpp:
2616         (WebCore):
2617         * css/CSSStyleDeclaration.h:
2618         (CSSStyleDeclaration):
2619         (WebCore::CSSStyleDeclaration::getPropertyCSSValueInternal):
2620         (WebCore::CSSStyleDeclaration::getPropertyValueInternal):
2621         (WebCore::CSSStyleDeclaration::setPropertyInternal):
2622         
2623             Add *Internal versions of some CSSOM APIs to support some editing and bindings uses.
2624             These take propertyIDs instead of strings names.
2625
2626         * css/CSSStyleRule.cpp:
2627         (WebCore::CSSStyleRule::cssText):
2628         * css/CSSStyleSelector.cpp:
2629         (WebCore::leftToRightDeclaration):
2630         (WebCore::rightToLeftDeclaration):
2631         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2632         (WebCore::CSSStyleSelector::matchPageRulesForList):
2633         * css/WebKitCSSKeyframeRule.cpp:
2634         (WebCore::WebKitCSSKeyframeRule::cssText):
2635         * dom/StyledElement.cpp:
2636         (WebCore::StyledElement::updateStyleAttribute):
2637         * editing/ApplyStyleCommand.cpp:
2638         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
2639         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2640         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
2641         (WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
2642         (WebCore::ApplyStyleCommand::addBlockStyle):
2643         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
2644         * editing/EditingStyle.cpp:
2645         ():
2646         (WebCore::copyEditingProperties):
2647         (WebCore):
2648         (WebCore::propertyCSSValue):
2649         (WebCore::getRGBAFontColor):
2650         (WebCore::EditingStyle::overrideWithStyle):
2651         (WebCore::EditingStyle::removeStyleAddedByNode):
2652         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2653         (WebCore::EditingStyle::triStateOfStyle):
2654         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode):
2655         (WebCore::EditingStyle::prepareToApplyAt):
2656         (WebCore::removePropertiesInStyle):
2657         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2658         (WebCore::EditingStyle::removePropertiesInElementDefaultStyle):
2659         (WebCore::StyleChange::StyleChange):
2660         (WebCore::fontWeightIsBold):
2661         (WebCore::getPropertiesNotIn):
2662         (WebCore::getIdentifierValue):
2663         (WebCore::hasTransparentBackgroundColor):
2664         * editing/EditingStyle.h:
2665         
2666             Adapt to changes.
2667     
2668         (WebCore):
2669         * editing/ReplaceSelectionCommand.cpp:
2670         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
2671         (WebCore::handleStyleSpansBeforeInsertion):
2672         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
2673         * editing/mac/EditorMac.mm:
2674         (WebCore::styleForSelectionStart):
2675         * editing/markup.cpp:
2676         (WebCore::StyledMarkupAccumulator::appendStyleNodeOpenTag):
2677         (WebCore::StyledMarkupAccumulator::appendElement):
2678         * html/ImageDocument.cpp:
2679         (WebCore::ImageDocument::resizeImageToFit):
2680         (WebCore::ImageDocument::restoreImageSize):
2681         (WebCore::ImageDocument::windowSizeChanged):
2682         * html/canvas/CanvasRenderingContext2D.cpp:
2683         (WebCore::CanvasRenderingContext2D::setFont):
2684         * html/canvas/CanvasStyle.cpp:
2685         (WebCore::currentColor):
2686         * inspector/InspectorStyleSheet.cpp:
2687         (WebCore::InspectorStyleSheet::revalidateStyle):
2688         * page/PageSerializer.cpp:
2689         (WebCore::PageSerializer::retrieveResourcesForCSSDeclaration):
2690         * rendering/RenderTreeAsText.cpp:
2691         (WebCore::isEmptyOrUnstyledAppleStyleSpan):
2692         * svg/SVGStyledElement.cpp:
2693         (WebCore::SVGStyledElement::getPresentationAttribute):
2694
2695 2012-01-30  Pavel Feldman  <pfeldman@google.com>
2696
2697         Web Inspector: protocol validator should fail if one of response fields turns optional
2698         https://bugs.webkit.org/show_bug.cgi?id=76452
2699
2700         Reviewed by Yury Semikhatsky.
2701
2702         * inspector/Inspector-0.1.json:
2703         * inspector/Inspector.json:
2704         * inspector/generate-inspector-protocol-version:
2705         (compare_commands):
2706         (compare_events):
2707         (compare_params_list):
2708         (compare_types):
2709         (self_test):
2710
2711 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2712
2713         Web Inspector: keyboard navigation through comparison view in heap profiler should update retainers view
2714         https://bugs.webkit.org/show_bug.cgi?id=77326
2715
2716         Keyboard navigation in the detailed heap snapshot view now updates retainers view.
2717
2718         Reviewed by Pavel Feldman.
2719
2720         * inspector/front-end/DataGrid.js: Added SelectedNode/DeselectedNode events to DataGrid.
2721         (WebInspector.DataGridNode.prototype.select):
2722         (WebInspector.DataGridNode.prototype.deselect):
2723         * inspector/front-end/DetailedHeapshotView.js:
2724         (WebInspector.DetailedHeapshotView.prototype._selectionChanged):
2725         (WebInspector.DetailedHeapshotView.prototype._setRetainmentDataGridSource):
2726
2727 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2728
2729         Unreviewed. Fix inspector front-end compilation.
2730
2731         * inspector/front-end/RemoteObject.js:
2732         (WebInspector.RemoteObject):
2733         (WebInspector.RemoteObject.fromPayload):
2734
2735 2012-01-30  Roland Steiner  <rolandsteiner@chromium.org>
2736
2737         Node::parentOrHostElement(): Node::shadowHost() already returns an Element*
2738         https://bugs.webkit.org/show_bug.cgi?id=77332
2739
2740         Reviewed by Kent Tamura.
2741
2742         No new tests. (simple refactoring)
2743
2744         * dom/Node.cpp:
2745         (WebCore::Node::parentOrHostElement):
2746
2747 2012-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2748
2749         Unreviewed. Fix make distcheck.
2750
2751         * GNUmakefile.am: Add idl files in Source/WebCore/html/shadow/ to
2752         EXTRA_DIST.
2753         * GNUmakefile.list.am: Add missing files.
2754
2755 2012-01-27  Vsevolod Vlasov  <vsevik@chromium.org>
2756
2757         Web Inspector: TabbedEditorContainer should save open tabs.
2758         https://bugs.webkit.org/show_bug.cgi?id=76912
2759
2760         Reviewed by Pavel Feldman.
2761
2762         Test: inspector/tabbed-editors-history.html
2763
2764         * inspector/front-end/ScriptsPanel.js:
2765         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
2766         (WebInspector.ScriptsPanel.prototype._reset):
2767         (WebInspector.ScriptsPanel.prototype._showFile):
2768         (WebInspector.ScriptsPanel.prototype._updateExecutionLine):
2769         (WebInspector.ScriptsPanel.prototype._editorSelected):
2770         (WebInspector.EditorContainer.prototype.uiSourceCodeAdded):
2771         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.showFile):
2772         (WebInspector.ScriptsPanel.SingleFileEditorContainer.prototype.reset):
2773         * inspector/front-end/TabbedEditorContainer.js:
2774         (WebInspector.TabbedEditorContainer):
2775         (WebInspector.TabbedEditorContainer.prototype.showFile):
2776         (WebInspector.TabbedEditorContainer.prototype._editorClosedByUserAction):
2777         (WebInspector.TabbedEditorContainer.prototype._editorSelectedByUserAction):
2778         (WebInspector.TabbedEditorContainer.prototype._updateHistory.tabIdToURL):
2779         (WebInspector.TabbedEditorContainer.prototype._updateHistory):
2780         (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
2781         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
2782         (WebInspector.TabbedEditorContainer.prototype._tabSelected):
2783         (WebInspector.TabbedEditorContainer.prototype.reset):
2784         (WebInspector.TabbedEditorContainer.History):
2785         (WebInspector.TabbedEditorContainer.History.prototype.index):
2786         (WebInspector.TabbedEditorContainer.History.prototype.update):
2787         (WebInspector.TabbedEditorContainer.History.prototype.remove):
2788         (WebInspector.TabbedEditorContainer.History.prototype.save):
2789         * inspector/front-end/TabbedPane.js:
2790         (WebInspector.TabbedPane.prototype.appendTab):
2791         (WebInspector.TabbedPane.prototype.closeTab):
2792         (WebInspector.TabbedPane.prototype._innerCloseTab):
2793         (WebInspector.TabbedPane.prototype.closeAllTabs):
2794         (WebInspector.TabbedPane.prototype.lastOpenedTabIds):
2795         (WebInspector.TabbedPane.prototype._tabsSelectChanged):
2796
2797 2012-01-30  Alexander Pavlov  <apavlov@chromium.org>
2798
2799         Web Inspector: [Styles] Unable to paste and subsequently edit multiple properties in the Styles pane
2800         https://bugs.webkit.org/show_bug.cgi?id=77209
2801
2802         Reviewed by Pavel Feldman.
2803
2804         Check if the property value contains a ";" before kicking the freeflow text update.
2805
2806         * inspector/front-end/StylesSidebarPane.js:
2807         (WebInspector.StylePropertyTreeElement.prototype):
2808
2809 2012-01-30  Vsevolod Vlasov  <vsevik@chromium.org>
2810
2811         Web Inspector: Change Open Resource and Go To function shortcuts in scripts panel.
2812         https://bugs.webkit.org/show_bug.cgi?id=77321
2813
2814         Reviewed by Pavel Feldman.
2815
2816         * inspector/front-end/FilteredItemSelectionDialog.js:
2817         (WebInspector.JavaScriptOutlineDialog.createShortcut):
2818         (WebInspector.OpenResourceDialog.createShortcut):
2819         * inspector/front-end/ScriptsPanel.js:
2820
2821 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2822
2823         Web Inspector: hide function popover in heap snapshot view before navigating to the function definition
2824         https://bugs.webkit.org/show_bug.cgi?id=77330
2825
2826         Reviewed by Pavel Feldman.
2827
2828         * inspector/front-end/DetailedHeapshotView.js:
2829         (WebInspector.DetailedHeapshotView.prototype.willHide):
2830
2831 2012-01-30  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2832
2833         [BlackBerry] Credential backing store implementation
2834         https://bugs.webkit.org/show_bug.cgi?id=76761
2835
2836         Reviewed by Antonio Gomes.
2837
2838         Implemented credential backing store database and related
2839         operations in class CredentialBackingStore.
2840
2841         * platform/network/blackberry/CredentialBackingStore.cpp:
2842         (WebCore::CredentialBackingStore::~CredentialBackingStore):
2843         (WebCore::CredentialBackingStore::open):
2844         (WebCore::CredentialBackingStore::close):
2845         (WebCore::CredentialBackingStore::addLogin):
2846         (WebCore::CredentialBackingStore::updateLogin):
2847         (WebCore::CredentialBackingStore::hasLogin):
2848         (WebCore::CredentialBackingStore::getLogin):
2849         (WebCore::CredentialBackingStore::removeLogin):
2850         (WebCore::CredentialBackingStore::clear):
2851
2852 2012-01-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2853
2854         Only send resize events when layout size changes.
2855         https://bugs.webkit.org/show_bug.cgi?id=77212
2856
2857         When using fixed layout the widget size is the size of content, therefore
2858         resize checks must check against layoutsize and not widget size.
2859
2860         Reviewed by Kenneth Rohde Christiansen.
2861
2862         Needs to be manual tests because the test framework does not currently
2863         support testing fixed layout.
2864
2865         Tests: ManualTests/resize-events.html
2866
2867         * page/FrameView.cpp:
2868         (WebCore::FrameView::layout):
2869         (WebCore::FrameView::performPostLayoutTasks):
2870
2871 2012-01-30  Pavel Feldman  <pfeldman@google.com>
2872
2873         Web Inspector: TimelinePanel does not respect InspectorFrontendHost.canSaveAs
2874         https://bugs.webkit.org/show_bug.cgi?id=77301
2875
2876         Reviewed by Vsevolod Vlasov.
2877
2878         * inspector/front-end/TimelinePanel.js:
2879         (WebInspector.TimelinePanel.prototype._registerShortcuts):
2880
2881 2012-01-30  Nikolas Zimmermann  <nzimmermann@rim.com>
2882
2883         Not reviewed. Fix Clang build for real after r106218.
2884
2885         * inspector/CodeGeneratorInspector.py:
2886         (Generator.go): Add virtual destructor to the ABCs.
2887
2888 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
2889
2890         No need to keep anonymous RenderBlock in DETAILS.
2891         https://bugs.webkit.org/show_bug.cgi?id=77322
2892
2893         Reviewed by Hajime Morita.
2894
2895         Anonymous RenderBlock of DETAILS element was not squashed when detaching them.
2896         However, it should be removed.
2897
2898         No new tests. Should be covered by existing tests.
2899
2900         * rendering/RenderBlock.cpp:
2901         (WebCore::canMergeContiguousAnonymousBlocks):
2902
2903 2012-01-30  Zoltan Herczeg  <zherczeg@webkit.org>
2904
2905         Custom written CSS lexer
2906         https://bugs.webkit.org/show_bug.cgi?id=70107
2907
2908         Rubber Stamped by Csaba Osztrogonác.
2909
2910         Do not advance pointer at the end of input, just
2911         keep returning with END_TOKEN.
2912
2913         * css/CSSParser.cpp:
2914         (WebCore::CSSParser::lex):
2915
2916 2012-01-30  Shinya Kawanaka  <shinyak@google.com>
2917
2918         The query selector for HTMLContentElement should follow the shadow dom spec.
2919         https://bugs.webkit.org/show_bug.cgi?id=75946
2920
2921         Reviewed by Hajime Morita.
2922
2923         Checks the query selector of HTMLContentElement is valid.
2924         If not valid, the selector won't match anything, and shows fallback element.
2925
2926         Test: fast/dom/shadow/content-selector-query.html
2927
2928         * html/shadow/ContentSelectorQuery.cpp:
2929         (WebCore::ContentSelectorQuery::ContentSelectorQuery):
2930         (WebCore::ContentSelectorQuery::isValidSelector):
2931         (WebCore::ContentSelectorQuery::matches):
2932           When a select query is not valid, any element won't be matched.
2933         (WebCore::validateSubSelector):
2934         (WebCore::validateSelector):
2935         (WebCore::ContentSelectorQuery::validateSelectorList):
2936           Validate selectors.
2937         * html/shadow/ContentSelectorQuery.h:
2938         * html/shadow/HTMLContentElement.cpp:
2939         (WebCore::HTMLContentElement::isSelectValid):
2940           Returns true if select attribute is valid.
2941         * html/shadow/HTMLContentElement.h:
2942         * testing/Internals.cpp:
2943         (WebCore::Internals::isValidContentSelect):
2944         * testing/Internals.h:
2945         * testing/Internals.idl:
2946
2947 2012-01-30  Hans Wennborg  <hans@chromium.org>
2948
2949         Unreviewed, rolling out r106219.
2950         http://trac.webkit.org/changeset/106219
2951         https://bugs.webkit.org/show_bug.cgi?id=77083
2952
2953         This broke Chromium's test_shell.
2954
2955         * GNUmakefile.list.am:
2956         * Target.pri:
2957         * WebCore.gypi:
2958         * WebCore.vcproj/WebCore.vcproj:
2959         * WebCore.xcodeproj/project.pbxproj:
2960         * platform/mock/SpeechInputClientMock.cpp: Added.
2961         (WebCore):
2962         (WebCore::SpeechInputClientMock::SpeechInputClientMock):
2963         (WebCore::SpeechInputClientMock::setListener):
2964         (WebCore::SpeechInputClientMock::startRecognition):
2965         (WebCore::SpeechInputClientMock::stopRecording):
2966         (WebCore::SpeechInputClientMock::cancelRecognition):
2967         (WebCore::SpeechInputClientMock::addRecognitionResult):
2968         (WebCore::SpeechInputClientMock::clearResults):
2969         (WebCore::SpeechInputClientMock::timerFired):
2970         * platform/mock/SpeechInputClientMock.h: Added.
2971         (WebCore):
2972         (SpeechInputClientMock):
2973
2974 2012-01-30  Yury Semikhatsky  <yurys@chromium.org>
2975
2976         Unreviewed. Clang build fix after r106218
2977
2978         * inspector/CodeGeneratorInspector.py:
2979
2980 2012-01-30  ChangSeok Oh  <shivamidow@gmail.com>
2981
2982         Make GraphicsContext3DPrivate of GTK port shareable.
2983         https://bugs.webkit.org/show_bug.cgi?id=77296
2984
2985         Reviewed by Eric Seidel.
2986
2987         GraphicsContext3DPrivate.cpp/h of GTK port look shareable with another port
2988         using glx backend for WebGL. For example, EFL port.
2989         Moved GraphicsContext3DPrivate.cpp and its header into Source/WebCore/platform/graphics/glx.
2990
2991         No new tests required, because of no new feature.
2992
2993         * GNUmakefile.am:
2994         * GNUmakefile.list.am:
2995         * platform/graphics/glx/GraphicsContext3DPrivate.cpp: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.cpp.
2996         (sharedDisplay):
2997         (WebCore):
2998         (WebCore::activeGraphicsContexts):
2999         (WebCore::GraphicsContext3DPrivate::addActiveGraphicsContext):
3000         (WebCore::GraphicsContext3DPrivate::removeActiveGraphicsContext):
3001         (WebCore::GraphicsContext3DPrivate::cleanupActiveContextsAtExit):
3002         (WebCore::GraphicsContext3DPrivate::create):
3003         (WebCore::GraphicsContext3DPrivate::createPbufferContext):
3004         (WebCore::GraphicsContext3DPrivate::createPixmapContext):
3005         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3006         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3007         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
3008         * platform/graphics/glx/GraphicsContext3DPrivate.h: Renamed from Source/WebCore/platform/graphics/gtk/GraphicsContext3DPrivate.h.
3009         (WebCore):
3010         (GraphicsContext3DPrivate):
3011
3012 2012-01-26  Hans Wennborg  <hans@chromium.org>
3013
3014         Speech Input: move MockSpeechInputClient into Chromium DumpRenderTree implementation
3015         https://bugs.webkit.org/show_bug.cgi?id=77083
3016
3017         Reviewed by Darin Fisher.
3018
3019         Remove SpeechInputClientMock. The mock is moving to the DumpRenderTree
3020         implementation.
3021
3022         No new tests, just refactoring.
3023
3024         * GNUmakefile.list.am:
3025         * Target.pri:
3026         * WebCore.gypi:
3027         * WebCore.vcproj/WebCore.vcproj:
3028         * WebCore.xcodeproj/project.pbxproj:
3029         * platform/mock/SpeechInputClientMock.cpp: Removed.
3030         * platform/mock/SpeechInputClientMock.h: Removed.
3031
3032 2012-01-30  Peter Rybin  <peter.rybin@gmail.com>
3033
3034         Web Inspector: CodeGeneratorInspector.py: clean InspectorBackendDispatcher.h
3035         https://bugs.webkit.org/show_bug.cgi?id=77062
3036
3037         Reviewed by Yury Semikhatsky.
3038
3039         Code generator is changed. Now it generates InspectorBackendDispatcher
3040         as an abstract class so that implementation details could be fully
3041         hidden in .cpp file in a separate 'impl' class. This should make .h
3042         file more clear.
3043         Also new formal interfaces to domain agents are generated. This is an
3044         improvement over the current case when interfaces to agents are
3045         definen implicitly at calling sites.
3046
3047         * inspector/CodeGeneratorInspector.py:
3048         (RawTypes):
3049         (RawTypes.OutputPassModel):
3050         (RawTypes.OutputPassModel.ByPointer):
3051         (RawTypes.OutputPassModel.ByPointer.get_argument_prefix):
3052         (RawTypes.OutputPassModel.ByPointer.get_parameter_type_suffix):
3053         (RawTypes.OutputPassModel.ByReference):
3054         (RawTypes.OutputPassModel.ByReference.get_argument_prefix):
3055         (RawTypes.OutputPassModel.ByReference.get_parameter_type_suffix):
3056         (RawTypes.BaseType.is_event_param_check_optional):
3057         (RawTypes.String):
3058         (RawTypes.String.get_output_pass_model):
3059         (RawTypes.String.is_heavy_value):
3060         (RawTypes.Int):
3061         (RawTypes.Int.get_output_pass_model):
3062         (RawTypes.Int.is_heavy_value):
3063         (RawTypes.Number):
3064         (RawTypes.Number.get_output_pass_model):
3065         (RawTypes.Number.is_heavy_value):
3066         (RawTypes.Bool.get_c_param_type):
3067         (RawTypes.Bool):
3068         (RawTypes.Bool.get_output_pass_model):
3069         (RawTypes.Bool.is_heavy_value):
3070         (RawTypes.Object):
3071         (RawTypes.Object.get_output_pass_model):
3072         (RawTypes.Object.is_heavy_value):
3073         (RawTypes.Any.get_c_initializer):
3074         (RawTypes.Any):
3075         (RawTypes.Any.get_output_pass_model):
3076         (RawTypes.Any.is_heavy_value):
3077         (RawTypes.Array):
3078         (RawTypes.Array.get_output_pass_model):
3079         (RawTypes.Array.is_heavy_value):
3080         (InspectorBackendDispatcherImpl):
3081         (void):
3082         (Generator):
3083         (Generator.go):
3084         (Generator.process_command):
3085         * inspector/InspectorController.cpp:
3086         (WebCore::InspectorController::connectFrontend):
3087         * inspector/WorkerInspectorController.cpp:
3088         (WebCore::WorkerInspectorController::connectFrontend):
3089
3090 2012-01-29  Zoltan Herczeg  <zherczeg@webkit.org>
3091
3092         Custom written CSS lexer
3093         https://bugs.webkit.org/show_bug.cgi?id=70107
3094
3095         Reviewed by Antti Koivisto and Oliver Hunt.
3096
3097         This patch replaces the flex based CSS lexer to a
3098         new, custom written one. The new code is more
3099         than 2 times faster according to oprofile and CPU
3100         cycle counters.
3101
3102         The code structure is quite straightforward: it choose
3103         the possible token group based on the first character
3104         and employ utility functions to parse the longer than
3105         one character long ones. Most of the utilities are inline
3106         to make the lexer fast.
3107
3108         All build systems updated. Including removing the flex support.
3109
3110         Existing tests cover this feature.
3111
3112         * CMakeLists.txt:
3113         * DerivedSources.make:
3114         * DerivedSources.pri:
3115         * GNUmakefile.am:
3116         * GNUmakefile.list.am:
3117         * WebCore.gyp/WebCore.gyp:
3118         * WebCore.gyp/scripts/action_maketokenizer.py: Removed.
3119         * WebCore.gypi:
3120         * WebCore.vcproj/WebCore.vcproj:
3121         * WebCore.xcodeproj/project.pbxproj:
3122         * css/CSSParser.cpp:
3123         (WebCore::CSSParser::CSSParser):
3124         (WebCore::CSSParser::setupParser):
3125         (WebCore::parseSimpleLengthValue):
3126         (WebCore::mightBeRGBA):
3127         (WebCore::mightBeRGB):
3128         ():
3129         (WebCore::isCSSLetter):
3130         (WebCore):
3131         (WebCore::isCSSEscape):
3132         (WebCore::isURILetter):
3133         (WebCore::isIdentifierStartAfterDash):
3134         (WebCore::isEqualToCSSIdentifier):
3135         (WebCore::checkAndSkipEscape):
3136         (WebCore::skipWhiteSpace):
3137         (WebCore::CSSParser::isIdentifierStart):
3138         (WebCore::CSSParser::checkAndSkipString):
3139         (WebCore::CSSParser::parseEscape):
3140         (WebCore::CSSParser::parseIdentifier):
3141         (WebCore::CSSParser::parseString):
3142         (WebCore::CSSParser::parseURI):
3143         (WebCore::CSSParser::parseUnicodeRange):
3144         (WebCore::CSSParser::parseNthChild):
3145         (WebCore::CSSParser::parseNthChildExtra):
3146         (WebCore::CSSParser::detectFunctionTypeToken):
3147         (WebCore::CSSParser::detectMediaQueryToken):
3148         (WebCore::CSSParser::detectNumberToken):
3149         (WebCore::CSSParser::detectDashToken):
3150         (WebCore::CSSParser::detectAtToken):
3151         (WebCore::CSSParser::lex):
3152         (WebCore::CSSParser::markSelectorListStart):
3153         (WebCore::CSSParser::markSelectorListEnd):
3154         (WebCore::CSSParser::markRuleBodyStart):
3155         (WebCore::CSSParser::markRuleBodyEnd):
3156         (WebCore::CSSParser::markPropertyStart):
3157         (WebCore::CSSParser::markPropertyEnd):
3158         * css/CSSParser.h:
3159         (WebCore::CSSParser::token):
3160         (CSSParser):
3161         ():
3162         * css/tokenizer.flex: Removed.
3163
3164 2012-01-29  Dale Curtis  <dalecurtis@chromium.org>
3165
3166         Prepare WebCore.gyp for ffmpeg source transition.
3167         https://bugs.webkit.org/show_bug.cgi?id=77254
3168
3169         We're migrating our ffmpeg repo from a set of patches living on top of
3170         a tarball to an actual git fork of upstream.  The paths have changed
3171         slightly.
3172
3173         In order to not break the current build, we'll keep both paths around
3174         until the transition is complete.  Afterward the 'patched-ffmpeg' path
3175         will be removed.
3176
3177         Reviewed by Tony Chang.
3178
3179         No new tests. GYP change, if it doesn't work, nothing will compile.
3180
3181         * WebCore.gyp/WebCore.gyp:
3182
3183 2012-01-29  Hayato Ito  <hayato@chromium.org>
3184
3185         Add a ShadowRoot constructor as 'WebKitShadowRootConstructor', enabled by SHADOW_DOM flag.
3186         https://bugs.webkit.org/show_bug.cgi?id=76354
3187
3188         Reviewed by Hajime Morita.
3189
3190         We use vendor-prefixed name, 'WebKitShadowRoot', instead of 'ShadowRoot'
3191         since this is a feature under development.
3192
3193         * dom/ShadowRoot.cpp:
3194         (WebCore::ShadowRoot::create):
3195         (WebCore):
3196         * dom/ShadowRoot.h:
3197         (WebCore):
3198         (ShadowRoot):
3199         * dom/ShadowRoot.idl:
3200         * page/DOMWindow.idl:
3201
3202 2012-01-29  Noel Gordon  <noel.gordon@gmail.com>
3203
3204         [chromium] Use decoding swizzle only on libjpeg-turbo 1.1.90+
3205         https://bugs.webkit.org/show_bug.cgi?id=74286
3206
3207         Reviewed by Kenneth Russell.
3208
3209         No new tests. Covered by many existing tests: in particular 
3210             fast/images/*, fast/canvas/*,
3211             tables/mozilla/bugs/bug29314.html
3212             tables/mozilla/bugs/bug13169.html
3213             tables/mozilla/bugs/bug10565.html
3214             tables/mozilla/bugs/bug11026.html
3215             fast/repaint/backgroundSizeRepaint.html
3216             fast/repaint/block-layout-inline-children-replaced.html
3217             fast/repaint/clipped-relative.html
3218             fast/repaint/selected-replaced.html
3219             tables/mozilla/bugs/bug12908-1.html
3220
3221         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3222         (rgbOutputColorSpace): Swizzle decode iff libjpeg-turbo is r732 or above.
3223
3224 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3225
3226         Unreviewed, rolling out r105999.
3227         http://trac.webkit.org/changeset/105999
3228         https://bugs.webkit.org/show_bug.cgi?id=77304
3229
3230         Validating that this caused a performance regression in page
3231         load tests. (Requested by leviw on #webkit).
3232
3233         * dom/NamedNodeMap.cpp:
3234         * dom/NamedNodeMap.h:
3235         (NamedNodeMap):
3236         * dom/StyledElement.cpp:
3237         (WebCore::StyledElement::updateStyleAttribute):
3238         (WebCore::StyledElement::createInlineStyleDecl):
3239         (WebCore):
3240         (WebCore::StyledElement::destroyInlineStyleDecl):
3241         (WebCore::StyledElement::ensureInlineStyleDecl):
3242         (WebCore::StyledElement::style):
3243         (WebCore::StyledElement::addSubresourceAttributeURLs):
3244         * dom/StyledElement.h:
3245         (WebCore::StyledElement::inlineStyleDecl):
3246         (StyledElement):
3247
3248 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
3249
3250         Unreviewed, rolling out r106109.
3251         http://trac.webkit.org/changeset/106109
3252         https://bugs.webkit.org/show_bug.cgi?id=77302
3253
3254         It made tests crash (Requested by Ossy_weekend on #webkit).
3255
3256         * platform/graphics/qt/TextureMapperQt.cpp:
3257         (WebCore::TextureMapperQt::setGraphicsContext):
3258         * platform/graphics/qt/TextureMapperQt.h:
3259         (WebCore::TextureMapperQt::initialize):
3260
3261 2012-01-28  Alexander Færøy  <ahf@0x90.dk>
3262
3263         [Qt] Remove references to CSSBorderImageValue.h in Target.pri
3264         https://bugs.webkit.org/show_bug.cgi?id=77277
3265
3266         Reviewed by Antonio Gomes.
3267
3268         CSSBorderImageValue.h was removed in r105502.
3269
3270         * Target.pri:
3271
3272 2012-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
3273
3274         REGRESSION (r94016): Element with visibility:hidden but visible descendant may not be properly repainted
3275         https://bugs.webkit.org/show_bug.cgi?id=76126
3276
3277         Reviewed by Simon Fraser.
3278
3279         Tests: fast/layers/scroll-no-visible-content-but-visible-descendant-expected.html
3280                fast/layers/scroll-no-visible-content-but-visible-descendant.html
3281
3282         The optimization missed out that if the current layer does not have some visible content
3283         (m_hasVisibleContent is false), a descendant could totally be visible and would need to
3284         have its repaint rectangles recomputed.
3285
3286         * rendering/RenderLayer.cpp:
3287         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3288         Bail out only if the layer doesn't have visible content AND no visible descendants.
3289
3290 2012-01-27  Chris Marrin  <cmarrin@apple.com>
3291
3292         Get rid of TransformOperationList
3293         https://bugs.webkit.org/show_bug.cgi?id=77249
3294
3295         Reviewed by Dan Bernstein.
3296
3297         Changed fetchTransformOperationList to validateTransformOperations and got rid of separately generated list
3298         of transform operations. These are not needed, they are already available in the keyframe lists and they
3299         make it more difficult to add support for hardware animated filters. No behavior changes.
3300
3301
3302         * platform/graphics/GraphicsLayer.cpp:
3303         (WebCore::GraphicsLayer::validateTransformOperations):
3304         * platform/graphics/GraphicsLayer.h:
3305         (GraphicsLayer):
3306         * platform/graphics/ca/GraphicsLayerCA.cpp:
3307         (WebCore::GraphicsLayerCA::appendToUncommittedAnimations):
3308         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3309         * platform/graphics/ca/GraphicsLayerCA.h:
3310         ():
3311         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
3312         (WebCore::GraphicsLayerTextureMapper::addAnimation):
3313         * platform/graphics/texmap/TextureMapperAnimation.cpp:
3314         (WebCore::applyTransformAnimation):
3315         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
3316         (WebCore::TextureMapperAnimation::applyInternal):
3317         * platform/graphics/texmap/TextureMapperAnimation.h:
3318         (TextureMapperAnimation):
3319
3320 2012-01-27  Raymond Toy  <rtoy@google.com>
3321
3322         AudioPannerNode::setPanningModel() does not update m_panningModel properly
3323         https://bugs.webkit.org/show_bug.cgi?id=66830
3324
3325         Reviewed by Kenneth Russell.
3326
3327         Test: webaudio/panner-set-model.html
3328
3329         * webaudio/AudioPannerNode.cpp:
3330         (WebCore::AudioPannerNode::setPanningModel):  Update
3331         m_panningModel appropriately.  Also silently do nothing if the
3332         model is invalid.
3333
3334 2012-01-27  Chris Rogers  <crogers@google.com>
3335
3336         HRTFPanner could have high-quality mode for smoother transitions
3337         https://bugs.webkit.org/show_bug.cgi?id=76470
3338
3339         Reviewed by Kenneth Russell.
3340
3341         * platform/audio/HRTFPanner.cpp:
3342         (WebCore):
3343         (WebCore::HRTFPanner::HRTFPanner):
3344         (WebCore::HRTFPanner::reset):
3345         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
3346         (WebCore::HRTFPanner::pan):
3347         * platform/audio/HRTFPanner.h:
3348         (HRTFPanner):
3349         ():
3350
3351 2012-01-27  Mike Lawther  <mikelawther@chromium.org>
3352
3353         CSS calc parsing stage
3354         https://bugs.webkit.org/show_bug.cgi?id=57082
3355
3356         This is the parsing stage of calc. The expressions are evaluated and 
3357         expression trees are generated. CSS values are not created yet - that
3358         will happen in a subsequent commit. 
3359
3360         Reviewed by David Hyatt.
3361
3362         No functional change - covered by existing tests in LayoutTests/css3/calc.
3363
3364         * CMakeLists.txt:
3365         * GNUmakefile.list.am:
3366         * Target.pri:
3367         * WebCore.gypi:
3368         * WebCore.vcproj/WebCore.vcproj:
3369         * WebCore.xcodeproj/project.pbxproj:
3370         * css/CSSCalculationValue.cpp: Added.
3371         (WebCore):
3372         (WebCore::unitCategory):
3373         (WebCore::CSSCalcValue::customCssText):
3374         (WebCore::CSSCalcExpressionNode::~CSSCalcExpressionNode):
3375         (CSSCalcPrimitiveValue):
3376         (WebCore::CSSCalcPrimitiveValue::create):
3377         (WebCore::CSSCalcPrimitiveValue::cssText):
3378         (WebCore::CSSCalcPrimitiveValue::CSSCalcPrimitiveValue):
3379         ():
3380         (CSSCalcBinaryOperation):
3381         (WebCore::CSSCalcBinaryOperation::create):
3382         (WebCore::CSSCalcBinaryOperation::CSSCalcBinaryOperation):
3383         (WebCore::checkDepthAndIndex):
3384         (CSSCalcExpressionNodeParser):
3385         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
3386         (Value):
3387         (WebCore::CSSCalcExpressionNodeParser::operatorValue):
3388         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3389         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
3390         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
3391         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
3392         (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
3393         (WebCore::CSSCalcValue::create):
3394         * css/CSSCalculationValue.h: Added.
3395         (WebCore):
3396         ():
3397         (CSSCalcExpressionNode):
3398         (WebCore::CSSCalcExpressionNode::category):
3399         (WebCore::CSSCalcExpressionNode::isInt):
3400         (WebCore::CSSCalcExpressionNode::isZero):
3401         (WebCore::CSSCalcExpressionNode::CSSCalcExpressionNode):
3402         (CSSCalcValue):
3403         (WebCore::CSSCalcValue::category):
3404         (WebCore::CSSCalcValue::isInt):
3405         (WebCore::CSSCalcValue::CSSCalcValue):
3406         * css/CSSParser.cpp:
3407         (WebCore::CSSParser::validCalculationUnit):
3408         (WebCore):
3409         (WebCore::CSSParser::validUnit):
3410         (WebCore::CSSParser::createPrimitiveNumericValue):
3411         (WebCore::CSSParser::parseValidPrimitive):
3412         (WebCore::CSSParser::parseValue):
3413         (WebCore::CSSParser::parseFillPositionComponent):
3414         (WebCore::CSSParser::parsedDouble):
3415         (WebCore::CSSParser::isCalculation):
3416         (WebCore::CSSParser::colorIntFromValue):
3417         (WebCore::CSSParser::parseColorParameters):
3418         (WebCore::CSSParser::parseHSLParameters):
3419         (WebCore::ShadowParseContext::ShadowParseContext):
3420         (WebCore::ShadowParseContext::commitLength):
3421         (WebCore::ShadowParseContext::commitStyle):
3422         (ShadowParseContext):
3423         (WebCore::CSSParser::parseShadow):
3424         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
3425         (WebCore::BorderImageSliceParseContext::commitNumber):
3426         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice):
3427         (BorderImageSliceParseContext):
3428         (WebCore::CSSParser::parseBorderImageSlice):
3429         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext):
3430         (WebCore::BorderImageQuadParseContext::commitNumber):
3431         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad):
3432         (BorderImageQuadParseContext):
3433         (WebCore::CSSParser::parseBorderImageQuad):
3434         (WebCore::CSSParser::parseCalculation):
3435         * css/CSSParser.h:
3436         ():
3437         (CSSParser):
3438         * css/CSSValue.cpp:
3439         (WebCore::CSSValue::cssText):
3440         (WebCore::CSSValue::destroy):
3441         * css/CSSValue.h:
3442         (WebCore::CSSValue::isCalculationValue):
3443         ():
3444         * css/SVGCSSParser.cpp:
3445         (WebCore::CSSParser::parseSVGValue):
3446         * platform/CalculationValue.cpp: Added.
3447         (WebCore):
3448         * platform/CalculationValue.h: Added.
3449         (WebCore):
3450         ():
3451
3452 2012-01-27  Anders Carlsson  <andersca@apple.com>
3453
3454         WebTileLayers should honor the acceleratesDrawing flag
3455         https://bugs.webkit.org/show_bug.cgi?id=77242
3456         <rdar://problem/10622128>
3457
3458         Reviewed by Dan Bernstein.
3459
3460         * platform/graphics/ca/mac/TileCache.h:
3461         (WebCore::TileCache::acceleratesDrawing):
3462         Add getter.
3463
3464         * platform/graphics/ca/mac/TileCache.mm:
3465         (WebCore::TileCache::TileCache):
3466         Initialize m_acceleratesDrawing.
3467
3468         (WebCore::TileCache::setAcceleratesDrawing):
3469         Set m_acceleratesDrawing and go through all tile layers and update the flag.
3470
3471         (WebCore::TileCache::createTileLayer):
3472         Call -[CALayer setAcceleratesDrawing:] on the newly created layer.
3473
3474         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3475         (-[WebTileCacheLayer setAcceleratesDrawing:]):
3476         (-[WebTileCacheLayer acceleratesDrawing]):
3477         Call through to the TileCache object.
3478
3479 2012-01-27  Raymond Toy  <rtoy@google.com>
3480
3481         Round time to sample frame
3482         https://bugs.webkit.org/show_bug.cgi?id=76659
3483
3484         Three major changes:
3485
3486         1. Modify timeToSampleFrame to round the time to the sample frame
3487         and add support for Visual Studio to round the time in the same
3488         way as on gcc. (The issue is that Visual Studio uses x87
3489         instructions with 80-bit floats.)  This makes Visual Studio more
3490         consistent with the results with gcc.
3491
3492         2. Change the current time variable from keeping time in seconds
3493         to keeping time in sample frames.  This minimizes rounding except
3494         when needed for the Javascript API.
3495
3496         3. Update AudioBufferSourceNode::process to use samples (instead
3497         of time) as much as possible to reduce round-off effects.
3498
3499         Reviewed by Kenneth Russell.
3500
3501         Tests: Added note-grain-on test to exercise precise
3502         timing. Existing tests (gain and audiobuffersource-playbackrate)
3503         also cover some of these changes, and the equalpower panner test is
3504         modified to enable the tests for the offset of the impulses.
3505
3506         * platform/audio/AudioUtilities.cpp:
3507         (WebCore::AudioUtilities::timeToSampleFrame): Moved from
3508         AudioParamTimeLine and slightly modified, and updated to round
3509         operations consistently.  Add special flags for Visual Studio to
3510       &