Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(975)

Issue 979033003: Move code from StyleResolver to ViewportStyleResolver. (Closed)

Created:
5 years, 9 months ago by rune
Modified:
5 years, 9 months ago
CC:
aandrey+blink_chromium.org, darktears, apavlov+blink_chromium.org, arv+blink, blink-reviews, blink-reviews-css, blink-reviews-style_chromium.org, caseq+blink_chromium.org, Inactive, devtools-reviews_chromium.org, dglazkov+blink, ed+blinkwatch_opera.com, eustas+blink_chromium.org, kenneth.christiansen, kozyatinskiy+blink_chromium.org, loislo+blink_chromium.org, lushnikov+blink_chromium.org, malch+blink_chromium.org, pfeldman+blink_chromium.org, rwlbuis, sergeyv+blink_chromium.org, vivekg_samsung, vivekg, yurys+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Move code from StyleResolver to ViewportStyleResolver. @viewport rule collection is moved to ViewportStyleResolver. This removes the last StyleResolver dependency from ScopedStyleResolver. Removed an unnecessary null check for m_document in ViewportStyleResolver which should always be non-null. Moved resetAuthorStyle() to skip the call when the ScopedStyleResolver is deleted immediately afterwards. Load the viewport UA style into CSSDefaultStyleSheets once instead of parsing it from InspectorPageAgent every time it is applied. Also apply the UA style from ViewportStyleResolver instead of the InspectorPageAgent to remove resolver dependencies from the inspector code. The application of the UA style is controlled by a setting instead of and OS(ANDROID) #if in Blink. The introduction of the setting is a two-sided patch with this CL and [1]. [2] removes the OS(ANDROID) check completely. [1] https://codereview.chromium.org/989963002/ [2] https://codereview.chromium.org/989973002/ Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191747

Patch Set 1 #

Total comments: 5

Patch Set 2 : Use a setting for mobile style for @viewport #

Patch Set 3 : Removed stray method declaration #

Total comments: 4

Patch Set 4 : Addressed review issues #

Patch Set 5 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -67 lines) Patch
M Source/core/css/CSSDefaultStyleSheets.h View 1 3 chunks +3 lines, -4 lines 0 comments Download
M Source/core/css/CSSDefaultStyleSheets.cpp View 1 5 chunks +13 lines, -12 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.h View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/resolver/ScopedStyleResolver.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 4 chunks +5 lines, -21 lines 0 comments Download
M Source/core/css/resolver/ViewportStyleResolver.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/ViewportStyleResolver.cpp View 1 2 3 4 3 chunks +25 lines, -3 lines 0 comments Download
M Source/core/frame/Settings.in View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/frame/SettingsDelegate.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/inspector/InspectorInstrumentation.idl View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.h View 1 2 3 4 4 chunks +4 lines, -3 lines 0 comments Download
M Source/core/inspector/InspectorPageAgent.cpp View 1 2 3 4 5 chunks +12 lines, -15 lines 0 comments Download
M Source/core/page/Page.cpp View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M Source/web/WebDevToolsAgentImpl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebDevToolsAgentImpl.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M Source/web/WebSettingsImpl.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebSettingsImpl.cpp View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M public/web/WebSettings.h View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 23 (8 generated)
rune
5 years, 9 months ago (2015-03-05 10:38:54 UTC) #2
dgozman
https://codereview.chromium.org/979033003/diff/1/Source/core/css/CSSDefaultStyleSheets.h File Source/core/css/CSSDefaultStyleSheets.h (right): https://codereview.chromium.org/979033003/diff/1/Source/core/css/CSSDefaultStyleSheets.h#newcode42 Source/core/css/CSSDefaultStyleSheets.h:42: RuleSet* defaultViewportOverrideStyle() { return m_defaultViewportOverrideStyle.get(); } I'd rename this ...
5 years, 9 months ago (2015-03-05 10:55:53 UTC) #3
rune
https://codereview.chromium.org/979033003/diff/1/Source/core/css/CSSDefaultStyleSheets.h File Source/core/css/CSSDefaultStyleSheets.h (right): https://codereview.chromium.org/979033003/diff/1/Source/core/css/CSSDefaultStyleSheets.h#newcode42 Source/core/css/CSSDefaultStyleSheets.h:42: RuleSet* defaultViewportOverrideStyle() { return m_defaultViewportOverrideStyle.get(); } On 2015/03/05 10:55:53, ...
5 years, 9 months ago (2015-03-05 12:11:50 UTC) #5
dgozman
> https://codereview.chromium.org/979033003/diff/1/Source/core/inspector/InspectorPageAgent.cpp > File Source/core/inspector/InspectorPageAgent.cpp (right): > > https://codereview.chromium.org/979033003/diff/1/Source/core/inspector/InspectorPageAgent.cpp#newcode1455 > Source/core/inspector/InspectorPageAgent.cpp:1455: return > m_deviceMetricsOverridden && ...
5 years, 9 months ago (2015-03-05 12:47:12 UTC) #6
aelias_OOO_until_Jul13
https://codereview.chromium.org/979033003/diff/1/Source/core/inspector/InspectorPageAgent.cpp File Source/core/inspector/InspectorPageAgent.cpp (right): https://codereview.chromium.org/979033003/diff/1/Source/core/inspector/InspectorPageAgent.cpp#newcode1455 Source/core/inspector/InspectorPageAgent.cpp:1455: return m_deviceMetricsOverridden && m_emulateMobileEnabled; On 2015/03/05 12:11:50, rune wrote: ...
5 years, 9 months ago (2015-03-05 21:07:28 UTC) #7
rune
On 2015/03/05 21:07:28, aelias wrote: > Yes, I was already thinking myself that that #if ...
5 years, 9 months ago (2015-03-08 00:44:36 UTC) #8
dgozman
inspector lgtm https://codereview.chromium.org/979033003/diff/40001/Source/core/css/resolver/ViewportStyleResolver.cpp File Source/core/css/resolver/ViewportStyleResolver.cpp (right): https://codereview.chromium.org/979033003/diff/40001/Source/core/css/resolver/ViewportStyleResolver.cpp#newcode45 Source/core/css/resolver/ViewportStyleResolver.cpp:45: #include "core/inspector/InspectorInstrumentation.h" Not used anymore. https://codereview.chromium.org/979033003/diff/40001/Source/web/WebSettingsImpl.cpp File ...
5 years, 9 months ago (2015-03-08 06:32:11 UTC) #9
rune
https://codereview.chromium.org/979033003/diff/40001/Source/core/css/resolver/ViewportStyleResolver.cpp File Source/core/css/resolver/ViewportStyleResolver.cpp (right): https://codereview.chromium.org/979033003/diff/40001/Source/core/css/resolver/ViewportStyleResolver.cpp#newcode45 Source/core/css/resolver/ViewportStyleResolver.cpp:45: #include "core/inspector/InspectorInstrumentation.h" On 2015/03/08 06:32:11, dgozman wrote: > Not ...
5 years, 9 months ago (2015-03-08 19:15:27 UTC) #10
aelias_OOO_until_Jul13
lgtm
5 years, 9 months ago (2015-03-10 17:12:07 UTC) #11
rune
@jochen: public/ and Source/web
5 years, 9 months ago (2015-03-11 09:14:49 UTC) #13
jochen (gone - plz use gerrit)
lgtm
5 years, 9 months ago (2015-03-11 16:03:44 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/979033003/60001
5 years, 9 months ago (2015-03-11 17:58:32 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: android_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/android_blink_compile_dbg/builds/31126)
5 years, 9 months ago (2015-03-11 18:03:38 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/979033003/80001
5 years, 9 months ago (2015-03-11 23:33:04 UTC) #22
commit-bot: I haz the power
5 years, 9 months ago (2015-03-12 02:29:22 UTC) #23
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=191747

Powered by Google App Engine
This is Rietveld 408576698